/* ============================================
   COMPREHENSIVE MEDIA QUERIES
   Responsive Design for All Devices
   ============================================ */

/* ============================================
   SPECIFIC FIX FOR 360x800 RESOLUTION
   Common mobile phone size
   ============================================ */
@media screen and (max-width: 360px) {
  /* Navigation */
  #hamburger-nav {
    padding: 0.5rem 0.75rem;
    min-height: 55px;
    display: flex !important;
  }

  .logo {
    font-size: 1.1rem;
  }

  /* Hamburger Icon - Ensure visibility */
  .hamburger-menu {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .hamburger-icon {
    display: flex !important;
    height: 26px;
    width: 30px;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    align-items: center;
  }

  .hamburger-icon span {
    display: block !important;
    height: 2.5px;
    background-color: #f1f5f9 !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out !important;
    position: absolute !important;
    left: 0;
    right: 0;
    transform-origin: center center;
  }

  .hamburger-icon span:first-child {
    top: 0 !important;
  }

  .hamburger-icon span:nth-child(2) {
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .hamburger-icon span:last-child {
    bottom: 0 !important;
  }

  /* Hamburger Icon X Animation for 360px screens */
  .hamburger-icon.open span:first-child {
    top: 50% !important;
    transform: translateY(-50%) rotate(45deg) !important;
  }

  .hamburger-icon.open span:nth-child(2) {
    opacity: 0 !important;
    transform: translateY(-50%) scaleX(0) !important;
    visibility: hidden !important;
  }

  .hamburger-icon.open span:last-child {
    top: 50% !important;
    transform: translateY(-50%) rotate(-45deg) !important;
  }

  /* Sections */
  section {
    padding: 2rem 0.75rem;
  }

  /* Profile Section */
  #profile {
    padding: 1.5rem 0.75rem;
    gap: 1.25rem;
  }

  .section__pic-container {
    height: 200px;
    width: 200px;
  }

  .section__pic-container .profile-pic {
    width: 200px;
    height: 200px;
  }

  .title {
    font-size: 1.6rem;
  }

  .section__text__p2 {
    font-size: 1.1rem;
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 0.875rem;
    font-size: 0.8rem;
  }

  /* Social Icons */
  .icon {
    height: 1.5rem;
    width: 1.5rem;
  }

  /* About Section */
  #about {
    padding: 2rem 0.75rem;
  }

  .details-container {
    padding: 0.875rem;
  }

  /* Experience Section */
  #experience {
    padding: 2rem 0.75rem;
  }

  .experience-sub-title {
    font-size: 1.15rem;
  }

  /* Projects Section */
  #projects {
    padding: 2rem 0.75rem;
  }

  .project-img {
    height: 140px;
  }

  /* Prevent horizontal scroll */
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative;
  }

  /* Navigation - prevent overflow */
  nav,
  #desktop-nav,
  #hamburger-nav {
    max-width: 100vw;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  /* Ensure all sections respect viewport width */
  section {
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    box-sizing: border-box;
  }

  /* Prevent all containers from overflowing */
  .section-container,
  .about-containers,
  .experience-details-container,
  .contact-info-upper-container,
  .article-container {
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  /* Footer */
  footer {
    max-width: 100vw;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  /* Ensure images don't cause overflow */
  img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }

  /* Code blocks should wrap */
  .code-block,
  pre,
  code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
    box-sizing: border-box;
  }

  /* Blogs Section */
  #blogs {
    padding: 2rem 0.75rem;
    max-width: 100vw;
    overflow-x: hidden;
  }

  #blogs .section__text__p1 {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }

  #blogs .title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .blogs-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0;
    max-width: 100%;
    width: 100%;
  }

  .blog-card {
    width: 100%;
    margin: 0;
    border-radius: var(--radius-lg);
  }

  .blog-image {
    height: 140px;
    width: 100%;
  }

  .blog-image img {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .blog-content {
    padding: 1rem;
    gap: 0.75rem;
  }

  .blog-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .blog-category {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }

  .blog-date {
    font-size: 0.7rem;
  }

  .blog-title {
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .blog-description {
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .blog-footer {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    margin-top: 0.75rem;
  }

  .blog-read-time {
    font-size: 0.7rem;
    text-align: left;
  }

  .blog-btn {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.75rem;
    margin-top: 0;
    text-align: center;
    align-self: stretch;
  }

  /* View All Blogs button */
  #blogs .btn-container,
  #blogs div[style*="text-align: center"] {
    margin-top: 1.5rem;
    padding: 0;
  }

  #blogs .project-btn,
  #blogs .btn {
    width: 100%;
    min-width: auto;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }

  /* Table Styles for Mobile - Scrollable wrapper approach */
  table,
  .blog-content table {
    width: 100% !important;
    max-width: 100% !important;
    display: table;
    font-size: 0.7rem;
    margin: 1rem 0;
    border-collapse: collapse;
    table-layout: auto;
  }

  /* Wrap tables in blog content for scrolling */
  .blog-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
  }

  .blog-content table thead,
  .blog-content table tbody,
  .blog-content table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  table thead th,
  .blog-content table thead th {
    padding: 0.5rem 0.4rem;
    font-size: 0.65rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    min-width: 60px;
  }

  table tbody td,
  .blog-content table tbody td {
    padding: 0.5rem 0.4rem;
    font-size: 0.65rem;
    word-wrap: break-word;
    white-space: normal;
    max-width: 120px;
  }

  /* Table wrapper for scrollable tables */
  .table-wrapper,
  .blog-content > table,
  .blog-content table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
    margin: 1rem 0;
    max-width: 100%;
  }

  .table-wrapper table,
  .blog-content > table table,
  .blog-content table table {
    width: max-content;
    min-width: 100%;
    display: table;
  }

  /* Contact Section */
  #contact {
    padding: 2rem 0.75rem;
  }

  .contact-info-upper-container {
    padding: 1rem;
  }

  .contact-info-container {
    padding: 0.75rem;
  }

  /* Footer */
  footer {
    padding: 1.25rem 0.75rem;
  }
}

/* ============================================
   EXTRA SMALL DEVICES (Mobile Portrait)
   320px - 480px
   ============================================ */
@media screen and (max-width: 480px) {
  /* Navigation */
  #desktop-nav {
    display: none;
  }

  #hamburger-nav {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    height: auto;
    min-height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
  }

  .logo {
    font-size: 1.2rem;
    font-weight: 700;
  }

  /* Hamburger Icon - Make it clearly visible */
  .hamburger-menu {
    position: relative;
    display: inline-block !important;
    z-index: 1001;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .hamburger-icon {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    height: 28px;
    width: 32px;
    cursor: pointer;
    padding: 0;
    background: transparent;
    border: none;
    z-index: 1002;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    align-items: center;
  }

  .hamburger-icon span {
    display: block !important;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary) !important;
    border-radius: 2px;
    transition: all 0.3s ease-in-out !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: absolute !important;
    left: 0;
    right: 0;
    z-index: 1003;
    transform-origin: center center;
  }

  .hamburger-icon span:first-child {
    top: 0 !important;
    margin-bottom: 0 !important;
  }

  .hamburger-icon span:nth-child(2) {
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-bottom: 0 !important;
  }

  .hamburger-icon span:last-child {
    bottom: 0 !important;
  }

  /* Ensure hamburger icon is visible on dark background */
  #hamburger-nav .hamburger-icon span {
    background-color: #f1f5f9 !important;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
  }

  /* Hamburger Icon X Animation for Mobile */
  .hamburger-icon.open span:first-child {
    top: 50% !important;
    transform: translateY(-50%) rotate(45deg) !important;
  }

  .hamburger-icon.open span:nth-child(2) {
    opacity: 0 !important;
    transform: translateY(-50%) scaleX(0) !important;
    visibility: hidden !important;
  }

  .hamburger-icon.open span:last-child {
    top: 50% !important;
    transform: translateY(-50%) rotate(-45deg) !important;
  }

  /* Reset transforms when not open */
  .hamburger-icon span:first-child {
    transition: all 0.3s ease-in-out !important;
  }

  .hamburger-icon span:nth-child(2) {
    opacity: 1 !important;
    transform: translateY(-50%) scaleX(1) !important;
    visibility: visible !important;
    transition: all 0.3s ease-in-out !important;
  }

  .hamburger-icon span:last-child {
    transition: all 0.3s ease-in-out !important;
  }

  .menu-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100vw;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
  }

  .menu-links.open {
    max-height: 400px;
  }

  .menu-links a {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.3s ease;
  }

  .menu-links a:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
  }

  /* Sections */
  section {
    padding: 2.5rem 1rem;
  }

  /* Profile Section */
  #profile {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1rem;
    min-height: auto;
    text-align: center;
  }

  .section__pic-container {
    height: 220px;
    width: 220px;
    margin: 0 auto;
  }

  .section__pic-container .profile-pic {
    width: 220px;
    height: 220px;
    border: 2px solid var(--border-color);
  }

  .section__text {
    width: 100%;
    padding: 0;
  }

  .section__text__p1 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .section__text__p2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
  }

  .title {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
  }

  /* Buttons */
  .btn-container {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1rem;
  }

  .btn {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
    min-width: auto;
    border-radius: var(--radius-full);
  }

  /* Social Icons */
  #socials-container {
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .icon {
    height: 1.75rem;
    width: 1.75rem;
  }

  /* About Section */
  #about {
    padding: 2.5rem 1rem;
  }

  #about .section-container {
    flex-direction: column;
  }

  #about .text-container {
    width: 100%;
    padding: 0;
    text-align: center;
  }

  #about .text-container p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 1rem;
  }

  .about-containers {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .details-container {
    padding: 1rem;
    width: 100%;
    margin: 0;
  }

  .details-container h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .details-container p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .details-container .icon {
    height: 1.5rem;
    width: 1.5rem;
    margin-bottom: 0.5rem;
  }

  /* Experience Section */
  #experience {
    padding: 2.5rem 1rem;
  }

  .experience-sub-title {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .experience-details-container .about-containers {
    flex-direction: column;
    gap: 1.5rem;
  }

  .experience-details-container .details-container {
    padding: 1.25rem 1rem;
  }

  .article-container {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  article {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
  }

  article .icon {
    height: 1.25rem;
    width: 1.25rem;
    flex-shrink: 0;
  }

  article h3 {
    font-size: 0.95rem;
    margin: 0;
  }

  article p {
    font-size: 0.85rem;
    margin: 0;
  }

  /* Projects Section */
  #projects {
    padding: 2.5rem 1rem;
  }

  #projects .about-containers {
    flex-direction: column;
    gap: 1.5rem;
  }

  .project-card {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    margin: 0;
  }

  .project-img {
    height: 160px;
    width: 100%;
  }

  .project-title {
    font-size: 1rem;
    margin: 0.75rem 0;
  }

  .project-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    margin-top: 0.5rem;
  }

  /* Blogs Section */
  #blogs {
    padding: 2.5rem 1rem;
  }

  .blogs-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
  }

  .blog-card {
    width: 100%;
    margin: 0;
  }

  .blog-image {
    height: 160px;
  }

  .blog-content {
    padding: 1rem;
  }

  .blog-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .blog-description {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .blog-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    margin-top: 0.75rem;
  }

  .blog-meta {
    margin-bottom: 0.5rem;
  }

  .blog-category {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }

  .blog-date {
    font-size: 0.75rem;
  }

  /* Contact Section */
  #contact {
    padding: 2.5rem 1rem;
    min-height: auto;
  }

  .contact-info-upper-container {
    flex-direction: column;
    padding: 1.25rem;
    gap: 0.75rem;
    margin: 1.5rem auto;
    width: 100%;
    max-width: 100%;
  }

  .contact-info-container {
    flex-direction: row;
    text-align: left;
    gap: 0.75rem;
    padding: 0.875rem;
    width: 100%;
    justify-content: flex-start;
  }

  .contact-info-container p {
    font-size: 0.9rem;
    margin: 0;
  }

  .contact-info-container a {
    font-size: 0.9rem;
    word-break: break-word;
  }

  .contact-icon {
    height: 1.75rem;
    width: 1.75rem;
    flex-shrink: 0;
  }

  /* Footer */
  footer {
    height: auto;
    padding: 1.5rem 1rem;
    margin: 0;
  }

  footer nav {
    margin-bottom: 1rem;
  }

  footer .nav-links {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0;
  }

  footer .nav-links a {
    font-size: 0.85rem;
    padding: 0.25rem 0;
  }

  footer p {
    font-size: 0.75rem;
    margin: 0;
  }

  /* Arrow */
  .arrow {
    display: none;
  }

  /* Section titles consistency */
  .section__text__p1 {
    text-align: center;
  }

  /* Ensure proper spacing between sections */
  section + section {
    margin-top: 0;
  }
}

/* ============================================
   SMALL DEVICES (Mobile Landscape / Small Tablets)
   481px - 768px
   ============================================ */
@media screen and (min-width: 481px) and (max-width: 768px) {
  /* Navigation */
  #desktop-nav {
    display: none;
  }

  #hamburger-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    height: auto;
    min-height: 12vh;
  }

  .logo {
    font-size: 1.5rem;
  }

  .menu-links {
    width: 100vw;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
  }

  .menu-links a {
    padding: 1rem 2rem;
    font-size: 1.3rem;
    border-bottom: 1px solid var(--border-color);
  }

  /* Hamburger Icon X Animation for Small Devices */
  .hamburger-icon.open span:first-child {
    top: 50% !important;
    transform: translateY(-50%) rotate(45deg) !important;
  }

  .hamburger-icon.open span:nth-child(2) {
    opacity: 0 !important;
    transform: translateY(-50%) scaleX(0) !important;
    visibility: hidden !important;
  }

  .hamburger-icon.open span:last-child {
    top: 50% !important;
    transform: translateY(-50%) rotate(-45deg) !important;
  }

  /* Sections */
  section {
    padding: 4rem 2rem;
  }

  /* Profile Section */
  #profile {
    flex-direction: column;
    gap: 3rem;
    padding: 4rem 2rem;
    min-height: auto;
  }

  .section__pic-container {
    height: 300px;
    width: 300px;
  }

  .section__pic-container .profile-pic {
    width: 300px;
    height: 300px;
  }

  .section__text__p1 {
    font-size: 1rem;
  }

  .section__text__p2 {
    font-size: 1.5rem;
  }

  .title {
    font-size: 2.5rem;
  }

  /* Buttons */
  .btn-container {
    gap: 1rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }

  /* Social Icons */
  #socials-container {
    gap: 1.25rem;
  }

  .icon {
    height: 2.25rem;
  }

  /* About Section */
  #about {
    padding: 4rem 2rem;
  }

  #about .text-container {
    width: 100%;
  }

  .about-containers {
    flex-direction: column;
    gap: 2rem;
  }

  .details-container {
    padding: 1.5rem;
  }

  /* Experience Section */
  #experience {
    padding: 4rem 2rem;
  }

  .experience-sub-title {
    font-size: 1.5rem;
    text-align: center;
  }

  .about-containers {
    flex-direction: column;
  }

  .article-container {
    gap: 2rem;
    justify-content: center;
  }

  article {
    width: auto;
    min-width: 200px;
  }

  /* Projects Section */
  #projects {
    padding: 4rem 2rem;
  }

  .project-card {
    max-width: 100%;
    padding: 1.5rem;
  }

  .project-img {
    height: 220px;
  }

  /* Blogs Section */
  #blogs {
    padding: 4rem 2rem;
  }

  .blogs-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .blog-image {
    height: 200px;
  }

  /* Contact Section */
  #contact {
    padding: 4rem 2rem;
  }

  .contact-info-upper-container {
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
  }

  .contact-info-container {
    padding: 1.25rem;
  }

  /* Footer */
  footer {
    padding: 2rem;
  }

  footer .nav-links {
    gap: 2rem;
  }

  /* Arrow */
  .arrow {
    display: none;
  }
}

/* ============================================
   MEDIUM DEVICES (Tablets)
   769px - 1024px
   ============================================ */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  /* Navigation */
  nav {
    padding: 0 2rem;
    height: 15vh;
  }

  .nav-links {
    gap: 1.5rem;
    font-size: 1rem;
  }

  .logo {
    font-size: 1.6rem;
  }

  /* Sections */
  section {
    padding: 5rem 3rem;
  }

  /* Profile Section */
  #profile {
    gap: 4rem;
    padding: 5rem 3rem;
  }

  .section__pic-container {
    height: 350px;
    width: 350px;
  }

  .section__pic-container .profile-pic {
    width: 350px;
    height: 350px;
  }

  .section__text__p1 {
    font-size: 1.05rem;
  }

  .section__text__p2 {
    font-size: 1.6rem;
  }

  .title {
    font-size: 3rem;
  }

  /* About Section */
  #about {
    padding: 5rem 3rem;
  }

  #about .text-container {
    width: 85%;
  }

  .about-containers {
    gap: 1.5rem;
  }

  /* Experience Section */
  #experience {
    padding: 5rem 3rem;
  }

  .experience-sub-title {
    font-size: 1.6rem;
  }

  .article-container {
    gap: 2rem;
  }

  /* Projects Section */
  #projects {
    padding: 5rem 3rem;
  }

  .project-card {
    max-width: 450px;
  }

  .project-img {
    height: 240px;
  }

  /* Blogs Section */
  #blogs {
    padding: 5rem 3rem;
  }

  .blogs-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Contact Section */
  #contact {
    padding: 5rem 3rem;
  }

  .contact-info-upper-container {
    flex-wrap: wrap;
    justify-content: center;
    padding: 2rem;
  }

  /* Footer */
  footer {
    padding: 2rem 3rem;
  }

  footer .nav-links {
    gap: 2.5rem;
  }

  /* Arrow */
  .arrow {
    right: -3rem;
    padding: 0.875rem;
  }
}

/* ============================================
   LARGE DEVICES (Small Desktops / Laptops)
   1025px - 1200px
   ============================================ */
@media screen and (min-width: 1025px) and (max-width: 1200px) {
  /* Navigation */
  nav {
    padding: 0 3rem;
  }

  .nav-links {
    gap: 1.75rem;
    font-size: 1.05rem;
  }

  /* Sections */
  section {
    padding: 5rem 5rem;
  }

  /* Profile Section */
  #profile {
    gap: 4.5rem;
    padding: 6rem 5rem;
  }

  .section__pic-container {
    height: 380px;
    width: 380px;
  }

  .section__pic-container .profile-pic {
    width: 380px;
    height: 380px;
  }

  .title {
    font-size: 3.25rem;
  }

  /* About Section */
  #about {
    padding: 6rem 5rem;
  }

  #about .text-container {
    width: 75%;
  }

  /* Experience Section */
  #experience {
    padding: 6rem 5rem;
  }

  /* Projects Section */
  #projects {
    padding: 6rem 5rem;
  }

  .project-card {
    max-width: 500px;
  }

  /* Blogs Section */
  #blogs {
    padding: 6rem 5rem;
  }

  .blogs-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  /* Contact Section */
  #contact {
    padding: 6rem 5rem;
  }

  /* Arrow */
  .arrow {
    right: -4rem;
  }
}

/* ============================================
   EXTRA LARGE DEVICES (Large Desktops)
   1201px and above
   ============================================ */
@media screen and (min-width: 1201px) {
  /* Navigation */
  nav {
    padding: 0 4rem;
  }

  .nav-links {
    gap: 2rem;
    font-size: 1.1rem;
  }

  /* Sections */
  section {
    padding: 6rem 10rem;
  }

  /* Profile Section */
  #profile {
    gap: 5rem;
    padding: 6rem 10rem;
  }

  /* All other sections maintain default desktop styles */
}

/* ============================================
   LANDSCAPE ORIENTATION (Mobile & Tablet)
   ============================================ */
@media screen and (max-width: 1024px) and (orientation: landscape) {
  /* Profile Section */
  #profile {
    min-height: auto;
    padding: 3rem 2rem;
  }

  .section__pic-container {
    height: 250px;
    width: 250px;
  }

  .section__pic-container .profile-pic {
    width: 250px;
    height: 250px;
  }

  .title {
    font-size: 2.5rem;
  }

  /* Navigation */
  nav {
    height: 12vh;
  }

  #hamburger-nav {
    min-height: 12vh;
  }

  /* Sections */
  section {
    padding: 3rem 2rem;
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch target sizes */
  .btn {
    min-height: 44px;
    padding: 1rem 1.5rem;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
  }

  .icon {
    min-width: 44px;
    min-height: 44px;
  }

  .contact-icon {
    min-width: 44px;
    min-height: 44px;
  }

  /* Remove hover effects on touch devices */
  .btn:hover,
  .icon:hover,
  .contact-icon:hover,
  .project-card:hover,
  .blog-card:hover,
  .details-container:hover {
    transform: none;
  }

  /* Add active states instead */
  .btn:active {
    transform: scale(0.98);
  }
}

/* ============================================
   HIGH DPI / RETINA DISPLAYS
   ============================================ */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
  /* Ensure crisp rendering on high DPI displays */
  .section__pic-container img,
  .project-img,
  .blog-image img,
  .icon {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  nav,
  #hamburger-nav,
  footer,
  .btn-container,
  #socials-container,
  .arrow {
    display: none;
  }

  section {
    padding: 2rem;
    page-break-inside: avoid;
  }

  .title {
    color: #000;
    background: none;
    -webkit-text-fill-color: initial;
  }

  body {
    background: #fff;
    color: #000;
  }

  .project-card,
  .blog-card,
  .details-container {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   DARK MODE PREFERENCE (if needed for future light mode)
   ============================================ */
@media (prefers-color-scheme: dark) {
  /* Already using dark theme, so no changes needed */
  /* This can be used if you add a light mode toggle in the future */
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE DESIGN
   ============================================ */
@media screen and (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media screen and (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ============================================
   CONTAINER MAX-WIDTHS FOR BETTER READABILITY
   ============================================ */
@media screen and (min-width: 1400px) {
  .section-container,
  .experience-details-container,
  .blogs-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }
}

