/* ═══════════════════════════════════════════════
   MoonFrost — Apple Liquid Glass Design System
   ═══════════════════════════════════════════════ */

:root {
    --bg: #050608;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-strong: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.06);
    --glass-blur: 40px;
    --text: #f8fbff;
    --muted: #a8b3c2;
    --cyan: #32ade6;
    --indigo: #5e5ce6;
    --rose: #ff375f;
    --gold: #ff9f0a;
    --purple: #bf5af2;
    --lime: #95ff4f;
    --shadow: rgba(0, 0, 0, 0.45);
    --font-heading: "Outfit", sans-serif;
    --font-body: "Inter", sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 12% 8%, rgba(94, 92, 230, 0.08), transparent 42%),
        radial-gradient(ellipse at 88% 4%, rgba(50, 173, 230, 0.09), transparent 48%),
        radial-gradient(ellipse at 45% 45%, rgba(191, 90, 242, 0.06), transparent 52%),
        radial-gradient(ellipse at 65% 92%, rgba(255, 55, 95, 0.07), transparent 38%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Noise Grid Overlay ── */

.site-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, black, transparent 70%);
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 70%);
}

/* ── Base Reset ── */

a {
    color: inherit;
    text-decoration: none;
}

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

h1,
h2,
h3 {
    font-family: var(--font-heading);
    line-height: 1.05;
    letter-spacing: -0.025em;
}

/* ═══════════════════════════════
   Header — Liquid Glass Nav
   ═══════════════════════════════ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem clamp(1rem, 3vw, 3rem);
    background: linear-gradient(to bottom, rgba(5, 6, 8, 0.88), rgba(5, 6, 8, 0.35), transparent);
}

.brand {
    display: flex;
    align-items: center;
}

.brand-logo {
    width: 190px;
    height: 132px;
    object-fit: contain;
    mix-blend-mode: screen;
    filter: contrast(150%) brightness(1.2);
}

.nav-pills {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    padding: 0.4rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(8, 10, 16, 0.55);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 var(--glass-highlight),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.nav-link {
    border-radius: 999px;
    padding: 0.7rem 1.1rem;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: color 0.3s var(--ease-spring), background 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ═══════════════════════════════
   Eyebrow Label
   ═══════════════════════════════ */

.eyebrow {
    color: var(--cyan);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow: 0 0 24px rgba(50, 173, 230, 0.35);
}

/* ═══════════════════════════════
   Hero Parallax Section
   ═══════════════════════════════ */

.hero-parallax {
    position: relative;
    height: 300vh;
    padding-top: 9rem;
    overflow: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.parallax-header {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 5rem 0 4rem;
}

.hero-parallax h1 {
    max-width: 820px;
    margin-top: 1rem;
    font-size: clamp(4.5rem, 12vw, 10rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        rgba(255, 255, 255, 0.55) 35%,
        #ffffff 65%,
        rgba(255, 255, 255, 0.6) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    max-width: 640px;
    margin-top: 1.4rem;
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2.2rem;
}

/* ═══════════════════════════════
   Buttons — Glass Style
   ═══════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 1.5rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    border: 1px solid var(--glass-border);
    transition:
        transform 0.4s var(--ease-spring),
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.4s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--indigo));
    border-color: transparent;
    box-shadow:
        0 0 28px rgba(50, 173, 230, 0.22),
        0 0 80px rgba(50, 173, 230, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn.primary:hover {
    box-shadow:
        0 0 36px rgba(50, 173, 230, 0.38),
        0 0 120px rgba(50, 173, 230, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn.secondary {
    color: var(--text);
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 var(--glass-highlight);
}

.btn.secondary:hover {
    background: var(--glass-strong);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════
   Stat Row — Glass Cards
   ═══════════════════════════════ */

.stat-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 380px;
    margin-top: 2.6rem;
}

.stat-row div {
    min-height: 96px;
    padding: 1.2rem;
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    background: var(--glass);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 var(--glass-highlight);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.stat-row div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    pointer-events: none;
}

.stat-row div:hover {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-row strong {
    display: block;
    color: white;
    font-family: var(--font-heading);
    font-size: 2.4rem;
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-row span {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.84rem;
}

/* ═══════════════════════════════
   Parallax Cards — 3D Skill Grid
   ═══════════════════════════════ */

.parallax-cards {
    will-change: transform, opacity;
    transform-style: preserve-3d;
    margin-top: 4rem;
}

.parallax-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    will-change: transform;
}

.parallax-card {
    --card-accent: 149, 255, 79;
    flex-shrink: 0;
    width: 30rem;
    height: 22rem;
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(var(--card-accent), 0.06) 0%, transparent 50%),
        var(--glass);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 var(--glass-highlight);
    transition:
        transform 0.5s var(--ease-spring),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    cursor: default;
}

/* Specular highlight — top edge light refraction */
.parallax-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    border-radius: 24px 24px 0 0;
    pointer-events: none;
}

/* Accent glow — top edge color bleed */
.parallax-card::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--card-accent), 0.4), transparent);
    pointer-events: none;
}

.parallax-card:hover {
    transform: translateY(-20px) !important;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.4),
        0 0 48px rgba(var(--card-accent), 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(var(--card-accent), 0.28);
}

/* Card accent rotation — 5 colors across each row */
.parallax-card:nth-child(5n+1) { --card-accent: 94, 92, 230; }
.parallax-card:nth-child(5n+2) { --card-accent: 255, 55, 95; }
.parallax-card:nth-child(5n+3) { --card-accent: 50, 173, 230; }
.parallax-card:nth-child(5n+4) { --card-accent: 255, 159, 10; }
.parallax-card:nth-child(5n+5) { --card-accent: 191, 90, 242; }

.pcard-icon {
    display: inline-grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-bottom: 1.2rem;
    background: rgba(var(--card-accent), 0.1);
    border: 1px solid rgba(var(--card-accent), 0.18);
    color: rgb(var(--card-accent));
    box-shadow:
        0 0 20px rgba(var(--card-accent), 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.parallax-card h3 {
    font-size: 1.35rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.45rem;
    letter-spacing: -0.01em;
}

.parallax-card p {
    color: rgba(168, 179, 194, 0.85);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ═══════════════════════════════
   Section Layout
   ═══════════════════════════════ */

.section-panel {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.portfolio-section {
    padding: 5.5rem 0 18vh;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 2rem;
}

.section-heading h2 {
    margin-top: 0.75rem;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    font-weight: 900;
}

.section-note {
    margin-top: 1rem;
    color: var(--muted);
    max-width: 680px;
    line-height: 1.7;
}

/* ═══════════════════════════════
   Exit Portfolio — Glass Pill
   ═══════════════════════════════ */

.exit-portfolio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    bottom: 1.2rem;
    z-index: 12;
    width: fit-content;
    min-height: 42px;
    margin-left: auto;
    padding: 0 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(6, 8, 12, 0.65);
    color: var(--text);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    font-weight: 800;
    font-size: 0.88rem;
    white-space: nowrap;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--glass-highlight);
    transition:
        transform 0.3s var(--ease-spring),
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}

.exit-portfolio:hover {
    transform: translateY(-3px);
    border-color: rgba(149, 255, 79, 0.3);
    background: rgba(12, 18, 24, 0.82);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 24px rgba(149, 255, 79, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ═══════════════════════════════
   Video Grid — Glass Cards
   ═══════════════════════════════ */

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.25rem, 4vw, 3rem);
    max-width: 980px;
    margin: 0 auto;
    padding: 16vh 0 12vh;
    perspective: 1000px;
}

.video-card {
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 var(--glass-highlight);
    transform: translate3d(var(--tx, 0), var(--ty, 0), 0) rotate(var(--rot, 0deg)) rotateX(var(--rx, 0deg)) skewX(var(--skew, 0deg));
    filter: blur(var(--blur, 0)) brightness(var(--bright, 1)) contrast(var(--contrast, 1));
    transform-origin: center center;
    will-change: transform, filter;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    perspective: 1000px;
}

/* Specular edge highlight */
.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    z-index: 2;
    pointer-events: none;
}

.video-card:hover {
    border-color: rgba(39, 229, 255, 0.3);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35),
        0 0 48px rgba(39, 229, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.video-card-inner {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    transform-style: preserve-3d;
    transition: transform 0.4s var(--ease-out-expo);
    transform: rotateX(var(--mrx, 0deg)) rotateY(var(--mry, 0deg));
}

.video-mount {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 20px 20px 0 0;
    transform: translateZ(10px);
}

.video-card-inner video {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    background: #000;
    object-fit: cover;
    border-radius: 0;
    transform: none;
}

.video-meta {
    min-height: 142px;
    padding: 1.2rem 1.3rem;
    transform-style: preserve-3d;
    transform: translateZ(40px);
}

.video-meta h3 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    transform: translateZ(20px);
}

.video-meta p {
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.portfolio-sentinel {
    height: 1px;
    width: 100%;
}

/* ═══════════════════════════════
   Dynamic Island TOC — Glass
   ═══════════════════════════════ */

.toc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 48;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.toc-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.dynamic-island-toc {
    position: fixed;
    left: 50%;
    bottom: 1.3rem;
    z-index: 49;
    width: min(340px, calc(100vw - 2rem));
    color: var(--text);
    transform: translate(-50%, 120%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease-spring), transform 0.35s var(--ease-spring);
}

.dynamic-island-toc.visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.dynamic-island-toc.open {
    width: min(360px, calc(100vw - 2rem));
}

.toc-pill,
.toc-panel {
    border: 1px solid var(--glass-border);
    background: rgba(6, 8, 12, 0.75);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow:
        0 16px 56px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 var(--glass-highlight);
}

.toc-pill {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    min-height: 54px;
    padding: 0 1rem;
    border-radius: 999px;
    color: inherit;
    cursor: pointer;
    transition: transform 0.3s var(--ease-spring), opacity 0.3s ease;
}

.dynamic-island-toc.open .toc-pill {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.96);
}

.toc-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--lime);
    box-shadow: 0 0 18px rgba(149, 255, 79, 0.55);
}

.toc-current {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 800;
}

.toc-progress {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    transform: rotate(-90deg);
}

.toc-progress circle {
    fill: none;
    stroke-width: 2.5;
}

.toc-progress circle:first-child {
    stroke: rgba(255, 255, 255, 0.1);
}

.toc-progress circle:last-child {
    stroke: var(--lime);
    stroke-linecap: round;
    stroke-dasharray: 69.12;
    stroke-dashoffset: 69.12;
    transition: stroke-dashoffset 0.18s ease;
}

.toc-panel {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    height: min(420px, calc(100vh - 8rem));
    overflow: hidden;
    border-radius: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.97);
    transition: opacity 0.3s var(--ease-spring), transform 0.3s var(--ease-spring);
}

.dynamic-island-toc.open .toc-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.toc-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.2rem 0.75rem;
}

.toc-panel-head span {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.toc-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    transition: background 0.2s ease;
}

.toc-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.toc-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 0.65rem 0.85rem;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 42px;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(248, 251, 255, 0.48);
    cursor: pointer;
    text-align: left;
    transition: color 0.25s ease, background 0.25s ease;
}

.toc-item:hover,
.toc-item.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
}

.toc-item-index {
    color: var(--lime);
    font-size: 0.72rem;
    font-weight: 900;
}

.toc-item-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 700;
}

/* ═══════════════════════════════
   Reveal Animation
   ═══════════════════════════════ */

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s var(--ease-spring), transform 0.9s var(--ease-spring);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════
   Responsive — Tablet
   ═══════════════════════════════ */

@media (max-width: 980px) {
    .site-header {
        align-items: flex-start;
    }

    .hero-parallax {
        padding-top: 8rem;
    }

    .parallax-header {
        padding: 3rem 0;
    }

    .parallax-card {
        width: 22rem;
        height: 18rem;
        padding: 1.5rem;
        border-radius: 20px;
    }

    .parallax-row {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ═══════════════════════════════
   Responsive — Mobile
   ═══════════════════════════════ */

@media (max-width: 680px) {
    html {
        scroll-padding-top: 86px;
    }

    .site-header {
        align-items: center;
        gap: 0.7rem;
        padding: 0.7rem 0.8rem;
    }

    .brand-logo {
        width: 96px;
        height: 64px;
    }

    .nav-pills {
        flex: 1 1 auto;
        justify-content: space-between;
        max-width: calc(100vw - 7.8rem);
        overflow-x: auto;
        border-radius: 999px;
        scrollbar-width: none;
    }

    .nav-pills::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        flex: 0 0 auto;
        padding: 0.5rem 0.58rem;
        font-size: 0.76rem;
        white-space: nowrap;
    }

    .hero-parallax {
        height: auto;
        min-height: 0;
        padding-top: 5.8rem;
    }

    .hero-parallax h1 {
        font-size: 3.55rem;
    }

    .parallax-header {
        padding: 1.7rem 0 2rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .stat-row {
        grid-template-columns: 1fr;
    }

    .parallax-cards {
        width: min(28rem, calc(100% - 2rem));
        margin: 1rem auto 0;
        padding-bottom: 3rem;
        opacity: 1 !important;
        transform: none !important;
    }

    .parallax-row {
        gap: 0.85rem;
        margin: 0 0 0.85rem;
        padding: 0 0 0.4rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        transform: none !important;
    }

    .parallax-row::-webkit-scrollbar {
        display: none;
    }

    .parallax-card {
        width: min(16rem, 82vw);
        height: 14rem;
        min-height: 0;
        padding: 1.2rem;
        border-radius: 16px;
        scroll-snap-align: start;
    }

    .parallax-card h3 {
        font-size: 1.08rem;
    }

    .parallax-card p {
        font-size: 0.82rem;
    }

    .pcard-icon {
        width: 40px;
        height: 40px;
        font-size: 0.7rem;
        border-radius: 10px;
        margin-bottom: 0.8rem;
    }

    .portfolio-section {
        padding: 3.4rem 0 10vh;
    }

    .section-heading {
        margin-bottom: 0;
    }

    .section-heading h2 {
        font-size: 2.55rem;
    }

    .section-note {
        font-size: 0.98rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem;
        padding: 3.4rem 0 7rem;
        perspective: none;
    }

    .video-card {
        border-radius: 16px;
        filter: none !important;
        transform: none !important;
    }

    .video-card:hover {
        box-shadow:
            0 8px 40px rgba(0, 0, 0, 0.25),
            inset 0 1px 0 var(--glass-highlight);
    }

    .video-card-inner {
        border-radius: 16px;
        transform: none !important;
    }

    .video-mount {
        border-radius: 16px 16px 0 0;
        transform: none;
    }

    .video-card-inner video {
        border-radius: 16px 16px 0 0;
        transform: none;
    }

    .video-meta {
        min-height: 0;
        padding: 1rem;
        transform: none;
    }

    .video-meta h3 {
        transform: none;
    }

    .exit-portfolio {
        bottom: 5rem;
    }

    .dynamic-island-toc {
        bottom: 0.85rem;
        width: min(340px, calc(100vw - 1rem));
    }

    .dynamic-island-toc.open {
        width: min(360px, calc(100vw - 1rem));
    }
}

@media (max-width: 360px) {
    .site-header {
        padding-inline: 0.65rem;
    }

    .brand-logo {
        width: 78px;
        height: 54px;
    }

    .nav-pills {
        max-width: calc(100vw - 6rem);
        padding: 0.32rem;
    }

    .nav-link {
        padding: 0.48rem 0.46rem;
        font-size: 0.72rem;
    }

    .hero-parallax {
        padding-top: 5.1rem;
    }

    .hero-parallax h1 {
        font-size: 3.05rem;
    }

    .section-heading h2 {
        font-size: 2.25rem;
    }
}
