/* ==========================================================================
   Alexander Jameson - Product Design Portfolio
   Design language: precision / spec-sheet. Borrows the vocabulary of the
   engineering drawings and title blocks in the work itself (DWG NO, SHEET,
   SCALE, REV) as the site's own structural device.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700;800&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --ink: #14172B;
  --ink-soft: #2A2E4A;
  --paper: #FAFAFA;
  --panel: #F2F3F8;
  --line: #E1E3EC;
  --line-strong: #C9CCDC;
  --muted: #6B6F8A;
  --accent: #3452FF;
  --accent-dim: #E7EAFF;
  --accent-ink: #1B2A99;

  --font-display: 'Big Shoulders Display', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1240px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; }

::selection{ background: var(--accent); color: #fff; }

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- registration marks (signature motif) ---------- */
.reg-mark{
  position: fixed;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 40;
  opacity: 0.35;
}
.reg-mark::before, .reg-mark::after{
  content: "";
  position: absolute;
  background: var(--ink);
}
.reg-mark::before{ top: 6px; left: 0; width: 14px; height: 1px; }
.reg-mark::after{ top: 0; left: 6px; width: 1px; height: 14px; }
.reg-tl{ top: 14px; left: 14px; }
.reg-tr{ top: 14px; right: 14px; }
.reg-bl{ bottom: 14px; left: 14px; }
.reg-br{ bottom: 14px; right: 14px; }
@media (max-width: 640px){ .reg-mark{ display: none; } }

/* ---------- header / nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  text-transform: uppercase;
}
.brand span{ color: var(--accent); }
.nav{
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav a{
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav a:hover{ color: var(--ink); }
.nav a.active{ color: var(--ink); border-color: var(--accent); }

.nav-toggle{ display: none; }
@media (max-width: 720px){
  .nav{
    position: fixed; inset: 76px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    padding: 32px var(--gutter);
    gap: 22px;
    font-size: 16px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .nav.open{ opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-toggle{
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-toggle span{ width: 22px; height: 2px; background: var(--ink); display: block; }
}

/* ---------- eyebrow / labels ---------- */
.eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before{
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ---------- title block (footer + section markers) ---------- */
.title-block{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  border-top: 1px solid var(--line-strong);
  padding-top: 10px;
}
.title-block b{ color: var(--ink); font-weight: 500; }

/* ---------- buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn:hover{ background: var(--ink); color: var(--paper); }
.btn-primary{
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover{ background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- hero ---------- */
.hero{
  padding: clamp(16px, 2.5vw, 28px) 0 clamp(50px, 8vw, 90px);
  border-bottom: 1px solid var(--line);
}
.hero-kicker{ margin-bottom: 22px; }
.hero h1{
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(52px, 10vw, 128px);
  line-height: 0.92;
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}
.hero h1 em{
  font-style: normal;
  color: var(--accent);
}
.hero-sub{
  max-width: 620px;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-soft);
  margin: 0 0 40px;
}
.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- section framing ---------- */
.section{ padding: clamp(56px, 9vw, 96px) 0; border-bottom: 1px solid var(--line); }
.section:last-of-type{ border-bottom: none; }
.section-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section-head h2{
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(30px, 4.5vw, 48px);
  margin: 10px 0 0;
}

/* ---------- work page quick index ---------- */
.quick-index{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-index a{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.quick-index a:hover{ background: var(--ink); border-color: var(--ink); color: var(--paper); }
.quick-index a b{ color: var(--accent); font-weight: 500; }
.quick-index a:hover b{ color: inherit; }

/* ---------- about page ---------- */
.about-grid{
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
}
@media (max-width: 820px){ .about-grid{ grid-template-columns: 1fr; } }
.about-photo{
  aspect-ratio: 4/2.8;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tag-group{ margin-top: 16px; }
.tag-group h4{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.tags{ display: flex; flex-wrap: wrap; gap: 6px; }
.tag{
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

.lede{ font-size: clamp(16px, 2vw, 20px); color: var(--ink-soft); max-width: 640px; margin: 0 0 16px; }
.body-copy p{ max-width: 640px; margin: 0 0 12px; color: var(--ink-soft); font-size: 15px; }

.timeline{ margin-top: 20px; }
.timeline-row{
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.timeline-row:last-child{ border-bottom: 1px solid var(--line); }
.timeline-row h4{ margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.timeline-row p{ margin: 0; color: var(--muted); font-size: 13px; }
.timeline-date{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- contact page ---------- */
.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 24px;
}
@media (max-width: 720px){ .contact-grid{ grid-template-columns: 1fr; } }
.contact-item{
  background: var(--paper);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background .15s ease;
}
.contact-item:hover{ background: var(--panel); }
.contact-item .eyebrow{ margin-bottom: 2px; }
.contact-item strong{ font-size: 17px; font-weight: 600; word-break: break-word; }
.contact-item span{ font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer{ padding: 24px 0 32px; }
.site-footer .wrap > .title-block{ margin-top: 0; }
.footer-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}
.footer-links{
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links a{ text-decoration: none; color: var(--muted); }
.footer-links a:hover{ color: var(--ink); }

/* ---------- slide viewer ---------- */
.viewer{
  border: 1px solid var(--line-strong);
  background: var(--ink);
}
.viewer-stage{
  position: relative;
  width: 100%;
  height: min(44vh, 460px);
  overflow: hidden;
  background: var(--ink);
  touch-action: pan-y;
}
.viewer-track{
  display: flex;
  height: 100%;
  transition: transform .38s cubic-bezier(.65,0,.35,1);
  will-change: transform;
}
.viewer-slide{
  flex: none;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer-slide img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.viewer-arrow{
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%;
  min-width: 48px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity .15s ease;
}
.viewer-stage:hover .viewer-arrow{ opacity: 1; }
.viewer-arrow:focus-visible{ opacity: 1; }
.viewer-arrow-circle{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(20,23,43,0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.viewer-arrow:hover .viewer-arrow-circle{ background: rgba(20,23,43,0.8); transform: scale(1.06); }
.viewer-arrow svg{ width: 20px; height: 20px; }
.viewer-arrow.prev{ left: 0; justify-content: flex-start; padding-left: 14px; }
.viewer-arrow.next{ right: 0; justify-content: flex-end; padding-right: 14px; }
.viewer-arrow[disabled]{ opacity: 0 !important; pointer-events: none; }
@media (max-width: 640px){
  .viewer-arrow{ opacity: 0.85; width: 20%; }
}

.viewer-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  flex-wrap: wrap;
}
.viewer-counter{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #fff;
  white-space: nowrap;
}
.viewer-counter b{ color: var(--accent); font-weight: 500; }
.viewer-dots{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.viewer-dots::-webkit-scrollbar{ display: none; }
.viewer-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.viewer-dot.active{ background: var(--accent); border-color: var(--accent); transform: scale(1.25); }
.viewer-hint{
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
@media (max-width: 640px){ .viewer-hint{ display: none; } }
.viewer-loading{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- fullscreen lightbox ---------- */
.viewer-fullscreen-btn{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 9px 16px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.viewer-fullscreen-btn svg{ width: 15px; height: 15px; }
.viewer-fullscreen-btn:hover{ background: var(--ink); border-color: var(--ink); color: var(--paper); }
.viewer-note{
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.viewer-lightbox{
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10,11,20,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.viewer-lightbox.open{ opacity: 1; pointer-events: auto; }
.lightbox-img{
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close{
  position: absolute;
  top: 22px;
  right: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
  z-index: 5;
}
.lightbox-close:hover{ background: rgba(255,255,255,0.18); }
.lightbox-close svg{ width: 18px; height: 18px; }
.lightbox-counter{
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
}
.viewer-lightbox .viewer-arrow{ opacity: 1; top: 76px; z-index: 2; }
.viewer-lightbox .viewer-arrow[disabled]{ opacity: 0 !important; }

/* ---------- utility ---------- */
.text-center{ text-align: center; }
.mt-0{ margin-top: 0; }
