:root {
  --bg: #faf9f7;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --accent: #c45d3e;
  --line: rgba(0, 0, 0, 0.12);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

::selection {
  background: rgba(196, 93, 62, 0.18);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(960px, calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding: 96px 0;
}

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(250, 249, 247, 0.92);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    backdrop-filter 0.2s ease,
    -webkit-backdrop-filter 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  position: relative;
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.15s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.site-nav a.is-active::after {
  background: var(--accent);
}

.nav-email {
  display: inline-block;
  color: var(--accent) !important;
  font-weight: 500;
  transition: color 0.15s ease, transform 0.2s ease;
}

.nav-email::after {
  background: var(--accent) !important;
}

.nav-email:hover {
  transform: translateX(2px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 8px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Intro */

.intro {
  padding: 140px 0 80px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}

.intro-label {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 20px;
}

.intro h1 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  max-width: none;
}

.intro-tagline {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 24px;
  max-width: 22ch;
}

.intro-lede {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 0 32px;
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9375rem;
}

.intro-links a:first-child {
  position: relative;
  color: var(--accent);
  font-weight: 500;
}

.intro-links a:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.intro-links a:first-child:hover::after {
  transform: scaleX(1);
}

.intro-links a:not(:first-child) {
  color: var(--muted);
}

.intro-links a:not(:first-child):hover {
  color: var(--text);
}

.intro-photo {
  margin: 0;
}

.intro-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

/* Section headers */

.section-header {
  margin-bottom: 48px;
  max-width: 52ch;
}

.section-header--compact {
  margin-bottom: 32px;
}

.section-header h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.section-header p {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
}

/* Projects */

.project-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.project-row:last-child {
  border-bottom: 1px solid var(--line);
}

.project-media {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.project-media img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.45s ease;
}

.project-media:not(.project-media--mock):not(.project-media--brand):hover img {
  transform: scale(1.015);
}

.project-media--mock {
  min-height: 280px;
  padding: 0;
}

.project-media--brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 48px;
  background: #fff;
}

.project-media--brand img {
  width: auto;
  max-width: 180px;
  height: auto;
  max-height: 120px;
  object-fit: contain;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.project-meta h3 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

.project-meta h3 a {
  position: relative;
  display: inline-block;
  transition: color 0.15s ease, transform 0.2s ease;
}

.project-meta h3 a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.project-meta h3 a:hover {
  color: var(--accent);
  transform: translateX(2px);
}

.project-meta h3 a:hover::after {
  transform: scaleX(1);
}

.project-media:hover {
  border-color: rgba(196, 93, 62, 0.35);
}

.project-badge {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-badge a {
  color: inherit;
}

.project-badge a:hover {
  color: var(--accent);
}

.project-lead {
  font-weight: 500;
  color: var(--text);
  margin: 0 0 12px;
}

.project-body p {
  color: var(--muted);
  margin: 0 0 12px;
}

.project-stack {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 16px !important;
}

/* Mystic mock (flat editorial palette) */

.journal-ui {
  background: #f3f1ee;
  padding: 28px;
  min-height: 280px;
  position: relative;
}

.journal-date {
  font-size: 0.625rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.journal-title {
  font-family: var(--serif);
  font-size: 1.375rem;
  margin-top: 20px;
  letter-spacing: -0.02em;
}

.journal-lines {
  margin: 24px 0;
  display: grid;
  gap: 10px;
}

.journal-lines span {
  height: 5px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.08);
}

.journal-lines .short {
  width: 55%;
}

.journal-agent {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 24px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
}

.journal-agent > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
}

.journal-agent b,
.journal-agent small {
  display: block;
}

.journal-agent b {
  font-size: 0.6875rem;
}

.journal-agent small {
  color: var(--muted);
  font-size: 0.625rem;
}

/* Timeline */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.35s ease;
}

.timeline:has(.timeline-item:hover) .timeline-item:not(:hover) {
  opacity: 0.65;
}

.timeline-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.timeline-item:hover .timeline-logo {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.22);
}

.timeline-logo--img {
  padding: 0;
  overflow: hidden;
}

.timeline-logo--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.timeline-logo--img span {
  display: none;
}

.timeline-logo--img.timeline-logo--fallback span {
  display: block;
}

.timeline-when {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 4px;
}

.timeline-content h3 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 500;
  margin: 0 0 2px;
  letter-spacing: -0.02em;
}

.timeline-org {
  margin: 0 0 10px;
  font-weight: 500;
  font-size: 0.9375rem;
}

.timeline-org a {
  position: relative;
  display: inline-block;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.timeline-org a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.timeline-org a:hover {
  transform: translateX(2px);
}

.timeline-org a:hover::after {
  transform: scaleX(1);
}

.timeline-content > p:not(.timeline-when):not(.timeline-org) {
  color: var(--muted);
  margin: 0 0 12px;
  max-width: 60ch;
}

.timeline-content > p:not(.timeline-when):not(.timeline-org):last-child {
  margin-bottom: 0;
}

/* About */

.about-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.about-photo {
  margin: 0;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-copy p {
  color: var(--muted);
  margin: 0 0 16px;
}

.about-interests {
  margin-top: 24px !important;
  font-size: 0.875rem;
  color: var(--text) !important;
}

/* Contact */

.contact-block {
  border-top: 1px solid var(--line);
  padding-top: 48px;
  max-width: 52ch;
}

.contact-block h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.contact-block > p {
  color: var(--muted);
  margin: 0 0 24px;
}

.contact-email {
  position: relative;
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--accent);
  padding-bottom: 2px;
  margin-bottom: 24px;
  transition: transform 0.2s ease;
}

.contact-email::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.contact-email:hover {
  transform: translateX(2px);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9375rem;
}

.contact-links a {
  color: var(--muted);
}

.contact-links a:hover {
  color: var(--text);
}

/* Footer */

.footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

.footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Accent links — signature 2px hover shift */

.link-accent {
  display: inline-block;
  transition: transform 0.2s ease;
}

.link-accent:hover {
  transform: translateX(2px);
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .timeline:has(.timeline-item:hover) .timeline-item:not(:hover) {
    opacity: 1;
  }
}

/* Responsive */

@media (max-width: 820px) {
  .intro-grid,
  .project-row,
  .about-body {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .intro h1 {
    max-width: none;
  }

  .intro-photo {
    order: -1;
    max-width: 320px;
  }

  .project-row {
    padding: 32px 0;
  }

  .about-photo {
    max-width: 240px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 32px, 960px);
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }

  .site-nav a:last-child {
    border-bottom: none;
    margin-top: 8px;
  }

  .section {
    padding: 72px 0;
  }

  .intro {
    padding: 120px 0 56px;
  }

  .timeline-item {
    grid-template-columns: 40px 1fr;
    gap: 16px;
  }

  .timeline-logo {
    width: 40px;
    height: 40px;
  }
}
