:root {
  --bg: #e5dfd2;
  --surface: #eee8dc;
  --fg: #1c1a16;
  --muted: #5f5a50;
  --faint: #8f887996;
  --line: #d5cdbd;
  --accent: #b34a2c;
}

:root[data-theme="dark"] {
  --bg: #141310;
  --surface: #1b1915;
  --fg: #ece7dc;
  --muted: #a49d8f;
  --faint: #6d675b;
  --line: #2b2924;
  --accent: #e07a54;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s ease, color 0.35s ease;
}

a {
  color: inherit;
}

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

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.rise {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 52px) clamp(24px, 6vw, 64px) 40px;
}

/* Top bar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.topbar .domain {
  color: var(--muted);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--fg);
}

.theme-toggle .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* Hero */
.hero {
  padding-top: clamp(60px, 11vw, 116px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
  justify-content: space-between;
}

.hero-text {
  flex: 1 1 380px;
  min-width: min(100%, 320px);
}

.kicker {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.name {
  margin: 0;
  font-family: "IBM Plex Serif", serif;
  font-weight: 600;
  font-size: clamp(2.9rem, 8.5vw, 4.9rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
}

.name-accent {
  color: var(--accent);
}

.tagline {
  margin: 26px 0 0;
  max-width: 34ch;
  font-size: clamp(1.08rem, 2.5vw, 1.32rem);
  line-height: 1.55;
  color: var(--muted);
}

.tagline-highlight {
  color: var(--fg);
  font-weight: 500;
  box-shadow: inset 0 -0.5em 0 color-mix(in oklab, var(--accent) 20%, transparent);
}

.location {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.hero-photo {
  position: relative;
  flex: 0 0 auto;
  margin: 0 auto;
  width: clamp(208px, 42vw, 258px);
  height: clamp(248px, 50vw, 314px);
}

.hero-photo .photo-offset {
  position: absolute;
  inset: 0;
  transform: translate(15px, 15px);
  border-radius: 20px;
  background: var(--accent);
}

.hero-photo .photo-bracket {
  position: absolute;
  left: -16px;
  top: -16px;
  width: 40px;
  height: 40px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-top-left-radius: 6px;
  z-index: 1;
}

.hero-photo .portrait {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
  background: var(--surface);
}

/* Throughline */
.throughline {
  margin: clamp(56px, 9vw, 100px) 0 clamp(16px, 3vw, 28px);
  padding: clamp(30px, 4.5vw, 46px) clamp(30px, 4.5vw, 50px);
  border-radius: 18px;
  background: color-mix(in oklab, var(--accent) 9%, var(--surface));
  border-left: 4px solid var(--accent);
}

.throughline p {
  margin: 0;
  font-family: "IBM Plex Serif", serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  line-height: 1.32;
  letter-spacing: -0.015em;
  max-width: 24ch;
}

.throughline .lede {
  color: var(--muted);
}

.throughline .payoff {
  color: var(--fg);
}

/* Sections (Now / Work / Beyond) */
.section {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 4vw, 56px);
  padding: clamp(40px, 6vw, 60px) 0;
  border-top: 1px solid var(--line);
}

.section-label {
  flex: 0 0 150px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-content {
  flex: 1 1 340px;
  min-width: min(100%, 340px);
  max-width: 560px;
}

.section-content p {
  margin: 0;
  font-size: clamp(1.02rem, 2.1vw, 1.16rem);
  line-height: 1.68;
  color: var(--fg);
}

.section-content em {
  font-style: italic;
  color: var(--accent);
}

/* Work timeline */
.work .section-content {
  max-width: 600px;
}

.role {
  position: relative;
  padding-left: 30px;
  border-left: 1px solid var(--line);
  padding-bottom: 38px;
}

.role:last-child {
  padding-bottom: 0;
}

.role-marker {
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  background: var(--line);
  border-radius: 2px;
}

.role-marker.current {
  background: var(--accent);
}

.role-title {
  margin: 0;
  font-family: "IBM Plex Serif", serif;
  font-weight: 600;
  font-size: 1.34rem;
  letter-spacing: -0.01em;
}

.role-meta {
  margin-top: 5px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.role-desc {
  margin: 13px 0 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--muted);
}

/* Beyond the keyboard */
.beyond-intro {
  margin: 0 0 24px;
}

.beyond-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.beyond-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.beyond-label {
  flex: 0 0 66px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.beyond-text {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: clamp(38px, 5vw, 52px) 0 8px;
  border-top: 1px solid var(--line);
}

.footer-name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-link {
  display: inline-flex;
  padding: 9px;
  border-radius: 8px;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}

.social-link:hover {
  color: var(--accent);
  background-color: var(--surface);
}
