/* Nordic, mostly white with one warm accent: oak, mustard and a terracotta sun. */
:root {
  --bg: #FFFFFF;
  --surface: #F4F4F2;
  --text: #2B2A28;
  --muted: #7A746C;
  --line: #E6E6E3;
  --wood: #C9A77A;
  --accent: #E3A72F;
  --sun: #C8643B;
  --shadow: rgba(0, 0, 0, .25);
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --maxw: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #201F1C;
    --text: #EDEAE4;
    --muted: #A39D94;
    --line: #2E2C28;
    --wood: #8E7656;
    --accent: #E8B24A;
    --sun: #D0714A;
    --shadow: rgba(0, 0, 0, .6);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; } /* the growing sun must not cause sideways scroll */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Top bar */
.top { display: flex; justify-content: space-between; align-items: center; padding: 28px 0; }
.mark { font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.mark span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 4px; vertical-align: middle; }
.nav { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--text); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 48px; padding: 72px 0 112px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 8vw, 96px); line-height: 1; letter-spacing: -.01em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { margin-top: 24px; font-size: 19px; color: var(--muted); max-width: 28ch; }

.status {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px; padding: 8px 16px 8px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.status:hover { border-color: var(--text); }
.status i { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--sun); }
.status i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--sun); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(2.8); opacity: 0; } }

.portrait { position: relative; justify-self: center; width: min(340px, 80vw); aspect-ratio: 1; }
.portrait .sun { position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--sun); right: -6%; top: -8%; }
.portrait .slab { position: absolute; width: 46%; height: 22%; background: var(--wood); left: -8%; bottom: 4%; border-radius: 4px; }
.portrait img { position: relative; width: 78%; margin: 11%; border-radius: 28px; box-shadow: 0 24px 48px -24px var(--shadow); }

/* Sections: label on the left, content on the right */
.block { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 56px 0; border-top: 1px solid var(--line); }
.label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.label::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--accent); margin-right: 10px; }

/* About + skills */
.lead { font-size: 21px; line-height: 1.55; max-width: 36ch; }
.skills { margin-top: 40px; display: grid; gap: 18px; }
.skill { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: start; }
.skill h3 { font-size: 14px; font-weight: 600; padding-top: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13.5px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; }

/* Experience timeline */
.timeline { list-style: none; position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--line); transform-origin: top; }
.timeline li { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding-bottom: 32px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 7px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg); }
.timeline li:first-child::before { background: var(--accent); }
.when { font-size: 14px; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: 18px; font-weight: 600; }
.timeline h3 span { font-weight: 500; color: var(--muted); }
.timeline p { color: var(--muted); margin-top: 4px; max-width: 52ch; }
.more { display: inline-block; margin-top: 32px; font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

/* Now */
.now { list-style: none; }
.now li { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.now li:first-child { padding-top: 0; }
.now span { font-size: 14px; color: var(--muted); padding-top: 3px; }
.now a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Apps */
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.app { background: var(--surface); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 14px; transition: transform .3s ease, box-shadow .3s ease; }
.app:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px var(--shadow); }
.app .icon { width: 84px; height: 84px; border-radius: 20px; }
.app h3 { font-size: 22px; font-weight: 700; }
.app h3 a { text-decoration: none; }
.app h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.app p { color: var(--muted); }
/* "In review" state until an app is live */
.pill { align-self: flex-start; margin-top: auto; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; }
.badge { align-self: flex-start; margin-top: auto; line-height: 0; }
.badge img { height: 40px; }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 40px 0 56px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--muted); }
.links { display: flex; gap: 24px; }
.links a { text-decoration: none; color: var(--text); }
.links a:hover { color: var(--accent); }

/* Reveal on scroll: main.js adds .is-in to each [data-reveal] group; children stagger via --i */
.js .reveal { opacity: 0; transform: translateY(48px); transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i, 0) * 110ms); }
.js .chip.reveal { transform: translateY(20px) scale(.7); transition-delay: calc(var(--i, 0) * 70ms); }
.js .now li.reveal, .js .timeline li.reveal { transform: translateX(-56px); }
.js .app.reveal { transform: translateY(80px) scale(.94); }
.js .portrait.reveal { transform: translateY(60px) scale(.9); }
.js .is-in .reveal, .js .reveal.is-in,
.js .now.is-in li.reveal, .js .timeline.is-in li.reveal,
.js .apps.is-in .app.reveal, .js .hero.is-in .portrait.reveal { opacity: 1; transform: none; }
/* label squares grow in; the timeline line draws down and its dots pop */
.js .label.reveal::before { transform: scale(0); transition: transform .6s cubic-bezier(.34, 1.56, .64, 1) .25s; }
.js .label.is-in::before { transform: scale(1); }
.js .timeline::before { transform: scaleY(0); transition: transform 1.8s cubic-bezier(.16, 1, .3, 1); }
.js .timeline.is-in::before { transform: scaleY(1); }
.js .timeline li.reveal::before { transform: scale(0); transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i, 0) * 110ms + .3s); }
.js .timeline.is-in li.reveal::before { transform: scale(1); }
/* Once revealed, app cards go back to their quick hover transition */
.js .app.reveal.is-done { transition: transform .3s ease, box-shadow .3s ease; transition-delay: 0s; }
.js .apps.is-in .app.reveal:hover { transform: translateY(-4px); }

/* The sun rises, the oak slab drifts and the avatar tilts as you scroll (where supported) */
@supports (animation-timeline: scroll()) {
  .portrait .sun { animation: sunrise linear both; animation-timeline: scroll(root); animation-range: 0 70vh; }
  .portrait .slab { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 70vh; }
  .portrait img { animation: tilt linear both; animation-timeline: scroll(root); animation-range: 0 70vh; }
  @keyframes sunrise { to { transform: translateY(-140px) scale(1.45); } }
  @keyframes drift { to { transform: translateX(-90px) translateY(30px); } }
  @keyframes tilt { to { transform: rotate(-8deg) translateY(-20px); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .timeline::before, .js .label.reveal::before, .js .timeline li.reveal::before { opacity: 1; transform: none; transition: none; }
  .portrait .sun, .portrait .slab, .portrait img, .status i::after { animation: none; }
  .app { transition: none; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; padding: 32px 0 72px; gap: 40px; }
  .portrait { width: min(280px, 72vw); }
  .block { grid-template-columns: 1fr; gap: 20px; padding: 44px 0; }
  .lead { font-size: 19px; }
  .skill, .now li, .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .apps { grid-template-columns: 1fr; }
}
