:root {
  --bg: #f8f6f1;
  --card: #efebe2;
  --ink: #1b1a17;
  --muted: #625e56;
  --faint: #959086;
  --rule: #e2ddd2;
  --accent: #e5491b;
  --mark: rgba(255, 112, 67, .28);

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131312;
    --card: #1c1b19;
    --ink: #efede7;
    --muted: #a7a298;
    --faint: #75716a;
    --rule: #2a2926;
    --accent: #ff7a4d;
    --mark: rgba(255, 122, 77, .3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #131312;
  --card: #1c1b19;
  --ink: #efede7;
  --muted: #a7a298;
  --faint: #75716a;
  --rule: #2a2926;
  --accent: #ff7a4d;
  --mark: rgba(255, 122, 77, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

::selection { background: var(--accent); color: var(--bg); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .15s, text-decoration-color .15s;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

mark {
  background: linear-gradient(transparent 55%, var(--mark) 55%);
  color: inherit;
  padding: 0 .1em;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--rule); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}
.brand {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: .9rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
.theme-toggle {
  appearance: none;
  border: 1px solid var(--rule);
  background: none;
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform .3s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--faint); transform: rotate(-20deg); }
.theme-toggle svg { width: 15px; height: 15px; }

@media (max-width: 620px) {
  .site-nav .hide-sm { display: none; }
  .site-nav { gap: 16px; }
}

/* Intro */
.intro { padding: 88px 0 64px; }
.hi {
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--accent);
  margin: 0 0 14px;
}
.intro h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 5.75rem);
  line-height: .95;
  letter-spacing: -0.045em;
  margin: 0 0 28px;
}
.intro .lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.55;
  max-width: 33em;
  margin: 0 0 16px;
}
.now {
  margin: 32px 0 0;
  padding: 18px 20px;
  background: var(--card);
  border-radius: 14px;
  max-width: 36em;
}
.now h2 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--faint);
}
.now h2::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #2fb36a;
  vertical-align: 1px;
}
.now ul { margin: 0; padding: 0; list-style: none; }
.now li { padding: 3px 0; }
.now li span { color: var(--faint); margin-right: 6px; }
.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 28px;
  font-size: .95rem;
}
.intro-links a::after { content: " \2197"; color: var(--faint); }

@media (max-width: 620px) { .intro { padding: 56px 0 48px; } }

/* Sections */
.section {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 56px 0;
  border-top: 1px solid var(--rule);
}
.section > h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  padding-top: 2px;
}
.section > h2 small {
  display: block;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 400;
  color: var(--faint);
  letter-spacing: 0;
  margin-top: 2px;
}
@media (max-width: 760px) {
  .section { grid-template-columns: 1fr; gap: 20px; padding: 44px 0; }
}

.meta { font-family: var(--mono); font-size: .8rem; color: var(--faint); letter-spacing: .01em; }
.stack { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin: 12px 0 0; }

/* Work */
.job { padding-bottom: 40px; }
.job + .job { padding-top: 40px; border-top: 1px dashed var(--rule); }
.job:last-child { padding-bottom: 0; }
.job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 2px;
}
.job-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.job-where { margin: 0 0 16px; color: var(--muted); font-size: .92rem; }

.role { margin-top: 20px; }
.role:first-of-type { margin-top: 0; }
.role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
}
.role-head h4 { margin: 0; font-size: 1rem; font-weight: 600; }
.role p, .job > p { margin: 8px 0 0; }

.job ul { margin: 10px 0 0; padding-left: 1.1em; }
.job li { margin: 6px 0; padding-left: 4px; }
.job li::marker { color: var(--accent); }

/* Projects */
.projects { display: grid; }
.project {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.project:first-child { padding-top: 0; }
.project:last-child { border-bottom: 0; padding-bottom: 0; }
.project h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.project p { margin: 4px 0 0; color: var(--muted); grid-column: 1 / -1; max-width: 36em; }
.project .stack { grid-column: 1 / -1; margin-top: 6px; }
.project .arrow { color: var(--faint); font-size: 1.1rem; transition: transform .15s, color .15s; }
div.project .arrow { visibility: hidden; }
a.project:hover { color: inherit; }
a.project:hover h3 { color: var(--accent); }
a.project:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }

/* Off the clock */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.tile {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease;
}
a.tile:hover { color: inherit; transform: translateY(-3px) rotate(-.4deg); }
a.tile:hover h3 { color: var(--accent); }
.tile .meta { margin-bottom: 6px; }
.tile h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  transition: color .15s;
}
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }
.tile .go { margin-top: auto; padding-top: 12px; font-size: .85rem; color: var(--accent); }
.tiles-note { margin: 16px 0 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }

/* Education */
.school + .school { margin-top: 32px; }
.school h3 { margin: 0; font-family: var(--display); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; }
.school p { margin: 4px 0 0; }
.school .also { color: var(--muted); font-size: .92rem; margin-top: 8px; }

/* Certifications */
.certs { list-style: none; margin: 0; padding: 0; }
.certs li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.certs li:first-child { padding-top: 0; }
.certs li:last-child { border-bottom: 0; }
.certs .issuer { color: var(--muted); }
.certs .meta { white-space: nowrap; }

/* Quotes */
.quote { margin: 0; }
.quote + .quote { margin-top: 36px; }
.quote blockquote {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  border-left: 3px solid var(--accent);
  padding-left: 20px;
}
.quote blockquote p { margin: 0 0 12px; }
.quote blockquote p:last-child { margin-bottom: 0; }
.quote figcaption { margin-top: 14px; padding-left: 23px; font-size: .92rem; color: var(--muted); }
.quote figcaption a { color: var(--ink); font-weight: 600; }

/* Contact */
.contact p { margin: 0 0 18px; max-width: 32em; }
.contact .big {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  word-break: break-word;
}
.contact dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 24px 0 0;
}
.contact dt { font-family: var(--mono); font-size: .8rem; color: var(--faint); padding-top: 3px; }
.contact dd { margin: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0 40px;
  margin-top: 24px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Home hub */
.home .intro { padding-bottom: 40px; }
.home .tiles { margin-bottom: 72px; }
.tile.feature { grid-column: 1 / -1; background: var(--ink); color: var(--bg); }
.tile.feature .meta, .tile.feature p { color: color-mix(in srgb, var(--bg) 75%, transparent); }
a.tile.feature:hover h3 { color: var(--accent); }
.tile.feature .go { color: var(--bg); text-decoration: underline; text-underline-offset: 3px; }
