/* ═══════════════════════════════════════════
   Nicolas Biakou — Game Designer Portfolio
   ═══════════════════════════════════════════ */

:root {
    --bg-deep:    #0d0f14;
    --bg-card:    #161920;
    --bg-card-hover: #1c1f2a;
    --border:     #2a2d3a;
    --accent:     #8b7ad8;
    --accent-dim: #6b5cb0;
    --accent-glow: rgba(139, 122, 216, 0.15);
    --text:       #e2e0ea;
    --text-dim:   #8a879a;
    --text-bright:#ffffff;
    --lava:       #e85d3a;
    --water:      #4a9eff;
    --ore:        #f0c040;
    --success:    #4ade80;
    /* Fiona Volcano : rose/rouge + turquoise clair */
    --fiona-primary:  #e84a6a;
    --fiona-secondary:#5ce0d0;
    /* Hide Attack : turquoise + violet clair */
    --hide-primary:   #40d9c6;
    --hide-secondary: #b48ade;
    /* FocusPals : bleu + blanc cassé (scolaire) */
    --focus-primary:  #4a8eff;
    --focus-secondary:#f5f0e8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}



.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ═══ NAV ═══ */
#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: #3a3632;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: center; height: 60px;
}
.nav-logo { font-weight: 800; font-size: 20px; color: var(--accent); text-decoration: none; letter-spacing: 2px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: #f0eee9; text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: 0.3px; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* ═══ TOP LIGHT BACKGROUND ═══ */
.top-light-bg {
    background: linear-gradient(6deg, #eaeaea, #bdbdbd);
    color: #353535;
}
.top-light-bg h2, 
.top-light-bg h3, 
.top-light-bg h4,
.top-light-bg .hero-tag,
.top-light-bg .accent,
.top-light-bg .section-tag,
.top-light-bg .project-engine {
    color: #242424;
}
.top-light-bg p {
    color: #353535;
}
.top-light-bg .section-sub {
    color: #555;
}
.top-light-bg .project-card {
    background: rgba(255,255,255,0.5);
    border-color: rgba(255,255,255,0.7);
}
.top-light-bg .project-card:hover {
    background: rgba(255,255,255,0.9);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* ═══ HERO ═══ */
#hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; text-align: center; padding: 80px 24px;
}
.hero-bg {
    display: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-tag { font-size: 12px; font-weight: 800; letter-spacing: 4px; color: var(--accent); margin-bottom: 20px; }
#hero h1 { font-size: clamp(42px, 7vw, 80px); font-weight: 900; line-height: 1.05; color: #161920; margin-bottom: 20px; }
.accent { color: var(--accent); }
.hero-sub { font-size: 18px; color: #3a3d4a; font-weight: 500; max-width: 520px; margin: 0 auto 32px; line-height: 1.7; }
.hero-cta { display: flex; gap: 14px; justify-content: flex-start; }

.btn { display: inline-block; padding: 12px 28px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; transition: all 0.3s; cursor: pointer; }
.btn-primary {
    background: #7a1a2e;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(122, 26, 46, 0.35);
}
.btn-primary:hover { background: #5e1322; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(122, 26, 46, 0.5); }
.btn-ghost { border: 2px solid #161920; color: #161920; background: transparent; font-weight: 700; }
.btn-ghost:hover { border-color: #e85d3a; color: #e85d3a; }

.scroll-hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); animation: bounce 2s infinite; color: #161920; font-size: 24px; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ═══ COMPUTER MOCKUP ═══ */
.computer-mockup {
    position: relative;
    display: inline-block;
    max-width: 800px;
    width: 50vw;
    flex-shrink: 0;
}
.computer-img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
    pointer-events: none;
}
.computer-video {
    position: absolute;
    /* positioned to fit inside the Mac screen */
    top: 26.9%;
    left: 38.8%;
    width: 22.0%;
    height: 15.0%;
    object-fit: cover;
    z-index: 3;
    border-radius: 2px;
}

/* Hero split layout: computer left, text right */
#hero {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 80px 0 80px 0;
}
#hero .hero-content {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: none;
    padding: 0;
}
.hero-text {
    flex: 1;
    padding: 0 40px;
}
.hero-sub { margin: 0 0 32px 0; }
.hero-cta { justify-content: flex-start; }

/* ═══ SECTIONS ═══ */
section { padding: 100px 0; }
.section-alt { background: var(--bg-deep) url('BackgroundPatern2.png') center/cover no-repeat; }

/* Experience section: zigzag mask to interlock with FocusPals */
#experience {
    position: relative;
    padding-top: 120px;
    padding-bottom: 120px;
    z-index: 1;
    --mask-h: 24px;
    --mask-w: 48px;
    -webkit-mask-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24' preserveAspectRatio='none'%3E%3Cpolygon fill='black' points='0,24 24,0 48,24'/%3E%3C/svg%3E"),
        linear-gradient(black, black),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24' preserveAspectRatio='none'%3E%3Cpolygon fill='black' points='0,0 24,24 48,0'/%3E%3C/svg%3E");
    -webkit-mask-size: var(--mask-w) var(--mask-h), 100% calc(100% - var(--mask-h)*2 + 2px), var(--mask-w) var(--mask-h);
    -webkit-mask-position: 0 0, center, 0 100%;
    -webkit-mask-repeat: repeat-x, no-repeat, repeat-x;
    mask-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24' preserveAspectRatio='none'%3E%3Cpolygon fill='black' points='0,24 24,0 48,24'/%3E%3C/svg%3E"),
        linear-gradient(black, black),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24' preserveAspectRatio='none'%3E%3Cpolygon fill='black' points='0,0 24,24 48,0'/%3E%3C/svg%3E");
    mask-size: var(--mask-w) var(--mask-h), 100% calc(100% - var(--mask-h)*2 + 2px), var(--mask-w) var(--mask-h);
    mask-position: calc(var(--mask-w) / 2) 0, center, calc(var(--mask-w) / 2) 100%;
    mask-repeat: repeat-x, no-repeat, repeat-x;
    -webkit-mask-position: calc(var(--mask-w) / 2) 0, center, calc(var(--mask-w) / 2) 100%;
    margin-top: calc(var(--mask-h) * -1 + 1px);
}

/* Project-specific section backgrounds */
.project-section {
    position: relative;
    padding-top: 120px;
    padding-bottom: 120px;
    z-index: 1;
    /* Zigzag mask edges — SVG for antialiasing */
    --mask-h: 24px;
    --mask-w: 48px;
    -webkit-mask-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24' preserveAspectRatio='none'%3E%3Cpolygon fill='black' points='0,24 24,0 48,24'/%3E%3C/svg%3E"),
        linear-gradient(black, black),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24' preserveAspectRatio='none'%3E%3Cpolygon fill='black' points='0,0 24,24 48,0'/%3E%3C/svg%3E");
    -webkit-mask-size: var(--mask-w) var(--mask-h), 100% calc(100% - var(--mask-h)*2 + 2px), var(--mask-w) var(--mask-h);
    -webkit-mask-position: 0 0, center, 0 100%;
    -webkit-mask-repeat: repeat-x, no-repeat, repeat-x;
    mask-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24' preserveAspectRatio='none'%3E%3Cpolygon fill='black' points='0,24 24,0 48,24'/%3E%3C/svg%3E"),
        linear-gradient(black, black),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24' preserveAspectRatio='none'%3E%3Cpolygon fill='black' points='0,0 24,24 48,0'/%3E%3C/svg%3E");
    mask-size: var(--mask-w) var(--mask-h), 100% calc(100% - var(--mask-h)*2 + 2px), var(--mask-w) var(--mask-h);
    mask-position: 0 0, center, 0 100%;
    mask-repeat: repeat-x, no-repeat, repeat-x;
}
/* Interlocking zigzags between games */
#fiona,
.project-section + .project-section,
.project-section + #experience {
    margin-top: calc(var(--mask-h) * -1 + 1px); /* Pull up to hide seams and interlock */
}
#fiona {
    background-color: #2a0c13; /* Bordeaux/Brun sombre */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpolygon fill='%233d0c20' points='50,0 100,80 50,160 0,80'/%3E%3C/svg%3E");
    background-size: 50px 80px;
}
/* ═══ BESTIARY ART ═══ */
.bestiary-art {
    float: right;
    height: 280px;
    width: auto;
    margin: 0 0 20px 24px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(232, 74, 106, 0.3);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
@media (max-width: 900px) {
    .bestiary-art {
        float: none;
        display: block;
        margin: 0 auto 20px auto;
        height: 220px;
    }
}
/* ═══ FIONA CHARACTER ART ═══ */
.fiona-character-art {
    float: right;
    height: 500px;
    width: auto;
    margin: -40px -60px 20px 30px;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(-10px 10px 30px rgba(0,0,0,0.5));
    shape-outside: margin-box;
    position: relative;
    z-index: 10;
}
@media (max-width: 900px) {
    .fiona-character-art {
        float: none;
        display: block;
        margin: 0 auto 20px auto;
        height: 350px;
    }
}
/* ═══ LIVA CHARACTER ART ═══ */
.liva-character-art {
    float: left;
    height: 450px;
    width: auto;
    margin: -10px 40px 20px -50px;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(10px 10px 30px rgba(0,0,0,0.5));
    shape-outside: margin-box;
    position: relative;
    z-index: 10;
}
@media (max-width: 900px) {
    .liva-character-art {
        float: none;
        display: block;
        margin: 0 auto 20px auto;
        height: 350px;
    }
}
/* ═══ TAMA CHARACTER WINDOW ═══ */
.tama-character-window {
    float: right;
    width: max-content;
    margin: 10px -80px -140px 30px !important;
    position: relative;
    z-index: 10;
    box-shadow: 0 16px 40px rgba(100, 150, 200, 0.4);
}
.tama-character-img {
    height: 260px;
    width: auto;
    display: block;
    object-fit: cover;
}
@media (max-width: 900px) {
    .tama-character-window {
        float: none;
        margin: 0 auto 24px auto !important;
    }
    .tama-character-img {
        height: 250px;
    }
}
#hideattack {
    background: linear-gradient(rgba(26, 21, 40, 0.8), rgba(26, 21, 40, 0.8)), url('BackgroundPatern2.png') center/cover no-repeat;
    overflow: hidden;
    -webkit-mask-position: calc(var(--mask-w) / 2) 0, center, calc(var(--mask-w) / 2) 100%;
    mask-position: calc(var(--mask-w) / 2) 0, center, calc(var(--mask-w) / 2) 100%;
}
.ha-pattern-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('LogoOfficialNoColor.png') repeat 0 0 / 200px;
    transform: rotate(-45deg);
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
}
#hideattack > .container {
    position: relative;
    z-index: 1;
}

#focuspals {
    background:
        repeating-conic-gradient(#e8e2d8 0% 25%, #c8daf0 0% 50%) 0 0 / 80px 80px;
}

/* FocusPals: dark text on light checkerboard */
#focuspals .section-tag { color: var(--focus-primary); }
#focuspals h2, #focuspals h3 { color: #1a1a2e; }
/* ═══ READABLE BACKGROUNDS PER PROJECT ═══ */
/* Fiona: dark bordeaux bg */
#fiona .pitch-card,
#fiona .subsection,
#fiona .table-wrapper {
    background: rgba(30, 8, 14, 0.85);
    backdrop-filter: blur(6px);
    padding: 24px 28px;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Hide Attack: dark purple bg */
#hideattack .pitch-card,
#hideattack .subsection,
#hideattack .table-wrapper,
#hideattack .mechanic-duo {
    background: rgba(18, 12, 30, 0.85);
    backdrop-filter: blur(6px);
    padding: 24px 28px;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* FocusPals containers are now handled by .os-window */
#focuspals .section-sub { color: #1d3557; font-weight: 500; }
#focuspals .os-window-body p,
#focuspals .iter-content p,
#focuspals .section-body,
#focuspals .tech-item li { color: #1d3557; font-weight: 500; }
#focuspals .iter-content h4,
#focuspals .tech-item h4 { color: #1a1a2e; }
#focuspals .iter-num { color: var(--focus-primary); }
.section-tag { font-size: 11px; font-weight: 700; letter-spacing: 4px; color: var(--accent); margin-bottom: 10px; text-transform: uppercase; }
h2 { font-size: 36px; font-weight: 800; color: var(--text-bright); margin-bottom: 6px; }
.title-logo { height: 120px; width: auto; vertical-align: middle; margin-bottom: 8px; }
.section-sub { color: var(--text-dim); font-size: 16px; margin-bottom: 48px; }
h3 { font-size: 20px; font-weight: 700; color: var(--text-bright); margin-bottom: 16px; }
.subsection { margin-top: 56px; }

/* ═══ VIDEO EMBEDS ═══ */
.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.video-secondary {
    max-width: 700px;
    padding-bottom: 39.375%; /* 16:9 at 700px */
}

/* ═══ PROJECTS GRID ═══ */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
    padding: 32px 24px; text-decoration: none; color: var(--text);
    transition: all 0.3s; position: relative; overflow: hidden;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.project-fiona:hover { border-color: var(--fiona-primary); }
.project-hide:hover { border-color: var(--hide-primary); }
.project-focus:hover { border-color: var(--focus-primary); }
.project-logo { 
    display: block; 
    margin: 0 auto 24px auto; 
    width: 200px; 
    height: 120px; 
    object-fit: contain; 
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}
.project-engine { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--text-dim); text-transform: uppercase; }
.project-info { text-align: center; }
.project-info h3 { font-size: 22px; margin: 6px 0 10px; }
.project-info p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.project-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--accent); }
.project-fiona .project-link { color: var(--fiona-primary); }
.project-hide .project-link { color: var(--hide-primary); }
.project-focus .project-link { color: var(--focus-primary); }

/* ═══ PITCH (Magazine style) ═══ */
.pitch-card {
    background: rgba(255,255,255,0.04);
    border: none;
    border-radius: 0;
    padding: 28px 32px;
    margin: 0 0 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pitch-text h3 { margin-bottom: 12px; display: inline; }
.pitch-text p { color: var(--text-dim); line-height: 1.9; font-size: 15px; }

/* ═══ GAME LOOP (Circle with explicit positions) ═══ */
.loop-diagram {
    position: relative;
    width: 500px;
    height: 460px;
    margin: 40px auto 20px;
}
/* Dashed circle behind */
.loop-diagram::before {
    content: '';
    position: absolute;
    top: 80px;
    left: 100px;
    width: 300px;
    height: 300px;
    border: 3px dashed rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    pointer-events: none;
}
.loop-step {
    position: absolute;
    width: 150px;
    text-align: center;
    background: #eaaa32; /* Doré uni */
    padding: 14px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.loop-icon { font-size: 28px; margin-bottom: 6px; color: #3d0c20; }
.loop-label { font-weight: 800; font-size: 13px; color: #2a0c13; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.loop-desc { font-size: 11px; color: #4a1525; line-height: 1.4; margin: 0; font-weight: 600; }

/* Diamond positions: top, right, bottom, left */
.loop-step-1 { top: 0;    left: 175px; }   /* Explorer — top */
.loop-step-2 { top: 160px; left: 350px; }  /* Survivre — right */
.loop-step-3 { top: 320px; left: 175px; }  /* Shower — bottom */
.loop-step-4 { top: 160px; left: 0; }      /* S'équiper — left */

@media (max-width: 600px) {
    .loop-diagram {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .loop-diagram::before { display: none; }
    .loop-step {
        position: static;
        width: 100%;
        max-width: 280px;
        box-shadow: none;
        background: rgba(255,255,255,0.03);
    }
}

/* ═══ STATS GRID (Magazine style) ═══ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-card {
    background: transparent; border: none; padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.stat-icon { font-size: 26px; margin-bottom: 8px; opacity: 0.7; }
.stat-card h4 { font-size: 14px; font-weight: 800; color: var(--text-bright); margin-bottom: 6px; }
.stat-card p { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* ═══ EQUIPMENT (Magazine style) ═══ */
.equip-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 16px; }
.equip-cat {
    background: transparent; border: none; padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.equip-icon { font-size: 26px; display: block; margin-bottom: 8px; opacity: 0.7; }
.equip-cat h4 { font-size: 14px; font-weight: 800; color: var(--text-bright); margin-bottom: 4px; }
.equip-cat p { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* ═══ TABLE ═══ */
.table-wrapper { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--bg-card); }
th { text-align: left; padding: 12px 14px; font-weight: 600; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); border-bottom: 1px solid var(--border); }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
tr:hover { background: var(--bg-card-hover); }
.row-magic { background: var(--accent-glow); }
.row-magic:hover { background: rgba(139,122,216,0.22); }
.tradeoff { color: var(--lava); font-weight: 600; }
.design-note { font-size: 14px; color: var(--text-dim); line-height: 1.8; margin-bottom: 16px; padding-left: 20px; border-left: none; font-style: italic; opacity: 0.8; }

/* ═══ GDD INSPIRATION COMPONENTS ═══ */
.gdd-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 30px; margin-top: 24px; }
.gdd-stat-item { display: flex; flex-direction: column; }
.gdd-stat-icon { font-size: 28px; height: 40px; color: var(--accent); margin-bottom: 8px; }
.gdd-stat-item h4 { margin-bottom: 6px; font-size: 16px; font-weight: 700; color: var(--text-bright); }
.gdd-stat-item p { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin: 0; }

.gdd-boxes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.gdd-box { border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 24px; text-align: center; background: rgba(255,255,255,0.03); transition: transform 0.2s, box-shadow 0.2s, background 0.2s; }
.gdd-box:hover { transform: translateY(-2px); background: rgba(255,255,255,0.06); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.gdd-box h4 { margin-bottom: 12px; font-size: 17px; color: var(--text-bright); font-weight: 700; }
.gdd-box p { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin: 0; }

.gdd-steps-container { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.gdd-step { display: flex; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255,255,255,0.05); border-radius: 6px; overflow: hidden; align-items: center; }
.gdd-step-num { background: rgba(255, 255, 255, 0.05); font-size: 32px; font-family: 'JetBrains Mono', monospace; font-weight: 800; color: var(--accent); opacity: 0.8; width: 90px; text-align: center; align-self: stretch; display: flex; justify-content: center; align-items: center; }
.gdd-step-content { padding: 20px 24px; flex-grow: 1; }
.gdd-step-content h4 { margin-bottom: 6px; font-size: 16px; font-weight: 700; color: var(--text-bright); }
.gdd-step-content p { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin: 0; }

.gdd-horizontal-flag { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 18px 24px 18px 64px; position: relative; margin-top: 24px; }
.gdd-horizontal-flag-icon { position: absolute; left: 24px; top: 18px; font-size: 22px; color: var(--accent); }
.gdd-horizontal-flag p { margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.gdd-horizontal-flag strong { color: var(--text-bright); }

#fiona .gdd-stat-icon, #fiona .gdd-horizontal-flag-icon { color: #f0c040; }
#fiona .gdd-step-num { color: var(--fiona-primary); }

/* ═══ GDD MEDIA (images/gifs in sections) ═══ */
.gdd-media {
    margin-top: 24px;
    text-align: center;
}
.gdd-media-img {
    max-width: 100%;
    max-height: 350px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}
.gdd-media-caption {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-dim);
    font-style: italic;
}
.gdd-media-left {
    text-align: left;
    margin-left: -60px;
    margin-top: -180px;
    margin-bottom: 20px;
    position: relative;
    z-index: 5;
}
.gdd-media-left .gdd-media-img {
    max-height: 280px;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* ═══ ITERATIONS (Magazine style) ═══ */
.iterations { display: grid; gap: 0; }
.iter-card {
    display: flex; gap: 18px; background: transparent; border: none;
    padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.iter-num { font-family: 'JetBrains Mono', monospace; font-size: 32px; font-weight: 800; color: var(--accent); opacity: 0.3; flex-shrink: 0; line-height: 1; }
.iter-content h4 { font-size: 15px; font-weight: 700; color: var(--text-bright); margin-bottom: 6px; }
.iter-content p { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 3px; }

/* ═══ LEVEL DESIGN ═══ */
.level-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; margin-top: 24px; }
.level-grid-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.level-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; }
.tile { aspect-ratio: 1; border-radius: 2px; transition: transform 0.15s; cursor: pointer; }
.tile:hover { transform: scale(1.3); z-index: 2; }
.tile-rock { background: #4a4555; } .tile-hard { background: #6b5e7a; }
.tile-lava { background: var(--lava); box-shadow: 0 0 4px rgba(232,93,58,0.4); }
.tile-ore { background: var(--ore); box-shadow: 0 0 3px rgba(240,192,64,0.3); }
.tile-water { background: var(--water); box-shadow: 0 0 4px rgba(74,158,255,0.4); }
.tile-chest { background: #f59e0b; } .tile-empty { background: #1a1820; }
.tile-player { background: var(--success); box-shadow: 0 0 6px rgba(74,222,128,0.5); }
.tile-sample { display: inline-block; width: 16px; height: 16px; border-radius: 2px; vertical-align: middle; margin-right: 8px; flex-shrink: 0; }
.legend-item { display: flex; align-items: center; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.design-principles { list-style: none; padding: 0; margin-top: 16px; }
.design-principles li { font-size: 12px; color: var(--text-dim); padding: 4px 0 4px 16px; position: relative; line-height: 1.4; }
.design-principles li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* ═══ TRAILERS GRID ═══ */
.trailers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}
.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
@media (max-width: 800px) {
    .trailers-grid { grid-template-columns: 1fr; }
}

/* ═══ HIDE ATTACK: MECHANIC DUO (Magazine style) ═══ */
.mechanic-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mechanic-state {
    background: transparent; border-radius: 0; padding: 20px 0 20px 20px;
    border: none; border-bottom: 2px solid rgba(255,255,255,0.1);
}

.state-music-on { border-left: 4px solid var(--hide-primary); }
.state-music-off { border-left: 4px solid var(--hide-secondary); }
.mechanic-state h4 { font-size: 16px; margin-bottom: 12px; }
.mechanic-state ul { list-style: none; padding: 0; }
.mechanic-state li { font-size: 13px; color: var(--text-dim); padding: 4px 0 4px 18px; position: relative; line-height: 1.5; }
.mechanic-state li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

/* ═══ HIDE ATTACK: LOOP DIAGRAM (Linear flow) ═══ */
#hideattack .loop-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: auto;
    height: auto;
    margin: 30px 0;
}
#hideattack .loop-diagram::before { display: none; } /* Remove dashed circle */
#hideattack .loop-step {
    position: relative;
    top: auto;
    left: auto;
    background: #70c0a1; /* Mint green requested */
    border: 1px solid rgba(255,255,255,0.4);
    width: 140px;
    margin: 10px;
}
#hideattack .loop-icon { color: #15382b; }
#hideattack .loop-label { color: #0f2c21; }
#hideattack .loop-desc { color: #1c4a39; }
#hideattack .loop-arrow { font-size: 24px; color: var(--hide-primary); margin: 0 10px; }
#hideattack .loop-arrow-return { display: none; } /* Linear flow doesn't need return arrow if wrap used, or replace with flex wrap */

/* ═══ ROLE BADGES ═══ */
.role-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.role-badge { background: rgba(64,217,198,0.12); border: 1px solid rgba(64,217,198,0.3); color: var(--hide-primary); padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.role-note { font-size: 13px; color: var(--text-dim); font-style: italic; }

/* ═══ FOCUSPALS: TECH STACK (Retro OS Style) ═══ */
.tech-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* Global OS Window Class (for all FocusPals containers) */
.os-window, .tech-item {
    background: #ffffff;
    border: 3px solid #9fbddd;
    border-radius: 4px;
    padding: 0 !important; /* Force override */
    overflow: hidden;
    box-shadow: 6px 6px 0px rgba(100, 150, 200, 0.15); /* Retro drop shadow */
    margin-bottom: 24px;
}

.os-window-header, .tech-item h4 {
    background: #82acf2;
    color: #fdfaf6; /* Blanc cassé */
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #6b98d9;
    font-family: 'DotGothic16', sans-serif;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.25);
}
.os-window-header::after, .tech-item h4::after {
    content: "✖";
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 22px;
    height: 22px;
    background: #ffa1b9; /* Anime pink close button */
    color: #fff;
    font-size: 12px;
    font-family: sans-serif;
    border-radius: 3px;
    box-shadow: inset -1px -1px 2px rgba(0,0,0,0.1);
    margin-left: 10px;
}

.os-window-body, .tech-body {
    padding: 20px 24px;
    background: #ffffff;
    height: 100%;
}

.tech-item ul { list-style: none; padding: 0; margin: 0; }
.tech-item li { font-size: 14px; color: #1d3557; padding: 4px 0 4px 18px; position: relative; line-height: 1.5; font-weight: 500; }
.tech-item li::before { content: "▶"; position: absolute; left: 0; color: #9fbddd; font-size: 10px; top: 7px; }
.tech-body p { color: #1d3557 !important; font-weight: 500; font-size: 14px; }

/* ═══ TIMELINE ═══ */
.timeline { position: relative; padding-left: 40px; margin-bottom: 48px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-item::before { content: ""; position: absolute; left: -36px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg-deep); }
.timeline-date { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent); margin-bottom: 4px; }
.timeline-content h3 { font-size: 16px; margin-bottom: 2px; }
.timeline-company { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.timeline-content ul { list-style: none; padding: 0; }
.timeline-content li { font-size: 13px; color: var(--text-dim); padding: 2px 0 2px 16px; position: relative; }
.timeline-content li::before { content: "·"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ═══ SKILLS ═══ */
.skills-bar { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.skills-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.skill-tag { background: rgba(139,122,216,0.1); border: 1px solid var(--border); color: var(--text); padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; transition: border-color 0.2s; }
.skill-tag:hover { border-color: var(--accent); }
.skill-tag-accent { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ═══ CONTACT ═══ */
#contact { text-align: center; padding: 80px 0; }
.contact-grid { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.contact-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 20px 28px; display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--text); font-size: 14px;
    transition: border-color 0.3s, transform 0.2s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-icon { font-size: 22px; }

footer { text-align: center; padding: 30px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-dim); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
    .projects-grid { grid-template-columns: 1fr; }
    .mechanic-duo { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .loop-diagram { flex-direction: column; align-items: center; }
    .loop-arrow { transform: rotate(90deg); padding: 0; }
    .level-layout { grid-template-columns: 1fr; }
}

/* ═══ ANIMATIONS ═══ */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
