/* Corner [+] for landing page */
.corner-plus {
    position: absolute;
    color: #f0f0f0;
    font-family: var(--font-mono, monospace);
    font-size: 1.2rem;
    opacity: 0.1;
    z-index: 10;
    pointer-events: none;
}
.corner-plus-tl { top: 18px; left: 22px; }
.corner-plus-tr { top: 18px; right: 22px; }
.corner-plus-bl { bottom: 18px; left: 22px; }
.corner-plus-br { bottom: 18px; right: 22px; }
/* ============================================================
   PORTFOLIO — REDESIGNED
   Direction: Refined Editorial Dark
   Fonts: Plus Jakarta Sans (display) + DM Mono (utility)
   Colors: Near-black base, warm ivory text, warm gold accent
   ============================================================ */

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('assets/fonts/plus-jakarta-sans-latin-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 300 800;
    font-display: block;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('assets/fonts/plus-jakarta-sans-latin-italic-300.woff2') format('woff2');
    font-style: italic;
    font-weight: 300;
    font-display: block;
}

@font-face {
    font-family: 'DM Mono';
    src: url('assets/fonts/dm-mono-latin-300.woff2') format('woff2');
    font-style: normal;
    font-weight: 300;
    font-display: block;
}

@font-face {
    font-family: 'DM Mono';
    src: url('assets/fonts/dm-mono-latin-400.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: block;
}

@font-face {
    font-family: 'DM Mono';
    src: url('assets/fonts/dm-mono-latin-500.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: block;
}

/* ─── TOKENS ─────────────────────────────────────────── */
:root {
    --bg:          #0d0d0d;
    --bg-2:        #1a1a1a;
    --bg-3:        #161616;
    --card-bg:     rgba(255, 255, 255, 0.02);
    --gradient_bg: rgba(30, 30, 30, 0.6);

    --border:       rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);

    --accent:      #D6AC5F;
    --accent-dim:  rgba(214, 172, 95, 0.08);
    --accent-glow: rgba(214, 172, 95, 0.06);

    --text-main:   #f0f0f0;
    --text-dim:    #7a7a7a;
    --text-mid:    #b0b0b0;

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

    --radius-main: 2px;

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

    --space-sm:    1.5rem;
    --space-md:    3rem;
    --space-lg:    5rem;
    --space-xl:    8rem;
    --bg-overlay-img: url('docs/common/bg.webp');
    --bg-overlay-img_2: url('docs/common/bg.webp');
}

/* ─── 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 — disabled for clean look */
    .bg-overlay {
    display: none;
    }

    /* Background overlay */
    .bg-overlay_landing {
    position: fixed;
    inset: 0;
    z-index: 1;
    rotate: 180deg;
    pointer-events: none;
    background-image: var(--bg-overlay-img_2);
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    mix-blend-mode: lighten;
    filter: hue-rotate(220deg);
    }

/* Grain texture — disabled for clean editorial look */
body::before {
    display: none;
}



/* ─── NAVIGATION ─────────────────────────────────────── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem calc(5% + 20px);
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 13, 13, 0.89);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}


/* 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: 500;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: font-size 0.3s ease;
}


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

.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);
    font-weight: 400;
    letter-spacing: 0.02em;
    border-radius: 0;
    transition: color 0.2s ease;
    position: relative;
}

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

.nav-links a:hover {
    color: var(--text-main);
}

.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(--text-main) !important;
    color: var(--bg) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: var(--radius-main);
    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: none !important;
}

.nav-btn:hover {
    background: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1) !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;
    justify-content: center;
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
    
}

.glitch-wrapper_landing .glitch-text {
    position: relative;
    min-width: auto;
    text-align: center;
}

.glitch-text {
    position: absolute;
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 200;
    font-size: 0.82rem;
    letter-spacing: 0.15em;
    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 {
    padding-right: 5px;
    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 ─────────────── */

@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: var(--radius-main);
    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-main);
}

/* 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: var(--radius-main);
}

/* ─── SECTION SEPARATOR ──────────────────────────────── */
.section-sep {
    border: 0;
    height: 1px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 70px;
    background: var(--border);
}

/* ─── 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: 'Press Start 2P', monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 13px;
    background: linear-gradient(90deg, #7a9abb, #D6AC5F, #6aaa8a, #7a9abb, #D6AC5F, #6aaa8a, #7a9abb);
    background-size: 600% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 18s linear infinite;
    letter-spacing: 0.05em;
    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 36px;
    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: 700;
    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: 960px; /* 900px video + side arrows */
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.showreel::before {
    display: none;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-main);
    border: 1px solid var(--border);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

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

/* ─── REEL SLIDER ────────────────────────────────────── */
.reel-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reel-slider {
    flex: 1;
    overflow: hidden;
}

.reel-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.reel-slide {
    flex: 0 0 100%;
    width: 100%;
}

.reel-arrow {
    flex-shrink: 0;
    background: none;
    color: #fff;
    border: none;
    font-size: 2.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.reel-arrow:hover {
    opacity: 1;
}

.reel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.reel-dot {
    font-size: 0.7rem;
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #444;
    cursor: pointer;
    transition: color 0.2s;
    padding: 2px 0;
}

.reel-dot.active {
    color: #fff;
}

/* ─── BENTO GRID ─────────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-flow: row dense;
    grid-auto-rows: auto;
    gap: clamp(12px, 1.2vw, 18px);
    padding: 0 0 20px;
    margin-bottom: 24px;
    --project-size-scale: 1;
    --project-media-height: clamp(280px, 30vw, 420px);
    --project-desc-height: 0px;
}

/* Dim all non-hovered cards while interacting with the bento grid */
.bento-grid:hover .bento-item.visible:not(:hover) {
    filter: brightness(0.75);
}

.bento-grid:focus-within .bento-item.visible:not(:focus-within) {
    filter: brightness(0.75);
}

.bento-item {
    cursor: pointer;
    background: transparent;
    border: none;
    border-radius: var(--radius-main);
    position: relative;
    display: block;
    overflow: hidden;
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                filter 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    will-change: opacity, transform;
    width: 100%;
    justify-self: stretch;
    min-height: var(--project-media-height);
    height: auto;
    display: grid;
    grid-template-rows: 1fr;
}

.bento-item::after {
    display: none;
}

.bento-media {
    position: relative;
    min-height: 0;
    height: 100%;
    border-radius: var(--radius-main);
    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(--text-main);
    opacity: 0;
    pointer-events: none;
    padding: 4px 6px;
    border-radius: var(--radius-main);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.bento-item:hover .bento-item-num {
    opacity: 0.9;
}

.bento-item-studio {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--text-main);
    opacity: 0;
    pointer-events: none;
    padding: 4px 6px;
    border-radius: var(--radius-main);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.bento-item:hover .bento-item-studio {
    opacity: 0.9;
}

.bento-item-tasks {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0;
    pointer-events: none;
    padding: 20px 12px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    -webkit-mask-image: linear-gradient(transparent, black 40%);
    mask-image: linear-gradient(transparent, black 40%);
    transition: opacity 0.3s ease;
}

.bento-item:hover .bento-item-tasks {
    opacity: 1;
}

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

.bento-item.visible {
    opacity: 1;
    transform: translateY(0);
    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),
                filter 0.4s ease;
}

.bento-item.visible:hover {
    filter: brightness(1.08);
}

.bento-item.visible:hover::after {
    display: none;
}

.bento-desc-item {
    cursor: default;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-main);
    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,
        box-shadow 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.75);
}

.bento-item.bento-hovered {
    filter: brightness(1.08);
}

.bento-item.bento-hovered::after {
    display: none;
}

.project-card-desc {
    display: none;
}

.bento-grid .bento-item.visible:hover,
.bento-grid .bento-item.bento-hovered {
    filter: brightness(1.08);
}

.bento-grid .bento-item.visible:hover .desc-rule,
.bento-grid .bento-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: clamp(1rem, 1.15vw, 1.1rem);
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.desc-copy {
    font-size: clamp(0.9rem, 1.03vw, 1rem);
    color: var(--text-dim);
    line-height: 1.58;
}

.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 / PROJECTS HEADER ────────────────────────── */
.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;
    margin-bottom: 28px;
}

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

/* Projects Header — editorial style */
.projects-header {
    padding: 10px 0 0;
    scroll-margin-top: calc(70px + 10px);
}

.projects-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 350;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: var(--text-main);
}

.projects-header h2 .accent-dot { color: var(--accent); }

.project-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-tag {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s ease;
    letter-spacing: 0.01em;
}

.filter-tag:hover,
.filter-tag.active {
    color: var(--text-main);
}

.project-subfilters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-left: 2px;
}

.filter-sub {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s ease;
    letter-spacing: 0.01em;
}

.filter-sub:hover,
.filter-sub.active {
    color: var(--text-main);
}

.filter-sep {
    color: var(--text-dim);
    opacity: 0.4;
    font-size: 0.8rem;
    user-select: none;
}

.projects-rule {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 0 0 24px;
}

/* Grid intro text — sits in the 3rd column of first row */
.grid-intro-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
}

.grid-intro-text .skill-tags {
    justify-content: flex-start;
}

.grid-intro-text p {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--text-mid);
    text-align: justify;
    hyphens: auto;
}

.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: var(--radius-main);
    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: pointer;
    letter-spacing: 0.02em;
}

.skill-tags span:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

.grid-intro-text .skill-tags span.software-active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(214, 172, 95, 0.1);
}

/* ─── CV SECTION ─────────────────────────────────────── */
.cv-section {
    padding: 50px 60px;
    background: var(--bg-2);
    border-radius: var(--radius-main);
    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 {
    display: 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(--text-main);
}

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

.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-item-secondary {
    margin-left: 18px;
    padding-left: 26px;
    border-left: 1px dashed rgba(255, 255, 255, 0.2);
}

.cv-item-collapsible {
    padding-top: 2px;
}

.cv-item-summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    color: var(--accent);
}

.cv-item-summary::-webkit-details-marker {
    display: none;
}

.cv-item-arrow {
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.25s ease;
}

.cv-item-collapsible[open] .cv-item-arrow {
    transform: rotate(90deg);
}

.cv-item-secondary-content {
    padding-top: 12px;
}

.cv-item-secondary::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 0.65rem;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-main);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.cv-item-secondary .date,
.cv-item-secondary h4,
.cv-item-secondary .company {
    opacity: 0.82;
}

.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-main);
    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(2rem, 3.5vw, 3.2rem);
    font-weight: 350;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--text-main);
}

.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); }

.contact-info p {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--text-mid);
}

/* 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-main);
    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: #d1aa62;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

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

.link-card small {
    color: var(--text-dim);
    font-size: 0.76rem;
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.link-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
    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-main);
    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(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
     border-radius: var(--radius-main);
}

.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: var(--radius-main);
    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: none;
    margin-top: 4px;
}

.contact-form button:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

.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-main);
    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: 24px;
    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: var(--radius-main);
    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.82);
    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.97); }
}

#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;
    scroll-behavior: smooth;
    transform: none;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-shadow: none;
}

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

.about-modal-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 48px;
    padding: 96px 5vw 40px;
    width: min(100%, 1680px);
    margin-inline: auto;
    box-sizing: border-box;
}

.about-photo {
    width: clamp(220px, 28vw, 320px);
    aspect-ratio: 4 / 4;
    object-fit: cover;
    object-position: center;
    border-radius: 5000%;
    flex-shrink: 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    flex: 0 0 auto;
}

.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: 16px;
    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.82;
    max-width: min(100%, 72ch);
    color: var(--text-mid);

}

.about-modal-content .modal-info p + p {
    margin-top: 10px;
}

/* About Modal Skills Grid */
.about-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px 36px;
    align-items: center;
    width: 100%;
    max-width: none;
    flex: 1 1 720px;
}

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

.about-modal-content > .section-sep {
    margin: 0 auto 2px;
}

.cv-jump-btn {
    margin-top: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-radius: var(--radius-main);
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease-out);
}

.cv-jump-btn .arrow {
    font-size: 1rem;
    line-height: 1;
}

.cv-jump-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(2px);
}

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

.cv-scroll-up-btn {
    display: inline-flex;
    flex: 1 1 100%;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-mid);
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cv-scroll-up-btn:hover {
    opacity: 1;
    color: var(--text-main);
    transform: translateY(-1px);
}

.cv-scroll-up-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.about-cv-section {
    flex: 1 1 100%;
    width: 100%;
    margin: 0;
    padding: 12px 30px 20px;
}

.about-cv-section .cv-header {
    margin-bottom: 28px;
}

.about-cv-section .cv-grid {
    gap: 30px;
}

.about-cv-section .cv-item {
    margin-bottom: 24px;
}

.about-cv-section .cv-item,
.about-cv-section .cv-item.visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* ─── 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: 22px;
        padding: 34px 5vw 24px;
    }
    .about-modal-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .about-cv-section {
        padding: 14px 20px 18px;
    }
}

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

    .grid-intro-text {
        grid-column: 1 / -1;
    }

    .bento-item {
        min-height: var(--project-media-height);
    }

    .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.96rem;
    }

    .desc-copy {
        font-size: 0.9rem;
        line-height: 1.55;
    }
}

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

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

    .hamburger { display: flex; }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(13, 13, 13, 0.99);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        gap: 0.5rem;
        z-index: 105;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s var(--ease-out);
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        margin-left: 0;
        font-size: 1.6rem;
        padding: 1rem 1.5rem;
        border-radius: var(--radius-main);
        border-bottom: none;
        width: auto;
        text-align: center;
        letter-spacing: 0.08em;
        font-family: var(--font-display);
        font-weight: 500;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
    }

    .nav-links.open a {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.open a:nth-child(1) { transition-delay: 0.08s; }
    .nav-links.open a:nth-child(2) { transition-delay: 0.14s; }
    .nav-links.open a:nth-child(3) { transition-delay: 0.20s; }
    .nav-links.open a:nth-child(4) { transition-delay: 0.26s; }
    .nav-links.open a:nth-child(5) { transition-delay: 0.32s; }

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

    .nav-btn {
        background: var(--accent) !important;
        color: var(--bg) !important;
        padding: 0.6rem 1.5rem !important;
        border-radius: var(--radius-main) !important;
        text-align: center;
        margin-top: 0.5rem;
        font-size: 1.1rem !important;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        --project-media-height: clamp(190px, 54vw, 270px);
        gap: 16px;
    }

    .bento-grid > .bento-item,
    .bento-grid > .bento-desc-item,
    .bento-grid > .grid-intro-text {
        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;
    }

    /* iOS/mobile compositing fix for corner color artifacts on Characters card */
    .bento-characters .bento-media {
        isolation: isolate;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .bento-characters .bento-media .bento-item-bg {
        border-radius: inherit;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    .bento-characters .bento-item-num {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(12, 12, 11, 0.62);
    }

    .bento-characters::after {
        text-shadow: none;
    }

    /* Prevent iOS/WebKit blur bleed that creates bright corner splats */
    .project-card-desc {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(16, 16, 15, 0.94);
    }

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

    .desc-copy {
        font-size: 0.88rem;
        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:not(#aboutModal) .modal-content {
        max-width: 95%;
        max-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #aboutModal .modal-content {
        max-width: 100%;
        max-height: none;
        min-height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .about-modal-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 52px 6vw 20px;
        width: 100%;
        max-height: none;
        overflow: visible;
    }

    .about-modal-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        width: 100%;
    }

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

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

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

    .cv-item-secondary {
        margin-left: 8px;
        padding-left: 18px;
    }

    .cv-jump-btn {
        display: flex;
        width: fit-content;
        align-self: center;
        margin: 14px auto 0;
        padding: 11px 18px;
        font-size: 0.8rem;
        justify-content: center;
        text-align: center;
    }

    .cv-scroll-up-btn {
        margin: 0 auto;
        font-size: 1.2rem;
    }

    .about-cv-section {
        margin-top: 0;
        padding: 10px 14px 16px;
    }

    .about-cv-section .cv-header {
        margin-bottom: 20px;
    }

    .about-cv-section .cv-item {
        margin-bottom: 18px;
    }

    .interest-links { grid-template-columns: 1fr 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;
}

/* 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: var(--radius-main);
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.06),
                0 0 120px rgba(255, 255, 255, 0.03);
}

/* 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: 0;
    padding: 0.3rem 0;
    background: transparent;
    color: var(--text-dim);
    border: 0;
    font-family: var(--font-mono);
    font-size: 0.912rem;
    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, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                text-shadow 0.3s ease;
    margin-left: auto;
    margin-right: auto;
    z-index: 2;
}

.landing-contact-btn::before,
.landing-contact-btn::after {
    color: rgba(156, 156, 156, 0.142);
    font-family: var(--font-mono);
    font-size: 1.5rem;
    line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}

.landing-contact-btn::before {
    content: "[";
    margin-bottom: 2px;
    margin-right: 0.72rem;
}

.landing-contact-btn::after {
    content: "]";
    margin-bottom: 2px;
    margin-left: 0.72rem;
}

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

.landing-contact-btn:hover {
    color: var(--text-main);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.landing-contact-btn:hover::before {
    color: var(--accent);
    transform: translateX(-2px);
}

.landing-contact-btn:hover::after {
    color: var(--accent);
    transform: translateX(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;
}