/* Fonts are served from this domain, not Google's, so visiting
   the site does not hand a visitor's IP address to a third party. */
/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url(assets/fonts/fraunces-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url(assets/fonts/fraunces-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --bg: #faf7f2;
  --bg-raised: #f2ede4;
  --text: #1a1712;
  --text-dim: #6f695d;
  --line: rgba(26, 23, 18, 0.12);
  --accent: #a8542c;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 920px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
a.link { color: var(--accent); border-bottom: 1px solid rgba(168, 84, 44, 0.35); transition: border-color 0.15s; }
a.link:hover { border-color: var(--accent); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---------- nav ---------- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}
.site-nav .brand {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.nav-toggle { display: none; }

@media (max-width: 720px) {
  /* Side-by-side brand and links overflow on phones — stack them instead. */
  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 0 18px;
  }
  .site-nav .brand { font-size: 16px; }
  .site-nav ul { flex-wrap: wrap; gap: 12px 20px; }
  .site-nav a { font-size: 11px; }
}

/* ---------- hero ---------- */
/* Split hero: copy stays aligned to the page container, image bleeds to the
   right edge of the viewport. */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  min-height: calc(100vh - 84px);
  align-items: stretch;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 60px;
  padding-bottom: 80px;
  padding-left: max(28px, calc((100vw - var(--max)) / 2));
  padding-right: 56px;
}
.hero-image { position: relative; overflow: hidden; }
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
@media (max-width: 820px) {
  .hero-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-copy {
    padding: 48px 28px 40px;
  }
  .hero-image { height: 62vh; }
}
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 82px);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}
.hero-sub {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 0 40px;
}
.hero-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid var(--text);
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--text); color: var(--bg); }
.btn-solid {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- section headings ---------- */
.section { padding: 90px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: none; }
.section-label {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section h1, .section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 46px);
  margin: 0 0 40px;
  letter-spacing: -0.01em;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
}
.photo-slot {
  aspect-ratio: 3/4;
  background: var(--bg-raised);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 24px;
}
.photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}
.about-bio p { font-size: 17px; margin: 0 0 22px; max-width: 62ch; }
.about-bio .lede {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.5;
  margin-bottom: 28px;
}
/* The bio runs long, so the portrait follows the reader instead of leaving a
   tall empty column beside it. */
.about-photo { position: sticky; top: 36px; }
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-photo { position: static; max-width: 260px; }
  .photo-slot { max-width: 260px; }
  .about-bio .lede { font-size: 20px; }
}

/* ---------- timeline ---------- */
.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.timeline-item:first-child { border-top: none; }
.timeline-date { font-size: 13px; color: var(--text-dim); letter-spacing: 0.03em; }
.timeline-title { font-family: var(--serif); font-size: 20px; margin: 0 0 6px; }
.timeline-sub { font-size: 14px; color: var(--text-dim); margin: 0 0 10px; }
.timeline-item ul { margin: 0; padding-left: 18px; font-size: 15px; color: var(--text); }
.timeline-item li { margin-bottom: 4px; }
@media (max-width: 640px) {
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
}
.skill-group-title {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 13px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
}

/* ---------- projects ---------- */
.project-card {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
}
.project-card:first-of-type { border-top: none; }
.project-card .project-meta { font-size: 13px; color: var(--text-dim); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 10px; }
.project-card h3 { font-family: var(--serif); font-size: 30px; font-weight: 400; margin: 0 0 16px; }
.project-card p { font-size: 15px; color: var(--text); margin: 0 0 18px; max-width: 56ch; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tag { font-size: 12px; padding: 5px 12px; background: var(--bg-raised); color: var(--text-dim); border-radius: 4px; }
.status-badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 18px;
}
.status-live { background: rgba(168, 84, 44, 0.12); color: var(--accent); }
.status-progress { background: var(--bg-raised); color: var(--text-dim); }
.project-links { display: flex; gap: 16px; }
.project-shot {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
  padding: 24px;
}
.shot-caption {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 10px;
  line-height: 1.5;
}

/* ---------- screenshot carousel + lightbox ---------- */
/* Scrolling is native scroll-snap, so swipe works on touch for free and the
   script below only has to drive the arrows and dots. */
.carousel { position: relative; margin-top: 8px; }
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin: 0;
}
.slide figcaption {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 10px;
  line-height: 1.5;
  max-width: 62ch;
}

.carousel-arrow {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.carousel-arrow:hover { background: var(--text); color: var(--bg); }
.carousel-arrow[disabled] { opacity: 0.25; cursor: default; }
.carousel-arrow[disabled]:hover { background: var(--bg); color: var(--text); }
.carousel-arrow.prev { left: -18px; }
.carousel-arrow.next { right: -18px; }

.carousel-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.carousel-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.carousel-dots button[aria-current="true"] {
  background: var(--accent);
  transform: scale(1.4);
}

@media (max-width: 900px) {
  .carousel-arrow { display: none; }
}

.shot {
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  border-radius: 4px;
  overflow: hidden;
  cursor: zoom-in;
  display: block;
  width: 100%;
  transition: border-color 0.15s, transform 0.15s;
}
.shot:hover { border-color: var(--accent); transform: translateY(-2px); }
.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shot img { width: 100%; height: auto; display: block; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(12, 10, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
}
/* A project whose images want the full width rather than a side column. */
.project-card.stacked { grid-template-columns: 1fr; gap: 28px; }
.project-card.stacked .project-lead p { max-width: 68ch; }
@media (max-width: 760px) {
  .project-card { grid-template-columns: 1fr; }
  .project-shot { order: -1; }
}

/* ---------- contact ---------- */
.contact-list { display: flex; flex-direction: column; gap: 4px; }
.contact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 26px;
}
.contact-row:first-child { border-top: none; }
.contact-row span { font-family: var(--sans); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.contact-row a:hover { color: var(--accent); }
@media (max-width: 600px) {
  .contact-row { flex-direction: column; gap: 6px; font-size: 20px; }
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer .footer-links { display: flex; gap: 20px; }
.site-footer a:hover { color: var(--accent); }

/* ---------- keyboard and motion ---------- */

/* Without this a keyboard user cannot see where they are on the page. */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Lets a keyboard user jump the nav instead of tabbing it on every page. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  z-index: 100;
  font-size: 14px;
}
.skip-link:focus {
  left: 0;
}

/* Respect a reader who has asked their system for less movement. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- page lead sections ---------- */

/* The first section on a page sits directly under the nav, which already
   divides it, so it drops the rule above. These were inline styles; they live
   here so the CSP can forbid inline styles outright. */
.section-lead { border-top: none; padding-top: 40px; }
.section-lead-tight { padding-bottom: 32px; }
.section-lead-tight h1 { margin-bottom: 24px; }

/* Intro paragraph under a page heading. */
.lede {
  max-width: 56ch;
  font-size: 17px;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.section-notfound { border-top: none; padding: 96px 0 120px; }
.section-notfound h1 { margin-bottom: 16px; }
.section-notfound .lede { max-width: 44ch; font-size: 16px; margin-bottom: 32px; }
