/* ============================================================
   Jake Ward Portfolio — Swiss modernist design system
   Font: Archivo · Accent: burnt orange #dd541a
   ============================================================ */

:root {
  --ink: #141414;
  --paper: #ffffff;
  --alt: #f7f6f3;
  --hair: #e3e3e3;
  --muted: #6b6b6b;
  --accent: #dd541a;
  --accent-ink: #b8420f;

  --maxw: 1240px;
  --gutter: 40px;

  --fs-eyebrow: 13px;
  --ls-label: 0.16em;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

/* Metric-matched fallback so the swap to Archivo causes no layout shift (no flicker) */
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  ascent-override: 93.55%;
  descent-override: 24.72%;
  line-gap-override: 0%;
  size-adjust: 101.76%;
}

html { -webkit-text-size-adjust: 100%; background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", "Archivo Fallback", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

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

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 110px 0; }
.section--alt { background: var(--alt); }
.section--tight { padding: 70px 0; }

/* ---------- Top strip ---------- */
.topstrip {
  border-bottom: 1px solid var(--hair);
  font-size: 11px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--muted);
}
.topstrip .wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 34px;
  font-weight: 500;
}

/* ---------- Marker square ---------- */
.sq {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--accent);
  flex: 0 0 9px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hair);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.navlinks {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navlinks a {
  position: relative;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 0;
  color: var(--ink);
}
.navlinks a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}
.navlinks a:hover::after,
.navlinks a.active::after { transform: scaleX(1); }
.navlinks a.accent { color: var(--accent); }
/* Only let the sliding underline react to hover on real hover-capable pointers,
   so a tap on touchscreens doesn't leave the underline stuck on. */
@media (hover: none) {
  .navlinks a:hover::after { transform: scaleX(0); }
}

.nav-toggle { display: none; }

/* Home link: hidden on desktop (the wordmark is the home affordance);
   shown only at the top of the open mobile menu. */
.home-link { display: none; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--accent);
}
.eyebrow--muted { color: var(--muted); }

/* ---------- Section heads ---------- */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-top: 1px solid var(--ink);
  padding-top: 18px;
  margin-bottom: 56px;
}
.sec-num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.sec-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Display type ---------- */
.display {
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h1.display { font-size: clamp(40px, 6.6vw, 88px); }
h2.display { font-size: clamp(32px, 4.6vw, 60px); }

.lead {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 60ch;
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--accent:hover { background: #fff; color: var(--accent); border-color: #fff; }
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.txtlink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  transition: border-color 0.25s var(--ease);
}
.txtlink:hover { border-color: var(--accent); }
.txtlink .arr { color: var(--accent); transition: transform 0.3s var(--ease); }
.txtlink:hover .arr { transform: translateX(4px); }

/* ---------- View link (cards) ---------- */
.viewlink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.viewlink .arr { color: var(--accent); transition: transform 0.3s var(--ease); }
.viewlink:hover .arr { transform: translateX(5px); }

/* ---------- Placeholder media ---------- */
.ph {
  position: relative;
  background-color: #efeee9;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(20, 20, 20, 0.045) 0,
    rgba(20, 20, 20, 0.045) 1px,
    transparent 1px,
    transparent 11px
  );
  border: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  font-family: "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #9a988f;
  background: rgba(255, 255, 255, 0.72);
  padding: 6px 11px;
  border: 1px solid var(--hair);
  white-space: nowrap;
}
.ph--dark {
  background-color: #1c1c1c;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 11px
  );
  border-color: #2c2c2c;
}
.ph--dark::after {
  color: #8a8a8a;
  background: rgba(0, 0, 0, 0.4);
  border-color: #333;
}

/* play button for video placeholders */
.ph .play {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.3s var(--ease);
}
.ph .play::before {
  content: "";
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}
a.ph:hover .play { transform: scale(1.08); }

/* ---------- Footer (ink) ---------- */
.footer {
  background: var(--ink);
  color: #fff;
  padding: 100px 0 54px;
}
.footer .eyebrow { color: #fff; }
.footer h2.display { color: #fff; margin-bottom: 26px; }
.footer .btn { white-space: nowrap; }
.footer .contact-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer .contact-center .eyebrow { justify-content: center; }
.footer .contact-center .lead { max-width: 52ch; }
.footer .lead { color: #a9a9a9; }
.footer-meta {
  margin-top: 80px;
  padding-top: 30px;
  border-top: 1px solid #2c2c2c;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #8c8c8c;
}
.footer-meta a { color: #d8d8d8; text-decoration: none; }
.footer-meta a:hover { color: var(--accent); }
.footer-contacts { display: flex; gap: 28px; flex-wrap: wrap; }

/* ============================================================
   WORK PAGES (shared) — websites / graphics / video
   ============================================================ */
.work-hero {
  min-height: calc(100vh - 105px);
  display: flex;
  padding: 48px 0 56px;
}
.work-hero .wrap { width: 100%; display: flex; flex-direction: column; }
.work-hero .eyebrow { margin-top: auto; }
.work-hero .lead { margin-top: 40px; margin-bottom: auto; }
.work-hero h1 { margin-top: 26px; line-height: 1.04; }

/* index strip under hero */
.work-index {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin-top: 0;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.work-index .n { color: var(--accent); margin-right: 8px; font-variant-numeric: tabular-nums; }
.work-index a { text-decoration: none; color: var(--muted); display: inline-flex; align-items: center; transition: color 0.2s var(--ease); }
.work-index a:hover { color: var(--ink); }

/* Case study */
.case { padding: 92px 0; border-top: 1px solid var(--hair); }
.case:first-of-type { border-top: 0; }
.case-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 12px; }
.case-kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.tag-concept {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--hair); padding: 4px 10px;
}
.case-title { font-size: clamp(30px, 4vw, 52px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.0; margin: 0 0 26px; max-width: 18ch; }

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  margin-bottom: 40px;
}
.case-meta .m { background: var(--paper); padding: 18px 20px; }
.case-meta .mk { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 7px; }
.case-meta .mv { font-size: 15px; font-weight: 500; color: var(--ink); margin: 0; }

.case-figure { margin-bottom: 44px; }
.case-figure .ph { width: 100%; }
.case-figure figcaption { font-family: "SFMono-Regular", Menlo, monospace; font-size: 12px; color: var(--muted); margin-top: 12px; letter-spacing: 0.02em; }

.case-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.case-body .block h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; padding-top: 16px; border-top: 1px solid var(--ink); }
.case-body .block p { font-size: 16px; line-height: 1.6; color: #333; margin: 0; }

.case-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); margin-top: 44px; }
.case-stats .stat { background: var(--paper); padding: 30px 24px; }
.case-stats .num { font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.case-stats .num .u { color: var(--accent); }
.case-stats .slab { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.4; }

/* Two-up media row */
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 44px; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.gitem { text-decoration: none; color: inherit; display: block; }
.gitem .ph { transition: filter 0.3s var(--ease); }
.gitem:hover .ph { filter: brightness(0.97); }
.gitem .gcap { display: flex; justify-content: space-between; gap: 14px; margin-top: 12px; align-items: baseline; }
.gitem .gt { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.gitem .gm { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

@media (max-width: 900px) {
  .case-meta { grid-template-columns: repeat(2, 1fr); }
  .case-body { grid-template-columns: 1fr; gap: 28px; }
  .case-stats { grid-template-columns: 1fr; }
  .media-row { grid-template-columns: 1fr; }
  .gallery-grid, .gallery-grid.cols-2 { grid-template-columns: 1fr; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Page-entrance: hero content drifts up on load ---------- */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .wrap,
  .work-hero .wrap,
  .resume-hero .wrap,
  .contact-hero .wrap {
    animation: heroRise 0.62s var(--ease);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  :root { --gutter: 22px; }
  body { font-size: 17px; }
  .section { padding: 72px 0; }
  .navlinks { display: none; }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; }
  .nav.open .navlinks {
    display: flex;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--hair);
    padding: 8px 22px 18px;
  }
  .nav.open .navlinks a { padding: 14px 0; width: 100%; }
  /* Stacked mobile menu: no sliding underline at all (it spans the full row and
     collides with the dividers). Highlight ONLY the current page with color. */
  .nav.open .navlinks a::after,
  .navlinks a::after { display: none; }
  .nav.open .navlinks a,
  .nav.open .navlinks a.accent { color: var(--ink); }
  .nav.open .navlinks a.active { color: var(--accent); }
  .nav.open .navlinks .home-link { display: block; }
  .footer-meta { flex-direction: column; align-items: flex-start; }
}
