:root {
  --bg: #f9f9f6;
  --fg: #000;
  --grey: #f0f0f0;
  --red: #ef1b26;
  --blue: #0a50a1;
  --orange: #f7941d;
  --muted: #6b7280;
  --serif: 'Arvo', Georgia, serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap--wide { max-width: 80rem; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: var(--bg);
  border-bottom: 4px solid var(--fg);
}
.nav__inner {
  max-width: 80rem; margin: 0 auto; padding: .5rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav__brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; }
.nav__brand img { width: 44px; height: 44px; }
.nav__links { display: flex; align-items: center; gap: 1.5rem; }
.nav__links a {
  text-decoration: none; font-weight: 800; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .15em; color: rgba(0,0,0,.65);
  transition: color .2s;
}
.nav__links a:hover { color: var(--blue); }
.nav__links .nav__cta {
  color: #fff; background: var(--red); border: 3px solid var(--fg);
  padding: .4rem .9rem; box-shadow: 3px 3px 0 var(--fg);
}
.nav__links .nav__cta:hover { color: #fff; transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--fg); }
.nav__toggle { display: none; background: none; border: 3px solid var(--fg); padding: .5rem; cursor: pointer; }
.nav__toggle span { display: block; width: 20px; height: 3px; background: var(--fg); margin: 3px 0; }

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 4px solid var(--fg);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1rem;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .8rem 0; border-bottom: 1px solid rgba(0,0,0,.1); }
  .nav__links .nav__cta { margin-top: .75rem; text-align: center; border-bottom: 3px solid var(--fg); }
}

/* ---------- SECTIONS ---------- */
.section { padding: 7rem 0; border-bottom: 8px solid var(--fg); position: relative; }
.section--grey { background: var(--grey); }
.title {
  display: inline-block; font-family: var(--serif); font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.25rem); text-transform: uppercase; letter-spacing: -.01em;
  background: var(--bg); color: var(--fg);
  border: 4px solid var(--fg); padding: .6rem 1.5rem; margin-bottom: 3.5rem;
  box-shadow: 4px 4px 0 var(--fg);
}
.title--invert { background: var(--fg); color: var(--bg); border-color: var(--bg); box-shadow: 4px 4px 0 var(--bg); }
.group-title {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .2em; color: var(--red); margin: 0 0 2rem; padding-bottom: .6rem;
  border-bottom: 3px solid var(--fg);
}
.group-title--tight { margin-bottom: 1.25rem; }
.timeline + .group-title { margin-top: 1.5rem; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; cursor: pointer;
  border: 4px solid var(--fg); padding: .9rem 1.5rem;
  font: 800 .8rem var(--sans); text-transform: uppercase; letter-spacing: .2em;
  box-shadow: 4px 4px 0 var(--fg); transition: transform .25s, box-shadow .25s; white-space: nowrap;
}
.btn:hover { transform: translateY(-4px); box-shadow: 8px 8px 0 var(--fg); }
.btn i { font-style: normal; transition: transform .25s; }
.btn:hover i { transform: translateX(6px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red .black { color: #000; }
.btn--light { background: var(--bg); color: var(--fg); }
.btn--light .red { color: var(--red); }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 7rem 1.25rem 3rem; border-bottom: 8px solid var(--fg); text-align: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(239,27,38,.08) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 90% 80%, rgba(10,80,161,.08) 0 11rem, transparent 11.1rem),
    var(--bg);
}
.hero__inner { max-width: 64rem; width: 100%; display: flex; flex-direction: column; align-items: center; }
.hero__first {
  display: inline-block; background: var(--red); color: #fff; font-family: var(--serif); font-weight: 700;
  font-size: clamp(1rem, 3vw, 2.25rem); text-transform: uppercase; letter-spacing: .12em; padding: .4rem 1rem;
}
.hero__last {
  font-family: var(--serif); font-weight: 700; text-transform: uppercase; line-height: 1;
  font-size: clamp(2.6rem, 13vw, 8.5rem); letter-spacing: -.02em; margin: .4rem 0 .6rem;
  overflow-wrap: anywhere;
}
.hero__tag {
  font-weight: 800; text-transform: uppercase; letter-spacing: .3em; color: var(--red);
  font-size: clamp(.7rem, 2vw, 1rem); margin-bottom: .5rem;
}
.hero__role { font-family: var(--mono); text-transform: uppercase; letter-spacing: .25em; font-size: .8rem; color: var(--muted); margin-bottom: 2.5rem; }
.hero__buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* 3D die */
.die { width: 150px; height: 150px; perspective: 700px; cursor: grab; touch-action: none; margin: .25rem 0 .5rem; display: grid; place-items: center; }
.die:active { cursor: grabbing; }
.die__cube { --s: 84px; width: var(--s); height: var(--s); position: relative; transform-style: preserve-3d; }
.die__face {
  position: absolute; inset: 0; background: #fff; border: 3px solid #111; border-radius: 14px;
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 12px; backface-visibility: hidden;
}
.die__face i { width: 13px; height: 13px; border-radius: 50%; background: #111; place-self: center; }
.die__face.f1 i { background: var(--red); width: 17px; height: 17px; }
.die__face.f1 { transform: rotateY(0deg) translateZ(calc(var(--s) / 2)); }
.die__face.f6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.die__face.f2 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.die__face.f5 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.die__face.f3 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.die__face.f4 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }

/* ---------- WORK CARDS ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 2.25rem; }
.card {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column;
  background: var(--bg); border: 4px solid var(--fg); box-shadow: 8px 8px 0 var(--fg);
  transition: transform .3s, box-shadow .3s; overflow: hidden;
}
.card:hover, .card:focus-visible { transform: translate(-4px,-4px); box-shadow: 14px 14px 0 var(--fg); }
.card:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.card__img { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 4px solid var(--fg); background: #ddd; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__img img { transform: scale(1.05); }
.card__body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.card__tag {
  align-self: flex-start; font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .2em;
  padding: .3rem .7rem; border: 2px solid var(--fg);
}
.card__client { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); }
.card__title { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; line-height: 1.25; }
.card__more { margin-top: auto; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .2em; color: var(--red); }

/* ---------- ABOUT ---------- */
.about-card {
  max-width: 56rem; background: var(--bg); border: 4px solid var(--fg);
  box-shadow: 16px 16px 0 var(--fg); padding: clamp(1.75rem, 5vw, 3.5rem);
  display: grid; gap: 1.75rem; font-size: clamp(1rem, 1.6vw, 1.1rem); line-height: 1.9;
}
.about-card__lead { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 800; line-height: 1.5; }
.about-card__close { font-weight: 800; color: var(--red); }
@media (max-width: 640px) { .about-card { box-shadow: 8px 8px 0 var(--fg); } }

/* ---------- TIMELINE ---------- */
.timeline { position: relative; margin-bottom: 3.5rem; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--fg); }
.tl { position: relative; display: flex; gap: 0; padding-left: 1.75rem; }
.tl::before {
  content: ''; position: absolute; left: -5px; top: 8px; width: 13px; height: 13px;
  border: 3px solid var(--fg); background: var(--blue);
}
.tl__meta { display: flex; flex-direction: column; gap: .15rem; padding-top: .15rem; }
.tl__date { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .15em; color: var(--red); }
.tl__loc { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); }
.tl__body { padding-bottom: 3rem; }
.tl h4 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.1rem, 2.4vw, 1.5rem); text-transform: uppercase; line-height: 1.25; margin-bottom: .25rem; }
.tl__org { font-weight: 800; text-transform: uppercase; letter-spacing: .15em; color: var(--blue); font-size: .85rem; margin-bottom: 1rem; }
.tl ul { display: grid; gap: .6rem; }
.tl li { position: relative; padding-left: 1.2rem; font-size: .92rem; line-height: 1.7; color: rgba(0,0,0,.78); }
.tl li::before { content: ''; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; background: var(--red); }

/* Wide: dates in a left column, spine between */
@media (min-width: 720px) {
  .timeline::before { left: 280px; }
  .tl { padding-left: 0; }
  .tl::before { left: 277px; }
  .tl__meta { width: 280px; flex-shrink: 0; align-items: flex-end; padding-right: 2rem; text-align: right; }
  .tl__body { padding-left: 3rem; flex: 1; }
}
@media (max-width: 719px) {
  .tl { flex-direction: column; }
  .tl__meta { flex-direction: row; gap: .75rem; flex-wrap: wrap; align-items: baseline; margin-bottom: .5rem; }
}

/* ---------- SKILLS ---------- */
.skills { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); margin: 1rem 0 2.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li {
  border: 3px solid var(--fg); padding: .4rem .85rem; font-size: .75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; background: var(--bg); box-shadow: 3px 3px 0 var(--fg);
}
.chips--blue li { background: var(--blue); color: #fff; }
.resume { text-align: center; }

/* ---------- TESTIMONIALS ---------- */
.carousel { position: relative; margin: 0 auto; padding-bottom: 3.5rem; }
.quote { display: none; margin: 0; background: var(--bg); border: 4px solid var(--fg); box-shadow: 8px 8px 0 var(--fg); overflow: hidden; }
.quote.is-active { display: block; animation: slideIn .4s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.quote__bar { height: 12px; border-bottom: 4px solid var(--fg); background: var(--accent); }
.quote__body { padding: clamp(1.75rem, 5vw, 3.5rem); }
.quote__label { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .35em; color: var(--muted); margin-bottom: 1.5rem; }
.quote blockquote { margin: 0 0 2rem; font-family: var(--serif); font-weight: 700; font-size: clamp(1.1rem, 2.4vw, 1.5rem); line-height: 1.5; }
.quote figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.quote__name { display: block; font-weight: 800; text-transform: uppercase; letter-spacing: .18em; color: var(--accent); font-size: .9rem; }
.quote__title { display: block; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; color: var(--muted); margin-top: .2rem; }
.quote__links { display: flex; gap: .6rem; }
.quote__links a { border: 2px solid var(--fg); padding: .3rem .7rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; text-decoration: none; background: var(--bg); transition: background .2s, color .2s; }
.quote__links a:hover { background: var(--red); color: #fff; }
.carousel__btn {
  position: absolute; top: calc(50% - 1.75rem); transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; background: var(--bg); border: 2px solid var(--fg); box-shadow: 2px 2px 0 var(--fg);
  font-size: 1.6rem; line-height: 1; cursor: pointer; opacity: .6; transition: opacity .2s, background .2s, color .2s;
}
.carousel__btn:hover { opacity: 1; background: var(--red); color: #fff; }
.carousel__btn--prev { left: -22px; } .carousel__btn--next { right: -22px; }
.carousel__dots { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: .6rem; }
.carousel__dots button { width: 14px; height: 14px; border: 2px solid var(--fg); background: var(--bg); padding: 0; cursor: pointer; }
.carousel__dots button[aria-selected="true"] { background: var(--red); }
@media (max-width: 700px) { .carousel__btn { display: none; } }

/* ---------- CONTACT ---------- */
.contact { background: var(--fg); color: var(--bg); padding: 6rem 0; }
.contact__box { border-top: 4px solid rgba(249,249,246,.8); border-bottom: 2px solid rgba(249,249,246,.8); padding: 4px 0; }
.contact__box > div:first-child { border-bottom: 0; }
.contact__row { padding: 2rem .5rem; }
.contact__row + .contact__row { border-top: 2px solid rgba(249,249,246,.25); }
.contact__label { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4em; color: rgba(249,249,246,.55); margin-bottom: .75rem; }
.contact__row a {
  display: block; font-family: var(--serif); font-weight: 700; line-height: 1.2; text-decoration: none; overflow-wrap: anywhere;
  font-size: clamp(1.1rem, 3.6vw, 2.8rem); transition: color .25s;
}
.contact__row a:hover { color: #5aa3f0; }

/* ---------- FOOTER ---------- */
.footer { background: var(--bg); border-top: 4px solid var(--blue); padding: 2rem 0; }
.footer__inner { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; }
.footer__brand { display: flex; align-items: center; gap: .75rem; }
.footer__brand img { width: 48px; height: 48px; }
.footer__brand strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .15em; }
.footer__brand span { display: block; font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .2em; color: var(--red); }
.footer__links, .footer__social { display: flex; gap: 1.1rem; }
.footer a { text-decoration: none; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: rgba(0,0,0,.6); transition: color .2s; }
.footer a:hover { color: var(--blue); }

/* ---------- MODAL ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; overflow-y: auto; }
.modal::backdrop { background: rgba(0,0,0,.75); }
.modal[open] { display: flex; align-items: flex-start; justify-content: center; padding: 3vh 1rem; }
.modal__panel {
  position: relative; width: 100%; max-width: 56rem; background: var(--bg);
  border: 4px solid var(--fg); box-shadow: 10px 10px 0 var(--fg); animation: pop .3s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__bar { height: 18px; border-bottom: 4px solid var(--fg); }
.modal__close {
  position: absolute; top: 30px; right: 14px; width: 42px; height: 42px; cursor: pointer;
  background: var(--bg); border: 3px solid var(--fg); box-shadow: 3px 3px 0 var(--fg); font-size: 1rem; font-weight: 800;
}
.modal__close:hover { background: var(--red); color: #fff; }
.modal__content { padding: clamp(1.5rem, 4vw, 3rem); }
.modal__tag { display: inline-block; font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .2em; padding: .3rem .7rem; border: 2px solid var(--fg); }
.modal__client { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); margin: 1rem 3rem .25rem 0; }
.modal__title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.15; margin-right: 3rem; }
.modal__dates { font-family: var(--mono); font-size: .8rem; color: var(--red); margin-top: .6rem; }
.modal__hero { margin: 1.75rem 0; border: 4px solid var(--fg); box-shadow: 6px 6px 0 var(--fg); }
.modal__section { margin-top: 2rem; }
.modal__section h3 { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .3em; color: var(--blue); border-bottom: 3px solid var(--fg); padding-bottom: .4rem; margin-bottom: .9rem; }
.modal__section p { line-height: 1.8; }
.modal__section ul { display: grid; gap: .55rem; }
.modal__section li { position: relative; padding-left: 1.2rem; line-height: 1.7; }
.modal__section li::before { content: ''; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; background: var(--red); }
.modal__videos { display: grid; gap: 1.25rem; margin-top: 2rem; }
.modal__videos .video { aspect-ratio: 16 / 9; border: 4px solid var(--fg); box-shadow: 6px 6px 0 var(--fg); background: #000; }
.modal__videos iframe { width: 100%; height: 100%; border: 0; }
.modal__actions { margin-top: 2.25rem; display: flex; gap: 1rem; flex-wrap: wrap; }
body.is-locked { overflow: hidden; }

/* ---------- REVEAL ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .quote.is-active, .modal__panel { animation: none; }
  * { transition-duration: .01ms !important; }
}
