/* ============================================
   WARM & SUNNY — light + dark theme tokens
   ============================================ */
:root,
[data-theme="light"] {
    /* Typography */
    --font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-sans: var(--font-family);
    --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;

    /* Surfaces — soft cream / peach */
    --bg: #fff6ee;
    --bg-elev: #ffffff;
    --bg-elev-2: #ffe8d6;
    --bg-color: var(--bg);
    --card-bg: var(--bg-elev);
    --header-bg: rgba(255, 246, 238, 0.88);

    /* Lines */
    --line: rgba(90, 55, 40, 0.12);
    --line-strong: rgba(90, 55, 40, 0.22);
    --border-color: var(--line);

    /* Text — warm cocoa ink (high contrast on cream) */
    --text: #2f211c;
    --text-muted: #6b5248;
    --text-dim: #8a7166;
    --text-primary: var(--text);
    --text-secondary: var(--text-muted);
    --text-tertiary: var(--text-dim);
    --text-on-accent: #fffaf6;
    --text-on-elev: #2f211c;

    /* Orange accents */
    --accent: #e87722;
    --accent-2: #f59e0b;
    --accent-soft: rgba(232, 119, 34, 0.14);
    --accent-blue: #5b8fa8;
    --accent-teal: #6a9e8e;
    --accent-red: #b84a4a;
    --accent-orange: #f59e0b;
    --accent-purple: #9b7bb8;
    --accent-mustard: #d4a84b;
    --accent-hover: #c4610f;
    --accent-maroon: #b45309;
    --accent-bright: #fb923c;
    --accent-bright-2: #fdba74;

    /* Soft playful offset */
    --brut-pop: 6px 6px 0 0 rgba(232, 119, 34, 0.32);
    --brut-border: 2px solid rgba(232, 119, 34, 0.45);

    /* Warm cream → peach atmosphere */
    --grid-color: transparent;
    --bg-gradient-start: #fff9f3;
    --bg-gradient-mid: #fff6ee;
    --bg-gradient-end: #ffe9d8;
    --bg-glow-1: rgba(232, 119, 34, 0.28);
    --bg-glow-2: rgba(245, 158, 11, 0.22);
    --bg-glow-3: rgba(232, 119, 34, 0.16);
    --bg-dot-color: rgba(232, 119, 34, 0.08);
    --bg-line-color: rgba(245, 158, 11, 0.08);
    --bg-dot-opacity: 0.4;

    /* Soft lift shadows */
    --shadow-cartoon: 0 8px 24px rgba(90, 55, 40, 0.07);
    --shadow-hover: 0 14px 32px rgba(232, 119, 34, 0.14);
    --radius-cartoon: 20px;

    /* Cursor (kept for legacy CSS that references) */
    --cursor-x: 50%;
    --cursor-y: 50%;

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 180ms;
    --t-base: 320ms;
    --t-slow: 600ms;

    --container-max-width: 1280px;
}

/* Dark — soft charcoal (not black) + orange, high-contrast cream text */
[data-theme="dark"] {
    --bg: #1c2228;
    --bg-elev: #262e36;
    --bg-elev-2: #303942;
    --bg-color: var(--bg);
    --card-bg: var(--bg-elev);
    --header-bg: rgba(28, 34, 40, 0.97);

    --line: rgba(230, 220, 210, 0.12);
    --line-strong: rgba(230, 220, 210, 0.22);
    --border-color: var(--line);

    --text: #faf6f2;
    --text-muted: #e6ded6;
    --text-dim: #c4bab0;
    --text-primary: var(--text);
    --text-secondary: var(--text-muted);
    --text-tertiary: var(--text-dim);
    --text-on-accent: #1c1612;
    --text-on-elev: #f3ebe4;

    --accent: #e87722;
    --accent-2: #f59e0b;
    --accent-soft: rgba(232, 119, 34, 0.18);
    --accent-blue: #7eb3c9;
    --accent-teal: #7eb8a8;
    --accent-red: #c94e4e;
    --accent-orange: #f59e0b;
    --accent-purple: #b39dd0;
    --accent-mustard: #e0c070;
    --accent-hover: #c4610f;
    --accent-maroon: #b45309;
    --accent-bright: #fb923c;
    --accent-bright-2: #fdba74;

    --brut-pop: 6px 6px 0 0 rgba(232, 119, 34, 0.3);
    --brut-border: 2px solid rgba(232, 119, 34, 0.42);

    --bg-gradient-start: #1e262d;
    --bg-gradient-mid: #1c2228;
    --bg-gradient-end: #1a2026;
    --bg-glow-1: rgba(232, 119, 34, 0.14);
    --bg-glow-2: rgba(245, 158, 11, 0.1);
    --bg-glow-3: rgba(232, 119, 34, 0.08);
    --bg-dot-color: rgba(232, 119, 34, 0.09);
    --bg-line-color: rgba(245, 158, 11, 0.06);
    --bg-dot-opacity: 0.35;

    --shadow-cartoon: 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-hover: 0 14px 32px rgba(232, 119, 34, 0.14);
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

html {
    height: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    html {
        height: auto;
        overflow: auto;
    }
}

.highlight-text {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.08em;
    letter-spacing: 0.01em;
}



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

/* Cursor orb container hidden (legacy markup may still inject) */
.cursor-orbs,
.cursor-orb {
    display: none !important;
}

body {
    font-family: var(--font-sans);
    font-style: normal;
    font-synthesis: none;
    /* Outer “desktop” — warmer, stronger wash behind the app window */
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, var(--bg-glow-1), transparent 55%),
        radial-gradient(ellipse 70% 55% at 85% 75%, var(--bg-glow-2), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, var(--bg-glow-3), transparent 60%),
        linear-gradient(160deg, var(--accent-2) 0%, var(--accent) 42%, var(--accent-maroon) 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.65;
    font-weight: 400;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html[data-theme="dark"] body {
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(232, 119, 34, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 55% at 85% 75%, rgba(245, 158, 11, 0.16), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(232, 119, 34, 0.1), transparent 60%),
        linear-gradient(160deg, #3a2a26 0%, #2a2220 45%, #1c1816 100%);
}

/* Dot texture lives on the window content pane, not the desktop */
body::before {
    content: none;
    display: none;
}

body::after {
    display: none !important;
    content: none;
}

/* ============================================
   macOS-style app window chrome
   ============================================ */
.desktop-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: clamp(1rem, 2.5vh, 1.75rem) clamp(1rem, 2.5vw, 1.75rem);
    box-sizing: border-box;
}

.app-window {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1280px;
    height: 100%;
    max-height: calc(100vh - 2 * clamp(1rem, 2.5vh, 1.75rem));
    max-height: calc(100dvh - 2 * clamp(1rem, 2.5vh, 1.75rem));
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.12),
        0 24px 64px rgba(0, 0, 0, 0.28),
        0 8px 24px rgba(0, 0, 0, 0.16);
    background: var(--bg);
}

.app-window__titlebar {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    background: linear-gradient(180deg, #3a3a3c 0%, #2c2c2e 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
    user-select: none;
}

html[data-theme="light"] .app-window__titlebar {
    background: linear-gradient(180deg, #4a4542 0%, #35312e 100%);
}

.app-window__traffic {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.app-window__traffic span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #5c5c5e;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.app-window__title {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1;
}

.app-window__content {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background:
        radial-gradient(ellipse 90% 55% at 8% -10%, var(--bg-glow-1), transparent 55%),
        radial-gradient(ellipse 70% 50% at 92% 8%, var(--bg-glow-2), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, var(--bg-glow-3), transparent 55%),
        linear-gradient(165deg, var(--bg-gradient-start), var(--bg-gradient-mid) 45%, var(--bg-gradient-end));
    color: var(--text);
    scrollbar-width: thin;
    scrollbar-color: rgba(90, 55, 40, 0.35) transparent;
}

.app-window__content::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: var(--bg-dot-opacity, 0.4);
    background-image: radial-gradient(var(--bg-dot-color) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
}

html[data-theme="dark"] .app-window__content {
    scrollbar-color: rgba(230, 220, 210, 0.28) transparent;
}

.app-window__content::-webkit-scrollbar {
    width: 8px;
}

.app-window__content::-webkit-scrollbar-track {
    background: transparent;
}

.app-window__content::-webkit-scrollbar-thumb {
    background: rgba(90, 55, 40, 0.28);
    border-radius: 8px;
}

html[data-theme="dark"] .app-window__content::-webkit-scrollbar-thumb {
    background: rgba(230, 220, 210, 0.22);
}

/* Mobile: drop chrome, full-bleed document scroll */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        background:
            radial-gradient(ellipse 90% 55% at 8% -10%, var(--bg-glow-1), transparent 55%),
            radial-gradient(ellipse 70% 50% at 92% 8%, var(--bg-glow-2), transparent 50%),
            radial-gradient(ellipse 60% 40% at 50% 100%, var(--bg-glow-3), transparent 55%),
            linear-gradient(165deg, var(--bg-gradient-start), var(--bg-gradient-mid) 45%, var(--bg-gradient-end));
    }

    html[data-theme="dark"] body {
        background:
            radial-gradient(ellipse 90% 55% at 8% -10%, var(--bg-glow-1), transparent 55%),
            radial-gradient(ellipse 70% 50% at 92% 8%, var(--bg-glow-2), transparent 50%),
            radial-gradient(ellipse 60% 40% at 50% 100%, var(--bg-glow-3), transparent 55%),
            linear-gradient(165deg, var(--bg-gradient-start), var(--bg-gradient-mid) 45%, var(--bg-gradient-end));
    }

    body::before {
        content: '';
        display: block;
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 0;
        opacity: var(--bg-dot-opacity, 0.4);
        background-image: radial-gradient(var(--bg-dot-color) 1px, transparent 1px);
        background-size: 22px 22px;
        mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
        -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
    }

    .desktop-shell {
        display: block;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 0;
    }

    .app-window {
        max-width: none;
        height: auto;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }

    .app-window__titlebar {
        display: none;
    }

    .app-window__content {
        overflow: visible;
        background: transparent;
    }

    .app-window__content::before {
        display: none;
    }
}


.project-details-block .project-description {
    font-size: 1.15rem;
    line-height: 1.8;
    font-weight: 400;
    font-family: var(--font-family);
    color: var(--text-secondary);
}

body.loaded {
    animation: none;
}

/* Hairline border (replaces legacy sketchy borders) */
.sketchy-border,
.sketchy-border-thick {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-elev);
    border-image: none !important;
}

.sketchy-border::before {
    content: none;
}

/* --- Layout Containers --- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--header-bg);
    background-image: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}
header.scrolled {
    border-bottom-color: var(--line);
    box-shadow: none;
}

.container {
    max-width: var(--container-max-width);
    margin: 1rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto 1fr;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.container-full-width {
    max-width: var(--container-max-width);
    margin: 1rem auto;
    padding: 0 clamp(1.25rem, 4vw, 2.25rem);
    min-width: 0;
    position: relative;
    z-index: 1;
}

/* --- Components --- */

/* Header & Navigation – minimal editorial topbar */
header {
    padding: 1rem 1.5rem;
}

nav {
    max-width: var(--container-max-width);
    margin: 0 auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow: visible;
    width: 100%;
}

nav::after { content: none; }

nav ul {
    display: flex;
    justify-content: center;
    list-style-type: none;
    flex-wrap: wrap;
    gap: 0.1rem;
    align-items: center;
}

nav a {
    font-family: var(--font-sans);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 0;
    border: none;
    background: transparent;
    transition: color var(--t-fast) var(--ease);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    white-space: nowrap;
    display: inline-block;
    position: relative;
    transform: none;
}

nav a::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.4rem;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--t-base) var(--ease);
}

nav a:hover {
    color: var(--text);
    background: transparent;
    border-color: transparent;
    transform: none;
}

nav a:hover::after { transform: scaleX(1); }

nav a:active {
    transform: none;
}

nav a.active {
    color: var(--text);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    font-weight: 700;
}

nav a.active::after {
    transform: scaleX(1);
}

nav a.active:hover {
    color: var(--text);
    background: transparent;
    border-color: transparent;
    transform: none;
}

/* Theme-aware container / card text contrast */
.info-card,
.main-content,
.sidebar,
.project-details-block,
.project-details,
.showcase-container,
.contact-form-wrapper,
.contact-form,
.gdd-content,
.expertise-section,
.expertise-card {
    color: var(--text-on-elev);
}

.info-card p,
.main-content p,
.about-me-container p,
.expertise-card__body,
.experience-item__summary {
    color: var(--text-muted);
    font-weight: 500;
}

.info-card h2,
.info-card h3,
.info-card h4,
.expertise-card__title,
.experience-item__role,
.hero-title {
    color: var(--text);
}

.submit-btn,
.contact-form button[type="submit"] {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--text-on-accent) !important;
}

.submit-btn:hover,
.contact-form button[type="submit"]:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: var(--text-on-accent) !important;
}

/* Theme toggle in top nav */
.theme-toggle,
#theme-toggle,
nav .theme-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    margin-left: 0.35rem;
    padding: 0;
    border-radius: 999px;
    border: 1.5px solid var(--line-strong);
    background: var(--bg-elev);
    color: var(--text);
    cursor: pointer;
    box-shadow: none;
    transition: color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease),
                background-color var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease);
}

nav li:has(.theme-toggle) {
    display: list-item !important;
}

.theme-toggle:hover,
#theme-toggle:hover,
nav .theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.theme-toggle:focus-visible,
#theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle i {
    font-size: 0.95rem;
    line-height: 1;
    pointer-events: none;
}

.theme-toggle .theme-toggle__icon--sun { display: none; }
.theme-toggle .theme-toggle__icon--moon { display: inline-block; }

html[data-theme="dark"] .theme-toggle .theme-toggle__icon--sun { display: inline-block; }
html[data-theme="dark"] .theme-toggle .theme-toggle__icon--moon { display: none; }

/* Sidebar – minimal editorial header card */
.sidebar {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.75rem 2rem;
    position: relative;
    box-shadow: none;
    transition: border-color var(--t-base) var(--ease);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    min-width: 0;
}

.sidebar::before {
    content: none;
}

.sidebar:hover {
    border-color: var(--line-strong);
}

/* Zone 1: Profile */
.sidebar > .profile-pic {
    grid-column: 1;
}

/* Zone 2: Name + contact (center, takes remaining space) */
.sidebar-name-block {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.sidebar-name-block .contact-info {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
}

.sidebar-name-block .contact-info p {
    margin-bottom: 0;
    flex: 0 1 auto;
}

.sidebar-name-block .contact-info p:last-child {
    margin-bottom: 0;
}

/* Zone 3: Resume + social in one row, with subtle separator */
.sidebar-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--line);
}

.sidebar-actions .resume-btn {
    width: auto;
    height: 45px;
    padding: 0 1rem;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.sidebar-actions .social-links {
    margin-bottom: 0;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* About section: About Me full width, then Education (left) + Experience (right) */
.about-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.about-section:has(.education-certificate__trigger:hover),
.about-section:has(.education-certificate__trigger:focus-visible) {
    z-index: 20;
}

/* About page: same title and subtitle font everywhere */
.container h1,
.container h2,
.container h3,
.container h4 {
    font-family: var(--font-display);
}

.container p,
.container .contact-info p,
.container .education-info__body,
.container .education-info__line,
.container .education-info__university,
.container .education-info__degree,
.container .education-info__duration,
.container .education-info__grade,
.container .education-info p,
.container .education-courses__label,
.container .education-courses__list,
.container .education-courses__item,
.container .experience-info__body,
.container .experience-item,
.container .experience-item__header,
.container .experience-item__role,
.container .experience-item__company,
.container .experience-item__location,
.container .experience-item__time,
.container .experience-item__meta,
.container .experience-item__summary,
.container .experience-item__status,
.container .expertise-item p {
    font-family: var(--font-family);
}

/* About Me, then Education stacked */
.about-education-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    min-width: 0;
    overflow: visible;
}

/* About page: minimal, less cluttered – shadow and hover like coding project cards */
.container .info-card {
    border-width: 2px;
    box-shadow: var(--shadow-cartoon), 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 1.5rem 1.75rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.container .info-card::before {
    display: none;
}

.container .info-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover), 0 20px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .container .info-card {
    box-shadow: var(--shadow-cartoon), 0 2px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .container .info-card:hover {
    box-shadow: var(--shadow-hover), 0 24px 48px rgba(0, 0, 0, 0.4);
}

.container .main-content {
    border-width: 2px;
    box-shadow: var(--shadow-cartoon), 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 1.5rem 1.75rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.container .main-content::before {
    display: none;
}

.container .main-content:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover), 0 20px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .container .main-content {
    box-shadow: var(--shadow-cartoon), 0 2px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .container .main-content:hover {
    box-shadow: var(--shadow-hover), 0 24px 48px rgba(0, 0, 0, 0.4);
}

.container {
    gap: 2.5rem;
}

.container .about-section {
    gap: 2.5rem;
}

.container .education-courses {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .container .education-courses {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.container .education-courses__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

.container .education-courses__list {
    gap: 0.25rem 0.75rem;
}

.container .education-courses__item {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.container .experience-item {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.container .experience-showcase .experience-item {
    padding-bottom: 0.95rem;
    margin-bottom: 0;
    border-bottom: none;
}

[data-theme="dark"] .container .experience-item {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.container .experience-item__role {
    font-size: 1rem;
}

.container .expertise-item {
    border-width: 2px;
    box-shadow: var(--shadow-cartoon), 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
}

.container .expertise-item::before {
    display: none;
}

.container .expertise-item:hover {
    box-shadow: var(--shadow-hover), 0 16px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .container .expertise-item {
    box-shadow: var(--shadow-cartoon), 0 2px 14px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .container .expertise-item:hover {
    box-shadow: var(--shadow-hover), 0 20px 40px rgba(0, 0, 0, 0.35);
}

.container .expertise-title {
    font-size: 1.65rem;
    margin-bottom: 1.25rem;
}

.container .about-me-container p {
    font-size: clamp(1.05rem, 1.25vw, 1.25rem);
    line-height: 1.75;
}

.container .about-me-container h2,
.container .experience-info h4,
.container .education-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.container .main-content h2::after {
    height: 2px;
    margin-top: 0.35rem;
}

.container .sidebar {
    border-width: 2px;
    box-shadow: var(--shadow-cartoon), 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 1.25rem 1.75rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.container .sidebar::before {
    display: none;
}

.container .sidebar:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover), 0 20px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .container .sidebar {
    box-shadow: var(--shadow-cartoon), 0 2px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .container .sidebar:hover {
    box-shadow: var(--shadow-hover), 0 24px 48px rgba(0, 0, 0, 0.4);
}

/* My Expertise in its own container underneath About Me row */
.expertise-container {
    min-width: 0;
}

.expertise-container h2 {
    margin-bottom: 1rem;
}

/* Expertise section - title and grid to match reference design */
.expertise-title {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: left;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.expertise-title::after {
    content: none;
}

.about-me-container article {
    margin-bottom: 0;
}

/* About Me: fill container with readable, proportional font size */
.about-me-container {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.about-me-container article {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-me-container h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    margin-bottom: 1rem;
}

.about-me-container p {
    font-family: var(--font-family);
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    line-height: 1.85;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
    max-width: 100%;
}

[data-theme="dark"] .about-me-container p {
    color: var(--text);
    font-weight: 500;
}

.info-card {
    background-color: var(--card-bg);
    border: 4px solid var(--border-color);
    border-radius: var(--radius-cartoon);
    padding: 1.5rem 2rem;
    position: relative;
    box-shadow: var(--shadow-cartoon);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.info-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid var(--border-color);
    opacity: 0.2;
    pointer-events: none;
    border-radius: var(--radius-cartoon);
}

.info-card:hover {
    box-shadow: var(--shadow-hover);
}

.info-card--education .education-info {
    margin-bottom: 0;
    padding-top: 0;
    border-top: none;
    overflow: visible;
}

.info-card--education {
    overflow: visible;
    position: relative;
}

.info-card--education:has(.education-certificate__trigger:hover),
.info-card--education:has(.education-certificate__trigger:focus-visible) {
    z-index: 5;
}

.info-card--education .education-info::before {
    display: none;
}

/* Education: one line each for university, degree, then duration, then grade */
.education-info__body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.education-info__line {
    display: block;
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.5;
}

[data-theme="dark"] .education-info__line {
    color: var(--text-muted);
}

.education-info__university {
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-family);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .education-info__university {
    color: var(--text-primary);
}

.education-info__degree {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.education-info__duration {
    font-style: italic;
}

.education-info__grade {
    margin-top: 0.15rem;
}

.education-info__degree-row + .education-info__degree-row,
.education-info__degree-row--follow {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
}

.education-certificate {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
    overflow: visible;
}

.education-certificate--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.education-certificate__text {
    flex: 1;
    min-width: 0;
}

.education-certificate__label {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent-blue);
}

.education-certificate__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.education-info__degree-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    overflow: visible;
}

.education-info__summary {
    flex: 1;
    min-width: 0;
}

.education-info__degree-row h4 {
    margin-bottom: 0.5rem;
}

.education-info__degree-row .education-info__body {
    gap: 0.25rem;
}

.education-certificate__preview-wrap--degree {
    flex: 0 0 140px;
    width: 140px;
    max-width: 38%;
    overflow: visible;
}

.education-certificate__meta {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--text-dim);
    font-weight: 500;
    line-height: 1.4;
}

.education-certificate__preview-wrap {
    flex: 0 0 180px;
    width: 180px;
    max-width: 45%;
    overflow: visible;
}

.education-certificate__trigger {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: visible;
    background: var(--card-bg);
    box-shadow: 3px 3px 0 var(--border-color);
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.education-certificate__trigger:hover,
.education-certificate__trigger:focus-visible {
    transform: translateY(-2px);
    box-shadow: 5px 5px 0 var(--border-color);
    outline: none;
}

.education-certificate__trigger:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
}

.education-certificate__thumb {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.education-certificate__trigger:hover .education-certificate__thumb,
.education-certificate__trigger:focus-visible .education-certificate__thumb {
    transform: scale(1.04);
}

.education-certificate__hover-preview {
    display: none;
}

@media (max-width: 600px) {
    .education-certificate__hover-preview {
        right: auto;
        left: 50%;
        top: auto;
        bottom: calc(100% + 0.65rem);
        transform: translateX(-50%) scale(0.96);
    }

    .education-certificate__trigger:hover .education-certificate__hover-preview,
    .education-certificate__trigger:focus-visible .education-certificate__hover-preview {
        transform: translateX(-50%) scale(1);
    }
}

.education-courses {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.education-courses__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .education-courses__label {
    color: var(--text-muted);
}

.education-courses__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

.education-courses__item {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
}

[data-theme="dark"] .education-courses__item {
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .education-info__university,
    .education-info__degree {
        white-space: normal;
        text-overflow: clip;
    }
}

/* Experience section - separate container under Education */
.experience-container {
    min-width: 0;
}

.experience-info {
    text-align: left;
}

.experience-info h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.experience-info__body {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.6;
}

[data-theme="dark"] .experience-info__body {
    color: var(--text-muted);
}

/* Compact role cards (Experience) */
.experience-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.9rem;
}

.experience-showcase .experience-item {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 1.05rem;
    border: 1px solid rgba(45, 45, 58, 0.08);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.42));
    border-bottom: none;
    margin-bottom: 0;
    box-shadow: 0 10px 24px rgba(45, 45, 58, 0.07);
}

.experience-showcase .experience-item::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-orange));
}

[data-theme="dark"] .experience-showcase .experience-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.experience-showcase .experience-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.experience-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.experience-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.experience-item__role {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.experience-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.experience-item__status {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--accent-teal);
    border-radius: 999px;
    color: var(--accent-teal);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 0.35rem 0.55rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.experience-item__company {
    color: var(--text-muted);
    font-weight: 500;
}

[data-theme="dark"] .experience-item__company {
    color: var(--text-muted);
}

.experience-item__location {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

[data-theme="dark"] .experience-item__location {
    color: var(--text-muted);
}

.experience-item__time {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    font-style: italic;
}

[data-theme="dark"] .experience-item__time {
    color: var(--text-muted);
}

.experience-item__meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    font-style: italic;
}

[data-theme="dark"] .experience-item__meta {
    color: var(--text-muted);
}

.experience-item__summary {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.45;
    margin-top: 0.35rem;
}

[data-theme="dark"] .experience-item__summary {
    color: var(--text-muted);
}

.info-card--gaming .valorant-info {
    margin-top: 0;
}

/* Tech Stack (left) + Gaming Achievements (right) row - same height */
.tech-gaming-row {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 380px);
    gap: 2rem;
    align-items: stretch;
    min-width: 0;
}

.tech-gaming-row .main-content,
.tech-gaming-row .info-card--gaming {
    min-height: 0;
}

.tech-gaming-row .info-card--gaming {
    display: flex;
    flex-direction: column;
}

.tech-gaming-row .info-card--gaming .valorant-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar .profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--border-color);
    margin-bottom: 0;
    object-fit: cover;
    box-shadow: var(--shadow-cartoon);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.profile-pic:hover {
    transform: scale(1.05) rotate(2deg);
}

.sidebar h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 0;
    margin-right: 0;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.15;
    width: 100%;
}

.sidebar-name-block h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    letter-spacing: clamp(3px, 0.6vw, 8px);
    word-spacing: 0.05em;
}

.sidebar .contact-info p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: left;
    margin-bottom: 0.5rem;
}
.sidebar .contact-info p:last-child {
    margin-bottom: 0;
}
.contact-info p,
.education-info p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: left;
    margin-bottom: 1rem;
}

.contact-info strong,
.education-info p strong {
    color: var(--text-primary);
    font-weight: 700;
    font-family: var(--font-family);
    font-size: 1.2rem;
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out, transform 0.2s ease-in-out;
    cursor: pointer;
    border-bottom: 1px dashed var(--text-secondary);
    display: inline-block;
}

.contact-link:hover {
    color: var(--accent-red);
    border-bottom: 2px solid var(--accent-red);
    transform: scale(1.05);
}

.education-info {
    text-align: left;
    margin-bottom: 1.5rem;
    margin-top: 0;
    border-top: 3px solid var(--border-color);
    padding-top: 3rem;
    position: relative;
}

.education-info::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    border-top: 1px solid var(--border-color);
    opacity: 0.3;
}

.education-info h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    margin-top: 0;
    font-size: 1.3rem;
}

.education-info p em {
    font-style: italic;
}

.sidebar .resume-btn {
    width: auto;
    display: inline-block;
    margin-bottom: 0;
}
.resume-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: var(--card-bg);
    border: 4px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-cartoon);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-cartoon);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform-origin: center center;
}

.resume-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--accent-red);
    border-color: var(--accent-red);
}
.resume-btn:active {
    transform: scale(0.98) translateY(1px);
    box-shadow: 3px 3px 0 var(--border-color);
}

[data-theme="dark"] .resume-btn:hover {
    color: var(--accent-hover);
    border-color: var(--accent-hover);
    background-color: rgba(0, 212, 170, 0.1);
    box-shadow: 5px 5px 0 rgba(0, 212, 170, 0.3);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: var(--text-primary);
    background-color: var(--card-bg);
    border: 4px solid var(--border-color);
    width: 45px;
    height: 45px;
    border-radius: 14px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-cartoon);
    transform-origin: center center;
}

.social-links a:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: var(--shadow-hover);
    color: var(--accent-red);
    border-color: var(--accent-red);
}
[data-theme="dark"] .social-links a:hover {
    color: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 10px 10px 0 rgba(0, 212, 170, 0.4);
}
.social-links a:active {
    transform: scale(0.95);
}

/* Programming Languages Grid */
.programming-languages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.lang-logo {
    background-color: var(--bg-color);
    border: 3px solid var(--border-color);
    border-radius: 14px;
    width: 100%;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0 var(--border-color);
    cursor: pointer;
    gap: 0.25rem;
    min-height: 70px;
}

.lang-logo:hover {
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    border-color: var(--accent-red);
}
[data-theme="dark"] .lang-logo:hover {
    border-color: var(--accent-hover);
}

.lang-logo i {
    font-size: 1.4rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    margin-bottom: 0.2rem;
    flex-shrink: 0;
}

.lang-logo:hover i {
    color: var(--accent-red);
    transform: scale(1.1);
}
[data-theme="dark"] .lang-logo:hover i {
    color: var(--accent-hover);
}

.valorant-info {
    margin-top: 1.25rem;
    padding-top: 0;
    border-top: none;
}

.valorant-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.valorant-title i {
    margin-right: 0.35rem;
}

.valorant-info .valorant-btn + .valorant-btn {
    margin-top: 1rem;
}

.valorant-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    background-color: var(--bg-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0 var(--border-color);
    position: relative;
    text-align: center;
    line-height: 1.4;
}

.valorant-btn__title {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
}

.valorant-btn__meta {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

[data-theme="dark"] .valorant-btn__meta {
    color: var(--text-tertiary);
}

.valorant-btn--steam {
    border-color: var(--accent-red);
}

[data-theme="dark"] .valorant-btn--steam {
    border-color: rgba(0, 212, 170, 0.6);
}

.valorant-btn:hover {
    border-color: var(--accent-red);
}

[data-theme="dark"] .valorant-btn:hover {
    border-color: var(--accent-hover);
}

.valorant-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 6px 6px 0 var(--border-color);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.valorant-btn:hover .valorant-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.valorant-popup img {
    display: block;
    max-width: 340px;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

.lang-logo span {
    font-family: var(--font-family);
    font-size: 0.65rem;
    color: var(--text-primary);
    font-weight: 400;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 100%;
}

/* Gaming Achievements Section - full width below main area */
.gaming-achievements-section {
    max-width: var(--container-max-width);
    margin: 0 auto 2rem;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.gaming-achievements-container {
    background-color: var(--card-bg);
    border: 4px solid var(--border-color);
    border-radius: var(--radius-cartoon);
    padding: 2rem;
    box-shadow: var(--shadow-cartoon);
}

.gaming-achievements-section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.gaming-achievements-section-title i {
    margin-right: 0.5rem;
}

.gaming-achievements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.gaming-achievements-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gaming-achievements-block .gaming-achievements-comp,
.gaming-achievements-block .gaming-achievements-campaign {
    margin-bottom: 0;
}

/* Gaming Achievements - proper layout */
.gaming-achievements-comp,
.gaming-achievements-campaign {
    background-color: var(--bg-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 2px 2px 0 var(--border-color);
}

.gaming-achievements-campaign {
    margin-bottom: 0;
}

.gaming-achievements-label {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.gaming-achievements-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary, var(--text-secondary));
    font-style: italic;
    margin-bottom: 0.75rem;
}

.gaming-achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gaming-achievement-item {
    position: relative;
}

.gaming-achievement-link {
    display: block;
    padding: 0.55rem 0.85rem;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gaming-achievement-link:hover {
    border-color: var(--accent-red);
}

[data-theme="dark"] .gaming-achievement-link:hover {
    border-color: var(--accent-hover);
}

.gaming-achievement-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 6px 6px 0 var(--border-color);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.gaming-achievement-link:hover .gaming-achievement-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.gaming-campaign-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.gaming-campaign-list li {
    font-size: 1rem;
    color: var(--text-secondary);
    padding: 0.15rem 0;
    line-height: 1.4;
}

.gaming-campaign-list li::before {
    content: '▸ ';
    color: var(--accent-red);
}

[data-theme="dark"] .gaming-campaign-list li::before {
    color: var(--accent-hover);
}

.gaming-achievement-popup img {
    display: block;
    max-width: 340px;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}


/* Main Content Area */
.main-content {
    background-color: var(--card-bg);
    border: 4px solid var(--border-color);
    border-radius: var(--radius-cartoon);
    padding: 2rem;
    position: relative;
    box-shadow: var(--shadow-cartoon);
    transition: box-shadow 0.3s ease;
    overflow: visible;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid var(--border-color);
    opacity: 0.2;
    pointer-events: none;
}

.main-content article {
    margin-bottom: 2.5rem;
    content-visibility: auto;
}

.main-content article:last-child {
    margin-bottom: 0;
}

.main-content h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.main-content h2::after {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    margin-top: 0.5rem;
    transform: skewX(-10deg);
}

.page-title {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin-left: auto;
    margin-right: auto;
}

.main-content h2.page-title {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

.main-content h2.page-title::after {
    content: none;
}

/* Consistent font weight and style for all titles and headings */
h1, h2, h3, h4,
.page-title,
.main-content h2,
.sidebar h1,
.expertise-title,
.expertise-item h3,
.experience-info h4,
.education-info h4,
.valorant-title,
.gaming-achievements-section-title,
.gaming-achievements-label,
.game-project-card__title,
.project-details h3,
.project-details-block h4,
.gdd-content h3,
.gdd-content h4,
.contact-form h3,
.showcase-heading,
.tech-stack-category__title,
.code-snippet h4,
table th,
.game-project > a > h3,
.game-project > h3 {
    font-weight: 700;
    font-style: normal;
}

.main-content p {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.8;
    font-weight: 500;
}

/* --- Page-Specific Sections --- */

/* Expertise Section - 2x3 grid, rounded cards, accent border, turquoise icons */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    content-visibility: auto;
}

.expertise-item {
    background-color: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    box-shadow: var(--shadow-cartoon);
    text-align: left;
}

[data-theme="dark"] .expertise-item {
    border-color: var(--accent-red);
    background-color: var(--card-bg);
}

.expertise-item::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid var(--border-color);
    opacity: 0.2;
    pointer-events: none;
    border-radius: 11px;
}

.expertise-item:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-hover);
}

.expertise-item i {
    font-size: 1.75rem;
    color: var(--accent-teal);
    margin: 0.4rem 0 0.75rem 0.4rem;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] .expertise-item i {
    color: var(--accent-teal);
}

.expertise-item:hover i {
    transform: rotate(-8deg);
}

.expertise-item h3 {
    font-family: var(--font-family);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.expertise-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

[data-theme="dark"] .expertise-item p {
    color: var(--text-muted);
}

/* Tech Stack Section */
.tech-stack-image {
    width: 100%;
    height: auto;
    border-radius: 0;
    margin-top: 1rem;
    border: 3px solid var(--border-color);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 0;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

.tech-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    text-align: center;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.05);
}

.tech-logo:hover {
    transform: translateY(-3px);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.15);
    border-color: var(--accent-red);
}

.tech-logo i {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.tech-logo:hover i {
    color: var(--accent-red);
    transform: scale(1.1);
}

.tech-logo span {
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Game Projects Page - Filter & Grid */
.game-projects-page .page-title {
    margin-bottom: 1.25rem;
}

.game-projects-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 2rem;
}

.game-projects-filter .filter-btn {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 400;
    padding: 0.5rem 1.2rem;
    border-radius: 9999px;
    text-decoration: none;
    color: var(--text-secondary);
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.game-projects-filter .filter-btn[type="button"] {
    appearance: none;
}

.game-projects-filter a.filter-btn:hover,
.game-projects-filter button.filter-btn:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
    background-color: var(--card-bg);
    transform: scale(1.06);
}

.game-projects-filter .filter-btn--active {
    color: var(--card-bg);
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    cursor: default;
}

.game-projects-filter .filter-btn--active:hover {
    color: var(--card-bg);
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    transform: scale(1.06);
}

[data-theme="dark"] .game-projects-filter .filter-btn--active,
[data-theme="dark"] .game-projects-filter .filter-btn--active:hover {
    color: #ffffff;
    background-color: var(--accent);
    border-color: var(--accent);
}
[data-theme="dark"] .game-projects-filter .filter-btn:not(.filter-btn--active):hover {
    color: var(--accent-hover);
    border-color: var(--accent-hover);
    background-color: var(--card-bg);
}

[data-theme="dark"] {
    --shadow-cartoon: 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-hover: 0 14px 32px rgba(232, 119, 34, 0.12);
}

.game-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.25rem;
    content-visibility: auto;
    overflow: visible;
    padding: 1rem 2rem;
}

.game-project-card {
    display: block;
    width: 100%;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    background-color: var(--card-bg);
    border: 4px solid var(--border-color);
    border-radius: var(--radius-cartoon);
    overflow: visible;
    box-shadow: var(--shadow-cartoon);
    transition: transform 0.25s ease, box-shadow 0.25s ease, z-index 0.25s ease;
    position: relative;
    z-index: 0;
}
.game-project-card:hover {
    z-index: 10;
}

.game-project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover), 0 16px 32px rgba(0,0,0,0.2);
}

.game-project-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(ellipse 60% 50% at 30% 30%, rgba(46, 196, 182, 0.22), transparent 60%),
        linear-gradient(160deg, #0b1f3a 0%, #121a22 100%);
    border: none;
    color: #2ec4b6;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

[data-theme="dark"] .game-project-card {
    box-shadow: var(--shadow-cartoon);
}

[data-theme="dark"] .game-project-card:hover {
    box-shadow: var(--shadow-hover), 0 24px 48px rgba(0,0,0,0.4);
}

.game-project-card__thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--bg-color);
    border-radius: calc(var(--radius-cartoon) - 4px) calc(var(--radius-cartoon) - 4px) 0 0;
    display: block;
    line-height: 0;
    font-size: 0;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.game-project-card__banner {
    display: block;
    width: 100%;
    min-height: 2.35rem;
    padding: 0.48rem 0.85rem;
    border: 2px solid rgba(232, 119, 34, 0.35);
    border-bottom: 2px solid var(--border-color);
    border-top-left-radius: calc(var(--radius-cartoon) - 4px);
    border-top-right-radius: calc(var(--radius-cartoon) - 4px);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.35), rgba(232, 119, 34, 0.32));
    color: var(--text-on-elev);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.25;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-text-stroke: 0;
    paint-order: stroke fill;
    text-shadow: none;
}

[data-theme="light"] .game-project-card__banner {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.35), rgba(232, 119, 34, 0.32));
    color: #2f211c;
    border-color: rgba(232, 119, 34, 0.35);
    -webkit-text-stroke: 0;
    text-shadow: none;
}

[data-theme="dark"] .game-project-card__banner {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.28), rgba(232, 119, 34, 0.3));
    color: #1c1612;
    border-color: rgba(232, 119, 34, 0.4);
    text-shadow: none;
}

/* --- Game Projects Bento Layout (unique page layout) --- */
.game-projects-bento-page .game-projects-hero-head {
    margin-bottom: 1.5rem;
}

.game-projects-bento-page .page-title {
    font-size: clamp(2rem, 5vw, 2.85rem);
}

.game-projects-bento-page .page-title::after {
    content: none !important;
    display: none !important;
}

.game-projects-bento-page .game-projects-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 0;
    max-width: 52ch;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="dark"] .game-projects-bento-page .game-projects-subtitle {
    color: var(--text-tertiary);
}

/* Tab-style filter for bento page */
.game-projects-filter--tabs {
    display: inline-flex;
    padding: 0.25rem;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    margin-bottom: 2rem;
    box-shadow: 3px 3px 0 var(--border-color);
}

.game-projects-filter--tabs .filter-btn {
    border-radius: 10px;
    border: none;
    background: transparent;
}

.game-projects-filter--tabs .filter-btn--active {
    background-color: var(--accent-red);
    color: var(--card-bg);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.15);
}

[data-theme="dark"] .game-projects-filter--tabs .filter-btn--active {
    background-color: var(--accent-maroon);
}

/* Empty state for bento grid */
.game-projects-bento.game-projects-grid--empty,
.game-projects-bento:has(.game-project-card--hidden:only-child) {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-projects-grid--empty {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.empty-state-message {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
    font-style: italic;
}

/* General hover feedback for clickable titles */
a > h2,
a > h3,
h2 > a,
h3 > a {
    transform-origin: center center;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a > h2:hover,
a > h3:hover,
h2 > a:hover,
h3 > a:hover {
    color: var(--accent-red);
    transform: translateY(-2px) scale(1.1);
}

/* GitHub link styling */
.github-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background-color: var(--card-bg);
    border: 3px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 400;
    font-family: var(--font-family);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0.5rem auto 1.5rem auto;
    width: fit-content;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

.github-link i {
    font-size: 1.1rem;
}

.github-link:hover {
    transform: translate(-2px, -2px) scale(1.05);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    border-color: var(--accent-red);
    color: var(--accent-red);
}
[data-theme="dark"] .github-link:hover {
    border-color: var(--accent-hover);
    color: var(--accent-hover);
}

.project-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.project-cta-buttons .github-link {
    margin: 0;
}

.project-media-block {
    max-width: 960px;
    margin: 0 auto 2.5rem auto;
}

.project-media-block--compact {
    max-width: 640px;
}

.project-media-block--compact .project-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.feature-shot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    justify-items: stretch;
}

.feature-shot {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    box-sizing: border-box;
}

.feature-shot--wide {
    grid-column: 1 / -1;
}

/* Lone card in a row (before a full-width card, or last odd item) */
.feature-shot:not(.feature-shot--wide):has(+ .feature-shot--wide),
.feature-shot:not(.feature-shot--wide):last-child:nth-child(odd),
.feature-shot:not(.feature-shot--wide):only-child {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: calc((100% - 1rem) / 2);
}

.feature-shot__title {
    margin: 0;
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-shot__text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.feature-shot__img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    object-position: center top;
    display: block;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
}

/* Full uncropped screenshots (e.g. Habbitto / Kivi feature gallery) */
.feature-shot-grid--full .feature-shot {
    align-items: center;
}

.feature-shot-grid--full .feature-shot__title,
.feature-shot-grid--full .feature-shot__text {
    width: 100%;
    text-align: center;
}

.feature-shot-grid--full .feature-shot__img,
.feature-shot-grid--full .feature-shot__gallery .feature-shot__img {
    max-height: none;
    height: auto;
    width: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
    object-position: center;
}

.feature-shot-grid--full .feature-shot__gallery {
    width: 100%;
    justify-items: center;
}

/* Stacked, horizontally centered feature cards (e.g. Kivi project page) */
.feature-shot-grid--centered {
    grid-template-columns: 1fr;
    justify-items: center;
}

.feature-shot-grid--centered .feature-shot,
.feature-shot-grid--centered .feature-shot--wide {
    grid-column: auto;
    width: fit-content;
    max-width: 100%;
    justify-self: center;
}

.project-spotlight--page.project-spotlight--stacked .project-spotlight__media {
    overflow: visible;
    background: transparent;
}

.project-spotlight--page.project-spotlight--stacked .project-spotlight__media img {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    object-fit: contain;
    border-radius: 12px;
}

.feature-shot__gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

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

.feature-shot__gallery .feature-shot__img {
    max-height: 180px;
}

@media (max-width: 700px) {
    .feature-shot-grid {
        grid-template-columns: 1fr;
    }

    .feature-shot:not(.feature-shot--wide):has(+ .feature-shot--wide),
    .feature-shot:not(.feature-shot--wide):last-child:nth-child(odd),
    .feature-shot:not(.feature-shot--wide):only-child {
        max-width: none;
    }

    .feature-shot__gallery {
        grid-template-columns: 1fr;
    }

    .feature-shot__gallery--pair {
        grid-template-columns: 1fr;
    }

    .feature-shot__img,
    .feature-shot__gallery .feature-shot__img {
        max-height: 240px;
    }

    .feature-shot-grid--full .feature-shot__img,
    .feature-shot-grid--full .feature-shot__gallery .feature-shot__img {
        max-height: none;
    }
}

/* Video container styling */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border-radius: 0;
    border: 3px solid var(--border-color);
    width: 100%;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

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

/* GDD Image styling */
.project-image {
    width: 100%;
    height: auto;
    border-radius: 0;
    border: 3px solid var(--border-color);
    display: block;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

/* GDD Detail Page */
.gdd-content {
    text-align: left;
}

.gdd-content h3 {
    font-family: var(--font-family);
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    font-weight: 700;
}

.gdd-content h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--border-color);
    opacity: 0.3;
}

.gdd-content h4 {
    font-family: var(--font-family);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.gdd-content p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.gdd-content ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.gdd-content ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.gdd-images {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    justify-content: center;
}

.gdd-images img {
    flex: 1;
    min-width: 280px;
    max-width: 100%;
    height: auto;
    border-radius: 0;
    border: 3px solid var(--border-color);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

/* Contact Page */
.map-container {
    border: 3px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

.map-container iframe {
    display: block;
    width: 100%;
}

.contact-form h3 {
    font-family: var(--font-family);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    flex: 1;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 0;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1.15rem;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.05);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-width: 4px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
    margin-bottom: 1.5rem;
}

.contact-form::after {
    content: '';
    display: table;
    clear: both;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 4px solid var(--border-color);
    border-radius: 0;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    float: right;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.2);
}
[data-theme="dark"] .submit-btn:hover {
    border-color: var(--accent-hover);
    color: var(--accent-hover);
}

/* --- Page Transition Overlay (disabled; see later display:none rule) --- */

/* Hide page content during transition */
body.transitioning {
    overflow: hidden;
}

body.transitioning .container,
body.transitioning .main-content,
body.transitioning .sidebar,
body.transitioning .about-section,
body.transitioning .expertise-container,
body.transitioning .expertise-section,
body.transitioning .tech-gaming-row,
body.transitioning header {
    opacity: 0;
    transition: opacity 0.1s ease;
}

/* --- Content Animations --- */

.container,
.main-content,
.sidebar,
.about-section,
.expertise-container,
.expertise-section,
.info-card {
    animation: slideInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.container {
    animation-delay: 0s;
}

.sidebar {
    animation-delay: 0.02s;
}

.about-section {
    animation-delay: 0.03s;
}

.expertise-container {
    animation-delay: 0.04s;
}

.expertise-section {
    animation-delay: 0.04s;
}

.info-card {
    animation-delay: 0.05s;
}

.tech-gaming-row {
    animation: slideInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    animation-delay: 0.06s;
}

.main-content {
    animation-delay: 0.07s;
}

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

/* Staggered animations for articles */
.main-content article {
    animation: fadeInSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.main-content article:nth-child(1) {
    animation-delay: 0.05s;
}

.main-content article:nth-child(2) {
    animation-delay: 0.08s;
}

.main-content article:nth-child(3) {
    animation-delay: 0.1s;
}

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

/* Staggered animations for expertise items */
.expertise-item {
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: scale(0.9);
}

.expertise-item:nth-child(1) { animation-delay: 0.3s; }
.expertise-item:nth-child(2) { animation-delay: 0.32s; }
.expertise-item:nth-child(3) { animation-delay: 0.34s; }
.expertise-item:nth-child(4) { animation-delay: 0.36s; }
.expertise-item:nth-child(5) { animation-delay: 0.38s; }
.expertise-item:nth-child(6) { animation-delay: 0.4s; }

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Sidebar elements animation */
.sidebar > * {
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
}

.profile-pic {
    animation-delay: 0.12s;
}

.sidebar h1 {
    animation-delay: 0.15s;
}

.contact-info {
    animation-delay: 0.18s;
}

.education-info {
    animation-delay: 0.2s;
}

.resume-btn {
    animation-delay: 0.22s;
}

.social-links {
    animation-delay: 0.25s;
}

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

/* Navigation animation */
nav {
    animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(-20px);
}

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

/* Image defaults — visible immediately; lazy images fade in when loaded */
img {
    max-width: 100%;
    height: auto;
    opacity: 1;
    transform: none;
}

img[loading="lazy"],
img.img--fade-in {
    opacity: 0;
    transition: opacity 0.2s ease;
}

img[loading="lazy"].is-loaded,
img.img--fade-in.is-loaded {
    opacity: 1;
}

/* Smooth link transitions */
a {
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
    position: relative;
}

/* Hover feedback for regular links (excludes nav and other special links) */
a:not(.resume-btn):not(.github-link):not(.submit-btn):not(.social-links a):not(.game-project > a):not(.game-project-card):not(.contact-link):not(.nav-link):not(.level-design-toc__beat-link):not(.level-design-toc__section-link):not(.level-design-doc-btn):hover {
    color: var(--accent-red);
}



/* Hover animations for interactive elements */
.expertise-item,
.game-project,
.github-link,
.resume-btn,
.submit-btn,
.social-links a {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

/* --- Code Block Styling --- */
pre {
    background-color: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 0;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
}

code {
    font-family: var(--font-family);
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    font-size: 0.9em;
}

pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: var(--text-primary);
}

.code-snippet {
    margin: 2rem 0;
}

.code-snippet h4 {
    font-family: var(--font-family);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* --- Game Showcase Template (rounded containers) --- */
.showcase-container {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

[data-theme="dark"] .showcase-container {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    background-color: var(--card-bg);
}

.showcase-container:last-child {
    margin-bottom: 0;
}

.project-page-back {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.showcase-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.showcase-heading i {
    color: var(--accent-red);
    font-size: 1.1rem;
}

[data-theme="dark"] .showcase-heading i {
    color: var(--accent-teal);
}

.showcase-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.showcase-metrics--2 {
    grid-template-columns: repeat(2, 1fr);
}

.showcase-metric {
    text-align: center;
}

.showcase-metric__value {
    display: block;
    font-family: var(--font-family);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.showcase-metric__label {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.showcase-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem 1.5rem;
}

.showcase-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.showcase-detail-item__label {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.showcase-detail-item__value {
    font-family: var(--font-family);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-mustard);
}

[data-theme="light"] .showcase-detail-item__value {
    color: #8b0000;
}

.card-highlight {
    color: var(--accent-mustard);
    font-weight: 600;
}

[data-theme="light"] .card-highlight {
    color: #8b0000;
}

[data-theme="light"] .highlight-text {
    color: #8b0000;
}

.showcase-detail-grid--span-1 {
    grid-template-columns: 1fr;
}

.tech-stack-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.5rem;
}

.tech-stack-category {
    min-width: 0;
    display: flex;
}

.tech-stack-subcontainer {
    width: 100%;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    height: 100%;
}

[data-theme="dark"] .tech-stack-subcontainer {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(228, 91, 75, 0.4);
}

.tech-stack-subcontainer .tech-stack-category__title {
    margin-top: 0;
}

/* Same heading style when used under Technical Implementation (or other sections) */
.showcase-container .tech-stack-category__title:not(:first-of-type) {
    margin-top: 1.25rem;
}

.tech-stack-category__title {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-stack-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem 1rem;
    font-family: var(--font-family);
    font-size: 0.95rem;
    color: var(--text-primary);
}


.tech-stack-list li {
    padding: 0.3rem 0;
    opacity: 0.9;
}

.tech-stack-list li::before {
    content: '▸ ';
    color: var(--accent-red);
}

[data-theme="dark"] .tech-stack-list li::before {
    color: var(--accent-teal);
}

@media (max-width: 640px) {
    .tech-stack-categories {
        grid-template-columns: 1fr;
    }
}

/* Center images and media inside showcase containers */
.showcase-container .project-media-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.showcase-container .project-media-block .project-image,
.showcase-container .project-media-block video.project-image {
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .showcase-metrics {
        grid-template-columns: 1fr;
    }
    .showcase-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .showcase-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Table Styling --- */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    border: 3px solid var(--border-color);
}

table th,
table td {
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-align: left;
    font-family: var(--font-family);
    vertical-align: top;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.7;
}

table td {
    font-weight: 400;
}

table th {
    background-color: var(--card-bg);
    font-family: var(--font-family);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

table tr:nth-child(even) {
    background-color: var(--bg-color);
}

table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] table tr:hover {
    background-color: rgba(228,91,75,0.08);
}

table td strong {
    font-family: var(--font-family);
    font-size: 1.2rem;
    font-weight: 700;
}

/* Level Design Document - Presentation Style */
.level-doc-presentation .presentation-hero {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.02) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
}

.level-doc-presentation .presentation-hero__poster {
    display: block;
    width: min(100%, 720px);
    max-width: 100%;
    height: auto;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
    object-fit: contain;
}

.level-doc-presentation .presentation-hero .project-cta-buttons {
    margin-top: 1.25rem;
}

[data-theme="dark"] .level-doc-presentation .presentation-hero {
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
}

.level-doc-presentation .presentation-hero__title {
    font-family: var(--font-family);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    letter-spacing: 0.02em;
}

.level-doc-presentation .presentation-hero__subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 600;
}

.level-doc-presentation .presentation-slide {
    margin-bottom: 2rem;
}

.level-doc-presentation .presentation-section-num {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Level Design Document */
.level-design-doc .level-doc-subtitle {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-weight: 600;
}

.level-design-doc .doc-h4 {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
    color: var(--accent-orange);
    font-weight: 700;
}

.level-design-doc .doc-subsection .doc-h4 {
    margin-top: 0;
}

.level-design-doc .project-description {
    margin-bottom: 0.75rem;
}

.level-design-doc .doc-checklist {
    list-style: none;
    padding-left: 0;
}

.level-design-doc .doc-checklist li {
    padding: 0.35rem 0;
}

/* Document subsection containers */
.level-design-doc .doc-subsection {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    min-width: 0;
}

[data-theme="dark"] .level-design-doc .doc-subsection {
    background: rgba(255, 255, 255, 0.03);
}

.level-design-doc .doc-subsection:last-child {
    margin-bottom: 0;
}

/* Subcontainers (pillars, blocks) inside subsections */
.level-design-doc .doc-pillar {
    background: rgba(255, 255, 255, 0.5);
    border-left: 4px solid var(--accent-mustard);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    min-width: 0;
}

[data-theme="dark"] .level-design-doc .doc-pillar {
    background: rgba(0, 0, 0, 0.2);
    border-left-color: var(--accent-teal);
}

.level-design-doc .doc-pillar:last-child {
    margin-bottom: 0;
}

.level-design-doc .doc-pillar .project-description {
    margin-bottom: 0;
}

/* Block groups for related items (e.g. Core emotions, Weather) */
.level-design-doc .doc-block {
    margin-bottom: 1rem;
}

.level-design-doc .doc-block:last-child {
    margin-bottom: 0;
}

.level-design-doc .doc-block-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.level-design-doc .doc-pillar > p:first-child strong {
    color: var(--accent-orange);
}

.level-design-doc .ldd-highlight {
    color: var(--accent-orange);
}

/* Image placeholders for level design doc */
.ldd-image-placeholder {
    width: 100%;
    min-height: 220px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.ldd-image-placeholder--large {
    min-height: 360px;
}

.ldd-image-placeholder::after {
    content: '\f03e  ' attr(data-label);
    font-family: 'Font Awesome 6 Free', var(--font-family);
    font-weight: 900;
    font-size: 0.95rem;
    color: var(--text-tertiary);
    text-align: center;
    padding: 1rem;
    letter-spacing: 0.02em;
}

[data-theme="dark"] .ldd-image-placeholder {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
}

.ldd-image-placeholder img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.ldd-image-placeholder:has(img)::after {
    display: none;
}

.ldd-image-placeholder:has(img) {
    border-style: solid;
    min-height: auto;
}

/* --- Original Animations --- */
@keyframes fadeInAnimation {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .sidebar {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 2rem;
        text-align: center;
    }
    .sidebar > .profile-pic {
        justify-self: center;
    }
    .sidebar-name-block {
        width: 100%;
        align-items: center;
        text-align: center;
    }
    .sidebar-name-block .contact-info {
        text-align: center;
    }
    .sidebar-name-block .contact-info p {
        text-align: center;
    }
    .sidebar h1 {
        margin-bottom: 0;
        text-align: center;
    }
    .sidebar-actions {
        justify-self: center;
        width: 100%;
        max-width: 320px;
        justify-content: center;
        padding-left: 0;
        border-left: none;
        padding-top: 1rem;
        border-top: 2px solid var(--border-color);
    }
    [data-theme="dark"] .sidebar-actions {
        border-top-color: rgba(232, 119, 34, 0.4);
    }
    .sidebar-actions .resume-btn {
        width: 100%;
    }
    .sidebar-actions .social-links {
        width: 100%;
        justify-content: center;
    }

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

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

    .form-row {
        flex-direction: column;
    }
    
    header {
        padding: 0.5rem 1rem;
    }

    nav {
        margin: 0 0.5rem;
        padding: 0.35rem 0.4rem;
    }

    nav ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.25rem;
        width: 100%;
    }

    nav a {
        padding: 0.5rem 0.65rem;
        font-size: 0.72rem;
        letter-spacing: 0.1em;
        white-space: normal;
        line-height: 1.25;
        text-align: center;
        width: 100%;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    nav .theme-toggle {
        min-width: 36px;
        height: 32px;
        padding: 0.35rem 0.5rem;
        margin-left: 0.2rem;
        font-size: 1rem;
    }

    .game-projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }

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

    .game-projects-bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-projects-bento .game-project-card--hero:not(.game-project-card--hidden) {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(2) { grid-column: 1; grid-row: 2; }
    .game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(3) { grid-column: 2; grid-row: 2; }
    .game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(4) { grid-column: 1; grid-row: 3; }
    .game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(5) { grid-column: 2; grid-row: 3; }
    .game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(6) { grid-column: 1 / 3; grid-row: 4; }

    .programming-languages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    .gaming-achievements-grid {
        grid-template-columns: 1fr;
    }

    .project-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .level-doc-presentation .presentation-hero {
        padding: 1.5rem 1rem;
    }

    .level-design-doc .doc-subsection,
    .level-design-doc .doc-pillar {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .ldd-image-placeholder {
        min-height: 160px;
    }

    .gaming-campaign-list {
        gap: 0.4rem 1rem;
    }

    .game-projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .game-projects-grid--detailed {
        grid-template-columns: 1fr;
    }

    .game-projects-bento {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .game-projects-bento .game-project-card--hero:not(.game-project-card--hidden),
    .game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(2),
    .game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(3),
    .game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(4),
    .game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(5),
    .game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(6) {
        grid-column: 1;
        grid-row: auto;
    }

    .game-projects-bento .game-project-card--hero.game-project-card--hidden ~ .game-project-card--bento:not(.game-project-card--hidden) {
        grid-column: 1;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .game-projects-filter .filter-btn {
        padding: 0.45rem 1rem;
        font-size: 0.85rem;
    }

    .game-project-card__title {
        font-size: 1.05rem;
    }

    .game-project-card__role {
        font-size: 0.8rem;
    }

    .game-project-card--detailed .game-project-card__title {
        font-size: 1rem;
    }

    .game-project-card--detailed .game-project-card__role,
    .game-project-card--detailed .game-project-card__row {
        font-size: 0.7rem;
    }

    .game-project-card--detailed .game-project-card__thumb {
        aspect-ratio: 16 / 9;
    }

    .gdd-images {
        flex-direction: column;
        align-items: center;
    }
    
    .main-content h2 {
        font-size: 1.8rem;
    }
    
    .sidebar h1 {
        font-size: 1.5rem;
    }
    
    pre {
        font-size: 0.75rem;
        padding: 1rem;
        overflow-x: auto;
    }
    
    .code-snippet h4 {
        font-size: 1.1rem;
    }
    
    table {
        font-size: 0.95rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
        font-size: 1rem;
    }
    
    table th {
        font-size: 1.2rem;
    }
    
    .project-details-block .project-description {
        font-size: 1.1rem;
    }
    
    .project-details-block ol li {
        font-size: 1.1rem;
    }
    
    .tech-stack-tools {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.75rem;
    }

    .tech-stack-tool {
        min-height: 80px;
        padding: 0.75rem 0.5rem;
    }

    .tech-stack-tool__name {
        font-size: 0.7rem;
    }

    .tech-stack-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
    
    .tech-logo {
        padding: 1rem 0.5rem;
    }
    
    .tech-logo i {
        font-size: 2rem;
    }
    
    .tech-logo span {
        font-size: 0.75rem;
    }

    .programming-languages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .lang-logo {
        min-height: 60px;
        padding: 0.5rem 0.35rem;
    }

    .lang-logo span {
        font-size: 0.6rem;
    }
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}

.contact-link.copied {
    color: var(--accent-teal);
}

/* Respect user motion preference */

/* ---------- Birds data viz page ---------- */
.birds-page {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}
.birds-hero,
.birds-section,
.birds-poster,
.birds-footer {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-cartoon);
    border-radius: var(--radius-cartoon);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.birds-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 0.75rem;
}
.birds-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.birds-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 900px;
}
.birds-hero .birds-links {
    justify-content: center;
    margin-top: 0.9rem;
    margin-bottom: 0.2rem;
}
.birds-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.birds-stat {
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: color-mix(in srgb, var(--card-bg) 92%, var(--accent-red) 8%);
}
.birds-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.1;
    color: var(--text-primary);
}
.birds-stat span {
    font-size: 0.82rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.birds-section h2,
.birds-poster h2,
.birds-hero h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.birds-hero-overview {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 2px solid var(--border-color);
    text-align: left;
}
.birds-hero-overview + .birds-hero-overview {
    margin-top: 1rem;
    padding-top: 1rem;
}
.birds-hero-overview h2 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}
.birds-section p,
.birds-poster-lede,
.birds-hero-overview p,
.birds-hero-overview li {
    color: var(--text-secondary);
    line-height: 1.75;
}
.birds-poster-lede {
    margin-bottom: 1rem;
}
.birds-poster .birds-links,
.birds-card .birds-links {
    justify-content: center;
    margin-bottom: 0;
}
.birds-card .birds-links {
    margin-top: 0.85rem;
}
.birds-section p + p,
.birds-hero-overview p + p {
    margin-top: 0.75rem;
}
.birds-poster img,
.birds-dashboard-image {
    width: 100%;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    display: block;
}
.birds-dashboard-image {
    margin-top: 1rem;
    object-fit: contain;
    background: #0f1118;
}
.birds-dashboard-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.birds-caption {
    margin-top: 0.75rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}
.birds-viz-grid,
.birds-findings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}
.birds-card {
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
    background: color-mix(in srgb, var(--card-bg) 90%, var(--accent-blue) 10%);
}
.birds-card h3 {
    font-family: var(--font-display);
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.birds-viz-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    margin-bottom: 0.7rem;
    display: block;
}
.birds-hero-overview ul {
    margin: 0;
    padding-left: 1.1rem;
}
.birds-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}
.birds-tag {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--card-bg) 92%, var(--accent-teal) 8%);
}
.birds-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.birds-link {
    text-decoration: none;
    border: 2px solid var(--border-color);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.birds-link:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 var(--border-color);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    body {
        animation: fadeInAnimation 0.2s ease-out forwards;
        background-position: 0% 50%;
    }
    body::before {
        animation: none;
    }
    body::after {
        opacity: 0;
    }
}

/* --- Level design case study (level-design.html) --- */
body.level-design-page {
    animation: none !important;
    background-size:
        32px 32px,
        32px 32px,
        24px 24px,
        24px 24px,
        100% 100%;
    background-position:
        0 0,
        16px 16px,
        0 0,
        0 0,
        center center;
}

body.level-design-page::before {
    animation: none !important;
}

.level-design-main {
    padding-bottom: 1rem;
}

.level-design-main .showcase-container {
    scroll-margin-top: 5.5rem;
}

.level-design-main h2.showcase-heading {
    font-size: clamp(1.42rem, 2.4vw, 1.72rem);
}

[data-theme="light"] .level-design-main h2.showcase-heading {
    color: var(--text-primary);
    font-family: var(--font-display);
}

[data-theme="light"] .level-design-main h2.showcase-heading i {
    color: var(--accent-teal);
}

.level-design-beat[id] {
    scroll-margin-top: 6rem;
}

.level-design-subheading[id] {
    scroll-margin-top: 5.5rem;
}

/* Table of contents — explicit two-column grid (avoids CSS columns flow imbalance) */
.level-design-toc {
    scroll-margin-top: 5.5rem;
}

.level-design-toc__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid rgba(232, 119, 34, 0.35);
}

[data-theme="light"] .level-design-toc__title {
    border-bottom-color: rgba(45, 45, 58, 0.15);
    color: var(--text-primary);
}

.level-design-toc__title i {
    color: var(--accent-red);
    font-size: 1.1rem;
}

[data-theme="light"] .level-design-toc__title i {
    color: var(--accent-teal);
}

[data-theme="dark"] .level-design-toc__title i {
    color: var(--accent-teal);
}

.level-design-toc__body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}

.level-design-toc__col {
    min-width: 0;
}

.level-design-toc__col--left {
    display: flex;
    flex-direction: column;
    gap: 0;
    box-sizing: border-box;
    width: 100%;
    border: 1px solid rgba(232, 119, 34, 0.28);
    border-left-width: 3px;
    border-radius: 10px;
    background: rgba(232, 119, 34, 0.22);
    padding: 0.5rem 0.55rem 0.55rem;
}

[data-theme="light"] .level-design-toc__col--left {
    border-color: rgba(45, 45, 58, 0.12);
    border-left-color: var(--accent-red);
    background: rgba(45, 45, 58, 0.12);
}

.level-design-toc__col--left .level-design-toc__sections {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: level-design-toc-section;
}

.level-design-toc__col--left .level-design-toc__section-item:nth-child(5) {
    margin-top: 0.35rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(232, 119, 34, 0.12);
}

[data-theme="light"] .level-design-toc__col--left .level-design-toc__section-item:nth-child(5) {
    border-top-color: rgba(45, 45, 58, 0.08);
}

.level-design-toc__section-item {
    counter-increment: level-design-toc-section;
    margin: 0;
    padding: 0;
}

.level-design-toc__section-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    text-decoration: none;
    border: 1px solid rgba(232, 119, 34, 0.22);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    transform: none;
    color: inherit;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
    outline: none;
    box-shadow: inset 0 0 0 1px transparent;
}

[data-theme="light"] .level-design-toc__section-link {
    border-color: rgba(45, 45, 58, 0.12);
    background: rgba(45, 45, 58, 0.05);
}

.level-design-toc__section-link::before {
    content: counter(level-design-toc-section);
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: #0f0e17;
    background: var(--accent-orange);
    border-radius: 6px;
    transition: filter 0.18s ease, box-shadow 0.18s ease;
}

.level-design-toc__section-label {
    flex: 1;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.level-design-toc__section-link:hover,
.level-design-toc__section-link:focus-visible {
    transform: none;
    background-color: rgba(232, 119, 34, 0.14);
    border-color: rgba(255, 159, 41, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 159, 41, 0.28);
}

.level-design-toc__section-link:hover::before,
.level-design-toc__section-link:focus-visible::before {
    filter: brightness(1.06);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.level-design-toc__section-link:hover .level-design-toc__section-label,
.level-design-toc__section-link:focus-visible .level-design-toc__section-label {
    color: var(--accent-orange);
}

.level-design-toc__section-link:focus-visible {
    outline: none;
    box-shadow:
        inset 0 0 0 1px rgba(255, 159, 41, 0.28),
        inset 0 0 0 3px rgba(0, 180, 216, 0.35);
}

[data-theme="light"] .level-design-toc__section-link:hover,
[data-theme="light"] .level-design-toc__section-link:focus-visible {
    transform: none;
    background-color: rgba(232, 119, 34, 0.14);
    border-color: rgba(232, 119, 34, 0.45);
    box-shadow: inset 0 0 0 1px rgba(232, 119, 34, 0.3);
}

[data-theme="light"] .level-design-toc__section-link:hover .level-design-toc__section-label,
[data-theme="light"] .level-design-toc__section-link:focus-visible .level-design-toc__section-label {
    color: var(--accent-red);
}

[data-theme="light"] .level-design-toc__section-link:focus-visible {
    box-shadow:
        inset 0 0 0 1px rgba(232, 119, 34, 0.3),
        inset 0 0 0 3px rgba(232, 119, 34, 0.22);
}

.level-design-toc__walkthrough-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
    border: 1px solid rgba(232, 119, 34, 0.28);
    border-left-width: 3px;
    border-radius: 12px;
    background: rgba(232, 119, 34, 0.22);
    padding: 0.55rem;
    overflow: hidden;
}

/* In-page beat jump grid — padded shell + inner grid well */
.level-design-toc__walkthrough-panel--embed {
    flex: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 2.25rem;
    min-height: 0;
    padding: clamp(0.75rem, 2.2vw, 1.1rem);
    border-radius: 14px;
    background: linear-gradient(
        165deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(40, 22, 28, 0.45) 100%
    );
}

.level-design-toc__walkthrough-panel--embed .level-design-toc__beats {
    flex: none;
}

[data-theme="light"] .level-design-toc__walkthrough-panel {
    border-color: rgba(45, 45, 58, 0.12);
    border-left-color: var(--accent-red);
    background: rgba(45, 45, 58, 0.12);
}

[data-theme="light"] .level-design-toc__walkthrough-panel.level-design-toc__walkthrough-panel--embed {
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(45, 45, 58, 0.08) 100%
    );
}

.level-design-toc__walkthrough-head {
    flex-shrink: 0;
    align-self: flex-start;
    margin: 0 0 0.65rem;
    padding: 0;
}

.level-design-toc__walkthrough-head a,
.level-design-toc__walkthrough-head-label {
    display: inline-block;
    padding: 0.42rem 1.05rem;
    border: 2px solid var(--accent-teal);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.32);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.level-design-toc__walkthrough-head-label {
    cursor: default;
}

[data-theme="light"] .level-design-toc__walkthrough-head a,
[data-theme="light"] .level-design-toc__walkthrough-head-label {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    border-color: var(--accent-teal);
}

.level-design-toc__walkthrough-head a:hover,
.level-design-toc__walkthrough-head a:focus-visible {
    color: var(--accent-orange);
    border-color: var(--accent-orange);
}

[data-theme="light"] .level-design-toc__walkthrough-head a:hover,
[data-theme="light"] .level-design-toc__walkthrough-head a:focus-visible {
    color: var(--text-primary);
    border-color: var(--accent-teal);
    background: rgba(0, 180, 216, 0.1);
}

/* Beats — responsive grid (thumbnail + play + "Beat N | Name")
   Hover/focus use inset-only highlights so nothing paints past the panel. */
.level-design-toc__beats {
    --level-design-toc-beat-panel: rgba(0, 0, 0, 0.32);
    --level-design-toc-beat-line: rgba(232, 119, 34, 0.2);
    list-style: none;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0.35rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--level-design-toc-beat-line);
    border: 1px solid rgba(232, 119, 34, 0.22);
    border-radius: 10px;
    box-sizing: border-box;
    overflow: hidden;
}

@media (min-width: 36rem) {
    .level-design-toc__beats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .level-design-toc__beats li:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

[data-theme="light"] .level-design-toc__beats {
    --level-design-toc-beat-panel: rgba(255, 255, 255, 0.55);
    --level-design-toc-beat-line: rgba(45, 45, 58, 0.12);
    background: var(--level-design-toc-beat-line);
    border-color: rgba(45, 45, 58, 0.12);
}

.level-design-toc__walkthrough-panel--embed .level-design-toc__beats {
    border-radius: 10px;
}

.level-design-toc__beats li {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--level-design-toc-beat-panel);
}

.level-design-toc__beat-link {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 3.15rem;
    gap: 0.7rem;
    padding: 0.6rem 0.85rem;
    text-decoration: none;
    background: transparent;
    border: none;
    border-radius: 0;
    outline: none;
    box-sizing: border-box;
    transform: none;
    color: inherit;
    transition:
        background-color 0.18s ease,
        box-shadow 0.18s ease,
        color 0.18s ease;
    box-shadow: inset 0 0 0 1px transparent;
}

.level-design-toc__beat-link:hover {
    transform: none;
    background-color: rgba(232, 119, 34, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 159, 41, 0.55);
}

.level-design-toc__beat-link:focus-visible {
    outline: none;
    background-color: rgba(0, 180, 216, 0.08);
    box-shadow: inset 0 0 0 2px rgba(0, 180, 216, 0.55);
}

.level-design-toc__beat-link:hover .level-design-toc__beat-text,
.level-design-toc__beat-link:focus-visible .level-design-toc__beat-text {
    color: var(--accent-orange);
}

[data-theme="light"] .level-design-toc__beat-link:hover {
    transform: none;
    background-color: rgba(0, 180, 216, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 180, 216, 0.38);
}

[data-theme="light"] .level-design-toc__beat-link:hover .level-design-toc__beat-text,
[data-theme="light"] .level-design-toc__beat-link:focus-visible .level-design-toc__beat-text {
    color: var(--text-primary);
}

[data-theme="light"] .level-design-toc__beat-link:focus-visible {
    outline: none;
    background-color: rgba(0, 180, 216, 0.08);
    box-shadow: inset 0 0 0 2px rgba(0, 180, 216, 0.45);
}

.level-design-toc__beat-link.is-active {
    background-color: rgba(232, 119, 34, 0.16);
    box-shadow: inset 0 0 0 2px rgba(255, 159, 41, 0.35);
}

.level-design-toc__beat-link.is-active .level-design-toc__beat-text {
    color: var(--accent-orange);
}

.level-design-toc__beat-link.is-active:focus-visible {
    outline: none;
    box-shadow:
        inset 0 0 0 2px rgba(255, 159, 41, 0.35),
        inset 0 0 0 4px rgba(0, 180, 216, 0.35);
}

.level-design-toc__beat-thumb {
    position: relative;
    flex-shrink: 0;
    width: clamp(3.35rem, 8.5vw, 5rem);
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(232, 119, 34, 0.4);
    background: var(--card-bg);
    transition: border-color 0.18s ease;
}

[data-theme="light"] .level-design-toc__beat-thumb {
    border-color: rgba(45, 45, 58, 0.18);
}

.level-design-toc__beat-link:hover .level-design-toc__beat-thumb {
    border-color: rgba(255, 159, 41, 0.85);
}

[data-theme="light"] .level-design-toc__beat-link:hover .level-design-toc__beat-thumb {
    border-color: rgba(0, 180, 216, 0.5);
}

[data-theme="light"] .level-design-toc__beat-link.is-active {
    background-color: rgba(0, 180, 216, 0.11);
    box-shadow: inset 0 0 0 2px rgba(0, 180, 216, 0.42);
}

[data-theme="light"] .level-design-toc__beat-link.is-active .level-design-toc__beat-text {
    color: var(--text-primary);
}

[data-theme="light"] .level-design-toc__beat-link.is-active:focus-visible {
    box-shadow:
        inset 0 0 0 2px rgba(0, 180, 216, 0.42),
        inset 0 0 0 4px rgba(0, 180, 216, 0.2);
}

.level-design-toc__beat-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.25s ease;
}

/* Click-to-enlarge (project pages) */
.level-design-main img.image-lightbox-trigger,
.main-content img.image-lightbox-trigger,
.feature-shot__img.image-lightbox-trigger {
    cursor: zoom-in;
}

.image-lightbox {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    max-width: min(96vw, 1400px);
    max-height: 90vh;
    width: max-content;
    color: inherit;
    overflow: visible;
    box-sizing: border-box;
}

.image-lightbox::backdrop {
    background: rgba(10, 10, 14, 0.92);
    cursor: pointer;
}

.image-lightbox__content {
    position: relative;
    margin: 0;
    padding: 0;
}

.image-lightbox__img {
    display: block;
    max-width: min(96vw, 1400px);
    max-height: min(88vh, 900px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

.image-lightbox__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(15, 14, 23, 0.85);
    color: var(--text-primary, #f0f0f5);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    transition: background 0.15s ease, transform 0.15s ease;
}

.image-lightbox__close:hover {
    background: rgba(232, 119, 34, 0.95);
    color: #0f0e17;
}

.image-lightbox__close:focus-visible {
    outline: 2px solid var(--accent-blue, #4ecdc4);
    outline-offset: 2px;
}

[data-theme="light"] .image-lightbox__close {
    background: rgba(255, 255, 255, 0.92);
    color: #1a1a24;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .image-lightbox__close:hover {
    background: var(--accent-teal);
    color: #fff;
}

.level-design-toc__beat-play {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: var(--accent-orange);
    color: #0f0e17;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.48rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.level-design-toc__beat-link.is-active .level-design-toc__beat-play {
    background: rgba(240, 240, 245, 0.92);
    color: #0f0e17;
}

.level-design-toc__beat-text {
    flex: 1;
    min-width: 0;
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.4;
    transition: color 0.18s ease;
}

.level-design-toc__beat-pipe {
    font-weight: 600;
    opacity: 0.55;
}

.level-design-toc__beat-name {
    font-weight: 600;
}

/* Hero card: no inner padding so the screenshot fills the full bordered area */
.level-design-main .showcase-container.showcase-container--hero {
    padding: 0;
    overflow: hidden;
}

.level-design-hero {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    border: none;
}

.level-design-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: linear-gradient(
        180deg,
        rgba(5, 4, 10, 0.82) 0%,
        rgba(8, 7, 14, 0.38) 38%,
        rgba(12, 10, 18, 0.35) 55%,
        rgba(8, 6, 14, 0.9) 100%
    );
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Image + title share one stack; copy sits on top of the screenshot */
.level-design-hero__stage {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: clamp(420px, 68vh, 720px);
}

.level-design-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    line-height: 0;
}

.level-design-hero__top-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.level-design-hero__inner {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(1.35rem, 4vw, 2.5rem) 1.25rem 1.5rem;
    text-align: center;
    background: linear-gradient(
        180deg,
        rgba(6, 5, 12, 0.82) 0%,
        rgba(8, 7, 14, 0.38) 38%,
        rgba(10, 8, 16, 0.12) 62%,
        transparent 85%
    );
    box-sizing: border-box;
}

.level-design-hero__copy {
    width: 100%;
    max-width: min(68rem, 96%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
}

.level-design-hero__title {
    margin: 0;
    padding: 0;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: clamp(2.5rem, 8.5vw, 4.75rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-stretch: expanded;
}

.level-design-hero__title-line {
    display: block;
    color: #fff;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.6);
}

.level-design-hero__title-accent {
    display: block;
    color: #d62828;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
    margin-top: 0.06em;
}

.level-design-hero__lede {
    margin: 1.25rem auto 0;
    max-width: min(44rem, 100%);
    font-family: 'Nunito', sans-serif;
    font-size: clamp(0.95rem, 2.2vw, 1.12rem);
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.04em;
    color: rgba(240, 238, 248, 0.88);
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55);
    text-align: center;
}

/* Hero playable demo: same component as .level-design-doc-btn; hint row stacks under title + icon */
.level-design-hero__demo-btn.level-design-doc-btn {
    margin-top: 1.65rem;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.level-design-doc-btn__primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.level-design-hero__demo-btn.level-design-doc-btn i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

@media (max-width: 36rem) {
    .level-design-hero__title {
        letter-spacing: 0.1em;
        font-size: clamp(1.85rem, 9.2vw, 2.85rem);
    }
}

/* All copy inside showcase cards: full width, left-aligned for reading */
.level-design-main .showcase-container .project-description,
.level-design-main .showcase-container > p {
    text-align: left;
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1rem;
}

.level-design-main .level-design-callout,
.level-design-main .level-design-callout p {
    text-align: left;
    max-width: none;
}

.level-design-main .level-design-section-divider {
    margin: 1.35rem 0 1.1rem;
    border: 0;
    border-top: 1px solid var(--border-color);
    opacity: 0.72;
}

/* Overview stats: full-width symmetric grid inside an inset subcontainer */
.level-design-main #overview .level-design-overview-meta {
    width: 100%;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
    padding: 1.5rem clamp(1.25rem, 4vw, 2.75rem);
    box-sizing: border-box;
    border-radius: 10px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.level-design-main #overview .level-design-overview-meta__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    justify-items: stretch;
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin: 0;
    column-gap: clamp(1.25rem, 4vw, 2.25rem);
    row-gap: clamp(1.1rem, 2.5vw, 1.65rem);
}

.level-design-main #overview .level-design-overview-meta__cell {
    min-width: 0;
    padding: 1.05rem 1.15rem 1.2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .level-design-main #overview .level-design-overview-meta__cell {
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.level-design-main #overview .level-design-overview-meta__cell .showcase-detail-item {
    width: 100%;
    text-align: center;
    align-items: center;
    gap: 0.45rem;
}

.level-design-main #overview .level-design-overview-meta__cell .showcase-detail-item__value {
    text-wrap: balance;
}

/* Center in full showcase width (overrides .level-design-main .showcase-container > p { text-align: left }) */
.level-design-main .showcase-container > p.level-design-doc-btn-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.35rem 0 0.25rem 0;
    text-align: center;
}

.level-design-doc-btn {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: var(--radius-cartoon);
    box-shadow: var(--shadow-cartoon);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.level-design-doc-btn__hint {
    font-size: 0.68em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: rgba(0, 180, 216, 0.15);
    color: var(--accent-teal);
}

[data-theme="dark"] .level-design-doc-btn__hint {
    background: rgba(0, 180, 216, 0.2);
    color: var(--accent-teal);
}

.level-design-doc-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--accent-red);
    border-color: var(--accent-red);
}

[data-theme="dark"] .level-design-doc-btn:hover {
    color: var(--accent-hover, var(--accent-teal));
    border-color: var(--accent-hover, var(--accent-teal));
    background-color: rgba(0, 212, 170, 0.08);
    box-shadow: 5px 5px 0 rgba(0, 212, 170, 0.35);
}

.level-design-doc-btn:focus-visible {
    outline: 2px solid var(--accent-teal);
    outline-offset: 3px;
}

.level-design-doc-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-cartoon);
}

@media (prefers-reduced-motion: reduce) {
    .level-design-doc-btn,
    .level-design-doc-btn:hover,
    .level-design-doc-btn:active {
        transition: none;
        transform: none;
    }
}

@media (max-width: 768px) {
    .level-design-main #overview .level-design-overview-meta__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: clamp(1.5rem, 5vw, 2.75rem);
        row-gap: clamp(1.35rem, 3vw, 2rem);
    }
}

@media (max-width: 480px) {
    .level-design-main #overview .level-design-overview-meta {
        padding: 1.25rem 1.1rem;
    }

    .level-design-main #overview .level-design-overview-meta__grid {
        grid-template-columns: 1fr;
        row-gap: 1.35rem;
    }
}

.level-design-main #overview > .level-design-walkthrough-nest {
    margin-top: 1.75rem;
    margin-bottom: 0;
    padding: 1.2rem 1.35rem 1.35rem;
}

.level-design-main #overview > .level-design-walkthrough-nest .level-design-video {
    margin-top: 0;
}

.level-design-main .showcase-container p strong,
.level-design-main .project-description strong {
    color: var(--accent-mustard);
    font-weight: 700;
}

.level-design-main strong.keyword {
    color: var(--accent-mustard);
    font-weight: 700;
}

.level-design-video {
    margin-top: 1.5rem;
}

.level-design-video-inner {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid var(--border-color);
    aspect-ratio: 16 / 9;
    background: #000;
}

.level-design-video-inner iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.level-design-pillar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.level-design-pillar-card {
    background: var(--bg-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.level-design-pillar-card__num {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent-teal);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.level-design-pillar-card h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.level-design-pillar-card p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0;
}

.level-design-beat-list {
    margin-top: 1.5rem;
}

.level-design-beat {
    display: grid;
    grid-template-columns: 3.35rem minmax(0, 1fr);
    gap: 0.65rem 1rem;
    align-items: start;
    padding: 1.5rem 0;
    border-bottom: 2px solid rgba(232, 119, 34, 0.2);
    text-align: left;
}

.level-design-beat:last-child {
    border-bottom: none;
}

.level-design-beat__num {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--accent-teal);
    line-height: 1;
    padding-top: 0.2rem;
    text-align: right;
}

.level-design-beat__body {
    min-width: 0;
    width: 100%;
    text-align: left;
}

.level-design-beat__body h3,
.level-design-beat__body h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: left;
}

.level-design-beat__body p {
    margin: 0;
    max-width: none;
    text-align: left;
}

.level-design-beat__meta {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
    font-weight: 600;
    text-align: left;
}

.level-design-img-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.level-design-img-grid--triple {
    grid-template-columns: repeat(3, 1fr);
}

.level-design-img-full {
    border-radius: 12px;
    border: 3px solid var(--border-color);
    overflow: hidden;
    background: var(--card-bg);
}

.level-design-img-full--feature {
    grid-column: 1 / -1;
}

.level-design-img-caption {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-top: 1px solid var(--line);
    text-align: left;
    line-height: 1.6;
    background: var(--bg-elev);
}

.level-design-img-caption strong {
    color: var(--accent);
    font-weight: 700;
}

.level-design-main .level-design-figure {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-elev);
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.level-design-main .level-design-figure--flush {
    margin: 0;
}

.level-design-main .level-design-figure picture {
    display: block;
    width: 100%;
}

.level-design-main .level-design-figure img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.level-design-main .level-design-figure-slot.level-design-placeholder--flush {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(160px, 22vw, 260px);
    margin: 0;
}

.level-design-main .level-design-figure-slot .level-design-placeholder__label {
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    padding: 0 0.75rem;
    line-height: 1.45;
}

.level-design-placeholder {
    background: var(--bg-color);
    border: 3px dashed rgba(232, 119, 34, 0.4);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    margin: 1.5rem 0;
}

.level-design-placeholder--flush {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.level-design-placeholder__label {
    font-weight: 800;
    color: var(--accent-mustard);
    font-family: var(--font-display);
    margin-bottom: 0.35rem;
}

.level-design-placeholder__icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.55;
}

/* Pacing chart (#previewA) — Difficulty vs. Time Curve */
.level-design-preview-a {
    margin: 1.5rem 0 1.25rem;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

.level-design-preview-a__header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.level-design-preview-a__title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    font-weight: 700;
    color: #f97316;
    margin: 0 0 0.35rem;
    letter-spacing: 0.02em;
}

.level-design-preview-a__subtitle {
    margin: 0;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-tertiary);
}

.level-design-preview-a__chart-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .level-design-preview-a__chart-card {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.level-design-preview-a__canvas-wrap {
    position: relative;
    width: 100%;
    height: min(60vh, 440px);
    min-height: 280px;
}

.level-design-preview-a__canvas-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.level-design-preview-a__phases {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

@media (max-width: 52rem) {
    .level-design-preview-a__phases {
        grid-template-columns: 1fr;
    }
}

.level-design-preview-a__phase {
    padding: 1.1rem 1.15rem 1.2rem;
    border-radius: 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-left-width: 4px;
}

.level-design-preview-a__phase--hook {
    border-left-color: #3b82f6;
}

.level-design-preview-a__phase--pivot {
    border-left-color: #eab308;
}

.level-design-preview-a__phase--climax {
    border-left-color: #dc2626;
}

.level-design-preview-a__phase-title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    font-family: var(--font-display);
}

.level-design-preview-a__phase--hook .level-design-preview-a__phase-title {
    color: #60a5fa;
}

.level-design-preview-a__phase--pivot .level-design-preview-a__phase-title {
    color: #facc15;
}

.level-design-preview-a__phase--climax .level-design-preview-a__phase-title {
    color: #f87171;
}

.level-design-preview-a__phase-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.level-design-visual-identity__meta {
    margin: 1rem 0 1.35rem;
    padding: 1rem 1.2rem 1.05rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
}

.level-design-visual-identity__meta p {
    margin: 0.4rem 0;
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.level-design-visual-identity__meta p:first-child {
    margin-top: 0;
}

.level-design-visual-identity__meta p:last-child {
    margin-bottom: 0;
}

.level-design-divider {
    border: none;
    border-top: 2px solid rgba(232, 119, 34, 0.3);
    margin: 2rem 0;
}

.level-design-callout {
    border: 3px solid var(--border-color);
    border-left-width: 6px;
    border-left-color: var(--accent-teal);
    background: rgba(0, 212, 170, 0.08);
    padding: 1.5rem 1.75rem;
    margin: 1.5rem 0;
    border-radius: 12px;
    text-align: center;
}

.level-design-callout__title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-teal);
    margin-bottom: 0.5rem;
}

.level-design-callout p {
    margin: 0;
}

.level-design-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-color);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    margin: 1.25rem 0;
}

.level-design-legend__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.level-design-legend__dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.level-design-subheading {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-teal);
    text-align: left;
    margin: 1.25rem 0 0.75rem;
    font-family: var(--font-display);
    width: 100%;
}

[data-theme="light"] .level-design-main .level-design-subheading {
    color: #0a6f86;
}

[data-theme="light"] .level-design-preview-a__title {
    color: #c2410c;
}

[data-theme="light"] .level-design-pillar-card__num {
    color: #0a6f86;
}

[data-theme="light"] .level-design-beat__num {
    color: #0a6f86;
}

[data-theme="light"] .level-design-footer-note a:hover {
    color: #0a6f86;
}

[data-theme="light"] .level-design-main strong.keyword,
[data-theme="light"] .level-design-main .showcase-container p strong {
    color: #8a5a1c;
}

.level-design-footer-note {
    text-align: center;
    margin: 0;
    color: var(--text-secondary);
}

.level-design-footer-note a {
    color: var(--accent-teal);
    font-weight: 700;
    text-decoration: none;
}

.level-design-footer-note a:hover {
    color: var(--accent-orange);
}

@media (max-width: 768px) {
    .level-design-pillar-grid,
    .level-design-img-grid,
    .level-design-img-grid--triple {
        grid-template-columns: 1fr;
    }

    .level-design-beat {
        grid-template-columns: 3rem minmax(0, 1fr);
        gap: 0.5rem 0.75rem;
    }
}

/* ==========================================================================
   EDITORIAL DARK — overrides
   Final layer: flatten cartoon UI, hairline borders, single accent, smooth motion.
   This block sits at the end so it wins specificity ties cleanly.
   ========================================================================== */

/* Drop legacy light-mode rules entirely */
[data-theme="light"] {
    display: revert;
}

/* Surfaces: every card-like shell becomes a flat panel with a hairline border. */
.info-card,
.main-content,
.sidebar,
.expertise-item,
.tech-stack-grid,
.tech-logo,
.contact-form,
.contact-form-wrapper,
.gdd-content,
.code-snippet,
.project-details-block,
.project-details,
.showcase-container,
.tech-stack-category,
.level-design-pillar-card,
.level-design-beat,
.level-design-toc,
.experience-showcase .experience-item,
.game-project-card {
    background-color: var(--bg-elev) !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    transition: border-color var(--t-base) var(--ease),
                transform var(--t-base) var(--ease),
                background-color var(--t-base) var(--ease) !important;
}

.info-card::before,
.main-content::before,
.expertise-item::before,
.sidebar::before,
.experience-showcase .experience-item::before {
    content: none !important;
}

/* Inner / nested cards only (outer shells use neo stamp + frozen hover below) */
.expertise-item:hover,
.experience-showcase .experience-item:hover,
.level-design-beat:hover,
.game-project-card:hover {
    border-color: var(--line-strong) !important;
    box-shadow: none !important;
    transform: translateY(-2px) !important;
}

/* Profile card (sidebar) keeps its grid layout but loses cartoon edges. */
.sidebar { padding: 1.75rem 2rem !important; }

/* Profile picture: minimal soft rounded square, no thick border. */
.profile-pic {
    border: 1px solid var(--line) !important;
    box-shadow: none !important;
    border-radius: 14px !important;
}

/* Headings → display serif, generous tracking */
h1, h2, h3,
.page-title,
.expertise-title,
.sidebar h1,
.main-content h2,
.main-content h2.page-title {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
    color: var(--text) !important;
}

.main-content h2 {
    font-size: clamp(1.85rem, 2.2vw, 2.4rem) !important;
}

.main-content h2::after {
    content: none !important;
    background: transparent !important;
}

.page-title {
    font-size: clamp(2.2rem, 4vw, 3.4rem) !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Section subtitle / kicker pattern */
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.kicker::before {
    content: '';
    width: 1.25rem;
    height: 1px;
    background: var(--accent);
}

/* Resume / contact / generic buttons: pill outline with subtle lift */
.resume-btn,
.contact-form button,
.btn {
    background: transparent !important;
    border: 1px solid var(--line-strong) !important;
    color: var(--text) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font-family: var(--font-sans) !important;
    font-weight: 700 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    font-size: 0.76rem !important;
    padding: 0.65rem 1.3rem !important;
    transition: border-color var(--t-fast) var(--ease),
                color var(--t-fast) var(--ease),
                background-color var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease) !important;
}

.resume-btn:hover,
.contact-form button:hover,
.btn:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: var(--accent-soft) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(224, 122, 95, 0.15) !important;
}

/* Submit stays filled coral with high-contrast label in both themes */
.contact-form button.submit-btn,
.contact-form button[type="submit"],
button.submit-btn {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--text-on-accent) !important;
}

.contact-form button.submit-btn:hover,
.contact-form button[type="submit"]:hover,
button.submit-btn:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: var(--text-on-accent) !important;
}

.resume-btn:active,
.contact-form button:active,
.btn:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

/* Filter pills: text buttons with underline hover/active */
.filter-btn,
.game-projects-filter .filter-btn {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid transparent !important;
    color: var(--text-muted) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0.5rem 0.5rem !important;
    margin: 0 0.25rem !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    transition: color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease) !important;
    transform: none !important;
}
.filter-btn:hover {
    color: var(--text) !important;
    background: transparent !important;
    border-bottom-color: var(--line-strong) !important;
    transform: none !important;
}
.filter-btn--active,
.game-projects-filter .filter-btn--active {
    color: var(--text) !important;
    border-bottom-color: var(--accent) !important;
    background: transparent !important;
}

.game-projects-filter {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 2rem !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
}

/* Project cards: image-first, subtle elevation */
.game-project-card {
    overflow: hidden !important;
    padding: 0 !important;
    background: var(--bg-elev) !important;
}
.game-project-card:hover {
    transform: translateY(-3px) !important;
    border-color: var(--line-strong) !important;
}
.game-project-card__thumb {
    border-radius: 0 !important;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.game-project-card__thumb img {
    transition: transform 600ms var(--ease) !important;
}
.game-project-card:hover .game-project-card__thumb img {
    transform: scale(1.04);
}
.game-project-card__title,
.game-project-card__role,
.game-project-card__desc,
.game-project-card__meta {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
.game-project-card__title {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    letter-spacing: -0.005em !important;
    text-transform: none !important;
    margin-top: 1rem;
}
.game-project-card__role,
.game-project-card__desc {
    color: var(--text-muted) !important;
}
.game-project-card__tags {
    padding: 0 1.25rem 1.25rem !important;
}
.game-project-card__tag {
    background: transparent !important;
    color: var(--text-dim) !important;
    border: 1px solid var(--line) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    padding: 0.25rem 0.6rem !important;
}

/* Project cards: title centered; hide subtitle line under h3 */
.game-project-card__header {
    text-align: center !important;
}
.game-project-card__title {
    text-align: center !important;
}
.game-project-card__duration {
    display: none !important;
}
.game-project-card__meta-chips {
    text-align: start !important;
}

/* Expertise tiles: minimalist, accent icon */
.expertise-item {
    padding: 1.5rem !important;
}
.expertise-item i {
    color: var(--accent) !important;
    font-size: 1.4rem !important;
}
.expertise-item h3 {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    color: var(--text) !important;
}

/* Tech stack tiles */
.tech-stack-grid {
    background: transparent !important;
    border: 1px solid var(--line) !important;
    box-shadow: none !important;
    border-radius: 14px !important;
    padding: 1.5rem !important;
}
.tech-logo {
    background: var(--bg-elev) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    transition: border-color var(--t-fast) var(--ease) !important;
}
.tech-logo:hover {
    border-color: var(--line-strong) !important;
    background: var(--bg-elev-2) !important;
    transform: none !important;
}

/* Links */
a, .contact-link, .level-design-footer-note a {
    color: var(--text);
    text-decoration: none;
    transition: color var(--t-fast) var(--ease);
}
a:hover,
.contact-link:hover,
.level-design-footer-note a:hover {
    color: var(--accent) !important;
}

/* Social links: thin circles with subtle lift */
.social-links a {
    background: transparent !important;
    border: 1px solid var(--line-strong) !important;
    color: var(--text) !important;
    box-shadow: none !important;
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease),
                background-color var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease) !important;
}
.social-links a:hover {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
    background: var(--accent-soft) !important;
    transform: translateY(-2px) scale(1.04) !important;
    box-shadow: 0 6px 16px rgba(224, 122, 95, 0.18) !important;
}

/* Tables, code, prose tweaks */
code, pre, .code-snippet {
    background: var(--bg-elev-2) !important;
    border: 1px solid var(--line) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}
table th, table td {
    border-color: var(--line) !important;
}

/* Cross-document View Transitions (supporting browsers); others navigate instantly */
@view-transition {
    navigation: auto;
}

/* Legacy overlay unused — hide so it never blanks the screen */
.page-transition {
    display: none !important;
}

/* Vertical section number/label (.eyebrow) */
.eyebrow {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.85rem;
}
.eyebrow__num {
    color: var(--accent);
    margin-right: 0.6rem;
}

/* Hero title (used on home + project pages) */
.hero-title {
    font-family: var(--font-display);
    font-weight: 550;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 1.5rem;
    max-width: 22ch;
}
.hero-title em {
    font-style: normal;
    color: var(--accent);
    font-weight: 600;
}
.hero-lede {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.7;
    max-width: 60ch;
    margin: 0;
}

/* Hairline divider */
.hr-line {
    height: 1px;
    background: var(--line);
    border: 0;
    margin: 3rem 0;
}

/* Reveal on scroll (paired with [data-reveal] elements) */
[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--t-base) var(--ease),
                transform var(--t-base) var(--ease);
}
[data-reveal].is-in {
    opacity: 1;
    transform: none;
}

/* Disable extravagant motion if user opts out */
@media (prefers-reduced-motion: reduce) {
    [data-reveal],
    [data-reveal].is-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Accent text utility */
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-dim) !important; }

/* Force scrollbar to dark (cosmetic) */
html { scrollbar-color: var(--line-strong) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* Selection */
::selection {
    background: var(--accent-soft);
    color: var(--text);
}

/* Remove leftover transforms / rotations */
.expertise-item,
.expertise-item:hover,
.profile-pic:hover,
.contact-link,
.contact-link:hover,
.resume-btn,
.resume-btn:hover {
    transform: none !important;
}

/* Native scrolling (no CSS smooth-scroll) */
html { scroll-behavior: auto; }

/* ---------- Home: centered editorial hero ---------- */
.home-hero {
    padding: 5rem 0 1rem;
    max-width: 1100px;
    margin: 0 auto;
}
.home-hero--centered {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}
.home-hero__avatar {
    width: 96px !important;
    height: 96px !important;
    border-radius: 50% !important;
    object-fit: cover;
    border: 1px solid var(--line) !important;
    margin-bottom: 0.5rem;
    transition: border-color var(--t-base) var(--ease),
                transform var(--t-base) var(--ease) !important;
}
.home-hero__avatar:hover {
    border-color: var(--accent) !important;
    transform: scale(1.04) !important;
}
.home-hero--centered .hero-title {
    margin: 0 auto;
    max-width: 24ch;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.08;
}
.home-hero--centered .hero-lede {
    margin: 0 auto;
    max-width: 52ch;
    color: var(--text-muted);
    font-size: 1.05rem;
}
.home-hero__contact {
    margin-top: 0.25rem;
}
.home-hero__contact .contact-link {
    color: var(--text-muted);
    border-bottom: 1px solid var(--line-strong);
    padding-bottom: 2px;
    font-size: 0.95rem;
    transition: color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease);
}
.home-hero__contact .contact-link:hover {
    color: var(--accent) !important;
    border-bottom-color: var(--accent);
}
.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.75rem;
}
.home-hero__socials {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

/* Tech Stack row — single column */
.tech-gaming-row--solo {
    grid-template-columns: 1fr;
}

/* Hairline sits just under socials; avoids extra grid gap + stacked hr margins */
.home-hero .hr-line {
    align-self: stretch;
    width: auto;
    margin: 0.65rem 0 0;
}

/* ---------- CTA buttons: bright hover fill + high-contrast labels ---------- */
.cta {
    --cta-bg: transparent;
    --cta-fg: var(--text);
    --cta-border: rgba(230, 220, 210, 0.38);
    --cta-bg-hover: var(--accent-bright);
    --cta-fg-hover: #fff8f4;
    --cta-border-hover: var(--accent-bright);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.78rem 1.6rem;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid var(--cta-border);
    color: var(--cta-fg);
    background: var(--cta-bg);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
    transition: color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease),
                background-color var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease);
}

/* Wipe fill effect: accent slides in from below on hover */
.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cta-bg-hover);
    transform: translateY(101%);
    transition: transform var(--t-base) var(--ease);
    z-index: -1;
}
.cta:hover {
    color: var(--cta-fg-hover) !important;
    border-color: var(--cta-border-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(251, 146, 60, 0.32);
}
.cta:hover::before {
    transform: translateY(0);
}
.cta:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Primary: terracotta fill, bright hover, cream label */
.cta--primary {
    --cta-bg: var(--accent);
    --cta-fg: #fff8f4;
    --cta-border: var(--accent);
    --cta-bg-hover: var(--accent-bright);
    --cta-fg-hover: #ffffff;
    --cta-border-hover: var(--accent-bright-2);
}

/* Ghost: readable outline, bright fill on hover */
.cta--ghost {
    --cta-fg: var(--text);
    --cta-border: rgba(230, 220, 210, 0.34);
    --cta-bg-hover: var(--accent-bright);
    --cta-fg-hover: #ffffff;
    --cta-border-hover: var(--accent-bright);
}

/* Home: contact info + sidebar refinements */
.sidebar h1 {
    font-size: 1.6rem !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
}
.sidebar-name-block .contact-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.sidebar-name-block .contact-info p strong {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.2rem;
}

/* Home: education + experience headings keep editorial scale */
.education-info h4,
.experience-info h4 {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    font-size: 1.5rem !important;
    color: var(--text) !important;
    margin: 0 0 1rem !important;
    letter-spacing: -0.01em !important;
}

/* Container: tighten and centre */
.container,
.container-full-width {
    max-width: var(--container-max-width) !important;
    padding: 0 clamp(1.25rem, 4vw, 2.25rem) !important;
    margin: 1.5rem auto !important;
    gap: 2rem !important;
}

/* Show stacked layout breathing room */
.about-education-row {
    gap: 1.5rem !important;
}

/* Experience-showcase tweak: minimal flat with subtle accent line */
.experience-showcase .experience-item {
    background: var(--bg-elev) !important;
    border: 1px solid var(--line) !important;
    border-left: 2px solid var(--line-strong) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
.experience-showcase .experience-item:hover {
    border-left-color: var(--accent) !important;
}
.experience-showcase .experience-item::before { content: none !important; }
.experience-showcase .experience-item__role {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    font-size: 1.05rem !important;
    color: var(--text) !important;
}
.experience-showcase .experience-item__status {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: transparent !important;
}
.experience-showcase .experience-item__company {
    color: var(--text-muted) !important;
}
.experience-showcase .experience-item__meta {
    color: var(--text-dim) !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.04em !important;
    font-style: normal !important;
}
.experience-showcase .experience-item__summary {
    color: var(--text-muted) !important;
}

/* Tech Stack: icon grid (home) */
#tech-stack .tech-stack-category {
    display: block;
    margin-top: 1rem;
}

#tech-stack .tech-stack-category + .tech-stack-category {
    margin-top: 1.1rem;
}

#tech-stack .tech-stack-category__title {
    margin-bottom: 0.55rem;
    padding-bottom: 0.35rem;
    font-size: 0.66rem;
}

#tech-stack .tech-stack-category__icon {
    font-size: 0.82rem;
}

#tech-stack .tech-stack-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

#tech-stack .tech-stack-icons__item {
    flex: 0 0 auto;
}

#tech-stack .tech-stack-icons__tile {
    width: 76px;
    gap: 0.3rem;
    min-height: 0;
    padding: 0.45rem 0.3rem 0.4rem;
    border-radius: 8px;
}

#tech-stack .tech-stack-icons__tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(224, 122, 95, 0.1);
}

#tech-stack .tech-stack-icons__logo {
    width: 1.25rem;
    height: 1.25rem;
}

#tech-stack .tech-stack-icons__icon--initials {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.62rem;
    border-radius: 7px;
}

#tech-stack .tech-stack-icons__label {
    font-size: 0.54rem;
    letter-spacing: 0.05em;
    max-width: 100%;
    line-height: 1.2;
}

.tech-stack-category__title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.tech-stack-category__icon {
    font-size: 0.95rem;
    color: var(--accent);
}

.tech-stack-icons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 0.75rem;
}

.tech-stack-icons__item {
    margin: 0;
    padding: 0;
}

.tech-stack-icons__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 108px;
    padding: 0.85rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-elev-2);
    transition: border-color var(--t-base) var(--ease),
                transform var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease);
}

.tech-stack-icons__tile:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(224, 122, 95, 0.12);
}

.tech-stack-icons__tile:hover .tech-stack-icons__icon {
    color: var(--accent);
}

.tech-stack-icons__icon {
    font-size: 1.85rem;
    line-height: 1;
    color: var(--text);
    transition: color var(--t-fast) var(--ease);
}

.tech-stack-icons__logo {
    width: 1.95rem;
    height: 1.95rem;
    object-fit: contain;
    display: block;
    transition: filter var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.tech-stack-icons__tile:hover .tech-stack-icons__logo {
    transform: translateY(-1px) scale(1.05);
}

.tech-stack-icons__logo--mono {
    filter: invert(1);
}

[data-theme="light"] .tech-stack-icons__logo--mono {
    filter: none;
}

.tech-stack-icons__icon--initials {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: -0.03em;
    color: var(--accent);
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(224, 122, 95, 0.08);
}

.tech-stack-icons__icon--initials.tech-stack-icons__icon--narrow {
    font-size: 0.72rem;
    letter-spacing: -0.05em;
}

.tech-stack-icons__tile:hover .tech-stack-icons__icon--initials {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.tech-stack-icons__label {
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.25;
    max-width: 11ch;
}

.tech-stack-image {
    display: none;
}

/* Valorant / gaming buttons: flat editorial */
.valorant-btn {
    background: var(--bg-elev-2) !important;
    border: 1px solid var(--line) !important;
    box-shadow: none !important;
    border-radius: 10px !important;
    transition: border-color var(--t-fast) var(--ease) !important;
}
.valorant-btn:hover {
    border-color: var(--accent) !important;
    transform: none !important;
}
.valorant-title {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    color: var(--text) !important;
}

/* Mobile hero scaling */
@media (max-width: 720px) {
    .home-hero { padding: 2.5rem 0 0.85rem; }
    .hero-title { font-size: clamp(2rem, 8vw, 3rem) !important; }
}

/* ---------- Page heads (Projects, 3D, Contact, etc) ---------- */
.page-head {
    padding: 4rem 0 1.5rem;
    max-width: 1100px;
}
.page-head .kicker {
    margin-bottom: 1.5rem;
}
.page-display-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 1.25rem;
    max-width: 22ch;
}
.page-display-title em {
    font-style: italic;
    color: var(--accent);
    font-weight: 400;
}
.page-lede {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 60ch;
    margin: 0;
}

/* ---------- Contact grid ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    align-items: stretch;
}
.contact-grid__map .map-container {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-elev);
    height: 100%;
    min-height: 360px;
}
.contact-grid__map iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    display: block;
}
.contact-form {
    background: var(--bg-elev) !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    padding: 2rem !important;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-form h3 {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    font-size: 1.6rem !important;
    color: var(--text) !important;
    margin: 0 !important;
}
.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    background: var(--bg) !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    padding: 0.85rem 1rem !important;
    color: var(--text) !important;
    font-family: var(--font-sans) !important;
    font-size: 0.95rem !important;
    transition: border-color var(--t-fast) var(--ease) !important;
    box-shadow: none !important;
    outline: none !important;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-dim);
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent) !important;
}
.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}
.contact-form .submit-btn {
    align-self: flex-start;
    margin-top: 0.5rem;
}

@media (max-width: 800px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* ---------- Bento grid spacing for project listings ---------- */
.game-projects-bento-page {
    /* Horizontal padding so cards never hug the panel edge (padding: 1.5rem 0 0 zeroed sides). */
    padding: 1.5rem clamp(0.75rem, 2.5vw, 1.75rem) 2rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.game-projects-page {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.game-projects-page::before { content: none !important; }
.empty-state-message {
    color: var(--text-muted);
    font-style: italic;
    padding: 3rem 0;
    text-align: center;
}

/* Banner labels on project cards: minimal slim */
.game-project-card__banner,
.game-project-card__banner--multi {
    background: rgba(224, 122, 95, 0.06) !important;
    color: var(--accent) !important;
    border: none !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    font-family: var(--font-sans) !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    padding: 0.5rem 1.25rem !important;
    box-shadow: none !important;
}

/* Meta chips inside project cards: same accent-bar treatment */
.game-project-card__meta-chips {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
    gap: 0.6rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0.75rem 0 0 !important;
}
.game-project-card__meta-chip {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    background: var(--bg-elev-2) !important;
    border: 1px solid var(--line) !important;
    color: var(--text) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    padding: 0.6rem 0.75rem !important;
    overflow: hidden;
    transition: border-color var(--t-fast) var(--ease) !important;
}
.game-project-card__meta-chip::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity var(--t-fast) var(--ease);
}
.game-project-card:hover .game-project-card__meta-chip {
    border-color: var(--line-strong) !important;
}
.game-project-card:hover .game-project-card__meta-chip::before {
    opacity: 1;
}
.game-project-card__meta-chip-label {
    color: var(--text-dim) !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
}
.game-project-card__meta-chip-value {
    color: var(--text) !important;
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    line-height: 1.25 !important;
}

/* Featured bento card: same chip chrome & type as siblings (overrides legacy hero coral chips). */
.game-projects-bento .game-project-card--hero .game-project-card__meta-chip,
.game-projects-bento .game-project-card--hero .game-project-card__meta-chip:hover {
    border: 1px solid var(--line) !important;
    background: var(--bg-elev-2) !important;
    box-shadow: none !important;
    padding: 0.6rem 0.75rem !important;
    pointer-events: none !important;
}
.game-projects-bento .game-project-card--hero .game-project-card__meta-chip-label {
    color: var(--text-dim) !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
}
.game-projects-bento .game-project-card--hero .game-project-card__meta-chip-value {
    color: var(--text) !important;
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    line-height: 1.25 !important;
}

/* Project details block (other detail pages) */
.project-details-block {
    background: var(--bg-elev) !important;
    border: 1px solid var(--line) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    padding: 1.75rem !important;
}
.project-details-block h4 {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    color: var(--text) !important;
    text-transform: none !important;
    letter-spacing: -0.005em !important;
}
.project-details-block h4::after {
    background: var(--accent) !important;
    height: 1px !important;
}

/* Code snippet */
.code-snippet {
    background: var(--bg) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    padding: 1.25rem !important;
}
.code-snippet h4 {
    font-family: var(--font-display) !important;
    color: var(--text) !important;
    font-weight: 500 !important;
}
.code-snippet pre,
.code-snippet code {
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
}

/* ---------- Detail page polish ---------- */
.showcase-container {
    background: var(--bg-elev) !important;
    border: 1px solid var(--line) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    padding: 2rem !important;
    margin-bottom: 1.5rem !important;
    transition: border-color var(--t-base) var(--ease) !important;
}
.showcase-container:hover {
    border-color: var(--line-strong) !important;
}

.showcase-heading,
.showcase-container > h3:first-child,
.showcase-container > h3 {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    font-size: 1.55rem !important;
    color: var(--text) !important;
    text-transform: none !important;
    letter-spacing: -0.01em !important;
    border: none !important;
    padding: 0 0 1rem !important;
    margin: 0 0 1.25rem !important;
    background: transparent !important;
    border-bottom: 1px solid var(--line) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.7rem !important;
}

.showcase-heading i,
.showcase-container h3 > i,
.showcase-container h3 > .fas,
.showcase-container h3 > .fab {
    color: var(--accent) !important;
    font-size: 0.95rem !important;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--accent-soft) !important;
    flex: 0 0 auto;
}

.showcase-container h4,
.showcase-container .tech-stack-category__title {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    color: var(--text) !important;
    text-transform: none !important;
    letter-spacing: -0.005em !important;
}

.project-description,
.showcase-container p {
    color: var(--text-muted) !important;
    line-height: 1.75 !important;
}
.project-description strong,
.showcase-container p strong {
    color: var(--text) !important;
    font-weight: 700;
}
/* Showcase detail grid: project meta cards (Genre / Studio / Engine etc.) */
.showcase-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
}

.showcase-detail-item {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)) var(--bg-elev-2) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    padding: 1rem 1.1rem !important;
    box-shadow: none !important;
    overflow: hidden;
    transition: border-color var(--t-base) var(--ease),
                transform var(--t-base) var(--ease),
                background-color var(--t-base) var(--ease) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.45rem !important;
    min-height: 88px;
}

.showcase-detail-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity var(--t-base) var(--ease);
}

.showcase-detail-item:hover {
    border-color: var(--line-strong) !important;
    transform: translateY(-2px);
}

.showcase-detail-item:hover::before {
    opacity: 1;
}

.showcase-detail-item__label {
    color: var(--text-dim) !important;
    font-family: var(--font-sans) !important;
    font-size: 0.66rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.22em !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
}

.showcase-detail-item__value {
    color: var(--text) !important;
    font-family: var(--font-display) !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.005em !important;
}

.github-link,
.project-cta-buttons a {
    background: transparent !important;
    border: 1px solid var(--line-strong) !important;
    color: var(--text) !important;
    box-shadow: none !important;
    border-radius: 999px !important;
    padding: 0.6rem 1.1rem !important;
    font-family: var(--font-sans) !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    transition: border-color var(--t-fast) var(--ease),
                color var(--t-fast) var(--ease),
                background-color var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease) !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
}
.github-link:hover,
.project-cta-buttons a:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: var(--accent-soft) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(224, 122, 95, 0.15) !important;
}
.github-link:active,
.project-cta-buttons a:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

.tech-stack-categories {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 1rem !important;
}

.tech-stack-category {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.tech-stack-subcontainer {
    background: var(--bg-elev-2) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 1.1rem 1.25rem !important;
    height: 100% !important;
    transition: border-color var(--t-base) var(--ease) !important;
}
.tech-stack-subcontainer:hover {
    border-color: var(--line-strong) !important;
}

.tech-stack-category__title {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    font-size: 1.05rem !important;
    color: var(--text) !important;
    text-transform: none !important;
    letter-spacing: -0.005em !important;
    margin-bottom: 0.65rem !important;
    padding-bottom: 0.55rem !important;
    border-bottom: 1px solid var(--line) !important;
}

.tech-stack-list {
    color: var(--text-muted) !important;
    font-size: 0.9rem !important;
}
.tech-stack-list li {
    padding: 0.25rem 0 !important;
    opacity: 1 !important;
    color: var(--text-muted) !important;
}
.tech-stack-list li::before {
    content: '• ' !important;
    color: var(--accent) !important;
}

/* GDD content blocks */
.gdd-content,
.gdd-section {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.gdd-content h3,
.gdd-content h4 {
    font-family: var(--font-display) !important;
    color: var(--text) !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: -0.005em !important;
}

/* Prose: long-form readability */
.prose,
.main-content article p,
.showcase-container p,
.gdd-content p,
.project-description {
    color: var(--text-muted);
    line-height: 1.8;
}
.prose strong,
.main-content article p strong,
.showcase-container p strong,
.project-description strong {
    color: var(--text);
    font-weight: 700;
}

/* Detail page top: centered project title */
.main-content > article:first-child h2.page-title {
    font-family: var(--font-display) !important;
    font-weight: 400 !important;
    font-size: clamp(2.4rem, 5vw, 4rem) !important;
    text-transform: none !important;
    letter-spacing: -0.02em !important;
    text-align: center !important;
    color: var(--text) !important;
    margin: 2rem auto !important;
}

/* Project detail: card-highlight subtle accent */
.card-highlight,
.keyword {
    color: var(--accent) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-weight: 600 !important;
}

/* Level design: TOC */
.level-design-toc {
    background: var(--bg-elev) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
.level-design-toc__beat-link {
    color: var(--text-muted) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    transition: color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease) !important;
}
.level-design-toc__beat-link:hover,
.level-design-toc__beat-link.is-active {
    color: var(--text) !important;
    border-color: var(--line) !important;
}
.level-design-pillar-card,
.level-design-beat {
    background: var(--bg-elev) !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}
.level-design-pillar-card__num,
.level-design-beat__num {
    color: var(--accent) !important;
    font-family: var(--font-display) !important;
}

/* Image lightbox */
.image-lightbox {
    background: rgba(0, 0, 0, 0.86);
}

/* Map iframe always toned to dark frame */
.map-container iframe {
    display: block;
    width: 100%;
}

/* ===========================================================
   Subtle artistic flourishes (hand-drawn, restrained)
   =========================================================== */

/* Signature squiggle under hero name */
.hero-name {
    position: relative;
    display: inline-block;
    color: inherit;
}
.hero-name em {
    font-style: italic;
    position: relative;
    z-index: 1;
}
.hero-name__squiggle {
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: -0.16em;
    width: 104%;
    height: 0.42em;
    color: var(--accent);
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}
.hero-name__squiggle path {
    stroke-dasharray: 360;
    stroke-dashoffset: 360;
    animation: hero-squiggle-draw 1100ms cubic-bezier(0.4, 0, 0.2, 1) 350ms forwards;
}
@keyframes hero-squiggle-draw {
    to { stroke-dashoffset: 0; }
}

/* Wavy hairline divider in hero (replaces straight rule) */
.hero-divider-wave {
    display: block;
    width: min(440px, 80%);
    height: 14px;
    margin: 0.4rem auto 0;
    color: var(--line-strong);
    opacity: 0.85;
    overflow: visible;
    align-self: center;
}
.hero-divider-wave path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

/* Tiny sparkle next to each section eyebrow number */
.eyebrow {
    position: relative;
}
.eyebrow .eyebrow__num {
    position: relative;
}
.eyebrow .eyebrow__num::after {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-left: 0.35rem;
    margin-right: 0.05rem;
    background-color: var(--accent);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2 L13.4 10.6 L22 12 L13.4 13.4 L12 22 L10.6 13.4 L2 12 L10.6 10.6 Z'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2 L13.4 10.6 L22 12 L13.4 13.4 L12 22 L10.6 13.4 L2 12 L10.6 10.6 Z'/></svg>") center / contain no-repeat;
    transform: translateY(-1px) rotate(-12deg);
    opacity: 0.7;
}

/* CTA: gentle wobble on hover + arrow nudge on primary */
.cta:hover {
    transform: translateY(-2px) rotate(-0.6deg);
}
.cta--primary {
    --cta-arrow-shift: 0;
}
.cta--primary::after {
    content: '\2192';
    display: inline-block;
    margin-left: 0.45rem;
    transform: translateX(var(--cta-arrow-shift));
    transition: transform var(--t-fast) var(--ease);
}
.cta--primary:hover {
    --cta-arrow-shift: 4px;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
    .hero-name__squiggle path { stroke-dashoffset: 0; animation: none; }
    .cta:hover { transform: translateY(-2px); }
    .cta--primary::after { transition: none; }
    .cta--primary:hover { --cta-arrow-shift: 0; }
}

/* Mobile: shrink wave + keep squiggle proportional */
@media (max-width: 720px) {
    .hero-divider-wave { width: min(280px, 80%); }
    .hero-name__squiggle { stroke-width: 2; }
}

/* ===========================================================
   Neo-brutalist shells: solid offset “stamp” shadow (no blur)
   =========================================================== */

/* Large panels */
.info-card,
.main-content,
.expertise-container,
.sidebar,
.project-details-block,
.project-details,
.showcase-container,
.tech-stack-category,
.level-design-pillar-card,
.level-design-toc,
.contact-form-wrapper,
.contact-form,
.gdd-content {
    border: var(--brut-border) !important;
    box-shadow: var(--brut-pop) !important;
}

/* Outer shells: keep stamp + border identical on hover (no lift / no shadow swap). */
.info-card:hover,
.main-content:hover,
.expertise-container:hover,
.sidebar:hover,
.project-details-block:hover,
.project-details:hover,
.showcase-container:hover,
.tech-stack-category:hover,
.level-design-pillar-card:hover,
.level-design-toc:hover,
.contact-form-wrapper:hover,
.contact-form:hover,
.gdd-content:hover {
    border: var(--brut-border) !important;
    box-shadow: var(--brut-pop) !important;
    transform: none !important;
}

/* Inner cards/tiles: flat panel + hover above; tech tiles keep .tech-stack-icons__tile:hover. */

/* ========== Project Spotlight Layout ========== */
.project-spotlight-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    padding: 0;
}

.project-spotlight-list .game-project-card--hidden {
    display: none;
}

/* Grid cards: media on top, content below (fits 2-up) */
.project-spotlight-list .project-spotlight {
    grid-template-columns: 1fr;
    min-height: 0;
    height: 100%;
}

.project-spotlight-list .project-spotlight__media {
    border-radius: 20px 20px 0 0;
    min-height: 200px;
    aspect-ratio: 16 / 10;
}

.project-spotlight-list .project-spotlight__media img,
.project-spotlight-list .project-spotlight__media video,
.project-spotlight-list .project-spotlight__media .youtube-facade {
    min-height: 0;
    height: 100%;
}

.project-spotlight-list .project-spotlight__content {
    align-items: flex-start;
    text-align: left;
    padding: 1.15rem 1.25rem 1.35rem;
}

.project-spotlight-list .project-spotlight__title {
    max-width: none;
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.project-spotlight-list .project-spotlight__synopsis {
    margin-left: 0;
    width: 100%;
    text-align: left;
}

.project-spotlight-list .project-spotlight__synopsis p {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-spotlight-list .project-spotlight__tags,
.project-spotlight-list .project-spotlight__actions {
    justify-content: flex-start;
}

@media (max-width: 1100px) {
    .project-spotlight-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .project-spotlight-list {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.project-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: stretch;
    min-height: 270px;
    text-decoration: none;
    color: inherit;
    position: relative;
    border-radius: 20px;
    overflow: visible;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-cartoon);
    transition: border-color var(--t-base) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.project-spotlight:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.project-spotlight:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.project-spotlight__media {
    position: relative;
    border-radius: 20px 0 0 20px;
    overflow: hidden;
    background: linear-gradient(145deg, #2d2250 0%, #1c1734 45%, #11101c 100%);
    min-height: 270px;
}

.project-spotlight__media picture {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

/* Level-design figures: picture must not stretch — figcaption sits below the image */
.level-design-main .level-design-figure picture {
    height: auto;
    min-height: 0;
}

.project-spotlight__media img,
.project-spotlight__media video,
.project-spotlight__media .youtube-facade {
    width: 100%;
    height: 100%;
    min-height: 270px;
    object-fit: cover;
    display: block;
}

/* Hero YouTube embed: thumbnail + red play only (no YT chrome until click) */
.project-spotlight__media--yt {
    overflow: visible;
    background: transparent;
    display: flex;
    align-items: center;
    min-height: 0;
    padding: 1.15rem 0.35rem 1.15rem 1.15rem;
}

.spotlight-yt {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.spotlight-yt__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #0a0a0a;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.spotlight-yt__frame .youtube-facade,
.spotlight-yt__frame .youtube-facade__poster,
.spotlight-yt__frame .youtube-facade__button {
    min-height: 0;
    height: 100%;
}

.youtube-facade--yt-style .youtube-facade__play-icon--red {
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 0;
    line-height: 0;
}

.youtube-facade--yt-style .youtube-facade__play-icon--red svg {
    display: block;
    width: clamp(52px, 12vw, 68px);
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.youtube-facade--yt-style .youtube-facade__button:hover .youtube-facade__play-icon--red,
.youtube-facade--yt-style .youtube-facade__button:focus-visible .youtube-facade__play-icon--red {
    background: transparent;
    transform: none;
}

.youtube-facade--yt-style .youtube-facade__button:hover .youtube-facade__play-icon--red svg,
.youtube-facade--yt-style .youtube-facade__button:focus-visible .youtube-facade__play-icon--red svg {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
}

.spotlight-yt__caption {
    margin: 0;
    text-align: center;
    font-size: 0.82rem;
    font-style: italic;
    color: var(--text-tertiary);
    line-height: 1.35;
}

/* Click-to-load YouTube — poster only until play */
.youtube-facade {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    background: #000;
}

.youtube-facade__button {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: block;
    cursor: pointer;
    position: relative;
    background: transparent;
    color: inherit;
    font: inherit;
}

.youtube-facade__poster {
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
    display: block;
    vertical-align: middle;
}

.youtube-facade__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.youtube-facade__play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.62);
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: #fff;
    font-size: 1.35rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.youtube-facade__button:hover .youtube-facade__play-icon,
.youtube-facade__button:focus-visible .youtube-facade__play-icon {
    transform: scale(1.08);
    background: rgba(200, 40, 40, 0.85);
}

.youtube-facade__button:focus-visible {
    outline: 2px solid #6eb5ff;
    outline-offset: 4px;
}

.youtube-facade iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.youtube-facade.is-playing .youtube-facade__button {
    display: none;
}

.level-design-video-inner .youtube-facade {
    position: absolute;
    inset: 0;
    min-height: 0;
    height: 100%;
}

.level-design-video-inner .youtube-facade__poster {
    min-height: 0;
    height: 100%;
}

.project-spotlight__content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    padding: 1.65rem 1.65rem 1.35rem 0.25rem;
    position: relative;
    z-index: 1;
}

.project-spotlight__stack {
    margin: 0 0 0.55rem;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.project-spotlight__title {
    margin: 0 0 0.85rem;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.8vw, 2rem);
    font-weight: 600;
    line-height: 1.12;
    color: var(--text);
    max-width: 14ch;
}

.project-spotlight__synopsis {
    position: relative;
    z-index: 2;
    margin: 0 0 0.9rem -3.5rem;
    padding: 0.95rem 1.1rem;
    background: var(--bg-elev-2);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: var(--shadow-cartoon);
    text-align: right;
    width: calc(100% + 2.75rem);
    max-width: none;
    align-self: stretch;
}

.project-spotlight__synopsis p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.project-spotlight__tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
}

.project-spotlight__tags li {
    padding: 0.32rem 0.68rem;
    font-family: var(--font-sans);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
}

.project-overview-meta {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.85rem;
    width: 100%;
    max-width: none;
    margin: 1.25rem 0 0;
    padding: 0;
}

.project-overview-meta--centered {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

.project-overview-meta--centered .project-overview-meta__item {
    flex: unset;
    width: auto;
    max-width: none;
    min-width: 0;
}

.project-overview-meta--centered .project-overview-meta__item dd {
    white-space: normal;
}

@media (max-width: 700px) {
    .project-overview-meta--centered {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }
}

@media (max-width: 400px) {
    .project-overview-meta--centered {
        grid-template-columns: 1fr;
    }
}

.project-overview-meta__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 0;
    margin: 0;
    padding: 1rem 0.85rem;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .project-overview-meta__item {
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.project-overview-meta__item dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.project-overview-meta__item dd {
    margin: 0;
    font-family: var(--font-family);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-mustard);
    line-height: 1.35;
    white-space: nowrap;
}

[data-theme="light"] .project-overview-meta__item dd {
    color: #8b0000;
}

@media (max-width: 900px) {
    .project-overview-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .project-overview-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 400px) {
    .project-overview-meta {
        grid-template-columns: 1fr;
    }
}

.project-spotlight__tags--top {
    margin: 0 0 0.55rem;
}

.project-spotlight__tags--ends {
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin: 0.85rem 0 0;
    margin-top: auto;
    width: 100%;
}

.project-spotlight-list .project-spotlight__tags--ends {
    justify-content: space-between;
}

.project-spotlight__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    transition: color var(--t-fast) var(--ease);
}

.project-spotlight:hover .project-spotlight__cta {
    color: var(--accent);
}

.project-spotlight--page {
    margin-bottom: 2rem;
    cursor: default;
}

.project-spotlight--page:hover {
    transform: none;
}

.project-spotlight--page .project-spotlight__cta {
    text-decoration: none;
}

.project-spotlight--page .project-spotlight__cta:hover {
    color: var(--accent);
}

/* Level-design hero: details on top (centered), video full-width below */
.project-spotlight--stacked {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0;
}

.project-spotlight--stacked .project-spotlight__content {
    align-items: center;
    text-align: center;
    padding: 2rem 2rem 1.35rem;
    order: 1;
}

.project-spotlight--stacked .project-spotlight__stack {
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}

.project-spotlight--stacked .project-spotlight__title {
    max-width: none;
    width: 100%;
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.08;
    margin-bottom: 1.1rem;
}

.project-spotlight--stacked .project-spotlight__synopsis {
    margin: 0 0 1.15rem;
    width: 100%;
    max-width: 52rem;
    align-self: center;
    text-align: center;
}

.project-spotlight--stacked .project-spotlight__synopsis p {
    font-size: clamp(0.98rem, 1.6vw, 1.12rem);
    line-height: 1.65;
}

.project-spotlight--stacked .project-spotlight__tags {
    justify-content: center;
    margin-bottom: 1rem;
}

.project-spotlight--stacked .project-spotlight__tags li {
    font-size: 0.74rem;
    padding: 0.4rem 0.85rem;
}

.project-spotlight--stacked .project-spotlight__actions {
    justify-content: center;
    margin-top: 0.25rem;
    gap: 1.25rem 1.75rem;
}

.project-spotlight--stacked .project-spotlight__cta {
    margin-top: 0;
    font-size: 0.92rem;
}

.project-spotlight--stacked .project-spotlight__media,
.project-spotlight--stacked .project-spotlight__media--yt {
    order: 2;
    padding: 0.35rem 1.5rem 1.5rem;
    border-radius: 0 0 20px 20px;
    min-height: 0;
}

.project-spotlight--stacked .spotlight-yt__frame {
    border-radius: 16px;
}

/* Light mode: cream info panels with dark readable text */
[data-theme="light"] .project-spotlight {
    background: #ffffff;
    border-color: rgba(90, 55, 40, 0.12);
    box-shadow: 0 12px 32px rgba(90, 55, 40, 0.08);
}

[data-theme="light"] .project-spotlight__synopsis {
    background: #fff6ee;
    border-color: rgba(90, 55, 40, 0.14);
    box-shadow: 0 8px 24px rgba(90, 55, 40, 0.08);
}

[data-theme="light"] .project-spotlight__synopsis p {
    color: #3a2a24;
}

[data-theme="light"] .project-spotlight__title {
    color: #2f211c;
}

[data-theme="light"] .project-spotlight__tags li {
    color: #2f211c;
    background: #ffe8d6;
    border-color: rgba(90, 55, 40, 0.16);
}

/* Dark mode: elevated charcoal panels with cream text */
[data-theme="dark"] .project-spotlight {
    background: #262e36;
    border-color: rgba(230, 220, 210, 0.12);
}

[data-theme="dark"] .project-spotlight__synopsis {
    background: #303942;
    border-color: rgba(232, 119, 34, 0.28);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .project-spotlight__synopsis p {
    color: #d8cdc4;
}

[data-theme="dark"] .project-spotlight__title {
    color: #f3ebe4;
}

[data-theme="dark"] .project-spotlight__tags li {
    color: #f3ebe4;
    background: #1c2228;
    border-color: rgba(232, 119, 34, 0.3);
}

.project-spotlight__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: auto;
}

.main-content > .project-spotlight--page {
    margin-top: 0.5rem;
}

@media (max-width: 900px) {
    .project-spotlight {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .project-spotlight__media {
        border-radius: 20px 20px 0 0;
        min-height: 220px;
    }

    .project-spotlight__media--yt {
        min-height: 0;
        border-radius: 0;
        padding: 1rem 1rem 0;
    }

    .project-spotlight--stacked .project-spotlight__content {
        align-items: center;
        text-align: center;
        padding: 1.5rem 1.25rem 1rem;
    }

    .project-spotlight--stacked .project-spotlight__synopsis {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .project-spotlight--stacked .project-spotlight__media--yt {
        padding: 0.25rem 1rem 1.15rem;
    }

    .project-spotlight__media img,
    .project-spotlight__media video,
    .project-spotlight__media .youtube-facade {
        min-height: 220px;
    }

    .project-spotlight__media--yt .youtube-facade {
        min-height: 0;
    }

    .project-spotlight__content {
        align-items: flex-start;
        text-align: left;
        padding: 1.15rem 1.15rem 1.25rem;
    }

    .project-spotlight__title {
        max-width: none;
    }

    .project-spotlight__synopsis {
        margin-left: 0;
        width: 100%;
        text-align: left;
    }

    .project-spotlight__tags,
    .project-spotlight__actions {
        justify-content: flex-start;
    }
}

/* Expertise section — card grid with tool tags */
.expertise-section {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.expertise-panel {
    position: relative;
}

.expertise-panel .expertise-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 1.9rem);
    font-weight: 500;
    text-transform: none;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 0 0 1.25rem;
}

.expertise-panel .expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.expertise-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.35rem 1.5rem;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: none;
    transition: border-color var(--t-base) var(--ease),
                transform var(--t-base) var(--ease),
                background-color var(--t-base) var(--ease);
}

.expertise-card:hover {
    background: var(--bg-elev-2);
    border-color: var(--line-strong);
    box-shadow: none;
    transform: translateY(-2px);
}

.expertise-card__icon {
    margin-bottom: 1.1rem;
    color: var(--accent);
    font-size: 1.45rem;
    line-height: 1;
    transition: text-shadow var(--t-base) var(--ease);
}

.expertise-card:hover .expertise-card__icon {
    text-shadow: 0 0 12px rgba(224, 122, 95, 0.35);
}

.expertise-card__title {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.25;
}

.expertise-card__body {
    margin: 0 0 1rem;
    flex: 1;
    font-family: var(--font-sans);
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.expertise-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0.85rem 0 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.expertise-card__tags li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.6rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text);
    background: var(--bg-elev-2);
    border: 1px solid var(--line-strong);
    border-radius: 7px;
}

.expertise-card__tags li i {
    font-size: 0.65rem;
    color: var(--accent);
    opacity: 1;
}

[data-theme="light"] .expertise-card__tags li {
    color: #2f211c;
    background: #ffe8d6;
    border-color: rgba(90, 55, 40, 0.18);
}

[data-theme="light"] .expertise-card__tags li i {
    color: #e87722;
}

[data-theme="dark"] .expertise-card__tags li {
    color: #f3ebe4;
    background: #303942;
    border-color: rgba(232, 119, 34, 0.35);
}

[data-theme="dark"] .expertise-card__tags li i {
    color: #e87722;
}

.expertise-card {
    animation: slideInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.expertise-card:nth-child(1) { animation-delay: 0.3s; }
.expertise-card:nth-child(2) { animation-delay: 0.32s; }
.expertise-card:nth-child(3) { animation-delay: 0.34s; }
.expertise-card:nth-child(4) { animation-delay: 0.36s; }
.expertise-card:nth-child(5) { animation-delay: 0.38s; }
.expertise-card:nth-child(6) { animation-delay: 0.4s; }

@media (max-width: 1024px) {
    .expertise-panel .expertise-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .expertise-panel .expertise-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Mobile performance & layout polish ========== */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        overflow-x: clip;
    }

    body {
        overflow-x: clip;
    }

    .container,
    .container-full-width {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin-top: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        gap: 1.5rem !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    header {
        padding: 0.5rem 0.75rem !important;
    }

    nav ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.25rem;
        width: 100%;
        padding: 0.15rem 0;
    }

    nav a {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
        padding: 0.65rem 0.5rem;
        font-size: 0.68rem;
        letter-spacing: 0.12em;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    nav a::after {
        left: 0.5rem;
        right: 0.5rem;
    }

    .page-head {
        padding: 2.25rem 0 1rem !important;
    }

    .page-display-title {
        max-width: none;
        font-size: clamp(2rem, 9vw, 2.75rem);
    }

    .page-lede,
    .hero-lede {
        font-size: 1rem;
        line-height: 1.65;
    }

    .home-hero {
        padding: 2.25rem 0 0.75rem !important;
    }

    .home-hero__contact .contact-link {
        word-break: break-word;
        overflow-wrap: anywhere;
        font-size: 0.9rem;
    }

    .home-hero__actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
        width: 100%;
    }

    .cta {
        min-height: 44px;
        padding: 0.65rem 1.1rem;
    }

    .container .info-card {
        padding: 1.15rem 1.2rem !important;
    }

    .main-content {
        padding: 1.15rem 1rem !important;
        overflow-x: clip;
    }

    .education-info__degree-row,
    .education-certificate--row {
        flex-direction: column;
        align-items: stretch;
    }

    .education-certificate__preview-wrap,
    .education-certificate__preview-wrap--degree {
        flex: none;
        width: 100%;
        max-width: 220px;
        align-self: center;
    }

    .showcase-container {
        padding: 1.15rem 1rem !important;
        overflow-x: clip;
    }

    .showcase-detail-grid {
        grid-template-columns: 1fr !important;
    }

    .showcase-heading,
    .showcase-container > h3:first-child,
    .showcase-container > h3 {
        font-size: 1.35rem !important;
        flex-wrap: wrap;
    }

    .project-description,
    .showcase-container p,
    .main-content p {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }

    .project-spotlight--page {
        margin-bottom: 1.25rem;
    }

    .project-spotlight__synopsis {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: left !important;
        align-self: stretch !important;
    }

    .project-spotlight--stacked .project-spotlight__synopsis {
        text-align: center !important;
        align-self: center !important;
    }

    .project-spotlight--stacked .project-spotlight__title {
        max-width: none !important;
        font-size: clamp(1.65rem, 7vw, 2.25rem) !important;
    }

    .project-spotlight--stacked .project-spotlight__actions {
        justify-content: center;
    }

    .project-spotlight__synopsis p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    .project-spotlight__title {
        max-width: none !important;
        font-size: clamp(1.4rem, 6vw, 1.85rem) !important;
    }

    .project-spotlight__actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.75rem 1rem;
    }

    .project-spotlight--page .project-spotlight__cta {
        min-height: 44px;
        align-items: center;
        font-size: 0.78rem;
    }

    .project-spotlight__media img,
    .project-spotlight__media video,
    .project-spotlight__media .youtube-facade {
        min-height: 200px;
        max-height: 52vw;
        object-fit: cover;
    }

    .project-spotlight--page.project-spotlight--stacked .project-spotlight__media img {
        min-height: 0;
        max-height: none;
        height: auto;
        object-fit: contain;
    }

    .project-spotlight__media--yt {
        padding: 0.85rem 0.85rem 0;
    }

    .project-spotlight__media--yt .youtube-facade,
    .project-spotlight__media--yt .youtube-facade__poster {
        min-height: 0;
        max-height: none;
    }

    .game-projects-filter {
        width: 100%;
        justify-content: center;
        gap: 0.4rem;
        margin-bottom: 1.25rem;
    }

    .game-projects-filter--tabs {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        padding: 0.35rem;
    }

    .game-projects-filter .filter-btn {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 0;
        min-height: 40px;
        text-align: center;
        font-size: 0.72rem;
        letter-spacing: 0.06em;
        padding: 0.5rem 0.55rem;
        white-space: normal;
        line-height: 1.25;
    }

    .game-projects-bento-page {
        padding: 1rem 0.5rem 1.5rem !important;
    }

    .project-spotlight-list {
        gap: 1.5rem;
    }

    .level-design-beat {
        grid-template-columns: 2.5rem minmax(0, 1fr);
    }

    .level-design-beat__num {
        font-size: 1.35rem;
    }

    .level-design-toc__section-label,
    .level-design-toc__beat-text {
        overflow-wrap: anywhere;
        word-break: break-word;
        white-space: normal;
        line-height: 1.35;
    }

    .level-design-toc__beat-link {
        min-height: 3.5rem;
        padding: 0.65rem 0.75rem;
    }

    .level-design-preview-a__canvas-wrap {
        min-height: 220px;
        height: min(50vh, 320px);
    }

    .level-design-main #overview > .level-design-walkthrough-nest {
        padding: 1rem 0.85rem 1.1rem;
    }

    .level-design-main .level-design-figure img {
        width: 100%;
        height: auto;
    }

    .level-design-main .level-design-figure {
        overflow: visible;
    }

    .level-design-main .showcase-container .project-description,
    .level-design-main .showcase-container > p {
        font-size: 1rem !important;
    }

    .level-design-img-caption {
        font-size: 0.9rem;
        padding: 0.75rem 0.85rem;
    }

    .tech-stack-categories {
        grid-template-columns: 1fr !important;
    }

    .birds-page {
        padding: 1.25rem 0.75rem 2.5rem;
    }

    .birds-viz-grid,
    .birds-findings {
        grid-template-columns: 1fr;
    }

    .birds-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .gdd-images img {
        min-width: 0;
        flex: 1 1 100%;
    }

    .gdd-content h3 {
        font-size: 1.45rem;
    }

    .gdd-content h4 {
        font-size: 1.15rem;
    }

    .showcase-container table,
    .main-content table,
    .gdd-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .showcase-container table th,
    .showcase-container table td,
    .main-content table th,
    .main-content table td {
        font-size: 0.9rem !important;
        padding: 0.55rem 0.65rem !important;
        word-break: break-word;
        white-space: normal;
        vertical-align: top;
    }

    .showcase-container table th,
    .main-content table th {
        font-size: 0.95rem !important;
    }

    .showcase-container .project-image[style*="max-width"],
    .project-media-block .project-image[style*="max-width"] {
        max-width: 100% !important;
        width: 100% !important;
    }

    .project-page-back {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .project-page-back .cta {
        width: 100%;
        max-width: 320px;
    }

    [data-reveal],
    [data-reveal].is-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    img[loading="lazy"],
    img.img--fade-in,
    img[loading="lazy"].is-loaded,
    img.img--fade-in.is-loaded {
        opacity: 1 !important;
        transform: none !important;
    }

    .container,
    .container-full-width,
    .main-content,
    .about-section,
    .expertise-section,
    .info-card,
    .tech-gaming-row {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .showcase-container,
    .project-spotlight-list .project-spotlight,
    .main-content article {
        content-visibility: visible !important;
        contain-intrinsic-size: none !important;
    }

    .info-card,
    .main-content,
    .showcase-container,
    .level-design-toc,
    .gdd-content,
    .contact-form {
        box-shadow: 4px 4px 0 0 rgba(224, 122, 95, 0.55) !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        max-width: none !important;
        font-size: clamp(1.85rem, 9vw, 2.5rem) !important;
    }

    .project-spotlight__content {
        padding: 1rem !important;
    }

    .project-spotlight__title {
        font-size: clamp(1.3rem, 6.5vw, 1.7rem) !important;
    }

    .project-spotlight__tags li {
        font-size: 0.72rem;
    }

    .game-projects-filter .filter-btn {
        flex: 1 1 100%;
        font-size: 0.75rem;
    }

    .level-design-main #overview .level-design-overview-meta {
        padding: 1rem 0.85rem;
    }

    .level-design-toc__beat-thumb {
        width: 2.85rem;
    }

    .experience-showcase .experience-item__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .expertise-card {
        padding: 1.1rem 1.15rem;
    }

    .contact-form {
        padding: 1.25rem !important;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr !important;
    }
}

@media (hover: none), (pointer: coarse) {
    .info-card:hover,
    .container .info-card:hover,
    .container .main-content:hover,
    .game-project-card:hover,
    .project-spotlight:hover,
    .cta:hover,
    .cta--primary:hover {
        transform: none !important;
    }
}

/* Respect reduced motion globally for entrance effects */
@media (prefers-reduced-motion: reduce) {
    [data-reveal],
    [data-reveal].is-in {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .container,
    .container-full-width,
    .main-content,
    .about-section,
    .expertise-section,
    .info-card,
    .tech-gaming-row {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    img {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .page-transition {
        display: none !important;
    }
}
