@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&display=swap');

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

:root {
    --navy:        #323250;
    --navy-dark:   #27273e;
    --navy-light:  #3e3e62;
    --parchment:   #EDE7D3;
    --parchment-mid: #D5CCAF;
    --teal:        #2C5A5A;
    --teal-mid:    #366e6e;
    --teal-light:  #4DA885;
    --teal-dim:    #1e3f3f;

    --bg:          var(--navy-dark);
    --bg-alt:      var(--navy);
    --bg-section:  #2c2c47;
    --card:        #2e2e4a;
    --card-hover:  #353554;
    --border:      rgba(77, 168, 133, 0.2);
    --border-solid: rgba(77, 168, 133, 0.35);

    --text:        var(--parchment);
    --text-dim:    var(--parchment-mid);
    --text-muted:  #9e9880;
    --text-head:   #f5f0e6;

    --accent:      var(--teal-light);
    --accent-glow: rgba(77, 168, 133, 0.12);

    --amber:       #c8902e;
    --amber-light: #e8b050;

    --nav-h: 60px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.75;
}

h1, h2, h3, h4 {
    font-family: 'DM Serif Display', Georgia, serif;
    color: var(--text-head);
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--teal-light); font-family: 'DM Sans', sans-serif; font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-light); text-decoration: underline; }
a:hover { color: var(--amber-light); }

code {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 0.82em;
    color: var(--teal-light);
    background: var(--accent-glow);
    padding: 0.1em 0.4em;
    border: 1px solid var(--border-solid);
    border-radius: 3px;
}

em { color: var(--amber-light); font-style: italic; }

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 1.75rem;
}

section {
    padding: 4.5rem 0;
    border-top: 1px solid var(--border);
}

section.alt  { background: var(--bg-alt); }
section.mid  { background: var(--bg-section); }

nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy-dark);
    border-bottom: 1px solid var(--border-solid);
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
}

.nav-logo {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: 1.3rem;
    color: var(--teal-light);
    text-decoration: none;
    letter-spacing: 0.04em;
}

.nav-logo:hover { color: var(--text-head); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.15rem;
}

.nav-links a {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--parchment-mid);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
    color: var(--text-head);
    background: rgba(77, 168, 133, 0.1);
}

.nav-links a.active {
    color: var(--teal-light);
    background: rgba(77, 168, 133, 0.12);
}

.nav-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--parchment-mid);
    border-radius: 2px;
}

.page-header {
    padding: 4.5rem 0 3.5rem;
    border-bottom: 1px solid var(--border);
}

.page-header.alt { background: var(--navy-dark); }

.breadcrumb {
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--teal-light); }
.breadcrumb span { margin: 0 0.4rem; opacity: 0.5; }
.breadcrumb .current { color: var(--teal-light); }

.page-header-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: var(--amber);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-dim);
    margin-top: 0.75rem;
    font-style: italic;
    max-width: 640px;
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
}

.section-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 0.6rem;
}

.section-title { margin-bottom: 1rem; }

.section-body {
    font-size: 1rem;
    max-width: 680px;
    color: var(--text);
    line-height: 1.85;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 6px;
    transition: border-color 0.2s, background 0.2s;
}

.card:hover {
    border-color: var(--border-solid);
    background: var(--card-hover);
}

.card h3 { color: var(--teal-light); margin-bottom: 0.5rem; }
.card p  { font-size: 0.95rem; color: var(--text-dim); line-height: 1.7; }

.card-tag {
    display: inline-block;
    margin-top: 1rem;
    font-family: 'DM Mono', monospace;
    font-size: 0.63rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    width: 100%;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-top: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'DM Mono', monospace;
    font-size: 0.83rem;
}

.data-table th {
    text-align: left;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--border-solid);
}

.data-table td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid rgba(77, 168, 133, 0.08);
    color: var(--text);
    font-size: 0.84rem;
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr.highlight td { color: var(--teal-light); }
.data-table tr.amber-row td { color: var(--amber-light); }

.bar-wrap { display: flex; flex-direction: column; gap: 1rem; }

.bar-label {
    display: flex;
    justify-content: space-between;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}

.bar-track {
    height: 7px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--teal-light);
    border-radius: 4px;
    transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-fill.amber { background: var(--amber); }
.bar-fill.dim   { background: var(--teal); }
.bar-fill.faint { background: var(--teal-dim); }

.pipeline { display: flex; flex-direction: column; }

.pipeline-step {
    display: flex;
    gap: 1.4rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.pipeline-step:last-child { border-bottom: none; }

.step-num {
    font-family: 'DM Mono', monospace;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--teal);
    flex-shrink: 0;
    width: 2.5rem;
    padding-top: 0.2rem;
}

.step-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-head);
    margin-bottom: 0.5rem;
    font-family: 'DM Sans', sans-serif;
}

.step-content p {
    font-size: 0.93rem;
    line-height: 1.75;
    color: var(--text-dim);
    margin-bottom: 0;
}

.step-badge {
    display: inline-block;
    margin-top: 0.5rem;
    font-family: 'DM Mono', monospace;
    font-size: 0.63rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--teal-light);
    border: 1px solid var(--border-solid);
    padding: 0.15em 0.6em;
    border-radius: 3px;
}

.ref-item {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.1rem 1.3rem;
    border-radius: 5px;
}

.ref-item cite {
    display: block;
    font-style: italic;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 0.3rem;
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    font-size: 0.95rem;
}

.ref-item a {
    font-family: 'DM Mono', monospace;
    font-size: 0.73rem;
    color: var(--teal-light);
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 1.75rem;
    text-align: center;
    background: var(--navy-dark);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 980px;
    margin: 0 auto;
    gap: 1.5rem;
}

.footer-gif {
    width: 100px;
    height: 100px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--card);
    display: block;
}

.footer-logo {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    color: var(--teal-light);
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.footer-tagline {
    font-style: italic;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.footer-nav a {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
}

.footer-nav a:hover { color: var(--teal-light); }

.footer-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.9;
}

.img-frame {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 5px;
    overflow: hidden;
}

.img-frame-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.67rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid var(--border);
}

.img-placeholder {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-dark);
}

.img-placeholder::after {
    content: attr(data-hint);
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 1rem;
    text-align: center;
    line-height: 1.6;
    white-space: pre-line;
}

.card.amber-accent { border-color: rgba(200, 144, 46, 0.3); }
.card.amber-accent h3 { color: var(--amber-light); }

.divider {
    height: 1px;
    background: var(--border);
}

.shot-grid.layout-d {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

.shot {
    height: 100%;
}

.shot-frame img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

@media (max-width: 760px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--navy-dark);
        border-bottom: 1px solid var(--border-solid);
        flex-direction: column;
        padding: 0.75rem 1.25rem 1rem;
        gap: 0.2rem;
    }

    .nav-links.open { display: flex; }
    .nav-menu-toggle { display: flex; }
    nav { position: relative; }
    section { padding: 3rem 0; }
    .page-header { padding: 3rem 0 2.5rem; }
}