/* ===== Design tokens — "Field Journal" ===== */
:root {
  --paper: #edeadf;          /* warm cream */
  --paper-2: #f4f1e7;        /* lighter cream (plate frame) */
  --ink: #223a29;            /* dark forest green */
  --ink-2: #45573f;          /* muted green-grey text */
  --ink-3: #6b7560;          /* faint labels */
  --green: #5f8a4f;          /* accent green (italics) */
  --line: #cbc7b4;           /* rule lines */
  --plate-a: #2f5233;        /* plate gradient */
  --plate-b: #1c3320;
  --max: 1180px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(90deg, rgba(34,58,41,0.025) 0 1px, transparent 1px 46px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 40px; }

a { color: var(--ink); text-decoration: none; }

/* ===== Scroll-reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.22, .61, .36, 1),
              transform .8s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.plate.reveal { transform: translateY(28px) scale(.985); }
.plate.reveal.is-visible { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Shared: monospace kicker labels */
.kicker {
  font-family: "Space Mono", monospace;
  text-transform: uppercase; letter-spacing: 3px;
  font-size: .72rem; color: var(--ink-3); font-weight: 700;
  margin-bottom: 22px;
}

/* Editorial arrow links */
.link-arrow {
  font-family: "Space Mono", monospace;
  text-transform: uppercase; letter-spacing: 2px; font-size: .74rem;
  color: var(--ink); padding-bottom: 3px;
  border-bottom: 1px solid var(--ink); transition: color .2s, border-color .2s;
}
.link-arrow:hover { color: var(--green); border-color: var(--green); }

/* ===== Masthead ===== */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(237, 234, 223, 0.9);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--ink);
}
.masthead__inner { display: flex; align-items: center; gap: 28px; height: 74px; }
.masthead__brand { display: flex; align-items: baseline; gap: 14px; margin-right: auto; }
.masthead__title {
  font-family: "Playfair Display", serif; font-weight: 900;
  font-size: 1.5rem; letter-spacing: .5px; color: var(--ink);
}
.masthead__tag {
  font-family: "Newsreader", serif; font-style: italic;
  font-size: .95rem; color: var(--ink-2);
}
.masthead__meta {
  font-family: "Space Mono", monospace;
  text-transform: uppercase; letter-spacing: 2px;
  font-size: .68rem; color: var(--ink-3); white-space: nowrap;
}

.nav__links { display: flex; gap: 22px; }
.nav__links a {
  font-family: "Space Mono", monospace;
  text-transform: uppercase; letter-spacing: 1.5px; font-size: .7rem;
  color: var(--ink-2); padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.nav__links a:hover { color: var(--green); border-color: var(--green); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); transition: .25s; }

/* ===== Cover / Hero ===== */
.cover { padding: 74px 0 80px; border-bottom: 1px solid var(--line); }
.cover__inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center;
}
.cover__headline {
  font-family: "Playfair Display", serif; font-weight: 900;
  font-size: clamp(3rem, 8vw, 6rem); line-height: .96; letter-spacing: -1px;
  color: var(--ink); margin-bottom: 30px;
}
.cover__headline em { font-style: italic; font-weight: 500; color: var(--green); }
.cover__lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-style: italic;
  color: var(--ink-2); max-width: 30em; line-height: 1.55;
}
.cover__actions { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 36px; }

/* Plate (photo frame) */
.plate { display: flex; flex-direction: column; }
.plate__frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: linear-gradient(135deg, var(--plate-a), var(--plate-b));
  padding: 16px; background-clip: padding-box;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(28, 51, 32, 0.55);
}
/* Cream mat around the image */
.plate__frame { background:
  linear-gradient(135deg, var(--plate-a), var(--plate-b)); }
.plate__frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  object-position: 50% 30%;
}
.plate__frame--empty {
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 16px),
    linear-gradient(135deg, var(--plate-a), var(--plate-b));
}
.plate__frame--empty img { display: none; }
.plate__caption {
  display: flex; justify-content: space-between;
  font-family: "Space Mono", monospace; text-transform: uppercase;
  letter-spacing: 2px; font-size: .66rem; color: var(--ink-3);
  padding-top: 12px;
}

/* ===== Chapters (sections) ===== */
.chapter { padding: 64px 0; }
.chapter--rule { border-top: 1px solid var(--line); }
.chapter__title {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -.5px;
  color: var(--ink); margin-bottom: 40px;
}
.chapter__intro {
  font-family: "Playfair Display", serif; font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.35;
  color: var(--ink); max-width: 20em;
}

/* ===== Entries (experience / education) ===== */
.entries { display: grid; gap: 0; }
.entries--split { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 56px; }
.entry { padding: 30px 0; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; padding-top: 0; }
.entries--split .entry { border-top: 1px solid var(--line); padding-top: 30px; }
.entry__top {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: baseline; gap: 10px;
}
.entry__role {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: 1.4rem; color: var(--ink);
}
.entry__date {
  font-family: "Space Mono", monospace; letter-spacing: 1.5px;
  font-size: .7rem; color: var(--ink-3); white-space: nowrap;
}
.entry__org {
  font-style: italic; color: var(--ink-2); font-size: 1.05rem; margin: 6px 0 16px;
}
.entry__points { list-style: none; display: grid; gap: 10px; max-width: 62ch; }
.entry__points li { position: relative; padding-left: 24px; color: var(--ink-2); }
.entry__points li::before {
  content: ""; position: absolute; left: 2px; top: .7em;
  width: 10px; height: 1px; background: var(--green);
}

/* ===== Index (skills) ===== */
.index { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.index__label {
  font-family: "Space Mono", monospace; text-transform: uppercase;
  letter-spacing: 2px; font-size: .72rem; color: var(--ink-3);
  padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-family: "Space Mono", monospace; font-size: .72rem;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--ink); border: 1px solid var(--ink); border-radius: 999px;
  padding: 6px 14px;
}

/* ===== Certifications ===== */
.certs { list-style: none; display: grid; gap: 0; }
.certs li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.certs li:first-child { border-top: 0; }
.certs__name {
  font-family: "Playfair Display", serif; font-size: 1.3rem; color: var(--ink);
}
.certs__meta {
  font-family: "Space Mono", monospace; text-transform: uppercase;
  letter-spacing: 2px; font-size: .68rem; color: var(--green); white-space: nowrap;
}

/* ===== Colophon (footer) ===== */
.colophon { border-top: 1px solid var(--ink); padding: 26px 0; }
.colophon__inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-family: "Space Mono", monospace; text-transform: uppercase;
  letter-spacing: 2px; font-size: .68rem; color: var(--ink-3);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .cover__inner { grid-template-columns: 1fr; gap: 44px; }
  .plate { max-width: 420px; }
}
@media (max-width: 760px) {
  .container { padding: 0 24px; }
  .masthead__meta { display: none; }
  .nav__links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--ink); padding: 4px 24px;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav__links.is-open { max-height: 340px; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__toggle { display: flex; }
  .cover__actions { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ===== Print (PDF) ===== */
@media print {
  .masthead, .cover__actions, .nav__toggle { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .cover__headline em { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; }
  body { color: #000; background: #fff; }
  .chapter, .cover { padding: 16px 0; }
  .cover { border: 0; }
  a { color: #000; }
}
