:root {
  --paper: #0d1118;
  --paper-deep: #151b25;
  --ink: #f0eee7;
  --muted: #9da5b4;
  --blue: #86adff;
  --coral: #ff846b;
  --line: rgba(240, 238, 231, 0.18);
  --white: #191f2a;
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

a { color: inherit; }
a:hover { color: var(--blue); }
a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}
img { display: block; max-width: 100%; }

.page {
  width: min(1120px, calc(100vw - 3rem));
  margin: 0 auto;
  padding: 2.5rem 0 2rem;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.site-wordmark {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.site-wordmark::before { color: var(--coral); content: "~/"; margin-right: 0.35rem; }

.site-nav,
.eyebrow,
.project-meta,
.footer,
.photo-flourish figcaption,
.about-photo figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav { display: flex; gap: 1.5rem; padding-top: 0.4rem; }
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--blue); }

.hero {
  max-width: 700px;
  padding: clamp(4.5rem, 9vw, 7rem) 0 clamp(4rem, 8vw, 6rem);
}

.eyebrow { margin: 0 0 1rem; color: var(--blue); }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.045em; }
h1 { max-width: 12ch; margin-bottom: 1.5rem; font-size: clamp(2.8rem, 6vw, 5.2rem); line-height: 0.94; }
h1 em, h2 em { color: var(--blue); font-style: normal; }
h2 { margin-bottom: 1.25rem; font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 0.95; }
h3 { margin-bottom: 0.8rem; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1; }

.hero-lede {
  max-width: 31rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.45;
}

.text-link,
.project-link { text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.jump-link { font-weight: 600; }
.jump-link span, .project-link span, .social-links span, .footer span:last-child { color: var(--coral); }

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(3rem, 8vw, 6rem);
  align-items: start;
  padding: 1.5rem 0 7rem;
  border-top: 1px solid var(--line);
}

.section-heading { margin-bottom: 3rem; }
.section-heading h2 { max-width: 11ch; }

.project {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.project-meta { display: flex; gap: 1.25rem; justify-content: space-between; margin-bottom: 1.15rem; color: var(--muted); }
.project-meta span:first-child { color: var(--coral); }
.project p { max-width: 35rem; margin-bottom: 1.15rem; color: var(--muted); font-size: 1.03rem; }
.project-link { font-weight: 700; }
.project-experiment { padding-top: 1.75rem; }
.project-experiment h3 { display: inline; margin-right: 0.75rem; font-size: 1.7rem; }
.project-experiment p { display: inline; }
.project-experiment .text-link { display: inline-block; margin-top: 1rem; font-size: 0.9rem; }

.photo-flourish { position: sticky; top: 2rem; max-width: 270px; margin: 4rem 0 0; }
.photo-frame { position: relative; padding: 0.7rem; background: var(--white); box-shadow: 10px 12px 0 var(--blue); transform: rotate(2deg); }
.photo-frame::after { position: absolute; top: -0.8rem; left: -0.8rem; z-index: -1; width: 3rem; height: 3rem; background: var(--coral); content: ""; }
.photo-frame img { aspect-ratio: 1 / 1.12; width: 100%; object-fit: cover; filter: saturate(0.88); }
.photo-flourish figcaption { display: flex; flex-direction: column; gap: 0.35rem; margin: 1.5rem 0 0 0.5rem; color: var(--muted); transform: rotate(2deg); }
.photo-flourish figcaption span:first-child { color: var(--ink); }

.contact-strip {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 2rem;
  padding: 3rem 0 5rem;
  border-top: 1px solid var(--line);
}
.contact-strip h2 { margin-bottom: 0.55rem; }
.contact-copy { margin-bottom: 1.5rem; color: var(--muted); }
.social-links { display: flex; flex-wrap: wrap; gap: 0.7rem 1.4rem; }
.social-links a { text-underline-offset: 0.25em; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer a { text-decoration: none; }

.about-page { padding: 4.5rem 0 7rem; }
.about-layout { display: grid; grid-template-columns: 310px minmax(0, 580px); gap: clamp(3rem, 10vw, 8rem); align-items: start; }
.about-photo { margin: 0; }
.about-photo img { aspect-ratio: 0.85; width: 100%; object-fit: cover; box-shadow: 16px 18px 0 var(--coral); }
.about-photo figcaption { margin-top: 1.5rem; color: var(--muted); }
.about-copy h1 { margin-bottom: 2rem; font-size: clamp(2.8rem, 6vw, 5.2rem); }
.about-copy p { max-width: 35rem; color: var(--muted); font-size: 1.06rem; }
.about-copy .about-lede { color: var(--ink); font-size: 1.3rem; line-height: 1.45; }
.about-links { margin-top: 2rem; }
.about-note { max-width: 620px; margin: 8rem 0 0 auto; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.about-note p:last-child { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1; letter-spacing: -0.04em; }

@media (max-width: 760px) {
  .page { width: min(100vw - 2rem, 1120px); padding-top: 1.25rem; }
  .site-header { align-items: center; }
  .site-nav { gap: 1rem; }
  .hero { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .work-layout, .about-layout { grid-template-columns: 1fr; gap: 3rem; }
  .work-layout { padding-bottom: 5rem; }
  .photo-flourish { max-width: 250px; margin: 1.5rem auto 0; }
  .contact-strip { grid-template-columns: 1fr; gap: 0.5rem; padding-bottom: 4rem; }
  .about-page { padding: 3.5rem 0 5rem; }
  .about-photo { max-width: 250px; }
  .about-note { margin-top: 5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .photo-frame { animation: settle-in 900ms cubic-bezier(.2,.8,.2,1) both; }
  @keyframes settle-in { from { opacity: 0; transform: translateY(12px) rotate(0); } to { opacity: 1; transform: rotate(2deg); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
