/* toren3d — site styles
   Tokens mirror the toren3d design system (tokens.json). */

:root {
  /* colour */
  --paper: #ffffff;
  --paper-alt: #f5f5f5;
  --line: #e2e2e2;
  --ink: #0a0a0a;
  --graphite: #3a3a3a;
  --slate: #6b6b6b;
  --magenta: #e6007a;
  --magenta-deep: #b8005f;
  --magenta-tint: #fde6f1;
  --on-accent: #ffffff;

  /* type */
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --font-brand: "Boldonse", var(--font-sans);

  /* space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* shape */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-pill: 999px;
  --shadow-lift: 0 12px 32px rgba(10, 10, 10, 0.12);

  /* layout */
  --content-max: 1440px;
  --text-max: 68ch;
  --gutter: var(--space-8);
  --section-gap: var(--space-24);
}

@media (max-width: 720px) {
  :root {
    --gutter: var(--space-4);
    --section-gap: var(--space-16);
  }
}

/* ---------- base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--magenta-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }

:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }

h1, h2, h3, p { margin: 0; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-4); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- type styles ---------- */

.t-display {
  font-size: 72px; line-height: 72px; font-weight: 700; letter-spacing: -0.03em;
}
.t-h1 {
  font-size: 48px; line-height: 52px; font-weight: 700; letter-spacing: -0.02em;
}
.t-h2 {
  font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -0.01em;
}
.t-h3 { font-size: 22px; line-height: 28px; font-weight: 600; }
.t-body-sm { font-size: 14px; line-height: 22px; }
.t-label {
  font-family: var(--font-mono);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.t-spec {
  font-family: var(--font-mono);
  font-size: 13px; line-height: 20px; color: var(--slate);
}

@media (max-width: 900px) {
  .t-display { font-size: 52px; line-height: 56px; }
  .t-h1 { font-size: 38px; line-height: 44px; }
}
@media (max-width: 520px) {
  .t-display { font-size: 40px; line-height: 44px; }
  .t-h1 { font-size: 32px; line-height: 38px; }
  .t-h2 { font-size: 26px; line-height: 32px; }
}

.prose { max-width: var(--text-max); color: var(--graphite); }
.prose p + p { margin-top: var(--space-4); }

/* ---------- buttons & tags (t3 components) ---------- */

.t3-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px;
  font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease-out, color .15s ease-out, border-color .15s ease-out;
}
.t3-btn:hover { text-decoration: none; }
.t3-btn-md { padding: var(--space-3) var(--space-6); }
.t3-btn-sm { padding: var(--space-2) var(--space-4); font-size: 14px; }
.t3-btn-primary { background: var(--magenta); color: var(--on-accent); }
.t3-btn-primary:hover { background: var(--magenta-deep); color: var(--on-accent); }
.t3-btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.t3-btn-secondary:hover { background: var(--ink); color: var(--paper); }
.t3-btn-ghost { background: transparent; color: var(--ink); padding-left: 0; padding-right: 0; }
.t3-btn-ghost:hover { color: var(--magenta-deep); text-decoration: underline; text-underline-offset: 4px; }
.t3-btn svg { width: 18px; height: 18px; flex: none; }

.t3-tag {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--graphite);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-3);
}
button.t3-tag {
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: border-color .15s ease-out, color .15s ease-out, background-color .15s ease-out;
}
button.t3-tag:hover { border-color: var(--magenta); color: var(--magenta-deep); }
.t3-tag[aria-pressed="true"] {
  background: var(--magenta-tint); border-color: var(--magenta-tint); color: var(--magenta-deep);
}
.t3-tag .count { margin-left: var(--space-2); color: var(--slate); }
.t3-tag[aria-pressed="true"] .count { color: var(--magenta-deep); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  min-height: 72px;
}
.brand {
  display: inline-flex; align-items: center;
  min-height: 44px;
  padding: var(--space-2) 0;
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 22px; line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); text-decoration: none; }

.site-nav ul { display: flex; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: .01em;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  text-decoration: none;
}
.site-nav a:hover { color: var(--magenta-deep); text-decoration: none; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--magenta); }

@media (max-width: 520px) {
  .site-header .container { min-height: 60px; }
  .brand { font-size: 18px; }
  .site-nav ul { gap: var(--space-4); }
  .site-nav a { font-size: 14px; }
}

/* ---------- home: intro ---------- */

.intro { padding-top: var(--space-16); padding-bottom: var(--space-12); }
.intro .t-label { color: var(--slate); margin-bottom: var(--space-4); }
.intro h1 { max-width: 16ch; }
.intro-lede {
  margin-top: var(--space-6);
  max-width: 60ch;
  color: var(--graphite);
  font-size: 19px; line-height: 30px;
}
@media (max-width: 720px) {
  .intro { padding-top: var(--space-12); padding-bottom: var(--space-8); }
  .intro-lede { font-size: 17px; line-height: 28px; }
}

/* ---------- home: gallery ---------- */

.work-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.filters { display: none; }
.js .filters { display: flex; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  list-style: none; margin: 0; padding: 0;
}
@media (max-width: 1024px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .gallery { grid-template-columns: minmax(0, 1fr); } }
.gallery > li[hidden] { display: none; }

.t3-card {
  display: block; height: 100%;
  color: inherit; text-decoration: none;
  background: var(--paper);
  border-radius: var(--radius-sm);
  transition: box-shadow .2s ease-out;
}
.t3-card:hover { box-shadow: var(--shadow-lift); text-decoration: none; }
.t3-card-media { position: relative; overflow: hidden; background: var(--paper-alt); aspect-ratio: 1 / 1; }
.t3-card-img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius-none);
  transition: transform .2s ease-out;
}
.t3-card:hover .t3-card-img { transform: scale(1.03); }
.t3-card-body { padding: var(--space-4) var(--space-4) var(--space-6); }
.t3-card-eyebrow { color: var(--slate); margin-bottom: var(--space-2); }
.t3-card-title { color: var(--ink); }
.t3-card:hover .t3-card-title { color: var(--magenta-deep); }
.t3-card-meta { margin-top: var(--space-1); }

@media (prefers-reduced-motion: reduce) {
  .t3-card-img, .t3-card { transition: none; }
  .t3-card:hover .t3-card-img { transform: none; }
}

/* ---------- home: about ---------- */

.section { padding-top: var(--section-gap); }

.about-band { background: var(--paper-alt); margin-top: var(--section-gap); }
.about {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--space-12);
  align-items: start;
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
.about-photo {
  width: 220px; height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--line);
}
.about h2 { margin-bottom: var(--space-6); }
.about .prose { color: var(--graphite); }
.credits { margin-top: var(--space-6); }
.credits .t-label { color: var(--slate); margin-bottom: var(--space-3); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }

@media (max-width: 720px) {
  .about { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); padding-top: var(--space-12); padding-bottom: var(--space-12); }
  .about-photo { width: 144px; height: 144px; }
}

/* ---------- project page ---------- */

.project-head { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.back-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 44px;
  margin-bottom: var(--space-6);
  color: var(--ink);
  font-size: 15px; font-weight: 600;
}
.back-link:hover { color: var(--magenta-deep); }
.back-link svg { width: 18px; height: 18px; }

.project-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--space-12);
  align-items: start;
}
@media (max-width: 960px) { .project-head-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); } }

.project-head .t-label { color: var(--slate); margin-bottom: var(--space-3); }
.project-summary {
  margin-top: var(--space-4);
  max-width: var(--text-max);
  font-size: 19px; line-height: 30px; color: var(--ink);
}
.project-head .prose { margin-top: var(--space-6); }

.spec-block {
  background: var(--paper-alt);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
}
.spec-block dl { margin: 0; display: grid; gap: var(--space-4); }
.spec-block dt { color: var(--slate); margin-bottom: var(--space-1); }
.spec-block dd { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink); }
.spec-block .tag-list { margin-top: var(--space-2); }
.spec-block .t3-tag { background: var(--paper); }

.project-note {
  margin-top: var(--space-6);
  color: var(--slate);
}
.project-note a { color: var(--magenta-deep); }

.shots { display: grid; gap: var(--space-12); padding-bottom: var(--space-8); }
.shot { margin: 0; }
.shot img {
  width: 100%;
  border-radius: var(--radius-none);
  background: var(--paper-alt);
}
.shot figcaption {
  margin-top: var(--space-3);
  max-width: var(--text-max);
  font-size: 14px; line-height: 22px; color: var(--slate);
}
@media (max-width: 720px) { .shots { gap: var(--space-8); } }

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid var(--line);
}
.pager a {
  display: flex; align-items: center; gap: var(--space-4);
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.pager a:hover .pager-title { color: var(--magenta-deep); }
.pager img { width: 96px; aspect-ratio: 1 / 1; object-fit: cover; flex: none; background: var(--paper-alt); }
.pager .t-label { color: var(--slate); display: block; margin-bottom: var(--space-1); }
.pager-title { font-size: 18px; line-height: 24px; font-weight: 600; }
.pager-next { justify-content: flex-end; text-align: right; grid-column: 2; }
@media (max-width: 600px) {
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next { grid-column: 1; }
  .pager img { width: 72px; }
}

/* ---------- resume page ---------- */

.resume-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--space-8);
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--line);
}
.resume-head .t-label { color: var(--slate); margin-bottom: var(--space-3); }
.resume-head .role { margin-top: var(--space-2); font-size: 22px; line-height: 28px; font-weight: 500; color: var(--graphite); }
.resume-contact { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
.resume-contact a { font-family: var(--font-mono); font-size: 13px; line-height: 20px; }

.resume-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--space-16);
  padding-top: var(--space-12);
}
@media (max-width: 960px) { .resume-body { grid-template-columns: minmax(0, 1fr); gap: var(--space-12); } }

.resume-section + .resume-section { margin-top: var(--space-12); }
.resume-section > h2 { margin-bottom: var(--space-6); }

.job { padding: var(--space-6) 0; border-top: 1px solid var(--line); }
.job:first-of-type { border-top: 0; padding-top: 0; }
.job-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1) var(--space-4); align-items: baseline; }
.job-org { margin-top: var(--space-1); color: var(--graphite); font-weight: 500; }
.job ul { margin: var(--space-4) 0 0; padding-left: 1.1em; color: var(--graphite); max-width: var(--text-max); }
.job li + li { margin-top: var(--space-2); }
.job li::marker { color: var(--magenta); }

.side-card { background: var(--paper-alt); border-radius: var(--radius-sm); padding: var(--space-6); }
.side-card + .side-card { margin-top: var(--space-6); }
.side-card h2 { font-size: 22px; line-height: 28px; font-weight: 600; margin-bottom: var(--space-4); }
.side-card ul { margin: 0; padding-left: 1.1em; color: var(--graphite); font-size: 15px; line-height: 24px; }
.side-card li + li { margin-top: var(--space-2); }
.side-card li::marker { color: var(--magenta); }
.side-card .t3-tag { background: var(--paper); }
.side-card p { font-size: 15px; line-height: 24px; color: var(--graphite); }

.pdf-cta {
  margin-top: var(--space-16);
  padding: var(--space-8);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6);
}
.pdf-cta p { color: var(--graphite); }

/* ---------- footer ---------- */

.site-footer {
  margin-top: var(--section-gap);
  background: var(--graphite);
  color: var(--paper);
}
.site-footer.flush { margin-top: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-12);
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); padding-top: var(--space-12); } }

.site-footer h2 { font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -0.01em; }
.site-footer .t-label { color: #cfcfcf; margin-bottom: var(--space-4); }
.site-footer p { font-size: 15px; line-height: 24px; color: #e6e6e6; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.site-footer a { color: var(--paper); text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 4px; }
.site-footer a:hover { text-decoration-color: var(--paper); }
.site-footer a:focus-visible { outline-color: var(--paper); }
.footer-link { display: inline-flex; flex-direction: column; min-height: 44px; justify-content: center; }
.footer-link small { font-size: 13px; line-height: 20px; color: #cfcfcf; }
.footer-cta { margin-top: var(--space-6); }
.footer-cta .t3-btn-primary { text-decoration: none; }
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  font-family: var(--font-mono);
  font-size: 12px; line-height: 16px; letter-spacing: .04em;
  color: #cfcfcf;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2);
}

/* ---------- print (resume) ---------- */

@media print {
  .site-header, .site-footer, .skip-link, .pdf-cta, .no-print { display: none !important; }
  body { font-size: 11pt; line-height: 1.45; }
  .resume-body { grid-template-columns: minmax(0, 1fr); gap: 16pt; }
  .side-card { background: none; padding: 0; }
  a { color: var(--ink); }
}
