:root {
  --ink: #062E38;      /* deep teal, the old sidebar */
  --teal: #125769;     /* logo nodes */
  --ring: #2A768A;     /* logo ring */
  --coral: #F36262;    /* accent from the old site */
  --paper: #F8FEFE;    /* cool white */
  --mist: #E1EEF0;
  --text: #17363F;
  --muted: #4F6E77;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --measure: 40rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
}
a { color: var(--teal); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: var(--paper); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--paper); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.brand svg { width: 2.75rem; height: 2.75rem; flex: none; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-family: var(--display); font-size: 1rem; }
.topbar nav a { color: #BFDCE2; text-decoration: none; padding: 0.25rem 0; }
.topbar nav a:hover { color: #fff; text-decoration: underline; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 3rem; align-items: center; padding-top: 4rem; padding-bottom: 5.5rem; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.25rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.02; text-wrap: balance; }
.hero .lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; max-width: 34rem; margin: 1.75rem 0 2.25rem; color: #D7E9EC; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1rem; text-decoration: none; padding: 0.8rem 1.3rem; border-radius: 999px; border: 2px solid var(--coral); }
.btn-solid { background: var(--coral); color: var(--ink); }
.btn-solid:hover { background: #ff7b7b; border-color: #ff7b7b; color: var(--ink); }
.btn-line { color: var(--paper); border-color: #4E8C9B; }
.btn-line:hover { color: #fff; border-color: var(--paper); }

/* The logo's node graph, drawn large */
.graph { width: 100%; max-width: 22rem; justify-self: end; }
.graph line { stroke: #7FB4C0; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 240; stroke-dashoffset: 240; animation: draw 0.9s ease-out forwards; }
.graph circle { fill: var(--paper); transform-box: fill-box; transform-origin: center; transform: scale(0); animation: pop 0.35s cubic-bezier(.2,1.4,.4,1) forwards; }
.graph .mid { fill: var(--coral); }
.graph .l2 { animation-delay: 0.15s; } .graph .l3 { animation-delay: 0.3s; }
.graph .d1 { animation-delay: 0.05s; } .graph .d2 { animation-delay: 0.2s; } .graph .d3 { animation-delay: 0.35s; }
.graph .d4 { animation-delay: 0.85s; } .graph .d5 { animation-delay: 1.1s; } .graph .d6 { animation-delay: 0.95s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .graph line { animation: none; stroke-dashoffset: 0; }
  .graph circle { animation: none; transform: none; }
}

/* ---------- Sections: label column + content column ---------- */
.section { padding: 4.5rem 0; border-top: 1px solid var(--mist); }
.section:first-of-type { border-top: 0; }
.section-grid { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 3rem; }
.section h2 { font-size: 1.6rem; color: var(--ink); letter-spacing: -0.01em; }
.section-grid > div { max-width: var(--measure); }
.big { font-size: 1.4rem; line-height: 1.5; color: var(--ink); }

/* ---------- Experience: a timeline built from the logo's nodes and lines ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { position: relative; padding: 0 0 2.75rem 2.5rem; }
.timeline > li::before { content: ""; position: absolute; left: 0.5rem; top: 0.45rem; bottom: -0.45rem; width: 2px; background: var(--ring); transform: translateX(-1px); }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li:last-child::before { display: none; }
.timeline > li::after { content: ""; position: absolute; left: 0; top: 0.3rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--teal); }
.timeline > li.now::after { background: var(--coral); }
.timeline h3 { font-size: 1.3rem; color: var(--ink); }
.timeline .where { font-family: var(--display); color: var(--muted); font-size: 1rem; margin: 0.3rem 0 0.9rem; }
.timeline ul { margin: 0; padding-left: 1.1rem; }
.timeline ul li { margin-bottom: 0.55rem; }
.timeline ul li::marker { color: var(--ring); }
.timeline .tech { font-family: var(--display); font-size: 0.95rem; color: var(--muted); margin: 0.75rem 0 0; }

/* ---------- Case study ---------- */
.case { background: #fff; border: 1px solid var(--mist); border-left: 6px solid var(--teal); border-radius: 4px; padding: 2rem; }
.case h3 { font-size: 1.55rem; color: var(--ink); margin-bottom: 1rem; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.principles li { background: var(--paper); border-radius: 4px; padding: 1rem; font-size: 1rem; line-height: 1.45; }
.principles strong { display: block; font-family: var(--display); color: var(--ink); font-size: 1.05rem; margin-bottom: 0.25rem; }
.draft { border: 2px dashed var(--coral); border-radius: 4px; padding: 1rem 1.25rem; font-family: var(--display); font-size: 0.98rem; line-height: 1.5; color: var(--ink); background: #FFF6F5; }
.draft strong { color: #B23636; }
.draft ol { margin: 0.5rem 0 0; padding-left: 1.2rem; }

/* ---------- AI projects ---------- */
.project h3 { font-size: 1.3rem; color: var(--ink); }
.project .meta { font-family: var(--display); color: var(--muted); font-size: 1rem; margin: 0.3rem 0 0.9rem; }
.project .tech { font-family: var(--display); font-size: 0.95rem; color: var(--muted); margin: 0.75rem 0 0; }

/* ---------- Skills ---------- */
.skills { margin: 0; }
.skills dt { font-family: var(--display); font-weight: 600; color: var(--ink); margin-top: 1.1rem; }
.skills dt:first-child { margin-top: 0; }
.skills dd { margin: 0.15rem 0 0; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: #D7E9EC; padding: 4rem 0; }
footer h2 { color: var(--paper); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; max-width: 30rem; }
footer p { max-width: 34rem; margin-top: 1rem; }
footer a { color: var(--paper); }
footer a:hover { color: #fff; }
.contact { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; font-family: var(--display); font-size: 1.1rem; }
.fine { font-family: var(--display); font-size: 0.9rem; color: #8FB6BF; margin-top: 3rem; }

@media (max-width: 800px) {
  body { font-size: 1.0625rem; }
  .hero-grid { grid-template-columns: 1fr; padding-top: 2.5rem; padding-bottom: 3.5rem; gap: 2rem; }
  .graph { max-width: 11rem; justify-self: start; order: -1; }
  .section { padding: 3rem 0; }
  .section-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .principles { grid-template-columns: 1fr; }
  .case { padding: 1.25rem; }
  .big { font-size: 1.25rem; }
}

/* ---------- Summary ---------- */
.summary p:last-child { margin-bottom: 0; }

/* ---------- Notes (mini blog) ---------- */
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 1.5rem 0; border-top: 1px solid var(--mist); }
.notes li:first-child { border-top: 0; padding-top: 0; }
.notes h3 { font-size: 1.35rem; }
.notes h3 a { color: var(--ink); text-decoration: none; }
.notes h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.notes time, .post time { font-family: var(--display); color: var(--muted); font-size: 0.95rem; }
.notes p { margin: 0.4rem 0 0; }
.tag-draft { font-family: var(--display); font-size: 0.8rem; font-weight: 600; color: #B23636; border: 1px solid var(--coral); border-radius: 999px; padding: 0.1rem 0.6rem; margin-left: 0.5rem; vertical-align: middle; }

/* ---------- Post page ---------- */
.hero-slim .topbar { padding-top: 1rem; padding-bottom: 1rem; }
.post { max-width: 44rem; margin: 0 auto; padding: 3.5rem 1.5rem 5rem; }
.post h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin: 0.5rem 0 2rem; text-wrap: balance; }
.post h2 { font-size: 1.5rem; color: var(--ink); margin: 2.25rem 0 0.75rem; }
.post .back { font-family: var(--display); font-size: 1rem; }
.post .principles { margin: 1.5rem 0; }
.post .principles li { background: #fff; border: 1px solid var(--mist); }

/* ---------- Earlier roles (collapsed by default) ---------- */
.earlier { max-width: none; margin-top: -1rem; }
.earlier summary { display: inline-block; cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--teal); border: 2px solid var(--ring); border-radius: 999px; padding: 0.55rem 1.1rem; list-style: none; }
.earlier summary::-webkit-details-marker { display: none; }
.earlier summary::before { content: "+"; display: inline-block; width: 1em; font-weight: 700; }
.earlier[open] summary::before { content: "\2212"; }
.earlier summary:hover { background: var(--mist); color: var(--ink); }
.earlier .timeline { margin-top: 2rem; }
@media (max-width: 800px) { .section-grid > span:empty { display: none; } .earlier { margin-top: 0; } }
