/* ============================================================
   TOKENS: change colours and fonts here, every page updates
   ============================================================ */
:root {
  --snow:   #EEF1EF;  /* page background, cool glacier white */
  --paper:  #F8FAF9;  /* raised surfaces */
  --slate:  #1C2B33;  /* main text, deep high-altitude blue */
  --lichen: #5F7268;  /* secondary text */
  --rule:   #C8D1CC;  /* lines and borders */
  --rhodo:  #B3263A;  /* accent: rhododendron red */

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;

  --measure: 68ch;
  --gap: clamp(1.25rem, 4vw, 2.5rem);
  --wide: 1080px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--snow);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--rhodo); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--rhodo); }
:focus-visible { outline: 2.5px solid var(--rhodo); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; max-width: var(--measure); }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gap); }

.skip { position: absolute; left: -999px; top: 0; background: var(--slate); color: var(--snow); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* ---------- site header (all pages) ---------- */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.75rem; }
.site-nav a { text-decoration: none; font-weight: 500; color: var(--lichen); padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--slate); }
.site-nav a[aria-current="page"] { color: var(--slate); border-bottom-color: var(--rhodo); }

main { flex: 1; }
.home .site-header .wrap { justify-content: flex-end; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: .7rem 1.2rem;
  border-radius: 3px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--slate);
}
.btn-solid { background: var(--slate); color: var(--paper); }
.btn-solid:hover { background: var(--rhodo); border-color: var(--rhodo); color: var(--paper); }
.btn-line { color: var(--slate); }
.btn-line:hover { border-color: var(--rhodo); color: var(--rhodo); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ============================================================
   HOME
   ============================================================ */
.home main { display: flex; flex-direction: column; justify-content: flex-end; }
.hero { padding-top: clamp(2rem, 8vh, 6rem); }
.hero h1 {
  font-size: clamp(3.25rem, 12vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.9;
}
.hero h1 span { display: block; color: var(--lichen); font-weight: 400; }
.hero .intro { margin: 1.75rem 0 .25rem; font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 40ch; }
.hero .where { color: var(--lichen); font-size: .95rem; margin-bottom: 2rem; }

.ridge { display: block; width: 100%; height: clamp(110px, 17vw, 220px); margin-top: clamp(1.5rem, 5vh, 3rem); }
.ridge .fill { fill: var(--paper); }
.ridge .line { fill: none; stroke: var(--slate); stroke-width: 2; stroke-linejoin: round; }
.ridge .echo { fill: none; stroke: var(--rule); stroke-width: 1.25; stroke-linejoin: round; }
.ridge .summit { fill: var(--rhodo); }

/* the one moment of motion: the ridge draws itself on load */
@media (prefers-reduced-motion: no-preference) {
  .ridge .line { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.2s cubic-bezier(.6,.1,.2,1) .2s forwards; }
  .ridge .summit { opacity: 0; animation: appear .4s ease 2.2s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
}

/* ============================================================
   INNER PAGES (projects, cv)
   ============================================================ */
.page-head { padding-top: clamp(2rem, 6vw, 4rem); padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1rem; }
.page-head p { color: var(--lichen); font-size: 1.15rem; max-width: 52ch; }

.sheet { background: var(--paper); border-top: 1px solid var(--rule); padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 8vw, 5rem); }
.sheet h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 1.25rem; }
.sheet section + section { margin-top: clamp(2.5rem, 6vw, 3.5rem); padding-top: clamp(2rem, 5vw, 3rem); border-top: 1px solid var(--rule); }

/* ---------- projects list ---------- */
.projects { list-style: none; margin: 0; padding: 0; }
.project {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.project:first-child { padding-top: 0; }
.project:last-child { border-bottom: 0; }
.project .year { color: var(--lichen); font-variant-numeric: tabular-nums; padding-top: .25rem; }
.project h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.project p { margin-bottom: .6rem; }
.project .stack { color: var(--lichen); font-size: .9rem; }
.project .links { margin: 0; }
.project .links a { margin-right: 1.25rem; font-weight: 600; font-size: .95rem; }

.github-cta { margin-top: 2.5rem; color: var(--lichen); }

/* ---------- cv ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--rule); }
.timeline > li { position: relative; padding-bottom: 2rem; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: calc(-1.5rem - 7px); top: .45rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--slate);
}
.timeline > li.now::before { background: var(--rhodo); border-color: var(--rhodo); }
.timeline h3 { font-size: 1.2rem; font-weight: 600; }
.timeline .meta { color: var(--lichen); font-size: .95rem; margin: .15rem 0 .5rem; }
.timeline ul { margin: 0; padding-left: 1.1rem; max-width: var(--measure); }
.timeline ul li { padding: .1rem 0; }

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.5rem 2rem; }
.skills h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .5rem; }
.skills ul { list-style: none; margin: 0; padding: 0; color: var(--lichen); }
.skills li { padding: .15rem 0; }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.contact-list span { display: inline-block; min-width: 6rem; color: var(--lichen); }

/* ---------- footer (all pages) ---------- */
.site-footer { background: var(--paper); }
.home .site-footer { border-top: 0; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
  padding-top: 1.75rem; padding-bottom: 2rem;
  color: var(--lichen); font-size: .95rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer p { margin: 0; }
.inner .site-footer { border-top: 1px solid var(--rule); }

/* ---------- small screens ---------- */
@media (max-width: 600px) {
  .site-nav ul { gap: 1.25rem; }
  .project { grid-template-columns: minmax(0, 1fr); }
  .project .year { padding: 0 0 .25rem; }
}

/* ---------- printing the CV page ---------- */
@media print {
  :root { --snow: #fff; --paper: #fff; }
  body { font-size: 10.5pt; }
  .site-header, .site-footer, .no-print { display: none !important; }
  .page-head { padding-top: 0; padding-bottom: 1rem; }
  .sheet { border: 0; padding: 0; }
  .sheet section + section { margin-top: 1.25rem; padding-top: 1rem; }
  a { text-decoration: none; }
  .timeline > li { break-inside: avoid; }
}
