/* The palette and the typeface are Guardaleku's, so the two sites read as one family. */
:root {
  --paper: #F7F5F0;
  --ink: #1E2420;
  --muted: #5F6863;
  --accent: #B5541F;
  --chip: #F6E2D3;
  --border: #D9D4C7;
  --on-accent: #FBF1E8;
  --type: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #181C1A;
    --ink: #EDEAE2;
    --muted: #A9B0AB;
    --accent: #E78F5A;
    --chip: #3A2A20;
    --border: #38403B;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--type); }
::selection { background: var(--accent); color: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .16em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; letter-spacing: -.015em; font-weight: 700; }
.wrap { max-width: 1080px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 1; padding: 8px 12px; background: var(--paper); color: var(--ink); }
.section { padding-block: clamp(64px, 9vw, 112px); }

/* The hero: the name is the picture */
.hero { background: #B5541F; color: var(--on-accent); }
.hero a { color: inherit; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-block: 14px; }
.home { font-weight: 600; text-decoration: none; padding-block: 10px; }
.bar nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.bar nav a { display: inline-block; padding-block: 10px; }
.hero h1 { margin-top: clamp(40px, 7vw, 88px); font-size: clamp(58px, 15.5vw, 176px); line-height: .94; letter-spacing: -.04em; font-weight: 700; }
.hero .lead { margin-top: clamp(28px, 4vw, 48px); padding-bottom: clamp(48px, 7vw, 88px); max-width: 30em; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.34; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px clamp(40px, 7vw, 96px); }
.about .prose p { font-size: clamp(19px, 2.2vw, 22px); line-height: 1.42; max-width: 32em; }
.about h2 { grid-column: 1 / -1; }
.about .prose p + p { margin-top: 1em; }
.facts { padding-top: 4px; }
.facts dt { color: var(--muted); font-size: 15px; }
.facts dd + dt { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.facts a { color: inherit; }

/* Projects: one row each, name first */
.work { padding-top: 0; }
.intro { margin-top: 14px; max-width: 34em; color: var(--muted); font-size: 19px; line-height: 1.42; }
.projects { margin-top: clamp(32px, 5vw, 56px); }

/* Guardaleku, the one shipped app: first among the projects, on a card, with the phone cut off by its edge */
.featured { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 16px clamp(24px, 5vw, 64px); margin-top: clamp(32px, 5vw, 56px); padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px) 0; background: var(--chip); border-radius: 16px; overflow: hidden; }
.featured + .projects { margin-top: clamp(24px, 3vw, 32px); }
.featured-text { padding-bottom: clamp(24px, 4vw, 40px); }
.featured h3 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.12; letter-spacing: -.015em; font-weight: 700; }
.featured .links { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 8px; }
.featured .links a { display: inline-block; padding-block: 6px; }
.featured .line { margin-top: 16px; font-size: clamp(20px, 2.4vw, 24px); line-height: 1.25; letter-spacing: -.01em; font-weight: 600; }
.featured .line .place { color: var(--accent); }
.featured .line .tag, .featured .line .note { color: var(--muted); }
.featured .what { margin-top: 16px; font-size: 19px; line-height: 1.42; font-weight: 600; max-width: 32em; }
.featured .how { margin-top: 8px; max-width: 36em; }
.featured .how + .line { margin-top: 10px; }
.featured .key b { color: var(--accent); }
.featured .key + .how { margin-top: 16px; color: var(--muted); }
.phone { align-self: end; border-radius: 13% / 6%; background: #F7F5F0; box-shadow: 0 0 0 1px rgba(30,36,32,.25); margin-bottom: -120px; }
.project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 8px clamp(24px, 5vw, 64px); padding-block: clamp(24px, 3.4vw, 36px); border-top: 1px solid var(--border); }
.project h3 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.12; letter-spacing: -.015em; font-weight: 700; }
.project .links { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 8px; }
.project .links a { display: inline-block; padding-block: 6px; }
.project .what { font-size: 19px; line-height: 1.42; font-weight: 600; max-width: 32em; }
.project .how { margin-top: 8px; max-width: 36em; }
.project .stack { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* Career: each row carries its span, drawn to scale against 2010–2026 */
.career { border-top: 1px solid var(--border); }
.scale { display: flex; justify-content: space-between; margin-top: clamp(32px, 5vw, 56px); padding-bottom: 8px; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.job { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 4px clamp(24px, 5vw, 64px); padding-block: 22px 26px; }
.job:first-child { padding-top: 4px; }
.span { grid-column: 1 / -1; position: relative; height: 6px; margin-bottom: 14px; background: color-mix(in srgb, var(--border) 55%, transparent); border-radius: 3px; }
.span i { position: absolute; top: 0; bottom: 0; min-width: 6px; background: var(--accent); border-radius: 3px; }
.job h3 { font-size: 19px; line-height: 1.3; font-weight: 700; }
.job .when { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.job .role { font-weight: 600; }
.job .did { margin-top: 4px; max-width: 36em; }

/* Studies and papers */
.studies { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 96px); padding-top: 0; }
.studies h2 { font-size: clamp(24px, 3vw, 30px); }
.studies li { margin-top: 18px; max-width: 30em; }
.studies strong { display: block; font-weight: 600; }
.studies small { color: var(--muted); font-size: 15px; }

/* Contact and foot */
.contact { background: #B5541F; color: var(--on-accent); padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 72px); }
.contact a { color: inherit; }
.contact .mail { display: inline-block; margin-top: 16px; font-size: clamp(22px, 3.2vw, 32px); line-height: 1.2; letter-spacing: -.01em; font-weight: 600; overflow-wrap: anywhere; }
.contact nav { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 12px; font-size: 19px; font-weight: 600; }
.contact nav a { display: inline-block; padding-block: 8px; }
footer { background: #B5541F; color: var(--on-accent); font-size: 15px; }
.foot { padding-block: 18px 22px; }
.foot::before { content: ""; display: block; margin-bottom: 18px; border-top: 1px solid color-mix(in srgb, var(--on-accent) 35%, transparent); }

/* The missing page */
.missing { padding-block: clamp(64px, 12vw, 140px); }
.missing h1 { font-size: clamp(36px, 6vw, 52px); line-height: 1.06; letter-spacing: -.02em; }
.missing p { margin-top: 16px; }

@media (max-width: 720px) {
  .about, .project, .job, .studies, .featured { grid-template-columns: 1fr; }
  .facts { padding-top: 12px; }
  .featured-text { padding-bottom: 0; }
  .phone { width: 160px; margin: 8px auto -160px; }
}
