/* ============================================
   EDITORIAL DARK — design tokens (single source)
   ============================================ */
:root,
[data-theme="dark"],
[data-theme="light"] {
    /* Typography */
    --font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-sans: var(--font-family);
    --font-display: 'Fraunces', 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;

    /* Surfaces */
    --bg: #0a0a0c;
    --bg-elev: #111115;
    --bg-elev-2: #16161b;
    --bg-color: var(--bg);
    --card-bg: var(--bg-elev);

    /* Lines */
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.18);
    --border-color: var(--line);

    /* Text */
    --text: #ececec;
    --text-muted: #9a9aa3;
    --text-dim: #6b6b75;
    --text-primary: var(--text);
    --text-secondary: var(--text-muted);
    --text-tertiary: var(--text-dim);

    /* Single accent (warm copper) */
    --accent: #c99349;
    --accent-2: #d4a373;
    --accent-soft: rgba(201, 147, 73, 0.15);
    --accent-blue: var(--accent);
    --accent-teal: var(--accent);
    --accent-red: var(--accent);
    --accent-orange: var(--accent);
    --accent-purple: var(--accent);
    --accent-mustard: var(--accent);
    --accent-hover: var(--accent-2);
    --accent-maroon: var(--accent-2);

    /* Neo-brutalist offset blocks — outer shells only (solid shadow, no blur) */
    --brut-pop: 7px 7px 0 0 rgba(201, 147, 73, 0.92);
    --brut-border: 2px solid rgba(201, 147, 73, 0.88);

    /* Background fills (no animated gradient anymore) */
    --grid-color: transparent;
    --bg-gradient-start: var(--bg);
    --bg-gradient-mid: var(--bg);
    --bg-gradient-end: var(--bg);
    --bg-dot-color: transparent;
    --bg-line-color: transparent;

    /* Shadows neutralised */
    --shadow-cartoon: 0 0 0 0 transparent;
    --shadow-hover: 0 0 0 0 transparent;
    --radius-cartoon: 14px;

    /* Skeleton */
    --skeleton-base: var(--bg-elev);
    --skeleton-shimmer: var(--bg-elev-2);

    /* 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;
}

html { color-scheme: dark; }

.highlight-text {
    color: var(--accent);
}



* {
    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;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-weight: 400;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body::after,
body::before {
    display: none !important;
    content: 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;
}

/* Hide skeleton overlay once page is ready */
html.loaded .skeleton-loader {
    display: 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: rgba(10, 10, 12, 0.72);
    background-image: none;
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    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;
}

/* Hide legacy theme toggle (drop light mode) */
nav .theme-toggle,
.theme-toggle,
#theme-toggle,
nav li:has(.theme-toggle) {
    display: none !important;
}

/* 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;
    opacity: 0.85;
}

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

.container .education-courses__item {
    font-size: 0.8rem;
    opacity: 0.9;
}

.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-secondary);
    margin: 0;
    max-width: 100%;
}

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

.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-secondary);
    line-height: 1.5;
}

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

.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: #ffffff;
}

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

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

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

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

@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-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

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

/* 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-secondary);
}

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

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

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

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

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

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

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

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

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

.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-secondary);
    font-size: 1.15rem;
    line-height: 1.8;
    font-weight: 400;
}

/* --- 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.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-cartoon);
    transform-style: preserve-3d;
    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-secondary);
    line-height: 1.5;
    margin: 0;
}

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

/* 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: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.05);
}

.tech-logo:hover {
    transform: translateY(-3px) scale(1.05);
    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-maroon);
    border-color: var(--accent-maroon);
}
[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: 6px 6px 0 rgba(255, 107, 107, 0.4);
    --shadow-hover: 10px 10px 0 rgba(255, 107, 107, 0.5);
}

.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.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, z-index 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    z-index: 0;
}
.game-project-card:hover {
    z-index: 10;
}

.game-project-card:hover {
    transform: translateY(-5px) scale(1.015);
    box-shadow: var(--shadow-hover), 0 20px 40px rgba(0,0,0,0.2);
}

[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(26, 26, 46, 0.55);
    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(255, 107, 107, 0.28), rgba(255, 159, 41, 0.3));
    color: #f8f6ff;
    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.55px rgba(26, 26, 46, 0.95);
    paint-order: stroke fill;
    text-shadow:
        0 0 1px rgba(0, 0, 0, 0.5),
        1px 1px 0 rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .game-project-card__banner {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.18), rgba(255, 159, 41, 0.2));
    color: #0f172a;
    border-color: rgba(45, 45, 58, 0.35);
    -webkit-text-stroke: 0.45px #ffffff;
    text-shadow:
        0 0 1px rgba(255, 255, 255, 0.95),
        0 1px 0 rgba(255, 255, 255, 0.6);
}

/* The Rooms hero: several roles in one banner */
.game-project-card__banner--multi {
    letter-spacing: 0.06em;
    line-height: 1.25;
    padding: 0.48rem 0.85rem;
}

.game-project-card--hero .game-project-card__banner--multi {
    font-size: 0.58rem;
}

.game-project-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.35s ease, filter 0.28s ease;
}

.game-project-card:hover .game-project-card__thumb img {
    transform: scale(1.03);
    filter: brightness(1.05);
}

.game-project-card:focus-visible {
    outline: 2px solid var(--accent-red);
    outline-offset: 3px;
}

.game-project-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem 0.35rem;
    min-height: 0;
    margin: 0;
}

.game-project-card__desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
    padding: 0 1rem 1rem;
}

.game-project-card__title {
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-align: left;
    line-height: 1.25;
    flex-shrink: 1;
    min-width: 0;
}

.game-project-card__role {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0;
    text-align: right;
    flex-shrink: 0;
}

.game-project-card--hidden {
    display: none;
}

/* Detailed project card layout */
.game-projects-grid--detailed {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.game-project-card--detailed {
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    overflow: hidden;
    min-width: 0;
}

.game-project-card--detailed .game-project-card__thumb {
    aspect-ratio: 16 / 10;
    border: none;
    border-radius: calc(var(--radius-cartoon) - 4px) calc(var(--radius-cartoon) - 4px) 0 0;
    overflow: hidden;
}

.game-project-card--detailed .game-project-card__header {
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    min-width: 0;
    min-height: 5.5rem;
}

[data-theme="dark"] .game-project-card--detailed .game-project-card__header {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.game-project-card--detailed .game-project-card__title {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    text-align: center;
}

.game-project-card--detailed .game-project-card__role {
    margin: 0;
    font-size: 0.75rem;
    color: var(--accent-teal);
    text-align: center;
    flex-shrink: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

[data-theme="dark"] .game-project-card--detailed .game-project-card__role {
    color: var(--accent-blue);
}

.game-project-card--detailed .game-project-card__duration {
    margin: 0 0 0.5rem 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    min-height: 1.25rem;
    flex-shrink: 0;
}

[data-theme="dark"] .game-project-card--detailed .game-project-card__duration {
    color: var(--text-tertiary);
}

.game-project-card__duration--empty {
    visibility: hidden;
    margin: 0 0 0.5rem 0;
}

.game-project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    align-items: center;
}

.game-project-card__tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #fff;
    background-color: #2563eb;
    border: 1.5px solid rgba(0, 0, 0, 0.25);
    border-radius: 9999px;
    white-space: nowrap;
}

[data-theme="dark"] .game-project-card__tag {
    background-color: var(--accent-teal);
    color: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.2);
}

.game-project-card--detailed .game-project-card__details {
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--border-color);
    min-width: 0;
    min-height: 4.5rem;
}

.game-project-card__intro {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

[data-theme="dark"] .game-project-card__intro {
    color: var(--text-tertiary);
}

[data-theme="dark"] .game-project-card--detailed .game-project-card__details {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.game-project-card--detailed .game-project-card__row {
    margin: 0 0 0.3rem 0;
    font-size: 0.85rem;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.game-project-card--detailed .game-project-card__row:last-of-type {
    margin-bottom: 0.6rem;
}

.game-project-card--detailed .game-project-card__label {
    color: var(--accent-mustard);
    font-weight: 500;
    margin-right: 0.35rem;
}

.game-project-card--detailed .game-project-card__contrib-heading {
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-mustard);
    text-decoration: underline;
    text-underline-offset: 0.25em;
    margin: 0 0 0.4rem 0;
}

.game-project-card--detailed .game-project-card__contrib-list {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.game-project-card--detailed .game-project-card__contrib-list li {
    margin-bottom: 0.2rem;
}

/* --- 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);
}

/* Bento grid: 3 columns, hero spans 2x2 */
.game-projects-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 2rem;
    padding: 0;
}

.game-projects-bento .game-project-card--hidden {
    display: none;
}

/* Hero card: large featured (2 columns, 2 rows) */
.game-projects-bento .game-project-card--hero:not(.game-project-card--hidden) {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

/* Place remaining cards in bento slots */
.game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(2) { grid-column: 3; grid-row: 1; }
.game-projects-bento .game-project-card--bento:not(.game-project-card--hero):nth-child(3) { grid-column: 3; 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: 3; grid-row: 3; }

/* During filtering, drop slot locking so visible cards reflow naturally */
.game-projects-bento.is-filtered .game-project-card {
    grid-column: auto !important;
    grid-row: auto !important;
}

/* When hero is hidden, visible cards keep normal size and reflow from top-left */
.game-projects-bento .game-project-card--hero.game-project-card--hidden ~ .game-project-card--bento:not(.game-project-card--hidden):nth-child(2) { grid-column: 1; grid-row: 1; }
.game-projects-bento .game-project-card--hero.game-project-card--hidden ~ .game-project-card--bento:not(.game-project-card--hidden):nth-child(3) { grid-column: 2; grid-row: 1; }
.game-projects-bento .game-project-card--hero.game-project-card--hidden ~ .game-project-card--bento:not(.game-project-card--hidden):nth-child(4) { grid-column: 1; grid-row: 2; }
.game-projects-bento .game-project-card--hero.game-project-card--hidden ~ .game-project-card--bento:not(.game-project-card--hidden):nth-child(5) { grid-column: 1; grid-row: 1; }

/* Bento card styling: polished rounded corners, strong border, shadow like coding project cards */
.game-project-card--bento {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: var(--radius-cartoon);
    border: 4px solid var(--border-color);
    overflow: visible;
    box-shadow: var(--shadow-cartoon), 0 8px 24px rgba(0, 0, 0, 0.12);
    background-color: var(--card-bg);
}

[data-theme="dark"] .game-project-card--bento {
    box-shadow: var(--shadow-cartoon), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.game-project-card--bento .game-project-card__thumb {
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
    border-radius: calc(var(--radius-cartoon) - 4px) calc(var(--radius-cartoon) - 4px) 0 0;
    overflow: hidden;
}

.game-project-card--hero .game-project-card__thumb {
    /* Slightly shorter hero image so the synopsis can use more of the card */
    aspect-ratio: 16 / 10.5;
}

.game-project-card--bento .game-project-card__header {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    min-height: 0;
    flex-shrink: 0;
}

.game-project-card--hero .game-project-card__header {
    padding: 1rem 1.25rem;
}

.game-project-card--bento .game-project-card__title {
    font-size: 1rem;
    text-align: left;
    margin: 0 0 0.2rem 0;
}

.game-project-card--hero .game-project-card__title {
    font-size: 1.35rem;
}

.game-project-card--bento .game-project-card__duration {
    font-size: 0.7rem;
    text-align: left;
    margin: 0 0 0.4rem 0;
}

.game-project-card--bento .game-project-card__tags {
    justify-content: flex-start;
}

.game-project-card--bento .game-project-card__meta-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    margin: 0.55rem 0 0 0;
    padding: 0.55rem 0 0 0;
    border-top: 1px solid rgba(255, 107, 107, 0.22);
    list-style: none;
}

.game-project-card--bento .game-project-card__meta-chip {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    margin: 0;
    padding: 0.32rem 0.42rem 0.38rem;
    border: 1px solid rgba(255, 107, 107, 0.26);
    border-left: 2px solid var(--accent-orange);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.16);
    box-sizing: border-box;
    pointer-events: none;
    transform: none;
    transition: none;
}

.game-project-card--bento .game-project-card__meta-chip-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.15;
    color: var(--accent-mustard);
}

.game-project-card--bento .game-project-card__meta-chip-value {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--accent-mustard);
    word-break: break-word;
}

.game-project-card--bento .game-project-card__label {
    color: var(--accent-mustard);
    font-weight: 600;
    margin-right: 0.35rem;
}

.game-project-card--hero .game-project-card__meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.75rem 0 0 0;
    padding: 0.7rem 0 0 0;
    border-top: 1px solid rgba(255, 107, 107, 0.28);
    list-style: none;
}

[data-theme="light"] .game-project-card--hero .game-project-card__meta-chips {
    border-top-color: rgba(45, 45, 58, 0.12);
}

.game-project-card--hero .game-project-card__meta-chip {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1 1 auto;
    min-width: 5.25rem;
    max-width: 100%;
    margin: 0;
    padding: 0.45rem 0.55rem 0.5rem;
    border: 1px solid rgba(255, 107, 107, 0.32);
    border-left: 3px solid var(--accent-orange);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
    transform: none;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

[data-theme="light"] .game-project-card--hero .game-project-card__meta-chip {
    border-color: rgba(45, 45, 58, 0.14);
    border-left-color: var(--accent-orange);
    background: rgba(255, 255, 255, 0.45);
}

.game-project-card--hero .game-project-card__meta-chip:hover {
    transform: none;
    background-color: rgba(0, 0, 0, 0.22);
    border-color: rgba(255, 107, 107, 0.32);
    box-shadow: none;
}

[data-theme="light"] .game-project-card--hero .game-project-card__meta-chip:hover {
    background-color: rgba(255, 255, 255, 0.45);
    border-color: rgba(45, 45, 58, 0.14);
    border-left-color: var(--accent-orange);
    box-shadow: none;
}

.game-project-card--hero .game-project-card__meta-chip-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1.2;
    color: var(--accent-mustard);
}

.game-project-card--hero .game-project-card__meta-chip-value {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--accent-mustard);
    word-break: break-word;
}

[data-theme="light"] .game-project-card--hero .game-project-card__meta-chip-label,
[data-theme="light"] .game-project-card--hero .game-project-card__meta-chip-value {
    color: #8b0000;
}

.game-project-card--bento .game-project-card__details {
    padding: 0.6rem 0.85rem 0.85rem;
    border-bottom: none;
    min-height: 0;
    flex: 1;
}

.game-project-card--hero .game-project-card__details {
    padding: 1rem 1.25rem 1.25rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.85rem;
    min-height: 0;
}

.game-project-card--bento .game-project-card__intro {
    font-size: 0.85rem;
    margin: 0 0 0.35rem 0;
}

.game-project-card--hero .game-project-card__intro {
    font-size: 1.2rem;
    line-height: 1.58;
    margin: 0;
    flex: 1 1 auto;
}

.game-project-card--bento .game-project-card__row {
    font-size: 0.8rem;
    margin: 0;
}

.game-project-card--hero .game-project-card__row {
    font-size: 0.9375rem;
    line-height: 1.4;
    margin-top: auto;
    flex-shrink: 0;
}

/* Bento cards use the same hover as the editorial project-card rule (translateY -3px, thumb scale 1.04). */

/* Uniform card sizing: all project cards same size */
.game-projects-bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: auto;
}

.game-projects-bento .game-project-card--bento,
.game-projects-bento .game-project-card--hero {
    grid-column: auto !important;
    grid-row: auto !important;
    height: 640px;
}

.game-projects-bento .game-project-card--hero .game-project-card__thumb {
    aspect-ratio: 16 / 10;
}

.game-projects-bento .game-project-card--hero .game-project-card__header {
    padding: 0.6rem 0.85rem;
}

.game-projects-bento .game-project-card--hero .game-project-card__title {
    font-size: 1rem;
}

.game-projects-bento .game-project-card--hero .game-project-card__details {
    padding: 0.6rem 0.85rem 0.85rem;
    gap: 0.45rem;
    border-top: 0;
}

.game-projects-bento .game-project-card--hero .game-project-card__meta-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    margin: 0.55rem 0 0 0;
    padding: 0.55rem 0 0 0;
}

.game-projects-bento .game-project-card--hero .game-project-card__intro {
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0 0 0.35rem 0;
}

.game-projects-bento .game-project-card--hero .game-project-card__row {
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
}

.game-projects-bento .game-project-card__details {
    overflow: auto;
}

/* 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;
}

/* Game Project & GDD List Styles */
.game-project {
    margin-bottom: 2.5rem;
}

.game-project-wrapper {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-project-wrapper + .game-project-wrapper {
    border-top: 4px solid var(--border-color);
    margin-top: 3rem;
    padding-top: 3rem;
    position: relative;
}

.game-project-wrapper + .game-project-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    border-top: 2px solid var(--border-color);
    opacity: 0.3;
}

.game-project + .game-project {
    border-top: 4px solid var(--border-color);
    margin-top: 3rem;
    padding-top: 3rem;
    position: relative;
}

.game-project + .game-project::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    border-top: 2px solid var(--border-color);
    opacity: 0.3;
}

.game-project > a > h3,
.game-project > h3 {
    font-family: var(--font-family);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    transform-origin: center center;
    display: block;
    width: 100%;
}

/* Hover feedback for clickable titles */
.game-project > a:hover > h3 {
    transform: translateY(-3px) scale(1.15);
    color: var(--accent-red);
    filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.1));
}

/* 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);
}

.game-project a > .video-container,
.game-project a > .project-description {
    transition: opacity 0.3s ease;
}

.game-project a:hover > .video-container,
.game-project a:hover > .project-description {
    opacity: 0.9;
}

/* Enhanced hover feedback for entire game project link */
.game-project > a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    text-align: center;
    width: 100%;
}

.game-project > a:hover {
    transform: translateY(-2px);
}

/* 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;
}

/* GDD / project list layout (e.g. gdd.html) */
.project-layout {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 2rem;
    align-items: start;
}

.project-media {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-details h3 {
    font-family: var(--font-family);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-details-block {
    max-width: 1100px;
    margin: 0 auto;
}

/* 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);
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    background-color: var(--card-bg);
    border: 4px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: 400;
    font-family: var(--font-family);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.project-skills {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    width: 100%;
}

.project-skills strong {
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-family);
}

.project-details-block .time-estimation {
    font-size: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
}


.project-details-block h4 {
    font-family: var(--font-family);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 0.5rem;
    position: relative;
}

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

.project-details-block ol {
    list-style-position: inside;
    padding-left: 0;
}

.project-details-block ol li {
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.8;
    font-family: var(--font-family);
}

/* Image Hover Overlay */
.image-hover-container {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    border: 3px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

.image-hover-container .project-image {
    transition: transform 0.3s ease;
    border: none;
    margin-bottom: 0;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

[data-theme="dark"] .image-overlay {
    background-color: rgba(34, 28, 29, 0.85);
}

[data-theme="dark"] .image-overlay i {
    color: var(--accent-red);
}

.image-overlay i {
    font-size: 3rem;
    color: var(--text-primary);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-hover-container:hover .image-overlay {
    opacity: 1;
}

.image-hover-container:hover .project-image {
    transform: scale(1.02);
}

.image-hover-container:hover .image-overlay i {
    transform: scale(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 --- */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--card-bg);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.05s ease;
    border-right: 4px solid var(--border-color);
    will-change: transform, opacity;
}

.page-transition::before {
    content: '';
    position: absolute;
    top: 0;
    right: -2px;
    width: 2px;
    height: 100%;
    background-color: var(--border-color);
    opacity: 0.3;
}

.page-transition.active {
    opacity: 1 !important;
    transform: scaleX(1) !important;
    pointer-events: all;
    transition: transform 0.25s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.05s ease;
}

.page-transition.exit {
    transform-origin: right;
    transform: scaleX(0);
    opacity: 0;
}

/* 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;
}

/* --- Skeleton Loading --- */
@keyframes skeleton-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.skeleton-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background-color: var(--bg-color);
    padding: 2rem;
    overflow: hidden;
}

.skeleton-bone {
    background: linear-gradient(
        90deg,
        var(--skeleton-base) 25%,
        var(--skeleton-shimmer) 50%,
        var(--skeleton-base) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-bone--circle { border-radius: 50%; }

.skeleton-bone--card {
    border-radius: var(--radius-cartoon, 20px);
    border: 3px solid var(--skeleton-base);
}

.skeleton-nav {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    padding-bottom: 1.25rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--skeleton-base);
}

/* About page skeleton */
.skeleton-about-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.skeleton-sidebar-bones {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-cartoon, 20px);
    border: 3px solid var(--skeleton-base);
}

.skeleton-main-bones {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Grid page skeleton */
.skeleton-grid-layout {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.skeleton-filter-row {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.skeleton-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Detail page skeleton */
.skeleton-detail-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Contact page skeleton */
.skeleton-contact-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .skeleton-about-layout {
        grid-template-columns: 1fr;
    }
    .skeleton-sidebar-bones {
        max-width: 280px;
        margin: 0 auto;
    }
    .skeleton-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 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;
    transform: scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

@media (hover: hover) and (pointer: fine) {
    img.is-loaded:hover {
        transform: scale(1.02);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Level-design beat thumbnails: no global image zoom — use row hover only */
    .level-design-toc__beat-thumb img:hover {
        transform: none;
    }
}

/* Smooth link transitions */
a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    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);
    transform: translateY(-1px) scale(1.05);
}



/* Hover animations for interactive elements */
.expertise-item,
.game-project,
.github-link,
.resume-btn,
.submit-btn,
.social-links a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 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;
}

.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(255, 107, 107, 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 {
        gap: 0.2rem;
    }

    nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
    
    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 */
@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(255, 107, 107, 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(255, 107, 107, 0.28);
    border-left-width: 3px;
    border-radius: 10px;
    background: rgba(255, 107, 107, 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(255, 107, 107, 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(255, 107, 107, 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(255, 107, 107, 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(255, 107, 107, 0.14);
    border-color: rgba(255, 107, 107, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 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(255, 107, 107, 0.3),
        inset 0 0 0 3px rgba(255, 107, 107, 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(255, 107, 107, 0.28);
    border-left-width: 3px;
    border-radius: 12px;
    background: rgba(255, 107, 107, 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(255, 107, 107, 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(255, 107, 107, 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(255, 107, 107, 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(255, 107, 107, 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(255, 107, 107, 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 (level design case study) */
.level-design-main 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(255, 107, 107, 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(255, 107, 107, 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-secondary);
    border-top: 2px solid rgba(255, 107, 107, 0.25);
    text-align: left;
    line-height: 1.6;
}

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

.level-design-main .level-design-figure {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid var(--border-color);
    background: #0a0a10;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .level-design-main .level-design-figure {
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.4);
}

.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(255, 107, 107, 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(255, 107, 107, 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(201, 147, 73, 0.15) !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(201, 147, 73, 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;
}

/* Page transition: simple fade overlay */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--bg) !important;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: none !important;
    border: none !important;
    transition: opacity var(--t-base) var(--ease) !important;
    will-change: opacity;
}
.page-transition::before {
    content: none !important;
    display: none !important;
}
.page-transition.is-ready { opacity: 0; }
.page-transition.is-active,
.page-transition.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}
.page-transition.exit { opacity: 0 !important; }

/* Body fade in on load */
body {
    opacity: 0;
    transition: opacity 380ms var(--ease);
}
html.loaded body,
body.loaded {
    opacity: 1;
}

/* Skeleton loader: hidden in editorial layout */
.skeleton-loader {
    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: 400;
    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: italic;
    color: var(--accent);
    font-weight: 400;
}
.hero-lede {
    font-size: 1.05rem;
    color: var(--text-muted);
    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(18px);
    transition: opacity var(--t-slow) var(--ease),
                transform var(--t-slow) var(--ease);
    will-change: opacity, transform;
}
[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: tasteful hover (lift + accent swap) ---------- */
.cta {
    --cta-bg: transparent;
    --cta-fg: var(--text);
    --cta-border: var(--line-strong);
    --cta-bg-hover: transparent;
    --cta-fg-hover: var(--accent);
    --cta-border-hover: var(--accent);
    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 6px 18px rgba(201, 147, 73, 0.12);
}
.cta:hover::before {
    transform: translateY(0);
}
.cta:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Primary: filled white, fills with accent on hover */
.cta--primary {
    --cta-bg: var(--text);
    --cta-fg: var(--bg);
    --cta-border: var(--text);
    --cta-bg-hover: var(--accent);
    --cta-fg-hover: var(--bg);
    --cta-border-hover: var(--accent);
}

/* Ghost: muted outline, fills with subtle accent tint on hover */
.cta--ghost {
    --cta-border: var(--line);
    --cta-fg: var(--text-muted);
    --cta-bg-hover: var(--accent-soft);
    --cta-fg-hover: var(--accent);
    --cta-border-hover: var(--accent);
}

/* 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(201, 147, 73, 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(201, 147, 73, 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(201, 147, 73, 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;
    filter: grayscale(0.7) contrast(0.9) brightness(0.85);
    transition: filter var(--t-base) var(--ease);
}
.contact-grid__map iframe:hover {
    filter: grayscale(0.2) contrast(1) brightness(1);
}
.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(201, 147, 73, 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(201, 147, 73, 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: '\2014\00a0\00a0' !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 {
    filter: grayscale(0.7) contrast(0.9) brightness(0.85);
}

/* ===========================================================
   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: flex;
    flex-direction: column;
    gap: 2.25rem;
    padding: 0;
}

.project-spotlight-list .game-project-card--hidden {
    display: none;
}

.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: #0c0e13;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    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: rgba(110, 181, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.38);
}

.project-spotlight:focus-visible {
    outline: 2px solid #6eb5ff;
    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,
.level-design-figure picture {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.project-spotlight__media img,
.project-spotlight__media video {
    width: 100%;
    height: 100%;
    min-height: 270px;
    object-fit: cover;
    display: block;
}

.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: #6eb5ff;
}

.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: #ffffff;
    max-width: 14ch;
}

.project-spotlight__synopsis {
    position: relative;
    z-index: 2;
    margin: 0 0 0.9rem -3.5rem;
    padding: 0.95rem 1.1rem;
    background: #181b22;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
    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: rgba(255, 255, 255, 0.76);
}

.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: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.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: rgba(255, 255, 255, 0.92);
    transition: color var(--t-fast) var(--ease);
}

.project-spotlight:hover .project-spotlight__cta {
    color: #6eb5ff;
}

.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: #6eb5ff;
}

.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 img,
    .project-spotlight__media video {
        min-height: 220px;
    }

    .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(201, 147, 73, 0.4);
}

.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 rgba(255, 255, 255, 0.06);
}

.expertise-card__tags li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(201, 147, 73, 0.92);
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(201, 147, 73, 0.22);
    border-radius: 7px;
}

.expertise-card__tags li i {
    font-size: 0.62rem;
    opacity: 0.75;
}

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

    nav ul {
        gap: 0;
        padding: 0.15rem 0;
    }

    nav a {
        padding: 0.55rem 0.7rem;
        font-size: 0.65rem;
        letter-spacing: 0.14em;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .home-hero__actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
    }

    .cta {
        min-height: 44px;
        padding: 0.65rem 1.1rem;
    }

    .container .info-card {
        padding: 1.15rem 1.2rem !important;
    }

    .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: flex-end;
    }

    .showcase-container {
        padding: 1.15rem 1.1rem !important;
    }

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

    .project-spotlight--page {
        margin-bottom: 1.25rem;
    }

    .project-spotlight__actions {
        justify-content: flex-start;
        gap: 0.75rem 1rem;
    }

    .project-spotlight--page .project-spotlight__cta {
        min-height: 44px;
        align-items: center;
        font-size: 0.78rem;
    }

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

    .level-design-beat__num {
        font-size: 1.35rem;
    }

    .tech-stack-categories {
        grid-template-columns: 1fr !important;
    }

    /* Skip heavy entrance animations on small screens for snappier load */
    .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[loading="lazy"].is-loaded,
    img.img--fade-in.is-loaded {
        opacity: 1;
        transform: none;
    }

    .showcase-container,
    .project-spotlight-list .project-spotlight {
        content-visibility: auto;
        contain-intrinsic-size: auto 480px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        max-width: none !important;
    }

    .project-spotlight__content {
        padding: 1rem !important;
    }

    .project-spotlight__title {
        font-size: clamp(1.35rem, 6vw, 1.85rem) !important;
    }

    .game-projects-filter {
        gap: 0.4rem;
    }

    .game-projects-filter .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
        min-height: 40px;
    }
}

/* Respect reduced motion globally for entrance effects */
@media (prefers-reduced-motion: reduce) {
    .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;
    }
}
