/* ============================================================
   JKC — shared styles
   Editorial minimalism: warm paper, ink, one slate-blue accent.
   Newsreader (serif) · IBM Plex Sans (body) · IBM Plex Mono (data)
   ============================================================ */

:root {
    --paper:    #f6f4ee;   /* warm off-white */
    --paper-2:  #efece2;   /* slightly deeper, for hover fills */
    --ink:      #1b1a17;   /* near-black, warm */
    --muted:    #6c685f;   /* secondary text */
    --faint:    #9b968b;   /* tertiary / metadata */
    --line:     #e1ddd2;   /* hairlines */
    --accent:   #2c5468;   /* deep slate blue — used sparingly */

    --max:  1080px;
    --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --sans:  'IBM Plex Sans', system-ui, sans-serif;
    --mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* faint paper grain — print warmth, not flat-AI gloss */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

a { color: var(--accent); }

::selection { background: var(--accent); color: var(--paper); }

/* ---------- masthead ---------- */
.masthead {
    max-width: var(--max);
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.wordmark {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.45rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    text-decoration: none;
}

.wordmark .dot { color: var(--accent); }

.masthead nav {
    display: flex;
    gap: 1.6rem;
}

.nav-link {
    font-family: var(--mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.nav-link:hover { color: var(--ink); border-color: var(--accent); }

/* ---------- shared section kicker ---------- */
.kicker {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent);
    margin: 0 0 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.kicker::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ---------- footer ---------- */
.site-foot {
    max-width: var(--max);
    margin: 5rem auto 0;
    padding: 2.5rem 2rem 3rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--muted);
}

.site-foot a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: border-color 0.25s ease, color 0.25s ease;
}

.site-foot a:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   HOME
   ============================================================ */
.intro {
    max-width: var(--max);
    margin: 3rem auto 1rem;
    padding: 4rem 2rem 3rem;
}

.eyebrow {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.74rem;
    color: var(--accent);
    margin: 0 0 1.8rem;
}

.intro h1 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin: 0;
    max-width: 18ch;
}

.intro h1 em {
    font-style: italic;
    color: var(--accent);
}

.intro .lede {
    margin: 1.8rem 0 0;
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 46ch;
}

/* project list */
.projects {
    max-width: var(--max);
    margin: 2rem auto 0;
    padding: 0 2rem;
}

.projects ol {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.project {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: 0.6rem 2.2rem;
    padding: 2.2rem 1rem;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.35s ease, padding-left 0.35s ease;
}

.project:hover {
    background-color: var(--paper-2);
    padding-left: 1.4rem;
}

.project .num {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--faint);
    padding-top: 0.45rem;
}

.project h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.7rem;
    line-height: 1.1;
    margin: 0 0 0.4rem;
}

.project p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    max-width: 50ch;
}

.project .go {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
    white-space: nowrap;
    align-self: center;
    transition: transform 0.35s ease;
}

.project:hover .go { transform: translateX(6px); }

/* ============================================================
   RESUME
   ============================================================ */
.resume {
    max-width: var(--max);
    margin: 1.5rem auto 0;
    padding: 0 2rem;
}

.resume-head {
    padding-bottom: 2.4rem;
    margin-bottom: 3.2rem;
    border-bottom: 1px solid var(--line);
}

.resume-head h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(3rem, 9vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin: 0;
}

.resume-head .role {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    color: var(--accent);
    margin: 0.7rem 0 1.3rem;
}

.resume-head .contact {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0;
}

.resume-head .contact a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

.resume-head .contact a:hover { color: var(--accent); border-color: var(--accent); }

.resume-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 4.5rem;
}

.block { margin-bottom: 3rem; }
.block:last-child { margin-bottom: 0; }

.profile-text {
    margin: 0;
    font-size: 1.05rem;
    color: var(--ink);
    max-width: 58ch;
}

/* experience entries */
.role-entry {
    padding: 1.6rem 0;
    border-top: 1px solid var(--line);
}

.role-entry:first-of-type { border-top: none; padding-top: 0; }

.role-entry .top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem 1.2rem;
}

.role-entry h3 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.3rem;
    margin: 0;
    line-height: 1.2;
}

.role-entry h3 .loc {
    font-weight: 400;
    font-style: italic;
    color: var(--muted);
}

.role-entry h3 .pos { color: var(--accent); }

.role-entry .dates {
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--faint);
    white-space: nowrap;
}

.role-entry p {
    margin: 0.6rem 0 0;
    color: var(--muted);
    font-size: 0.97rem;
    max-width: 60ch;
}

/* sidebar */
.sub {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
    color: var(--ink);
    margin: 0 0 0.7rem;
    font-weight: 600;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1.4rem;
}

.tag {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 0.28rem 0.55rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.tag:hover { border-color: var(--accent); color: var(--accent); }

.side-text {
    margin: 0 0 1.4rem;
    color: var(--muted);
    font-size: 0.93rem;
}

.side-text strong { color: var(--ink); font-weight: 600; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 2px;
    padding: 0.5rem 0.9rem;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.btn:hover { background: var(--ink); color: var(--paper); }

/* ---------- page-load reveal ---------- */
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.reveal:nth-child(1) { animation-delay: 0.05s; }
.reveal:nth-child(2) { animation-delay: 0.13s; }
.reveal:nth-child(3) { animation-delay: 0.21s; }
.reveal:nth-child(4) { animation-delay: 0.29s; }
.reveal:nth-child(5) { animation-delay: 0.37s; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
    body { font-size: 16px; }

    .intro { padding: 2.5rem 2rem; margin-top: 1rem; }

    .project {
        grid-template-columns: auto 1fr;
        gap: 0.4rem 1.4rem;
        padding: 1.8rem 0.4rem;
    }

    .project:hover { padding-left: 0.8rem; }

    .project .go { grid-column: 2; justify-self: start; align-self: auto; }
    .project:hover .go { transform: translateX(4px); }

    .resume-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; animation: none; }
    * { transition: none !important; }
}

/* ---------- print (resume) ---------- */
@media print {
    body { background: #fff; font-size: 11pt; }
    body::before { display: none; }
    .masthead, .site-foot, .btn { display: none; }
    .resume { margin: 0; padding: 0; }
    .resume-head h1 { font-size: 32pt; }
    a { color: var(--ink); }
    .tag { background: transparent; }
}
