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

:root {
  --paper:        #f6f3ec;
  --ink:          #1b1a16;   /* headings */
  --prose:        #3b3a33;   /* body */
  --soft:         #5f5d54;   /* secondary body */
  --muted:        #8d8a7e;   /* labels, meta */
  --faint:        #a8a499;   /* years, hints */
  --line:         rgba(31, 29, 22, 0.10);
  --line-strong:  rgba(31, 29, 22, 0.17);
  --accent:       #5c6e5f;   /* deep muted green */
  --accent-deep:  #45563f;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--sans);
  background-color: var(--paper);
  color: var(--prose);
  line-height: 1.68;
  font-weight: 400;
  letter-spacing: -0.002em;
  padding: 0 1.5rem;
  overflow-x: hidden;
}

/* faint paper grain for depth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: 5.5rem 0 7rem;
  animation: pageFade 0.6s ease both;
}
@keyframes pageFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- header ---------- */
header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 3.4rem;
}
.header-copy { flex: 0 0 auto; }

.site-name {
  display: inline-block;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2rem, 6.4vw, 2.5rem);
  line-height: 1.02;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-decoration: none;
}
.site-name span { display: inline-block; }

@keyframes letterIn {
  from { opacity: 0; transform: translateY(0.5em); }
  to   { opacity: 1; transform: translateY(0); }
}

nav {
  margin-top: 1.3rem;
  font-size: 0.82rem;
  font-weight: 450;
  letter-spacing: 0.01em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}
nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  transition: color 0.22s ease;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
nav a:hover,
nav a:focus-visible { color: var(--ink); outline: none; }
nav a:hover::after,
nav a:focus-visible::after { right: 0; }
nav a[aria-current="page"] { color: var(--ink); }
nav a[aria-current="page"]::after { right: 0; background: var(--line-strong); }

/* ---------- portrait ---------- */
.portrait {
  flex: 0 0 auto;
  align-self: center;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.portrait img {
  width: auto; height: 150px;
  object-fit: contain;
  display: block;
}

/* ---------- sections ---------- */
section {
  margin-bottom: 3.6rem;
  padding-top: 2.1rem;
  border-top: 1px solid var(--line);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: none; }

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.lede {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.34;
  letter-spacing: 0;
  color: var(--ink);
  max-width: 34rem;
  margin-bottom: 1.5rem;
}
.lede em { font-style: italic; }
.lede a, .prose a {
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.22s ease, color 0.22s ease;
}
.lede a:hover, .prose a:hover,
.lede a:focus-visible, .prose a:focus-visible { border-bottom-color: var(--accent); color: var(--accent); }

.prose {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.56;
  color: #2c2a24;
  max-width: 38rem;
  margin-bottom: 1.05rem;
}
.prose:last-child { margin-bottom: 0; }

/* ---------- work list ---------- */
.work { list-style: none; }
.work li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 1.4rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.work li:first-child { border-top: none; padding-top: 0.4rem; }

.work-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.28rem;
  line-height: 1.28;
  letter-spacing: 0;
  color: var(--ink);
}
.work-org {
  margin-top: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}
.work-desc {
  font-family: var(--serif);
  margin-top: 0.7rem;
  font-size: 1.1rem;
  line-height: 1.55;
  color: #34322b;
  max-width: 36rem;
}
.work-links {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.work-links a {
  color: var(--soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.work-links a:hover,
.work-links a:focus-visible {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
  outline: none;
}
.work-links .sep { margin: 0 0.55rem; color: var(--faint); }

.work-year {
  font-size: 0.82rem;
  color: var(--faint);
  white-space: nowrap;
  padding-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.soon {
  font-size: 0.92rem;
  color: var(--muted);
}
.soon .dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.55rem;
  vertical-align: middle;
  animation: breathe 3.4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

/* ---------- footer ---------- */
footer {
  font-family: var(--serif);
  margin-top: 4.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0;
}
footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
footer a:hover,
footer a:focus-visible { color: var(--ink); outline: none; }
footer .sep { margin: 0 0.7rem; color: var(--faint); }
footer .spacer { flex: 1; }
footer .credit { color: var(--faint); font-size: 0.76rem; }

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .container { padding: 3.4rem 0 5rem; }
  header {
    gap: 1rem;
    margin-bottom: 2.6rem;
  }
  .portrait img { height: 104px; }
  nav { margin-top: 1rem; gap: 0.3rem 1.2rem; }
  .work li { grid-template-columns: 1fr; gap: 0.45rem; }
  .work-year { padding-top: 0; }
}

/* ---------- the canvas, signed — a single line of Monet's Giverny footbridge ---------- */
.signature {
  display: none;                  /* footbridge signature removed site-wide */
}
.signature svg {
  width: 196px;
  height: auto;
  overflow: visible;
}
.signature .ink {
  fill: none;
  stroke: #3c3a35;                /* soft near-ink */
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.signature .water { stroke-width: 1; }
.signature .rail line { stroke: #3c3a35; stroke-width: 1.15; stroke-linecap: round; }
.signature .pad { fill: #5c6e5f; }    /* sage lily-pad dabs */

/* hidden state — everything waits to be drawn */
.signature .arch  { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0;
                    transition: stroke-dashoffset 1.6s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.4s ease; }
.signature .arch2 { transition-delay: 0.22s; }
.signature .rail  { opacity: 0; transition: opacity 0.9s ease 0.75s; }
.signature .water { opacity: 0; transition: opacity 1.1s ease 0.2s; }
.signature .pad   { opacity: 0; transition: opacity 1.2s ease 1s; }

/* signed — the ink lays down, then the rest washes in */
.signature.signed .arch  { stroke-dashoffset: 0; opacity: 0.5; }
.signature.signed .rail  { opacity: 0.5; }
.signature.signed .water { opacity: 0.42; }
.signature.signed .pad   { opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .container { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .site-name span { animation: none !important; opacity: 1 !important; }
  .soon .dot { animation: none; opacity: 0.7; }
  .signature .arch, .signature .rail, .signature .water, .signature .pad {
    transition: none; stroke-dashoffset: 0; opacity: 0.5;
  }
  .signature .water { opacity: 0.42; }
}
