:root {
    --bg: #f5f3ee;
    --panel: #ffffff;
    --ink: #1f2428;
    --muted: #667085;
    --line: #ded8ce;
    --soft: #ebe5da;
    --accent: #315d50;
    --accent-2: #9b6a3a;
    --warning: #fff6dc;
    --shadow: 0 18px 45px rgba(31, 36, 40, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
}

a {
    color: inherit;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 56px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 243, 238, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-weight: 800;
    letter-spacing: 0.02em;
}

nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 14px;
    color: var(--muted);
}

nav a, nav button {
    text-decoration: none;
    font-weight: 700;
}

nav a:hover, nav button:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hero {
    padding: 86px 0 56px;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 36px;
    align-items: end;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 14px;
}

h1 {
    font-size: clamp(44px, 7vw, 82px);
    line-height: 0.98;
    margin: 0;
    letter-spacing: -0.05em;
}

.role {
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.15;
    margin: 18px 0 0;
    color: var(--muted);
    font-weight: 500;
}

.hero-copy {
    max-width: 760px;
    margin-top: 26px;
    font-size: 20px;
}

.hero-side {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.hero-side h2 {
    font-size: 18px;
    margin: 0 0 12px;
}

.quick-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-size: 15px;
}

.quick-list strong {
    color: var(--ink);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid var(--ink);
    transition: transform 0.12s ease, background 0.12s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    color: white;
    background: var(--ink);
}

.btn.secondary {
    background: transparent;
}

section {
    padding: 66px 0;
    border-bottom: 1px solid var(--line);
}

.section-head {
    display: grid;
    grid-template-columns: 0.45fr 1fr;
    gap: 34px;
    margin-bottom: 28px;
}

.section-head h2 {
    font-size: 34px;
    line-height: 1.05;
    margin: 0;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    max-width: 760px;
}

.grid {
    display: grid;
    gap: 22px;
}

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

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card h3,
.card h4 {
    margin-top: 0;
    line-height: 1.18;
}

.card p {
    color: var(--muted);
}

.project-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}



.project-card.featured {
    grid-column: span 2;
    min-height: 420px;
    background:
        linear-gradient(135deg, rgba(49, 93, 80, 0.92), rgba(31, 36, 40, 0.88)),
        var(--panel);
    color: white;
}

.project-card.featured p,
.project-card.featured .meta,
.project-card.featured .tag {
    color: rgba(255, 255, 255, 0.82);
}

.project-title {
    font-size: 28px;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.project-card.featured .project-title {
    font-size: 40px;
}

.project-kicker {
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    margin-bottom: 12px;
}

.project-card.featured .project-kicker {
    color: #d7efe5;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    background: var(--soft);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.featured .tag {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
}

.meta {
    margin-top: auto;
    padding-top: 26px;
    color: var(--muted);
    font-weight: 800;
}

.pillars {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.pillar {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
}

.pillar strong {
    display: block;
    margin-bottom: 8px;
}

.pillar span {
    color: var(--muted);
    font-size: 14px;
}

.detail {
    padding-top: 84px;
}

.detail-header {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 34px;
    box-shadow: var(--shadow);
}

.detail-header h2 {
    font-size: 44px;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin: 0 0 14px;
}

.detail-header p {
    font-size: 18px;
    color: var(--muted);
    max-width: 840px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 24px;
    margin-top: 26px;
}

.sidebar-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    height: fit-content;
}

.sidebar-box h3 {
    margin-top: 0;
}

.check-list {
    padding-left: 20px;
    color: var(--muted);
}

.check-list li {
    margin: 8px 0;
}

.module {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.module h3 {
    margin-top: 0;
    font-size: 24px;
}

.module p,
.module li {
    color: var(--muted);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 12px;
}

.table th,
.table td {
    text-align: left;
    vertical-align: top;
    border: 1px solid var(--line);
    padding: 12px;
}

.table th {
    background: var(--soft);
}

.process-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.step {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
}

.step b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--ink);
    color: white;
    margin-bottom: 12px;
}

.note {
    background: var(--warning);
    border-left: 5px solid #d2a33a;
    border-radius: 12px;
    padding: 16px 18px;
    color: #5f4520;
}

footer {
    padding: 42px 0 10px;
    color: var(--muted);
}

@media (max-width: 980px) {
    .hero,
    .section-head,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .project-card.featured {
        grid-column: span 1;
    }

    .grid.three,
    .grid.two,
    .pillars,
    .process-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        justify-content: flex-start;
    }

    .page {
        padding: 0 16px 40px;
    }

    .hero {
        padding-top: 52px;
    }

    .detail-header h2 {
        font-size: 34px;
    }

    .project-card.featured .project-title {
        font-size: 32px;
    }
}


/* Published project materials, using the existing portfolio theme. */
section, header[id] { scroll-margin-top: 100px; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 5px; }
.project-cover { display: block; width: 100%; height: auto; border-radius: 12px; margin: 20px 0; }
.detail-layout { grid-template-columns: minmax(0, .52fr) minmax(0, 1.48fr); }
.detail-layout > *, .quick-list li { min-width: 0; overflow-wrap: anywhere; }
.evidence-image { margin: 20px 0; }
.evidence-image img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
figcaption, .caption { font-size: 14px; color: var(--muted); line-height: 1.5; margin-top: 10px; }
.comparison-grid, .mechanic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mechanic-stage h4 { font-size: 20px; margin-bottom: 0; }
.mechanic-stage .evidence-image { margin: 16px 0; }
.mechanic-stage figcaption { display: none; }
.material-links { list-style: none; padding: 0; margin: 0 0 26px; }
.material-links li { margin: 16px 0; }
.material-links a { font-weight: 700; text-underline-offset: 3px; }
.material-links span { display: block; font-size: 14px; color: var(--muted); }
details { border-top: 1px solid var(--line); padding-top: 18px; }
summary { font-weight: 700; cursor: pointer; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.table { font-size: 14px; min-width: 530px; line-height: 1.55; }
.table tbody th { background: transparent; }
.table th:first-child { width: 22%; }
.topbar-inner { gap: 16px; }
@media (max-width: 980px) { .detail-layout { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
    section, header[id] { scroll-margin-top: 125px; }
    .comparison-grid, .mechanic-grid { grid-template-columns: 1fr; }
    .detail-header, .module, .card, .hero-side { padding: 22px; }
    .btn { max-width: 100%; font-size: 15px; text-align: center; }
    nav { gap: 8px 15px; }
    .project-cover { border-radius: 8px; }
    .table { min-width: 0; }
    .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .table, .table tbody, .table tr, .table td, .table tbody th { display: block; width: 100%; }
    .table tr { margin-bottom: 16px; }
    .table tbody th:first-child { background: var(--soft); width: 100%; }
    .table td { border-top: 0; }
    .table td::before { display: block; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
    .table td:nth-child(2)::before { content: "Player activity"; }
    .table td:nth-child(3)::before { content: "Design purpose"; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* The project title is the card's only navigation link. */
.project-title a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 7px;
    transition: color 150ms ease;
}
.project-title a:hover, .project-title a:focus-visible { color: #bfe8d9; }
.brand { text-decoration: none; }
button { font: inherit; }
nav button { padding: 0; border: 0; background: none; color: inherit; font-weight: 700; cursor: pointer; }
button.btn { cursor: pointer; }
button:focus-visible { outline: 3px solid #d2a33a; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.carousel { margin: 20px 0 4px; min-width: 0; }
.carousel-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #253734;
    touch-action: pan-y pinch-zoom;
}
.carousel-track { display: flex; }
.carousel-track.is-moving { transition: transform 450ms ease-in-out; }
.carousel-slide { margin: 0; flex: 0 0 100%; min-width: 0; }
.carousel-slide img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1.92;
    object-fit: contain;
    user-select: none;
}
.carousel:not(.is-ready) .carousel-slide:not(:first-child) { display: none; }
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 52px;
    display: grid;
    place-items: center;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 10px;
    background: rgba(22, 32, 30, .75);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease, background 150ms ease;
}
.carousel-prev { left: 14px; }
.carousel-next { right: 14px; }
.carousel-arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.carousel-viewport:hover .carousel-arrow,
.carousel-viewport:focus-visible .carousel-arrow,
.carousel-viewport:has(:focus-visible) .carousel-arrow { opacity: 1; pointer-events: auto; }
.carousel-arrow:hover { background: rgba(22, 32, 30, .95); }
.carousel-footer { padding-top: 10px; }
.carousel-footer .carousel-caption { margin: 0; font-size: 14px; line-height: 1.5; color: #e0e9e6; }

/* A wider reading page, with separate summary and materials rails. */
.project-page .page, .project-page .topbar-inner { max-width: 1600px; padding-left: 32px; padding-right: 32px; }
.project-page-content { padding-top: 26px; }
.project-page .detail-header h1 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.08; letter-spacing: -.04em; }
.project-page .detail-header p { max-width: 950px; }
.project-page #process { padding: 44px 0; }
.project-page .section-head { grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }
.project-page .section-head p { max-width: 930px; font-size: 17px; }
.project-page .section-head h2 { font-size: 30px; }
.project-page .process-strip { gap: 16px; }
.project-page .step { padding: 20px; }
.project-page .step h3 { margin: 4px 0 12px; font-size: 19px; }
.project-page .step p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }
.project-page .step b { margin-bottom: 8px; }
.project-case { padding: 36px 0 44px; }
.project-page .detail-layout {
    grid-template-columns: 240px minmax(0, 1fr) 260px;
    grid-template-areas: "summary content materials";
    gap: 24px;
    margin: 0;
    align-items: start;
}
.project-summary { grid-area: summary; }
.case-content { grid-area: content; }
.project-materials { grid-area: materials; scroll-margin-top: 95px; }
.project-page .sidebar-box { padding: 20px; overflow-wrap: normal; font-size: 14px; line-height: 1.6; }
.project-page .sidebar-box h2 { font-size: 18px; line-height: 1.3; margin: 0 0 20px; }
.summary-list { margin: 0; }
.summary-list dt { font-weight: 700; margin-top: 18px; color: var(--ink); }
.summary-list dt:first-child { margin-top: 0; }
.summary-list dd { margin: 4px 0 0; color: var(--muted); }
.project-page .material-links { margin-bottom: 22px; }
.project-page .material-links li { margin: 0 0 18px; }
.project-page .material-links li:last-child { margin-bottom: 0; }
.project-page .material-links span { font-size: 13px; margin-top: 4px; }
.project-page .check-list { padding-left: 18px; }
.project-page .module { padding: 28px; overflow-wrap: normal; }
.project-page .module h3 { font-size: 25px; line-height: 1.3; margin-bottom: 22px; }
.project-page .module p { line-height: 1.7; }
.project-page .module:last-child { margin-bottom: 0; }
.project-page .table { min-width: 0; }
.project-page .comparison-grid, .project-page .mechanic-grid { gap: 20px; }
.project-page .caption, .project-page figcaption { font-size: 13px; }

@media (max-width: 1279px) {
    .project-page .detail-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "summary materials" "content content"; }
    .project-page .sidebar-box { height: 100%; font-size: 15px; }
    .project-page .summary-list { display: grid; grid-template-columns: 78px 1fr; gap: 16px 12px; }
    .project-page .summary-list dt, .project-page .summary-list dd { margin: 0; }
    .project-page .process-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .carousel-footer .carousel-caption { font-size: 12px; }
    .carousel-arrow { width: 36px; height: 44px; padding: 6px; }
    .carousel-prev { left: 8px; }
    .carousel-next { right: 8px; }
    .project-page .page, .project-page .topbar-inner { padding-left: 16px; padding-right: 16px; }
    .project-page .detail-layout { grid-template-columns: 1fr; grid-template-areas: "summary" "materials" "content"; gap: 20px; }
    .project-page .section-head { grid-template-columns: 1fr; gap: 16px; }
    .project-page .process-strip { grid-template-columns: 1fr; }
    .project-page .module { padding: 22px; }
    .project-page .module h3 { font-size: 23px; }
    .project-page .summary-list { grid-template-columns: 1fr; gap: 0; }
    .project-page .summary-list dt { margin-top: 16px; }
    .project-page .summary-list dt:first-child { margin-top: 0; }
    .project-page .summary-list dd { margin-top: 4px; }
    .project-page .project-materials { scroll-margin-top: 130px; }
}
@media (hover: none), (pointer: coarse) { .carousel-arrow { opacity: 1; pointer-events: auto; } }
@media (prefers-reduced-motion: reduce) { .carousel-track.is-moving, .carousel-arrow, .project-title a { transition: none; } }
