/* ============================================================
   Michael Gerwe — blueprint / editorial theme
   Edit the palette below to recolor the whole site.
   ============================================================ */

:root {
    --ink:        #182a30;   /* warm teal-ink (page background) — drafting table, not navy */
    --blueprint:  #1e353c;   /* panel surface */
    --blueprint2: #264349;   /* lighter panel / hover */
    --line:       #5c7a7d;   /* soft warm-grey linework */
    --line-bright:#9bb8b6;   /* brighter linework (used sparingly) */
    --grid-minor: rgba(206,190,158,0.022); /* faint warm grid */
    --grid-major: rgba(206,190,158,0.045); /* faint warm grid */
    --paper:      #f5ece0;   /* warm cream (primary text) */
    --paper-dim:  #d8d2c4;   /* warm dimmed text */
    --gold:       #dca94c;   /* warm editorial accent */
    --gold-soft:  #eccd8f;   /* lighter warm accent */
    --oxblood:    #c0654f;   /* secondary warm accent */

    --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --body:  "EB Garamond", Georgia, serif;
    --mono:  "IBM Plex Mono", ui-monospace, "Courier New", monospace;
}

* { box-sizing: border-box; }

/* match the page background so cross-fades never flash white */
html { background-color: var(--ink); }

/* ── Page cross-fade ── */
@media (prefers-reduced-motion: no-preference) {
    body { animation: page-in 0.45s ease both; }
    body.is-leaving { animation: page-out 0.28s ease both; }
}
@keyframes page-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-out { from { opacity: 1; } to { opacity: 0; } }

body {
    margin: 0;
    padding: 0;
    font-family: var(--body);
    font-size: 19px;
    line-height: 1.75;
    color: var(--paper);
    background-color: var(--ink);
    /* warm editorial glow layered over a faint blueprint grid */
    background-image:
        radial-gradient(120% 85% at 50% -10%, rgba(220,169,76,0.16), transparent 62%),
        radial-gradient(110% 70% at 50% 112%, rgba(192,101,79,0.10), transparent 58%),
        linear-gradient(var(--grid-minor) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px),
        linear-gradient(var(--grid-major) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
    background-size: auto, auto, 34px 34px, 34px 34px, 170px 170px, 170px 170px;
    background-attachment: fixed, fixed, scroll, scroll, scroll, scroll;
}

/* ── Page wrapper ── */
.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 24px 120px;
}

/* ── Drafting "title block" header ── */
.titleblock {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    align-items: center;
    border: 1px solid rgba(67,101,127,0.6);
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(24,52,80,0.4), rgba(18,44,65,0.22));
    padding: 22px 26px;
    position: relative;
}
/* corner registration ticks on the title block */
.titleblock::before,
.titleblock::after {
    content: "";
    position: absolute;
    width: 12px; height: 12px;
    border: 1.5px solid var(--gold);
    opacity: 0.7;
}
.titleblock::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.titleblock::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.titleblock img.monogram { width: 96px; height: 96px; display: block; }

.titleblock .fields { min-width: 0; }
.titleblock .project {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 2.6rem;
    line-height: 1.05;
    margin: 0;
    color: var(--paper);
    letter-spacing: 0.5px;
}
.titleblock .role {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.15rem;
    letter-spacing: 0.03em;
    color: var(--gold-soft);
    margin-top: 8px;
}
.titleblock .sheet {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1rem;
    letter-spacing: 0.01em;
    color: var(--paper-dim);
    margin-top: 4px;
    opacity: 0.85;
}

/* ── Intro / body copy ── */
.lead {
    font-size: 1.12rem;
    color: var(--paper-dim);
    margin: 30px 4px;
}
.lead .gold { color: var(--gold); font-style: italic; }

/* ── Flourish divider ── */
.flourish {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 34px auto;
    opacity: 0.9;
}

/* ── Section label (mono, technical) ── */
.section-label {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-variant: small-caps;
    text-transform: lowercase;
    letter-spacing: 0.1em;
    color: var(--gold-soft);
    margin: 40px 4px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(217,164,65,0.35), transparent);
}

/* ── Blueprint panel (shared card look) ── */
.panel {
    position: relative;
    background: linear-gradient(180deg, rgba(24,52,80,0.32), rgba(18,44,65,0.18));
    border: 1px solid rgba(67,101,127,0.5);
    border-radius: 5px;
}
/* crosshair corner marks (subtle, warm) */
.panel::before,
.panel::after {
    content: "";
    position: absolute;
    width: 9px; height: 9px;
    border-color: var(--gold);
    border-style: solid;
    opacity: 0.35;
}
.panel::before { top: 7px;  left: 7px;  border-width: 1px 0 0 1px; }
.panel::after  { bottom: 7px; right: 7px; border-width: 0 1px 1px 0; }

/* ── Home: category nav panels ── */
.categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 10px;
}
.category-link {
    display: block;
    padding: 24px 26px;
    text-decoration: none;
    color: var(--paper);
    transition: background 0.18s, transform 0.18s, border-color 0.18s;
}
.category-link:hover {
    background: linear-gradient(180deg, rgba(28,64,96,0.5), rgba(22,52,78,0.32));
    border-color: rgba(217,164,65,0.55);
    transform: translateY(-2px);
}
.category-link .cat-num {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    color: var(--gold);
}
.category-link .cat-name {
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 600;
    margin-top: 6px;
}
.category-link .cat-desc {
    font-size: 0.92rem;
    color: var(--paper-dim);
    margin-top: 2px;
}

/* ── Accordion entries ── */
.entries {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}
details.panel { overflow: hidden; }
details.panel[open] { border-color: rgba(217,164,65,0.5); }

summary {
    padding: 20px 26px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--paper);
    user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary .tag {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1rem;
    letter-spacing: 0.01em;
    color: var(--gold);
    white-space: nowrap;
}
summary::after {
    content: "+";
    font-family: var(--mono);
    color: var(--gold);
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.2s;
}
details[open] > summary::after { content: "\2212"; } /* minus */
summary:hover { background: rgba(26,72,112,0.35); }

.entry-body {
    padding: 4px 26px 26px;
    color: var(--paper-dim);
    border-top: 1px dashed var(--line);
    margin: 0 16px;
}
.entry-body p { margin-top: 16px; }
.entry-body img { max-width: 100%; border-radius: 4px; margin: 14px 0; border: 1px solid var(--line); }
.entry-body a { color: var(--gold); }

/* ── Links ── */
a { color: var(--gold); }
a:hover { color: var(--oxblood); }

/* ── Bottom toolbar ── */
.toolbar {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: rgba(12,30,44,0.92);
    backdrop-filter: blur(4px);
    border-top: 1px solid rgba(67,101,127,0.45);
    padding: 12px 0;
    text-align: center;
    z-index: 10;
}
.toolbar a {
    font-family: var(--serif);
    font-size: 1rem;
    font-variant: small-caps;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    color: var(--paper-dim);
    text-decoration: none;
    padding: 5px 11px;
    margin: 0 1px;
    border-radius: 3px;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}
.toolbar a:hover { color: var(--paper); background: rgba(74,127,165,0.25); }
.toolbar a.active { color: var(--gold); }

/* ── ARG: faint blueprint margin note (a hidden clue) ── */
.margin-note {
    position: relative;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1rem;
    letter-spacing: 0.01em;
    color: var(--paper-dim);
    opacity: 0.5;
    margin: 34px 4px 0;
    padding-left: 16px;
    border-left: 2px solid rgba(220,169,76,0.4);
    transition: opacity 0.3s;
}
.margin-note:hover { opacity: 0.9; }
.margin-note .lot { font-style: normal; font-variant: small-caps; letter-spacing: 0.04em; color: var(--gold); }

/* ── Resume embed ── */
.resume-embed {
    width: 100%;
    height: 78vh;
    border: 1.2px solid var(--line);
    border-radius: 4px;
    display: block;
    margin-top: 18px;
    background: #fff;
}

/* ── Secret page ── */
.lockbox { max-width: 460px; margin: 30px auto; text-align: center; padding: 34px 28px; }
.lockbox input[type="text"] {
    font-family: var(--mono);
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
    padding: 12px 14px;
    width: 100%;
    background: var(--ink);
    border: 1.2px solid var(--line);
    color: var(--paper);
    border-radius: 4px;
    margin: 16px 0;
}
.lockbox input[type="text"]:focus { outline: none; border-color: var(--gold); }
.lockbox button {
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 12px 26px;
    background: var(--gold);
    color: var(--ink);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.lockbox button:hover { background: var(--oxblood); color: var(--paper); }
.lockbox .hint { font-family: var(--mono); font-size: 0.72rem; color: var(--line); margin-top: 18px; }
.lockbox .err  { color: var(--oxblood); font-family: var(--mono); font-size: 0.78rem; min-height: 1.2em; }

/* ── Mobile ── */
@media (max-width: 620px) {
    body { font-size: 17px; }
    .categories { grid-template-columns: 1fr; }
    .titleblock { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .titleblock .project { font-size: 2.1rem; }
}
