:root {
  --paper: #f3f0e8;
  --ink: #171614;
  --muted: #6d675d;
  --rule: #d6d0c3;
  --accent: #d9480f;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121110;
    --ink: #ece8df;
    --muted: #8e887d;
    --rule: #2d2a26;
    --accent: #ff7b3d;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  max-width: 80rem;
  padding: clamp(1.5rem, 5vw, 4rem);
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 0.2em; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Intro */

.intro {
  display: grid;
  grid-template-columns: 1fr minmax(16rem, 25rem);
  gap: 1.5rem 4rem;
  align-items: end;
  padding: clamp(1rem, 4vw, 3rem) 0 clamp(4rem, 10vw, 8rem);
}

.kicker {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(3.5rem, 12vw, 10rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.055em;
}

.bio p { margin: 0 0 0.75rem; max-width: 36ch; }
.bio p:first-child { font-weight: 600; }
.bio .aside { color: var(--muted); }
.links { font-family: var(--mono); font-size: 0.875rem; }

/* Sections */

section { margin-bottom: clamp(4rem, 8vw, 6rem); }

h2 {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
h2 span, h2 small {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
}
h2 span { color: var(--accent); }
h2 small { margin-left: auto; color: var(--muted); }

/* Project rows */

.projects { list-style: none; margin: 0; padding: 0; }

.projects li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem 2.5rem;
  align-items: start;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.year, .meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}
.year { padding-top: 0.45rem; }

h3 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
h3 a { text-decoration: none; }
h3 a::after { content: " ↗"; font-size: 0.6em; vertical-align: 0.35em; color: var(--muted); }
h3 a:hover::after { color: inherit; }

.what p { margin: 0; max-width: 46ch; }
.what .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1.25rem;
}

.status {
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.status.live { color: var(--accent); border-color: currentColor; }
.status.live::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.05rem;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }

.shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--rule);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.projects li:hover .shot img { transform: scale(1.03); }

@media (prefers-reduced-motion: reduce) {
  .status.live::before { animation: none; }
  .shot img { transition: none; }
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Small screens: one column per row */

@media (max-width: 52rem) {
  .intro { grid-template-columns: 1fr; }
  .projects li { grid-template-columns: 1fr; gap: 0.75rem; padding: 1.75rem 0; }
  .year { padding-top: 0; }
  .shot { margin-top: 0.5rem; }
}
