/* External CSS file to handle styling */

/* Fonts are loaded via <link> in HTML for better performance */

/* Modern minimalist design with effects */

/* Unified theme (dark-forward for all system modes) */
:root {
    color-scheme: dark;
    --background-color: #070c14;
    --text-color: #ecf2fb;
    --primary-color: #f4f8ff;
    --secondary-color: #9fb0c7;
    --accent-color: #8fb2df;
    --button-bg: #8fb2df;
    --button-text: #ffffff;
    --link-color: #a9c7eb;
    --link-hover: #c5daf3;
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    --default-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    --backdrop-blur: blur(15px);
    --glass-bg: linear-gradient(135deg, rgba(19,30,45,0.72), rgba(12,20,33,0.58));
    --glass-border: 1px solid rgba(166,188,216,0.22);
    --surface-solid: rgba(15, 25, 39, 0.68);
    --metal-midnight: #020712;
    --metal-titanium: #97aac5;
    --metal-silver: #c5d2e1;
    --metal-rim: linear-gradient(115deg, rgba(197,210,225,0.52), rgba(80,96,119,0.24) 48%, rgba(197,210,225,0.50));
    --metal-sheen-soft: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(197,210,225,0.26) 44%, rgba(255,255,255,0) 82%);
    --glass-inner: inset 0 1px 0 rgba(255,255,255,0.06);
    --glass-outer: 0 12px 40px rgba(0, 0, 0, 0.55);
    --depth-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
    --spring: cubic-bezier(0.2, 0.8, 0.2, 1.2);
    --sheen: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.45) 40%, rgba(255,255,255,0) 80%);
    /* Glassy gradient variables used throughout */
    --glassy1: rgba(255,255,255,0.14);
    --glassy2: rgba(255,255,255,0.08);
    --glassy3: rgba(255,255,255,0.04);
    --glassy-opacity: 0.12;
    /* Hover helpers for glassy elements */
    --glass-hover-bg: linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0.12));
    --hover-ring-color: rgba(51,153,255,0.55);
    --hover-glow: 0 12px 28px rgba(0,0,0,0.45), inset 0 1px 1px rgba(255,255,255,0.06), 0 0 0 2px var(--hover-ring-color);
}

/* Prevent width + padding/border overflow across breakpoints */
*,
*::before,
*::after {
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -56px;
    left: 12px;
    z-index: 2000;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(190, 208, 229, 0.72);
    background: rgba(9, 15, 24, 0.96);
    color: #f4f8ff;
    text-decoration: none;
    font-weight: 700;
    transition: top 0.16s ease;
}

.skip-link:focus-visible {
    top: 12px;
}

/* Diploma CTA spacing to match other CTAs */
.diploma .btn {
    margin: 12px auto 0; /* center horizontally */
    display: inline-flex;
}

/* Center diploma section content */
.diploma { text-align: center; }
.diploma p { margin: 6px 0; }
.diploma p:first-of-type { font-weight: 600; }

/* Diploma card styling */
.diploma-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
}
.diploma-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 12px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-color);
    background: rgba(255,255,255,0.28);
    border: 1px solid rgba(169, 187, 209, 0.44);
}
.credential-details {
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8px 14px;
    margin: 10px auto 16px;
}
.credential-details dt {
    color: var(--secondary-color);
    font-weight: 600;
}
.credential-details dd {
    margin: 0;
}
.credential-details .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.credential-details .id-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.copy-id-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.22);
    color: var(--text-color);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
}
.copy-id-btn.icon-only { padding: 6px; }
.copy-id-btn svg { display: block; }
.copy-id-btn:focus-visible { outline: 2px solid var(--hover-ring-color); outline-offset: 2px; border-color: rgba(255,255,255,0.65); }
.copy-id-btn:hover {
    background: var(--glass-hover-bg);
    box-shadow: 0 8px 22px rgba(31,38,135,0.20);
}
.copy-id-btn:active {
    transform: translateY(1px) scale(0.99);
}
.verification-note {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}
.diploma-card .btn {
    margin-top: 6px;
}

@media (max-width: 480px) {
    .credential-details { grid-template-columns: 1fr; }
    .diploma-badge { font-size: 0.8rem; }
    .copy-id-btn { padding: 6px 9px; font-size: 0.82rem; }
}

/* Glass-like effect for sections */
/* Optimized glassy flow keyframes */
@keyframes glassFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animate backgrounds only on interaction to save power */
.glass:hover::before, .glass:focus-within::before,
.hero:hover::before, .hero:focus-within::before,
.card:hover::before, .card:focus-within::before,
.floating-tab-bar:hover::before { animation: glassFlow 20s linear infinite; }

/* Safe optimizations and consolidations */

.glass, .hero { box-shadow: var(--default-box-shadow); }

/* Removed redundant z-index and pointer-events */
.glass::before, .hero::before {
    z-index: -1;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .glass::before, .hero::before, .card::before, .spinner { animation: none !important; }
}

.glass {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow:
      0 2px 8px rgba(31, 38, 135, 0.12),
      0 8px 32px rgba(31, 38, 135, 0.18),
      0 1.5px 7px rgba(255,255,255,0.08) inset;
    backdrop-filter: blur(8px) saturate(108%);
    -webkit-backdrop-filter: blur(8px) saturate(108%);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s cubic-bezier(.22,.61,.36,1), transform 0.2s cubic-bezier(.22,.61,.36,1);
    isolation: isolate;
}
/* Subtle glassy underlay for glass */
.glass::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1; /* behind content to avoid affecting text AA */
    pointer-events: none;
    opacity: var(--glassy-opacity);
    background: linear-gradient(120deg, var(--glassy1) 0%, var(--glassy2) 45%, var(--glassy3) 100%);
    background-size: 200% 200%;
    will-change: background-position;
  }

/* keep content above the liquid layer */
.glass > * { position: relative; z-index: 1; }
.glass:hover, .glass:focus-within {
    transform: scale(1.012) translateY(-2px) perspective(600px) rotateX(1deg);
    box-shadow:
      0 6px 24px rgba(31, 38, 135, 0.22),
      0 16px 48px rgba(31, 38, 135, 0.20),
      0 2.5px 14px rgba(255,255,255,0.11) inset;
}

/* Ensure specific elements are adjusted for dark mode */
/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(120deg, rgba(255,255,255,0.19) 0%, rgba(255,255,255,0.11) 100%);
    backdrop-filter: blur(10px) saturate(110%);
    -webkit-backdrop-filter: blur(10px) saturate(110%);
    color: var(--text-color);
    border-radius: 20px;
    box-shadow:
      0 4px 16px rgba(31, 38, 135, 0.15),
      0 14px 48px rgba(31, 38, 135, 0.19),
      0 1.5px 7px rgba(255,255,255,0.08) inset;
    position: relative;
    transition: box-shadow 0.2s cubic-bezier(.22,.61,.36,1), transform 0.2s cubic-bezier(.22,.61,.36,1);
    overflow: hidden;
    isolation: isolate;
}
/* Dark mode variant not needed for neutral hero gradient */
/* Glassy underlay for hero */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1; /* behind content and ::after */
    pointer-events: none;
    opacity: var(--glassy-opacity);
    background: linear-gradient(118deg, var(--glassy1) 0%, var(--glassy2) 50%, var(--glassy3) 100%);
    background-size: 200% 200%;
    will-change: background-position;
}
.hero::after {
    /* Subtle faint gradient overlay for depth */
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,0.13) 10%, rgba(255,255,255,0.06) 80%);
    z-index: 0;
}
.hero > * {
    position: relative;
    z-index: 1;
}
.hero:hover {
    transform: scale(1.008) translateY(-1px) perspective(600px) rotateX(0.8deg);
    box-shadow:
      0 10px 40px rgba(31, 38, 135, 0.22),
      0 24px 64px rgba(31, 38, 135, 0.22),
      0 2.5px 16px rgba(255,255,255,0.12) inset;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in-out;
    color: var(--text-color);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    animation: fadeIn 1.5s ease-in-out;
    color: var(--text-color);
}


/* Floating Tab Bar (Top Position) */
.floating-tab-bar {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: min(920px, calc(100% - 20px));
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(24, 35, 50, 0.78), rgba(13, 22, 35, 0.64));
    border: 1px solid rgba(173, 192, 216, 0.44);
    backdrop-filter: blur(10px) saturate(125%);
    -webkit-backdrop-filter: blur(10px) saturate(125%);
    box-shadow: 0 12px 30px rgba(6, 12, 20, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    padding: 8px 12px;
    z-index: 1000;
    border-radius: 999px;
    transition: box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    isolation: isolate;
}

/* Subtle glassy flow behind the top bar */
.floating-tab-bar::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1; /* keep it behind links */
  pointer-events: none;
  opacity: 0.08;
  background: linear-gradient(120deg, var(--glassy1) 0%, var(--glassy2) 45%, var(--glassy3) 100%);
  background-size: 200% 200%;
    /* animation disabled by default for performance; enabled on hover below */
  will-change: background-position;
}

.floating-tab-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(173, 192, 216, 0.36);
    background: none;
    pointer-events: none;
    opacity: 0.52;
}

@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
    .floating-tab-bar::after {
        border: 1px solid transparent;
        background: var(--metal-rim) border-box;
        -webkit-mask:
            linear-gradient(#000 0 0) padding-box,
            linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
    }
}

 
.floating-tab-bar:hover {
    box-shadow: 0 14px 34px rgba(8, 15, 24, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.floating-tab-bar .tab-link {
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    padding: 9px 16px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    position: relative;
    border: 1px solid transparent;
    background: transparent;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    border-radius: 999px; /* Rounded pill corners */
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .18s var(--spring), box-shadow .22s ease;
}

.floating-tab-bar .tab-link:hover {
  background: linear-gradient(145deg, rgba(174, 196, 220, 0.24), rgba(111, 136, 169, 0.14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 16px rgba(8, 15, 24, 0.35);
  transform: translateY(-1px);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  border: 1px solid rgba(187, 203, 224, 0.58);
  border-radius: 999px;
  color: var(--primary-color);
}

/* On touch devices, avoid scaling to prevent layout shifts */
@media (hover: none) and (pointer: coarse) {
    .floating-tab-bar .tab-link:hover,
    .floating-tab-bar .tab-link:active,
    .floating-tab-bar .tab-link:focus {
    transform: none !important;
    background: var(--glass-hover-bg);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: 0 6px 16px rgba(31,38,135,0.18), inset 0 1px 1px rgba(255,255,255,0.45);
    }
}

/* Active Tab Styling */
.floating-tab-bar .tab-link.active {
    background: linear-gradient(140deg, rgba(163, 191, 224, 0.38), rgba(106, 132, 167, 0.28));
    color: var(--primary-color);
    font-weight: 700;
    transform: none;
    border-color: rgba(190, 208, 229, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px rgba(6, 12, 22, 0.36);
}

/* Mobile-only bottom navigation dock (hidden by default) */
.mobile-tab-dock {
    display: none;
}

/* Desktop nav: less "mobile tab bar", more clean site navigation */
@media (min-width: 769px) {
    .floating-tab-bar {
        position: sticky;
        top: 0;
        left: 0;
        right: auto;
        transform: none;
        width: 100%;
        border-radius: 0 0 16px 16px;
        border-left: 0;
        border-right: 0;
        gap: clamp(12px, 2vw, 24px);
        padding: 10px 18px;
        background: linear-gradient(180deg, rgba(10, 16, 26, 0.84), rgba(10, 16, 26, 0.68));
        backdrop-filter: blur(14px) saturate(135%);
        -webkit-backdrop-filter: blur(14px) saturate(135%);
        box-shadow: 0 12px 26px rgba(6, 10, 16, 0.28), inset 0 1px 0 rgba(255,255,255,0.08);
    }

    .floating-tab-bar .tab-link {
        min-height: 44px;
        padding: 8px 2px;
        border-radius: 0;
        border: 0;
        color: rgba(216, 227, 241, 0.84);
    }

    .floating-tab-bar .tab-link::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 2px;
        height: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, rgba(160, 188, 220, 0.55), rgba(217, 229, 242, 0.92), rgba(160, 188, 220, 0.55));
        opacity: 0;
        transform: scaleX(0.2);
        transform-origin: center;
        transition: opacity 0.22s ease, transform 0.22s ease;
    }

    .floating-tab-bar .tab-link:hover {
        background: transparent;
        box-shadow: none;
        border: 0;
        transform: none;
        color: var(--primary-color);
    }

    .floating-tab-bar .tab-link:hover::after {
        opacity: 0.45;
        transform: scaleX(0.84);
    }

    .floating-tab-bar .tab-link.active {
        background: transparent;
        box-shadow: none;
        border: 0;
        transform: none;
        color: var(--primary-color);
        font-weight: 700;
    }

    .floating-tab-bar .tab-link.active::after {
        opacity: 0.95;
        transform: scaleX(1);
    }

    .floating-tab-bar::before {
        opacity: 0.04;
    }

    .floating-tab-bar::after {
        opacity: 0.22;
    }
}

.btn {
    background: rgba(255,255,255,0.28);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    border: 1px solid rgba(169, 187, 209, 0.44);
    box-shadow: 0 8px 22px rgba(31,38,135,0.20);
    transition: background .18s ease, border-color .18s ease, transform .18s var(--spring), box-shadow .18s ease, outline-color .18s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--metal-sheen-soft);
    background-size: 210% 100%;
    background-position: 180% 50%;
    opacity: 0;
    transition: opacity .22s ease, background-position .55s ease;
    pointer-events: none;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(197,210,225,0.42);
    pointer-events: none;
}
.btn .btn-icon { margin-right: 8px; display: inline-block; vertical-align: -2px; }

.btn:hover {
  background: var(--glass-hover-bg);
  border: 1px solid rgba(187, 203, 224, 0.65);
  color: var(--text-color);
  box-shadow: var(--hover-glow);
    transform: scale(1.07);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    text-decoration: underline;
}

.btn:hover::before,
.btn:focus-visible::before {
    opacity: 1;
    background-position: -20% 50%;
}

.btn:focus-visible{
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}

.btn[aria-disabled="true"], .btn:disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  filter: grayscale(10%);
}

a:focus-visible, .btn:focus-visible, .tab-link:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

section:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

@media (forced-colors: active) {
    a:focus-visible,
    .btn:focus-visible,
    .tab-link:focus-visible,
    .copy-id-btn:focus-visible,
    section:focus-visible {
        outline: 2px solid Highlight;
    }
}

/* Contact Section Styling */
.contact {
    text-align: center;
    background: var(--glass-bg);
    border: var(--glass-border);
    backdrop-filter: blur(8px) saturate(108%);
    -webkit-backdrop-filter: blur(8px) saturate(108%);
    color: var(--text-color);
    padding: 50px 20px;
    border-radius: 20px;
    box-shadow:
      0 4px 16px rgba(31, 38, 135, 0.15),
      0 14px 48px rgba(31, 38, 135, 0.19),
      0 1.5px 7px rgba(255,255,255,0.08) inset;
    margin: 40px auto;
    max-width: 800px;
    transition: box-shadow 0.3s cubic-bezier(.22,.61,.36,1), transform 0.3s cubic-bezier(.22,.61,.36,1);
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Glassy underlay for contact */
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--glassy-opacity);
  background: linear-gradient(120deg, var(--glassy1) 0%, var(--glassy2) 45%, var(--glassy3) 100%);
  background-size: 200% 200%;
  animation: glassFlow 24s linear infinite;
  will-change: background-position;
}

/* Keep contact content above underlay */
.contact > * { position: relative; z-index: 1; }

.contact:hover {
    transform: scale(1.01) translateY(-1px) perspective(600px) rotateX(0.6deg);
    box-shadow:
      0 10px 40px rgba(31, 38, 135, 0.22),
      0 24px 64px rgba(31, 38, 135, 0.22),
      0 2.5px 16px rgba(255,255,255,0.12) inset;
}

.contact h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact p {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact a {
    display: inline-flex; /* match button feel */
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 20px;
    border-radius: 999px;
    margin-top: 20px;
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.28);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    box-shadow: 0 8px 22px rgba(31,38,135,0.20);
    font-weight: 500;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s var(--spring), box-shadow .18s ease, color 0.3s ease;
}

/* Ensure CTA inside contact uses glassy .btn spacing */
.contact .btn { margin-top: 10px; }

.contact .btn:hover {
  background: var(--glass-hover-bg);
  box-shadow: var(--hover-glow);
  transform: scale(1.05);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.contact a:hover {
    background: var(--glass-hover-bg);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: var(--hover-glow);
    transform: scale(1.03);
}

/* Touch-first behavior: avoid sticky hover transforms on phones/tablets */
@media (hover: none) and (pointer: coarse) {
    .hero:hover,
    .card:hover,
    .contact:hover,
    section:hover,
    .btn:hover,
    .contact a:hover,
    .contact .btn:hover {
        transform: none !important;
    }
}

/* Footer Styling */
footer {
    display: flex;
    justify-content: flex-start; /* Align content to the left */
    align-items: center;
    background: linear-gradient(120deg, rgba(15, 23, 38, 0.14), rgba(128, 150, 175, 0.16));
    color: var(--text-color); /* Ensure text is visible */
    padding: 10px 20px; /* Add spacing */
    box-shadow: 0 -6px 18px rgba(10, 18, 30, 0.12);
    border-top: 1px solid rgba(172, 189, 210, 0.30);
    font-size: 0.9rem; /* Slightly smaller font size */
    z-index: 1000; /* Ensure it stays above other elements */
}

footer p {
    margin: 0; /* Remove default margin */
}

/* Body Styling */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

main {
    padding-bottom: clamp(80px, 12vh, 140px);
}

html {
    scroll-behavior: auto;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}




a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}


/* Card Container */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px; /* Prevent too many narrow columns on ultra-wide screens */
    margin: 0 auto;     /* Center the grid within the section */
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    background: var(--surface-solid);
    border: 1px solid rgba(167, 185, 207, 0.52);
    box-shadow: 0 4px 12px rgba(31, 38, 135, 0.12);
    position: relative;
    overflow: hidden;
}

.chip::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05) 60%, rgba(255,255,255,0));
    pointer-events: none;
    opacity: 0.78;
}

.impact-list {
    margin: 0 0 10px;
    padding-left: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.impact-list li {
    margin-bottom: 4px;
}

.projects-entry {
    display: block;
}

.projects-entry-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 18px;
    row-gap: 12px;
}

.projects-entry-copy-block h2 {
    margin: 0;
}

.projects-entry-copy {
    margin: 8px 0 0;
    max-width: 74ch;
    color: rgba(216, 228, 244, 0.92);
}

.projects-entry-actions {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

.projects-entry-grid {
    margin-top: 14px;
}

.projects-entry-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.projects-entry-card h3 {
    margin: 0;
}

.projects-entry-card p {
    margin: 0;
    color: rgba(219, 231, 245, 0.92);
}

.projects-entry-link {
    margin-top: auto;
    font-weight: 700;
    color: var(--link-color);
}

.projects-entry-link:hover {
    color: var(--link-hover);
}

.project-showcase {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px 2px 12px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 2px;
    overscroll-behavior-x: contain;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    align-items: stretch;
}

.project-showcase::-webkit-scrollbar {
    height: 6px;
}

.project-showcase::-webkit-scrollbar-track {
    background: rgba(159, 176, 199, 0.08);
    border-radius: 999px;
}

.project-showcase::-webkit-scrollbar-thumb {
    background: linear-gradient(125deg, rgba(197, 210, 225, 0.55), rgba(143, 164, 188, 0.35));
    border: 1px solid rgba(197, 210, 225, 0.22);
    border-radius: 999px;
}

.project-showcase {
    scrollbar-width: thin;
    scrollbar-color: rgba(173, 192, 216, 0.55) rgba(159, 176, 199, 0.08);
}

.project-showcase .project-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 clamp(320px, 38vw, 430px);
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    min-height: 100%;
    min-width: 0;
}

.project-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.project-top h3 {
    margin: 0;
    flex: 1 1 220px;
    min-width: 0;
}

.project-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: var(--primary-color);
    background: linear-gradient(145deg, rgba(214,225,238,0.48), rgba(133,152,176,0.24));
    border: 1px solid rgba(173, 192, 216, 0.56);
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
}

.project-label::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--metal-sheen-soft);
    background-size: 200% 100%;
    background-position: 80% 50%;
    opacity: 0.58;
    pointer-events: none;
}

.project-tags {
    margin-bottom: 2px;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.case-study {
    border: 1px solid rgba(173, 192, 216, 0.40);
    border-radius: 14px;
    padding: 10px 12px;
    background: linear-gradient(160deg, rgba(228,236,245,0.24), rgba(146,165,188,0.12));
    position: relative;
    overflow: hidden;
}

.case-study::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(173, 192, 216, 0.34);
    background: none;
    pointer-events: none;
    opacity: 0.34;
}

@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
    .case-study::before {
        border: 1px solid transparent;
        background: var(--metal-rim) border-box;
        -webkit-mask:
            linear-gradient(#000 0 0) padding-box,
            linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
    }
}

.case-study summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text-color);
}

.case-study[open] summary {
    margin-bottom: 10px;
}

.case-study p {
    margin-bottom: 10px;
}

.case-study p:last-child {
    margin-bottom: 0;
}

/* Card Styling */
.card {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow:
      0 2px 8px rgba(31, 38, 135, 0.10),
      0 8px 32px rgba(31, 38, 135, 0.15),
      0 1.5px 7px rgba(255,255,255,0.07) inset;
    backdrop-filter: blur(8px) saturate(108%);
    -webkit-backdrop-filter: blur(8px) saturate(108%);
    padding: 20px;
    position: relative;
    transition: box-shadow 0.18s cubic-bezier(.22,.61,.36,1), transform 0.18s cubic-bezier(.22,.61,.36,1);
    overflow: hidden;
    isolation: isolate;
    min-width: 0;
}
/* Glassy underlay for cards */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1; /* behind content and ::after */
    pointer-events: none;
    opacity: var(--glassy-opacity);
    background: linear-gradient(124deg, var(--glassy1) 0%, var(--glassy2) 50%, var(--glassy3) 100%);
    background-size: 200% 200%;
    will-change: background-position;
}

/* Mobile refinement: calmer glassy flow */
@media (max-width: 480px){
  .glass::before, .hero::before, .card::before{
    opacity: calc(var(--glassy-opacity) - 0.05);
    animation-duration: 26s;
  }
}
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(120% 120% at 10% 10%, rgba(255,255,255,0.13), transparent 40%),
      radial-gradient(100% 100% at 90% 20%, rgba(255,255,255,0.08), transparent 50%);
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 1;
}
.card > * {
    position: relative;
    z-index: 2;
}
.card:hover, .card:focus-within {
    transform: scale(1.015) translateY(-2px) perspective(500px) rotateX(0.8deg);
    box-shadow:
      0 6px 24px rgba(31, 38, 135, 0.18),
      0 18px 56px rgba(31, 38, 135, 0.16),
      0 2.5px 12px rgba(255,255,255,0.10) inset;
}

/* Section Styling */
section {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    padding: 20px;
    margin: 40px auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-in-out forwards;
    transition: all 0.4s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    /* Keep section geometry stable for deterministic anchor navigation. */
    content-visibility: visible;
    contain-intrinsic-size: auto;
    scroll-margin-top: 84px;
}

/* Constrain inner width to avoid overly wide text and squished buttons layouts */
section > .card-container,
section > p,
section > h2 {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}



@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 48px rgba(31, 38, 135, 0.45);
}

/* Main heading styling (h1) */
h1 {
    font-size: 3rem; 
    font-weight: 700; 
    color: white; 
    text-align: center; 
    margin: 0; 
    padding: 20px 0;
    display: block;
}

h1, .name {
    color: var(--text-color); /* Ensure it uses the updated text color */
}

/* General heading styling */
h2, h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

h2 {
    position: relative;
    display: inline-block;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.26);
    color: var(--primary-color);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    h2 {
        background: linear-gradient(100deg, var(--metal-midnight) 8%, var(--metal-titanium) 45%, var(--metal-silver) 58%, var(--metal-midnight) 92%);
        background-size: 220% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

h2 {
    animation: headingSheen 9s ease-in-out infinite;
}

@keyframes headingSheen {
    0%, 12% { background-position: 0% 50%; }
    45% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

p {
    margin-bottom: 20px;
}

p, li {
    color: var(--text-color);
}



/* Styling for the profile picture */
.about-container {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 24px;
    align-items: start;
    max-width: 960px;
    margin: 0 auto;
}

/* Center About text block on larger screens too */
.intro .about-container {
    text-align: center;
    align-items: center;
}

.profile-picture {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto; /* Preserve natural aspect ratio; no cropping */
    border-radius: 16px;
    box-shadow: var(--default-box-shadow);
}

/* Tighter, more readable copy in About section */
.intro .about-container p {
    margin: 0;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* 2026 polish pass: consistent liquid look + reliable responsive behavior */
body {
    position: relative;
    isolation: isolate;
    background-image:
        radial-gradient(circle at 12% 12%, rgba(139, 162, 190, 0.24), transparent 34%),
        radial-gradient(circle at 88% 18%, rgba(224, 233, 243, 0.28), transparent 30%),
        radial-gradient(circle at 50% 82%, rgba(89, 112, 140, 0.16), transparent 38%);
    background-attachment: fixed;
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 34vmin;
    height: 34vmin;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.2;
    filter: blur(3px);
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.05) 70%);
    animation: bubbleDrift 18s ease-in-out infinite alternate;
}

body::before {
    top: 7vh;
    left: -10vmin;
}

body::after {
    right: -12vmin;
    bottom: 8vh;
    animation-duration: 22s;
    animation-delay: -4s;
}

@keyframes bubbleDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(2vmin, -2vmin, 0) scale(1.08); }
}

.hero,
.card,
.contact,
section,
.floating-tab-bar {
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow:
        0 8px 26px rgba(31, 38, 135, 0.17),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero::after,
.card::after,
.contact::after {
    background:
        radial-gradient(120% 120% at 8% 8%, rgba(255, 255, 255, 0.2), transparent 45%),
        radial-gradient(120% 120% at 88% 12%, rgba(255, 255, 255, 0.13), transparent 50%);
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none !important;
    }
    h2 {
        animation: none !important;
        background: none;
        color: var(--primary-color);
    }
}

/* Ensure sections themselves are not grids to avoid squishing content.
    Card layouts are handled by .card-container above. */
.projects, .experience, .recommendations { display: block; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: var(--button-text);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#back-to-top.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Fallback for browsers that do not support backdrop-filter */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    section,
    .card,
    .hero,
    .contact,
    .floating-tab-bar,
    .btn,
    .contact a,
    .copy-id-btn {
        background: rgba(11, 18, 29, 0.94);
    }
}
/* Final lock-in (EOF): mobile/tablet layout and nav behavior */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

img,
video,
svg {
    max-width: 100%;
}

@media (min-width: 769px) and (max-width: 1100px) {
    body {
        padding-top: 0;
    }

    .hero {
        margin: 18px 16px 0;
        padding: 82px 24px 70px;
    }

    .hero h1 {
        font-size: clamp(3rem, 6vw, 3.85rem);
    }

    .hero p {
        font-size: 1.2rem;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    section {
        margin: 28px 16px;
        padding: 22px;
        scroll-margin-top: 106px;
    }

    .card-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .intro .about-container {
        grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
        gap: 20px;
        text-align: left;
    }

    .intro .about-container p {
        text-align: left;
    }

    .profile-picture {
        max-width: 190px;
        margin: 0 auto;
    }

    .project-showcase {
        gap: 14px;
        scroll-snap-type: x proximity;
    }

    .project-showcase .project-card {
        flex-basis: min(72vw, 520px);
    }

    .floating-tab-bar {
        position: sticky;
        top: 0;
        left: 0;
        right: auto;
        width: 100%;
        transform: none;
        border-radius: 0 0 14px 14px;
        border-left: 0;
        border-right: 0;
        gap: 10px;
        padding: 8px 14px;
    }

    .floating-tab-bar .tab-link {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    body {
        margin: 0;
        font-size: 16px;
        padding: 0;
        padding-bottom: 104px;
        padding-bottom: calc(104px + env(safe-area-inset-bottom));
        padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
        background-attachment: scroll;
    }

    body::before,
    body::after {
        opacity: 0.08;
        filter: blur(8px);
    }

    .hero {
        margin: 10px 12px 0;
        padding: 34px 16px 30px;
        text-align: center;
        border-radius: 16px;
    }

    .hero h1,
    h1 {
        font-size: clamp(2.1rem, 7vw, 2.5rem);
        line-height: 1.06;
        margin-bottom: 12px;
    }

    .hero p {
        font-size: 1.02rem;
        line-height: 1.5;
        margin: 0 auto 8px;
        max-width: 34ch;
    }

    /* Mobile readability: avoid dark metallic heading gradients on small screens */
    h2 {
        background: none !important;
        -webkit-background-clip: initial;
        background-clip: initial;
        color: var(--primary-color) !important;
        text-shadow: none;
        animation: none;
        font-size: 1.9rem;
        line-height: 1.15;
        margin-bottom: 12px;
    }

    section {
        margin: 16px 12px;
        padding: 16px 14px;
        border-radius: 16px;
        scroll-margin-top: 18px;
    }

    .card {
        padding: 14px;
        border-radius: 16px;
    }

    .card-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .chip-list {
        gap: 8px;
    }

    .chip {
        font-size: 0.84rem;
        padding: 5px 10px;
    }

    .project-showcase {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        overflow: visible;
        padding: 0;
        scroll-snap-type: none;
        scroll-padding-inline: 0;
        scrollbar-width: auto;
    }

    .project-showcase::-webkit-scrollbar {
        display: initial;
    }

    .project-showcase .project-card {
        flex: initial;
        width: 100%;
        max-width: 100%;
        min-height: auto;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
    }

    .projects-entry-header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .projects-entry-actions .btn {
        width: 100%;
    }

    .floating-tab-bar {
        display: none !important;
    }

    .mobile-tab-dock {
        position: fixed;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: center;
        gap: 6px;
        bottom: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        left: 10px;
        right: 10px;
        width: auto;
        max-width: calc(100% - 20px);
        z-index: 1100;
        padding: 8px;
        padding-bottom: 8px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        border-radius: 18px;
        background: linear-gradient(135deg, rgba(14, 21, 33, 0.94), rgba(10, 16, 26, 0.88));
        border: 1px solid rgba(170, 190, 214, 0.22);
        box-shadow:
            0 12px 28px rgba(4, 8, 14, 0.42),
            inset 0 1px 0 rgba(255,255,255,0.08);
        backdrop-filter: blur(10px) saturate(120%);
        -webkit-backdrop-filter: blur(10px) saturate(120%);
    }

    .mobile-tab-dock .tab-link {
        min-width: 0;
        min-height: 44px;
        margin: 0;
        padding: 8px 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 0.78rem;
        line-height: 1;
        font-weight: 600;
        letter-spacing: 0;
        color: rgba(216, 227, 241, 0.86);
        border-radius: 12px;
        border: 1px solid transparent;
        background: transparent;
        white-space: nowrap;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-tab-dock .tab-link.active {
        color: var(--primary-color);
        background: linear-gradient(145deg, rgba(163, 191, 224, 0.26), rgba(106, 132, 167, 0.20));
        border-color: rgba(190, 208, 229, 0.30);
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
    }

    .mobile-tab-dock .tab-link:active {
        transform: scale(0.98);
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .intro .about-container {
        text-align: left;
        align-items: start;
        justify-items: center;
    }

    .intro .about-container p {
        text-align: left;
        font-size: 1rem;
        line-height: 1.65;
        width: 100%;
    }

    .profile-picture {
        justify-self: center;
        max-width: 170px;
    }

    .contact {
        padding: 30px 15px;
    }

    .contact h2 {
        font-size: 1.8rem;
    }

    .contact p {
        font-size: 1rem;
    }

    footer {
        padding: 10px 15px;
        font-size: 0.8rem;
    }

    .btn,
    button.btn,
    a.btn {
        display: block;
        width: 100%;
        max-width: 90%;
        margin: 0.5rem auto;
        text-align: center;
        font-size: 1rem;
        padding: 0.75rem 1rem;
        border-radius: 12px;
    }

    .card .btn {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .copy-id-btn,
    .copy-id-btn.icon-only {
        display: inline-flex;
        width: auto;
        max-width: none;
        margin: 0;
        padding: 6px;
        border-radius: 9999px;
    }

    .project-top {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .project-label {
        font-size: 0.74rem;
        white-space: nowrap;
        line-height: 1.15;
        max-width: 100%;
    }

    .project-links {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .project-links .btn {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .impact-list {
        padding-left: 16px;
        font-size: 0.92rem;
        margin-bottom: 8px;
    }

    .project-top {
        gap: 8px;
    }

    .project-top h3 {
        flex: initial;
        width: auto;
        font-size: 1.18rem;
        line-height: 1.25;
    }

    .case-study {
        padding: 10px;
    }

    .case-study summary {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    #back-to-top {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .about-container {
        gap: 14px;
    }

    .profile-picture {
        max-width: 150px;
        margin: 0 auto;
    }

    h1,
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        margin: 14px 10px;
        padding: 14px 12px;
        border-radius: 14px;
    }

    .intro p {
        font-size: 1rem;
    }

    .contact {
        padding: 30px 10px;
    }

    .contact h2 {
        font-size: 1.5rem;
    }

    .contact p {
        font-size: 0.9rem;
    }

    footer {
        padding: 8px 10px;
        font-size: 0.7rem;
    }

    .mobile-tab-dock {
        left: 8px;
        right: 8px;
        max-width: calc(100% - 16px);
        padding: 6px;
        gap: 4px;
        border-radius: 16px;
    }

    .mobile-tab-dock .tab-link {
        font-size: 0.7rem;
        padding: 7px 4px;
        min-height: 38px;
    }

    .project-showcase .project-card {
        width: 100%;
        flex-basis: auto;
        max-width: 100%;
    }

    .chip {
        font-size: 0.8rem;
        padding: 5px 9px;
    }

    body::before,
    body::after {
        opacity: 0.04;
    }
}

@media (max-width: 380px) {
    body {
        padding-bottom: 96px;
        padding-bottom: calc(96px + env(safe-area-inset-bottom));
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }

    .hero {
        margin: 8px 8px 0;
        padding: 26px 12px 24px;
    }

    .hero h1,
    h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.92rem;
        max-width: 30ch;
    }

    h2 {
        font-size: 1.65rem;
    }

    section {
        margin: 12px 8px;
        padding: 12px 10px;
        border-radius: 12px;
    }

    .card {
        padding: 12px;
        border-radius: 14px;
    }

    .about-container {
        gap: 12px;
    }

    .profile-picture {
        max-width: 138px;
    }

    .intro .about-container p {
        font-size: 0.94rem;
        line-height: 1.58;
    }

    .chip-list {
        gap: 6px;
    }

    .chip {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .project-top h3 {
        font-size: 1.05rem;
    }

    .project-label {
        font-size: 0.66rem;
        padding: 5px 8px;
    }

    .impact-list {
        font-size: 0.88rem;
        padding-left: 14px;
    }

    .mobile-tab-dock {
        left: 6px;
        right: 6px;
        max-width: calc(100% - 12px);
        bottom: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom));
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        padding: 5px;
        gap: 3px;
        border-radius: 14px;
    }

    .mobile-tab-dock .tab-link {
        min-height: 36px;
        padding: 7px 2px;
        font-size: 0.64rem;
        border-radius: 10px;
    }
}

@media (min-width: 1101px) {
    body {
        padding-top: 0;
    }

    section {
        margin: 36px auto;
        padding: 24px;
        scroll-margin-top: 112px;
    }

    .hero {
        margin-top: 10px;
        padding: 110px 28px 90px;
    }

    .hero h1 {
        font-size: clamp(3.6rem, 5vw, 4.8rem);
    }

    .hero p {
        max-width: 880px;
        margin-left: auto;
        margin-right: auto;
    }

    .intro .about-container {
        grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
        align-items: center;
        text-align: left;
    }

    .intro .about-container p {
        text-align: left;
    }

    .project-showcase {
        gap: 18px;
        padding-inline: 6px;
        scroll-snap-type: x proximity;
    }

    .project-showcase .project-card {
        flex-basis: clamp(350px, 30vw, 430px);
    }
}
