/* Colby Rough, Graduate Architect. Drawing-set grammar: paper, ink, hairlines. */

@font-face { font-family: 'Switzer'; src: url('../fonts/switzer-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('../fonts/switzer-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('../fonts/switzer-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Sentient'; src: url('../fonts/sentient-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Sentient'; src: url('../fonts/sentient-400i.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #FAF9F6;
  --ink: #141412;
  --stone: #8A8782;
  --hairline: #E3E0DA;
  --sans: 'Switzer', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Sentient', Georgia, serif;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22, .8, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--ink); color: var(--paper); }

/* ---------- label / caption / rule grammar ---------- */
.label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.label.ink { color: var(--ink); }

/* scale-bar rule: hairline with end ticks */
.rule {
  position: relative;
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 0;
}
.rule::before, .rule::after {
  content: '';
  position: absolute;
  top: -4px;
  width: 1px;
  height: 9px;
  background: var(--ink);
}
.rule::before { left: 0; }
.rule::after { right: 0; }

/* ---------- artwork banner ---------- */
.art-banner {
  height: clamp(48px, 8vh, 96px);
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}
.art-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.7;
}

/* ---------- header ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px var(--pad);
  position: relative;
  z-index: 10;
}
.wordmark {
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-nav { display: flex; gap: clamp(18px, 3vw, 36px); }
.site-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  position: relative;
  transition: color 0.25s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); }

/* ---------- home: intro ---------- */
.intro {
  min-height: calc(100svh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--pad) clamp(28px, 5vh, 64px);
}
.intro h1 {
  font-size: clamp(3.4rem, 14.5vw, 12.5rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
.intro h1 .line { display: block; overflow: hidden; }
.intro h1 .line > span { display: block; transform: translateY(110%); }
.js .intro h1 .line > span { animation: riseUp 0.9s var(--ease) forwards; }
.js .intro h1 .line:nth-child(2) > span { animation-delay: 0.08s; }
@keyframes riseUp { to { transform: translateY(0); } }

.intro-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: clamp(20px, 4vh, 44px);
  flex-wrap: wrap;
}
.intro-meta .desc { max-width: 26em; color: var(--ink); }
.intro-meta .desc em { font-family: var(--serif); font-style: italic; }

.intro-quote { max-width: 30em; }
.intro-quote blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.42;
}
.intro-quote blockquote em { font-style: italic; }
.intro-quote figcaption { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }

.serif-note {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  line-height: 1.42;
  max-width: 24em;
}

/* ---------- credentials ticker ---------- */
.ticker {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  padding: 14px 0;
}
.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: tick 38s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track .t-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ticker-track .t-item::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 11px;
  background: var(--ink);
  margin: 0 2.2em;
}
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; }
  .ticker-track { animation: none; }
}

/* project-page pull quote */
.pullquote {
  padding: 0 var(--pad);
  margin: 0 0 clamp(36px, 7vh, 84px);
  display: flex;
  justify-content: center;
}
.pullquote figure { max-width: 34em; text-align: center; }
.pullquote blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.38;
}
.pullquote figcaption { margin-top: 14px; }

/* ---------- home: project index ---------- */
.index-section { padding: clamp(48px, 9vh, 110px) var(--pad); }
.index-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.project-index { list-style: none; }
.project-index li { border-bottom: 1px solid var(--hairline); }
.project-index li:first-child { border-top: 1px solid var(--hairline); }
.project-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: clamp(16px, 2.6vh, 26px) 4px;
  transition: padding-left 0.35s var(--ease);
}
.project-row:hover { padding-left: 18px; }
.project-row .num {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--stone);
  letter-spacing: 0.08em;
}
.project-row .title {
  font-size: clamp(1.35rem, 3.4vw, 2.6rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.project-row .tag { text-align: right; white-space: nowrap; }

/* floating hover preview */
.index-preview {
  position: fixed;
  top: 0; left: 0;
  width: min(24vw, 340px);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  will-change: transform;
}
.index-preview.on { opacity: 1; }
.index-preview img { box-shadow: 0 18px 50px rgba(20, 20, 18, 0.18); }

/* touch devices: inline thumb, no floating preview */
.row-thumb { display: none; }
@media (hover: none) {
  .index-preview { display: none; }
  .project-row { grid-template-columns: 2.2rem 1fr 72px; align-items: center; }
  .project-row .tag { display: none; }
  .row-thumb { display: block; width: 72px; height: 54px; object-fit: cover; }
}

/* ---------- home: reference quote / credentials ---------- */
.proof {
  padding: clamp(56px, 11vh, 130px) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 6vw, 90px);
}
.proof blockquote {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.9vw, 2.3rem);
  line-height: 1.32;
  max-width: 22em;
}
.proof blockquote em { font-style: italic; }
.proof figcaption { margin-top: 22px; }
.cred-list { list-style: none; }
.cred-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.cred-list li:first-child { border-top: 1px solid var(--hairline); }
.cred-list .what { font-weight: 500; }
.cred-list .of { color: var(--stone); text-align: right; }

/* ---------- footer ---------- */
.site-footer { padding: clamp(48px, 9vh, 100px) var(--pad) 32px; }
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 26px;
}
.contact-lines { display: flex; flex-direction: column; gap: 6px; }
.contact-lines a {
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  font-weight: 500;
  width: fit-content;
  position: relative;
}
.contact-lines a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.contact-lines a:hover::after { transform: scaleX(1); }
.footer-note { color: var(--stone); font-size: 0.8125rem; text-align: right; }
.footer-note a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- project pages ---------- */
.project-head { padding: clamp(30px, 6vh, 70px) var(--pad) clamp(24px, 4vh, 44px); }
.project-head .kicker { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.project-head h1 {
  font-size: clamp(2.1rem, 6vw, 4.6rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 18em;
}

.meta-strip {
  margin: 0 var(--pad);
  padding: 16px 0 18px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(28px, 5vw, 72px);
}
.meta-strip .cell { display: flex; flex-direction: column; gap: 4px; }
.meta-strip .cell .val { font-size: 0.9rem; font-weight: 500; }

.project-body { padding: clamp(36px, 7vh, 80px) 0 0; }
.project-desc {
  padding: 0 var(--pad);
  margin-bottom: clamp(40px, 8vh, 90px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(20px, 4vw, 60px);
}
.project-desc .lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.4;
  max-width: 28em;
}
.project-desc .rest { max-width: 34em; color: var(--ink); }
.project-desc .rest p + p { margin-top: 1em; }

/* figures: one image per scroll moment; full bleed vs matted rhythm */
figure.fig { margin: 0 0 clamp(36px, 7vh, 84px); }
figure.fig figcaption { padding: 10px var(--pad) 0; }
.fig.bleed img { width: 100%; }
.fig.matted { padding: 0 clamp(40px, 12vw, 180px); }
.fig.matted figcaption { padding-left: 0; }
.fig.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 28px);
  padding: 0 var(--pad);
}
.fig.pair figure { margin: 0; }
.fig.pair figcaption { padding: 10px 0 0; }
@media (max-width: 640px) {
  .fig.matted { padding: 0 var(--pad); }
  .fig.pair { grid-template-columns: 1fr; }
}

/* image reveal grammar (decoration only, fast, consistent) */
.js .reveal { opacity: 0; transform: translateY(26px) scale(1.02); }
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* prev / next */
.project-next {
  margin: clamp(30px, 6vh, 60px) var(--pad) 0;
  padding: 26px 0;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}
.project-next a { font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 500; }
.project-next a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- about / cv pages ---------- */
.page-body { padding: clamp(30px, 6vh, 70px) var(--pad) clamp(40px, 8vh, 90px); }
.page-body h1 {
  font-size: clamp(2.2rem, 7vw, 5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: clamp(28px, 6vh, 60px);
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 6vw, 90px);
}
.bio p { max-width: 32em; }
.bio p + p { margin-top: 1.1em; }
.bio .serif-lede {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  line-height: 1.38;
  margin-bottom: 1.2em;
}
.portrait-slot {
  border: 1px solid var(--hairline);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.cv-section { margin-bottom: clamp(36px, 7vh, 72px); }
.cv-section > .label { display: block; margin-bottom: 8px; }
.cv-item {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) minmax(0, 2fr);
  gap: 14px clamp(20px, 3vw, 44px);
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.cv-item:first-of-type { border-top: 1px solid var(--hairline); }
.cv-item h3 { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.cv-item .org { color: var(--stone); font-size: 0.9rem; }
.cv-item .what { font-size: 0.95rem; max-width: 38em; }
.cv-item .when { text-align: right; color: var(--stone); font-size: 0.9rem; white-space: nowrap; }
.soft-list { display: flex; flex-wrap: wrap; gap: 8px 0; list-style: none; }
.soft-list li { font-size: 0.95rem; }
.soft-list li:not(:last-child)::after { content: '\00a0\00a0/\00a0\00a0'; color: var(--hairline); }
.soft-list .learning { color: var(--stone); }

@media (max-width: 760px) {
  .proof, .two-col, .project-desc { grid-template-columns: 1fr; }
  .cv-item { grid-template-columns: 1fr; }
  .cv-item .when { text-align: left; }
  .footer-note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .intro h1 .line > span { animation: none; transform: none; }
  .js .reveal { opacity: 1; transform: none; }
  .index-preview { transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
