/* ============================================================
   PORTFOLIO — REDESIGNED
   Direction: Refined Editorial Dark
   Fonts: Plus Jakarta Sans (display) + DM Mono (utility)
   Colors: Near-black base, warm ivory text, warm gold accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300&family=DM+Mono:wght@300;400;500&display=swap');

/* ─── TOKENS ─────────────────────────────────────────── */
:root {
    --bg:          #111110;
    --bg-2:        #5a67662e;
    --bg-3:        #181816;
    --card-bg:     rgba(175, 121, 121, 0.03);
    --gradient_bg: rgba(45, 43, 36, 0.121);

    /* FIX: Define --border — was used everywhere but never declared */
    --border:       rgba(255, 255, 255, 0.07);
    --border-hover: rgba(214, 172, 95, 0.25);

    /* FIX: Unified accent — removed lime/gold split, committed to warm gold */
    --accent:      #d6ac5f;
    --accent-dim:  rgba(214, 172, 95, 0.10);
    --accent-glow: rgba(214, 172, 95, 0.06);

    --text-main:   #f5f5f5;
    --text-dim:    #8a8884;
    --text-mid:    #c4c2be;

    --font-display:'Plus Jakarta Sans', sans-serif;
    --font-mono:   'DM Mono', 'Courier New', monospace;
    --font-body:   'Plus Jakarta Sans', sans-serif;

    --radius-sm:   8px;
    --radius-md:   14px;
    --radius-lg:   15px;
    --radius-xl:   20px;

    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.37, 0, 0.63, 1);

    /* FIX: Spacing scale for consistent rhythm */
    --space-sm:    1.5rem;
    --space-md:    3rem;
    --space-lg:    5rem;
    --space-xl:    8rem;
    --bg-overlay-img: url('docs/common/bg.jpg');
}

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

html { scroll-behavior: smooth; }

/* ─── BASE ───────────────────────────────────────────── */
body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ─── CONTENT WRAP (single layout parent) ────────────── */
.content-wrap {
    max-width: 1540px;
    margin: 0 auto;
    padding: 0 calc(5% + 20px);
}

    /* Background overlay */
    .bg-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background-image: var(--bg-overlay-img);
    background-size: cover;
    background-position: center;
    opacity: 0.08;
    mix-blend-mode: lighten;
    filter: hue-rotate(220deg);
    }

/* Grain texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 1;
}



/* ─── NAVIGATION ─────────────────────────────────────── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem calc(5% + 20px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.4s var(--ease-out), background 0.4s ease;
    background: rgba(12, 12, 11, 0.86);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border-bottom: 1px solid rgba(214, 172, 95, 0.08);
    box-shadow: 0 1px 0 rgba(255,255,255,0.03), 0 4px 24px rgba(0,0,0,0.3);
}


nav.scrolled {
    padding: 0.85rem calc(5% + 20px);
}

/* FIX: @supports fallback for backdrop-filter (Firefox, older browsers) */
@supports not (backdrop-filter: blur(1px)) {
    nav { background: rgba(12, 12, 11, 0.97); }
}


.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.05px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: font-size 0.3s ease;
}


.logo-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    transition: width 0.3s ease, height 0.3s ease;
    border: 1px solid var(--border);
}

nav.scrolled .logo { font-size: 1.15rem; }
nav.scrolled .logo-img { width: 34px; height: 34px; }

.logo span { color: var(--text-main); }
.logo .accent-dot { color: var(--accent); }

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    padding: 0.45rem 0.9rem;
    font-size: 0.88rem;
    font-family: var(--font-display);
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 16px;
    height: 1px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform 0.25s var(--ease-out), opacity 0.25s ease;
    opacity: 0;
}

.nav-links a:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.04);
}

.nav-links a:hover::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

/* FIX: focus-visible for keyboard navigation */
.nav-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-btn {
    background: var(--accent) !important;
    color: #0c0c0b !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-body) !important;
    letter-spacing: 0 !important;
    font-size: 0.82rem !important;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 2px 12px rgba(214, 172, 95, 0.25) !important;
}

.nav-btn:hover {
    background: #e8c070 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(214, 172, 95, 0.35) !important;
}

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

/* ─── GLITCH TEXT EFFECT ─────────────────────────────── */
.glitch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 8px;
    margin-top: 4px;
}

.glitch-wrapper_landing {
    display: flex;
    align-items: center;
    margin-left: -145px;
    margin-top: 10px;
    
}

.glitch-text {
    position: absolute;
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 200;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--white);
    text-transform: uppercase;
    min-width: 140px;
    /* Pixelated rendering */
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    animation: fadeIn 1s ease-out forwards;
    
}

.glitch-inner {
    position: relative;
    display: block;
    /* Disable font smoothing for pixel-crisp look */
    font-synthesis: none;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    

    
}

.glitch-inner::before,
.glitch-inner::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.glitch-inner::before {
    color: #ff0055;
    z-index: -1;
    text-shadow:
        -3px 0 rgba(255, 0, 0, 0.9),
        0 -2px rgba(255, 50, 0, 0.7);
}

.glitch-inner::after {
    color: #00ffff;
    z-index: -2;
    text-shadow:
        3px 0 rgba(0, 255, 255, 0.9),
        0 2px rgba(0, 200, 255, 0.7);
}

/* ── Activated only when JS adds .is-glitching ── */
.glitch-inner.is-glitching {
    animation: glitch-main 0.5s steps(1, end) forwards;
}

.glitch-inner.is-glitching::before {
    animation: glitch-red 0.5s steps(1, end) forwards;
}

.glitch-inner.is-glitching::after {
    animation: glitch-cyan 0.5s steps(1, end) forwards;
}

@keyframes glitch-main {
    0%   { filter: none;                                              transform: translateX(0); }
    10%  { filter: brightness(1.4) contrast(1.3) hue-rotate(5deg);   transform: translateX(-3px) scaleX(1.02); }
    20%  { filter: brightness(0.6) contrast(1.6);                    transform: translateX(4px)  scaleX(0.98); }
    30%  { filter: brightness(1.5) contrast(0.9) hue-rotate(-10deg); transform: translateX(-4px) scaleX(1.03); }
    40%  { filter: brightness(0.8) contrast(1.5);                    transform: translateX(3px)  scaleX(0.97); }
    50%  { filter: brightness(1.3) contrast(1.2) hue-rotate(8deg);   transform: translateX(-2px); }
    60%  { filter: brightness(0.9) contrast(1.1);                    transform: translateX(2px); }
    70%  { filter: brightness(1.2) contrast(0.95);                   transform: translateX(-1px); }
    80%  { filter: none;                                              transform: translateX(0); }
    100% { filter: none;                                              transform: translateX(0); }
}

@keyframes glitch-red {
    0%   { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateX(0); }
    10%  { opacity: 1; clip-path: inset(0   0 70% 0); transform: translateX(-5px) scaleY(1.06); }
    20%  { opacity: 1; clip-path: inset(15% 0 40% 0); transform: translateX(5px)  scaleY(0.94); }
    30%  { opacity: 1; clip-path: inset(55% 0 25% 0); transform: translateX(-4px); }
    40%  { opacity: 1; clip-path: inset(25% 0 55% 0); transform: translateX(4px); }
    50%  { opacity: 1; clip-path: inset(70% 0 20% 0); transform: translateX(-5px); }
    60%  { opacity: 1; clip-path: inset(10% 0 65% 0); transform: translateX(3px); }
    70%  { opacity: 0.7; clip-path: inset(0 0 80% 0); transform: translateX(-1px); }
    85%  { opacity: 0.3; clip-path: inset(0 0 0   0); transform: translateX(0); }
    100% { opacity: 0;   clip-path: inset(0 0 0   0); transform: translateX(0); }
}

@keyframes glitch-cyan {
    0%   { opacity: 0; clip-path: inset(100% 0 0   0); transform: translateX(0); }
    10%  { opacity: 1; clip-path: inset(30%  0 30% 0); transform: translateX(5px)  scaleY(0.94); }
    20%  { opacity: 1; clip-path: inset(60%  0 20% 0); transform: translateX(-5px) scaleY(1.06); }
    30%  { opacity: 1; clip-path: inset(10%  0 60% 0); transform: translateX(4px); }
    40%  { opacity: 1; clip-path: inset(45%  0 42% 0); transform: translateX(-4px); }
    50%  { opacity: 1; clip-path: inset(20%  0 55% 0); transform: translateX(5px); }
    60%  { opacity: 1; clip-path: inset(70%  0 15% 0); transform: translateX(-3px); }
    70%  { opacity: 0.7; clip-path: inset(0   0 85% 0); transform: translateX(1px); }
    85%  { opacity: 0.3; clip-path: inset(0   0 0   0); transform: translateX(0); }
    100% { opacity: 0;   clip-path: inset(0   0 0   0); transform: translateX(0); }
}

/* ─── RESPONSIVE ADJUSTMENTS FOR GLITCH ─────────────── */
nav.scrolled .glitch-text {
    font-size: 0.88rem;
}

@media (max-width: 768px) {
    .glitch-wrapper {
        display: flex;
    }
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.hamburger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

/* Social icons */
.social-icons {
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: var(--text-dim);
    transition: color 0.2s ease, transform 0.2s var(--ease-out);
    text-decoration: none;
}

.social-icon svg, .social-icon img { width: 100%; height: 100%; object-fit: contain; }

.social-icon:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.social-icon:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 50%;
}

/* ─── SECTION SEPARATOR ──────────────────────────────── */
.section-sep {
    border: 0;
    height: 1px;
    width: 50%;
    max-width: 560px;
    margin: 0 auto 70px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(214, 172, 95, 0.1) 35%,
        rgba(214, 172, 95, 0.28) 50%,
        rgba(214, 172, 95, 0.1) 65%,
        transparent 100%);
}

/* ─── EYEBROW LABEL ──────────────────────────────────── */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    color: var(--accent);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.2rem;
    opacity: 0.9;
}

.eyebrow::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 1px;
    background: var(--accent);
    opacity: 0.6;
    flex-shrink: 0;
}

/* ─── HIGHLIGHT TEXT ─────────────────────────────────── */
.highlight-text {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    background: linear-gradient(90deg, #a1a1aa, #5bb698, #b9aa79, #a1a1aa);
    background-size: 250% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 10s linear infinite;
    letter-spacing: 0.5px;
    position: relative;
    will-change: transform;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
}

@keyframes shine {
    from { background-position: 0% center; }
    to { background-position: 500% center; }
}

/* ─── HERO ───────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 20px 0 56px;
    max-width: 1250px;
    margin: 0 auto;
    position: relative;
    will-change: transform;
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.4vw, 4rem);
    font-weight: 800;
    margin: 20px 0 24px;
    line-height: 1.06;
    letter-spacing: -0.01em;
}

h1 span { color: var(--accent); }

.hero p {
    color: var(--text-mid);
    font-size: clamp(1rem, 1.4vw, 0.9rem);
    font-weight: 300;
    max-width: 480px;
    margin: 0 auto 32px;
    line-height: 1.85;
}

/* Showreel */
.showreel {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.showreel::before {
    content: '';
    position: absolute;
    inset: 20px;
    background: radial-gradient(ellipse at 50% 100%, rgba(214,172,95,0.12) 0%, transparent 70%);
    border-radius: var(--radius-xl);
    z-index: -1;
    filter: blur(20px);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(106, 85, 47, 0.12);
    box-shadow:
        0 16px 48px rgba(0,0,0,1),
        0 4px 16px rgba(214, 172, 95, 0.2);
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ─── BENTO GRID ─────────────────────────────────────── */
.bento-grid {
    /* Dimming effect for non-hovered bento items */
    .bento-grid.bento-hovering .bento-item:not(.bento-hovered) {
        filter: brightness(0.65) grayscale(0.15);
        transition: filter 0.2s;
    }
    .bento-item.bento-hovered {
        filter: none !important;
    }
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-flow: row dense;
    grid-auto-rows: clamp(200px, 40vw, 280px);
    gap: clamp(12px, 1.2vw, 18px);
    padding: 20px 0;
    scroll-margin-top: 25vh;
    margin-bottom: 60px;
}

/* Alternate pairs by row:
   Row 1: image left, card right
   Row 2: card left, image right */
.bento-grid > :nth-child(4n + 1),
.bento-grid > :nth-child(4n + 4) {
    grid-column: 1;
}

.bento-grid > :nth-child(4n + 2),
.bento-grid > :nth-child(4n + 3) {
    grid-column: 2;
}

.bento-item {
    cursor: pointer;
    background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    position: relative;
    display: block;
    overflow: hidden;
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease,
                filter 0.3s ease;
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    pointer-events: none;
    will-change: opacity, transform;
    width: 100%;
    justify-self: stretch;
}

.bento-item::after {
    content: "\2938";
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: rgba(245, 245, 245, 0.9);
    line-height: 1;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    transition: transform 0.25s var(--ease-out), color 0.25s ease;
}

.bento-media {
    position: relative;
    min-height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.bento-item-num {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    opacity: 0.78;
    pointer-events: none;
    padding: 4px 6px;
    border-radius: 999px;
    background: rgba(12, 12, 11, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(2px);
}

/* Inner wrapper clips content without overflow:hidden on the card */
.bento-item-inner {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    overflow: hidden;
}

.bento-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease,
                filter 0.3s ease;
}

.bento-item.visible:hover {
    border-color: rgba(214, 172, 95, 0.5);
    transform: translateY(-5px) scale(1.015);
    box-shadow:
        0 0 0 1px rgba(214, 172, 95, 0.366),
        0 16px 48px rgba(0,0,0,1),
        0 4px 16px rgba(214, 172, 95, 0.2);
}

.bento-item.visible:hover::after {
    transform: translate(1px, -1px) scale(1.04);
    color: var(--accent);
}

.bento-desc-item {
    cursor: default;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: var(--gradient_bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-height: 85%;
    height: 85%;
    align-self: center;
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    pointer-events: none;
    will-change: opacity, transform;
    transition:
        opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
        border-color 0.3s ease,
        background 0.3s ease;
    width: min(100%, 80%);
}

/* Keep cards narrower while preserving alternating side alignment */
.bento-grid > :nth-child(4n + 2).bento-desc-item {
    justify-self: start;
}

.bento-grid > :nth-child(4n + 4).bento-desc-item {
    justify-self: end;
}

.bento-desc-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.bento-grid.bento-hovering .bento-item.visible:not(.bento-hovered) {
    filter: brightness(0.65) grayscale(0.15);
}

.bento-item.bento-hovered {
    border-color: rgba(214, 172, 95, 0.5);
    transform: translateY(-5px) scale(1.015);
    box-shadow:
        0 0 0 1px rgba(214, 172, 95, 0.366),
        0 16px 48px rgba(0,0,0,1),
        0 4px 16px rgba(214, 172, 95, 0.2);
    filter: none;
}

.bento-item.bento-hovered::after {
    transform: translate(1px, -1px) scale(1.04);
    color: var(--accent);
}

.bento-desc-item.bento-hovered {
    border-color: rgba(214, 172, 95, 0.28);
    background: var(--gradient_bg);
    transform: translateY(-2px);
}

.bento-desc-item.bento-hovered .desc-rule {
    width: 46px;
    opacity: 0.62;
}

/*
.bento-desc-item:hover {
    border-color: rgba(214, 172, 95, 0.28);
    background: var(--gradient_bg);
    transform: translateY(-2px);
}
*/

.desc-num {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    opacity: 0.64;
}

.desc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.desc-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.desc-copy {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.65;
}

.desc-rule {
    width: 22px;
    height: 1px;
    background: var(--accent);
    opacity: 0.34;
    transition: width 0.4s var(--ease-out), opacity 0.3s ease;
}

.bento-desc-item:hover .desc-rule {
    width: 46px;
    opacity: 0.62;
}

/* ─── SKILLS ─────────────────────────────────────────── */
.skills {
    text-align: center;
    padding-bottom: 80px;
}

.skills h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em; /* FIX: em-based */
    margin-bottom: 28px;
}

.skills .software-title { margin-top: 56px; }

.skill-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tags span {
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
    background: var(--bg-2);
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
    letter-spacing: 0.02em;
}

.skill-tags span:hover {
    border-color: rgba(214, 172, 95, 0.3);
    color: var(--text-main);
    background: rgba(214, 172, 95, 0.05);
    box-shadow: 0 0 0 1px rgba(214, 172, 95, 0.1);
}

/* ─── CV SECTION ─────────────────────────────────────── */
.cv-section {
    padding: 50px 60px;
    background: linear-gradient(160deg, rgb(35, 35, 32) 0%, rgb(21, 22, 20) 50%, rgb(16, 16, 15) 100%);
    border-radius: var(--radius-xl);
    margin: 40px 0 90px;
    border: 1px solid var(--border);
    scroll-margin-top: 75px;
    position: relative;
    overflow: hidden;
    
}

/* Subtle ambient glow in corner */
.cv-section::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(214,172,95,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 70px;
}

.cv-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.03em; /* FIX: em-based */
}

.cv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.cv-column h3 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 30px;
}

.cv-item {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(32px);
    pointer-events: none;
    will-change: opacity, transform;
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    padding-left: 20px;
    border-left: 2px solid transparent;
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out),
                border-color 0.3s ease, padding-left 0.3s ease;
    position: relative;
}

.cv-item:last-child { margin-bottom: 0; }

.cv-item.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cv-item.visible:hover {
    border-left-color: var(--accent);
}

.cv-item:focus-within {
    border-left-color: var(--accent);
}

.cv-item-tab-btn {
    position: absolute;
    inset: 0;
    border: 0;
    background: transparent;
    opacity: 0;
    padding: 0;
    margin: 0;
    cursor: default;
}

.cv-item-tab-btn:focus-visible {
    outline: none;
}

.cv-item .date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cv-item h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.35;
}

.cv-item .company {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.88rem;
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

.cv-skills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.cv-skills .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.cv-skills .skill-tags span {
    font-family: var(--font-mono);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-mid);
    background: var(--bg-3);
}

/* ─── CONTACT ─────────────────────────────────────────── */
.contact-section {
    padding: 10px 0 80px;
    margin-bottom: 40px;
    scroll-margin-top: 85px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 100px;
    align-items: start;
}

.contact-info h2 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 3.8vw, 3.6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
}

.contact-info {
    opacity: 0;
    transform: translateY(32px);
    pointer-events: none;
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.contact-info.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.contact-info h2 span { color: var(--accent); }

/* Interest link cards */
.interest-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 36px;
    align-items: stretch;
    overflow: visible;
}

.link-card {
    background: rgba(34, 33, 31, 0.299);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color 0.25s ease, background 0.25s ease,
                box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
                
    display: flex;
    flex-direction: column;
    gap: 6px;
    will-change: transform;
    z-index: 1;
    overflow: visible;
    
}

.link-icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.link-card span {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
}

.link-card small {
    color: var(--text-dim);
    font-size: 0.76rem;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.link-card:hover {
    border-color: rgba(214, 172, 95, 0.35);
    box-shadow: 0 0 0 1px rgba(214, 172, 95, 0.15), 0 8px 24px rgb(12, 12, 12);
    background: rgba(214, 172, 95, 0.04);
    transform: translateY(-3px);
    z-index: 2;
}

.link-card:hover .link-icon {
    opacity: 1;
}

/* Contact form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 18px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(138, 136, 132, 0.7);
    font-weight: 300;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(214, 172, 95, 0.4);
    background: rgba(214, 172, 95, 0.03);
    box-shadow: 0 0 0 3px rgba(214, 172, 95, 0.06), 0 1px 0 rgba(214,172,95,0.1) inset;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.contact-form button {
    cursor: pointer;
    border: none;
    align-self: flex-start;
    padding: 0.95rem 2.4rem;
    background: var(--accent);
    color: var(--bg);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, transform 0.25s var(--ease-out), box-shadow 0.25s ease;
    box-shadow: 0 2px 16px rgba(214, 172, 95, 0.2);
    margin-top: 4px;
}

.contact-form button:hover {
    background: #e8c070;
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(214, 172, 95, 0.3);
}

.contact-form button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ─── MODALS ─────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(5, 5, 5, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@supports not (backdrop-filter: blur(1px)) {
    .modal { background: rgba(5, 5, 5, 0.97); }
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    background: linear-gradient(160deg, #1a1a18 0%, var(--bg-2) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-xl);
    max-width: 85%;
    width: 960px;
    overflow: hidden;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.4s var(--ease-out), opacity 0.4s ease;
    box-shadow:
        0 0 0 1px rgba(214,172,95,0.04),
        0 40px 120px rgba(0,0,0,0.7),
        0 80px 200px rgba(0,0,0,0.5);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

#modalImg {
    width: 100%;
    height: auto;
    max-height: 66vh;
    object-fit: cover;
    display: block;
}

.modal-info {
    padding: 32px 36px;
    background: transparent;
}

.modal-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent);
    letter-spacing: -0.3px;
}

.modal-info p {
    color: var(--text-mid);
    line-height: 1.8;
    font-size: 0.97rem;
}

.close-modal {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 36px;
    color: var(--text-dim);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.25s var(--ease-out), background 0.2s ease;
    font-family: var(--font-mono);
    font-weight: 300;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2100;
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
}

.close-modal:hover {
    color: var(--text-main);
    transform: rotate(90deg);
    background: rgba(255,255,255,0.07);
    border-color: var(--border);
}

.close-modal:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* About Modal */
#aboutModal {
    background: rgba(8, 8, 7, 0.88);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    align-items: stretch;
}

@supports not (backdrop-filter: blur(1px)) {
    #aboutModal { background: rgba(8, 8, 7, 0.99); }
}

#aboutModal .modal-content {
    background: transparent;
    border: none;
    border-radius: 0;
    max-width: 100%;
    width: 100%;
    min-height: 100%;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

#aboutModal.active .modal-content { transform: none; }

.about-modal-content {
    display: flex;
    align-items: center;
    gap: 80px;
    padding: 80px 5vw;
    width: 100%;
    max-width: 5200px;
    box-sizing: border-box;
}

.about-photo {
    width: clamp(220px, 28vw, 320px);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: top;
    border-radius: 20px;
    flex-shrink: 0;
    box-shadow: 0 30px 80px rgba(12, 42, 65, 0.6);
}

.about-modal-content .modal-info {
    background: transparent;
    padding: 0;
}

.about-modal-content .modal-info h3 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 1vw, 4rem);
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--text-main);
}

.about-modal-content .modal-info p {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    line-height: 1.8;
    max-width: 520px;
    color: var(--text-mid);

}

/* About Modal Skills Grid */
.about-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px 56px;
    align-items: center;
    width: 100%;
}

.about-skills-grid {
    margin-top: 0;
    margin-bottom: 0;
}

/* ─── FOOTER ─────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* ─── ICON FILTER (ArtStation / IMDB) ───────────────── */
.link-card img[alt="ArtStation"],
img[alt="imdb"] {
    filter: brightness(0) saturate(100%) invert(80%) sepia(40%) saturate(380%) hue-rotate(0deg) brightness(90%);
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
    .about-modal-content {
        flex-direction: column;
        gap: 32px;
        padding: 40px 5vw;
    }
    .about-modal-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* ─── TABLET BREAKPOINT ───────────────────────────────── */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-auto-rows: clamp(150px, 21vw, 210px);
        gap: 14px;
    }

    .bento-item {
        min-height: 100%;
    }

    .bento-desc-item {
        min-height: 85%;
        height: 85%;
        align-self: center;
        width: min(100%, 70%);
        padding: 14px 13px;
        gap: 8px;
    }

    .desc-title {
        font-size: 0.84rem;
    }

    .desc-copy {
        font-size: 0.71rem;
        line-height: 1.58;
    }
}

@media (max-width: 768px) {
    .content-wrap {
        padding: 0 20px;
    }

    nav { padding: 1.2rem calc(5% + 20px); }

    .hamburger { display: flex; }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 4px);
        right: 5%;
        background: rgba(16, 16, 15, 0.97);
        backdrop-filter: blur(20px);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 0.75rem 1rem;
        gap: 0;
        min-width: 160px;
        box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    }

    .nav-links.open { display: flex; }

    .nav-links a {
        margin-left: 0;
        font-size: 0.88rem;
        padding: 0.65rem 0.5rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
        width: 80%;
    }

    .nav-links a:last-child { border-bottom: none; }

    .nav-btn {
        background: var(--accent) !important;
        color: var(--bg) !important;
        padding: 0.45rem 1rem !important;
        border-radius: 50px !important;
        text-align: center;
        margin-top: 0.3rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 16px;
    }

    /* Mobile pair order: card first, then its image */
    .bento-grid > :nth-child(1) { order: 2; }
    .bento-grid > :nth-child(2) { order: 1; }
    .bento-grid > :nth-child(3) { order: 4; }
    .bento-grid > :nth-child(4) { order: 3; }
    .bento-grid > :nth-child(5) { order: 6; }
    .bento-grid > :nth-child(6) { order: 5; }
    .bento-grid > :nth-child(7) { order: 8; }
    .bento-grid > :nth-child(8) { order: 7; }
    .bento-grid > :nth-child(9) { order: 10; }
    .bento-grid > :nth-child(10) { order: 9; }

    .bento-grid > .bento-item,
    .bento-grid > .bento-desc-item {
        grid-column: auto !important;
    }

    .bento-item,
    .bento-desc-item {
        min-height: 160px;
    }

    .bento-desc-item {
        width: 100%;
        min-height: auto;
        height: auto;
        padding: 10px;
        gap: 7px;
    }

    .desc-num {
        font-size: 0.56rem;
    }

    .bento-item-num {
        font-size: 0.56rem;
        top: 10px;
        left: 10px;
    }

    .bento-item::after {
        top: 10px;
        right: 10px;
        font-size: 0.9rem;
    }

    .desc-title {
        font-size: 0.8rem;
    }

    .desc-copy {
        font-size: 0.68rem;
        line-height: 1.5;
    }

    h1 { letter-spacing: -0.04em; } /* FIX: em-based on mobile too */

    .cv-grid { grid-template-columns: 1fr; }
    .cv-skills { grid-template-columns: 1fr; }
    .cv-header { flex-direction: column; align-items: flex-start; gap: 20px; }
    .cv-section { padding: 40px 24px; }

    .modal-content {
        max-width: 95%;
        max-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .about-modal-content {
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding: 60px 6vw 48px;
        width: 100%;
        max-height: 100vh;
        overflow-y: auto;
    }

    .about-modal-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-photo {
        display: block;
        width: min(220px, 60vw);
        max-width: 100%;
        aspect-ratio: 3 / 4;
        object-fit: cover;
        object-position: top;
        flex-shrink: 0;
        margin: 0 auto;
    }

    .about-modal-content .modal-info h3 {
        font-size: 1.8rem;
        margin-bottom: 14px;
        text-align: center;
    }

    .about-modal-content .modal-info p {
        font-size: 0.95rem;
        line-height: 1.7;
        max-width: 100%;
        text-align: center;
    }

    .interest-links { grid-template-columns: 1fr; }
}

/* ─── INTRO ANIMATIONS ───────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Initial states */
nav, .hero h1, .hero p, .showreel, .skills h2 {
    opacity: 0;
}

nav {
    animation: fadeInUp 0.5s ease-out 0.1s forwards;
}

.hero h1 {
    animation: fadeInScale 0.6s ease-out 0.2s forwards;
}

.hero p {
    animation: fadeIn 0.5s ease-out 0.3s forwards;
}

.showreel {
    animation: fadeInUp 0.5s ease-out 0.4s forwards;
}

.skills h2 {
    animation: fadeInUp 0.5s ease-out 0.2s forwards;
}

/* ─── LANDING OVERLAY ────────────────────────────────── */
.landing-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.8s;
}

.landing-overlay.dismissed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Shader background canvas */
.landing-shader {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0;
    animation: shaderFadeIn 2s ease-out 0.3s forwards;
}


.landing-shader canvas {
    display: block;
    width: 200% !important;
    height: 100% !important;
}

@keyframes shaderFadeIn {
    to { opacity: 0.06; }
}

/* Block main-page intro animations while landing is visible */
body.landing-active nav,
body.landing-active .hero h1,
body.landing-active .hero p,
body.landing-active .showreel,
body.landing-active .skills h2 {
    animation: none;
    opacity: 0;
}

.landing-content {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 100px 5vw; 
}

/* Logo */
.landing-logo-wrapper {
    opacity: 0;
    transform: scale(0.8);
    animation: landingLogoIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.landing-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(214, 172, 95, 0.2);
    box-shadow: 0 0 60px rgba(214, 172, 95, 0.12),
                0 0 120px rgba(214, 172, 95, 0.06);
}

/* Title */
.landing-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.2vw, 3.6rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-main);
    margin-top: 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: landingFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.landing-dot {
    color: var(--accent);
}

/* Subtitle */
.landing-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(0.85rem, 1.15vw, 1.92rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: 12px;
    opacity: 0;
    transform: translateY(14px);
    animation: landingFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

/* Decorative line */
.landing-line {
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin-top: 32px;
    animation: landingLineExpand 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.65s forwards;
}

/* Contact button */
.landing-contact-btn {
    margin-top: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1.8rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-dim);
    border: 1px solid rgba(214, 172, 95, 0.1);
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    animation: landingFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) 0.75s forwards;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease,
                box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                backdrop-filter 0.3s ease;
    z-index: 2;
}

.landing-contact-btn svg {
    color: var(--accent);
    transition: color 0.3s ease;
}

.landing-contact-btn:hover {
    color: var(--text-main);
    border-color: var(--accent);
    background: rgba(214, 172, 95, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 0 30px rgba(214, 172, 95, 0.15);
    transform: translateY(-2px);
}

/* Tap hint */
.landing-tap-hint {
    margin-top: 40px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    opacity: 0;
    transform: translateY(10px);
    animation: landingFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.7s forwards;
}

@keyframes tapPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

.landing-tap-hint {
    animation: landingFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) 0.85s forwards,
               tapPulse 3s ease-in-out 1.15s infinite;
}

/* Landing keyframes */
@keyframes landingLogoIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes landingFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes landingLineExpand {
    to {
        width: min(320px, 60vw);
    }
}

/* Re-trigger main page animations after landing dismiss */
body.landing-dismissed nav {
    animation: fadeInUp 0.5s ease-out 0.1s forwards;
}
body.landing-dismissed .hero h1 {
    animation: fadeInScale 0.6s ease-out 0.25s forwards;
}
body.landing-dismissed .hero p {
    animation: fadeIn 0.5s ease-out 0.4s forwards;
}
body.landing-dismissed .showreel {
    animation: fadeInUp 0.5s ease-out 0.55s forwards;
}
body.landing-dismissed .skills h2 {
    animation: fadeInUp 0.5s ease-out 0.5s forwards;
}

/* ─── CINEMA MODE ────────────────────────────────────── */
.cinema-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    z-index: 500;
    transition: background 0.6s ease;
}

body.cinema-active .cinema-overlay {
    background: rgba(0, 0, 0, 0.82);
}

/* Neutralise EVERY source of stacking context on .hero:
   transform, will-change, and backface-visibility all create one. */
body.cinema-active .hero {
    transform: none;
    will-change: auto;
    backface-visibility: visible;
}

/* Showreel lifts above the overlay in the root stacking context */
body.cinema-active .showreel {
    position: relative;
    z-index: 501;
}