/* ─── TOKENS ──────────────────────────────────────────────────────────── */
:root {
  --bg:        #f4f2ec;
  --paper:     #fbf9f4;
  --ink:       #0a0a0a;
  --ink-soft:  #2a2a2a;
  --muted:     #6b6963;
  --hairline:  #d9d6cc;
  --blue:      #1d3aff;
  --blue-soft: #e6e9ff;
}

/* ─── RESET ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.5;
}
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, video { max-width: 100%; display: block; }

/* ─── TYPE HELPERS ────────────────────────────────────────────────────── */
.display {
  font-family: "Inter Tight", -apple-system, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
}
.mono {
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: "ss02";
}
.text-blue     { color: var(--blue); }
.text-semibold { font-weight: 600; font-style: normal; }
.underline-em  {
  font-style: normal;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.section-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── PAGE WRAPPER ────────────────────────────────────────────────────── */
body > * { max-width: 1280px; margin-inline: auto; }
.marquee-wrap,
footer.footer {
  max-width: none;
  width: 100%;
}

/* ─── PILL ────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  line-height: 1;
  background: transparent;
}
.pill--accent {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* ─── NAV ─────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  margin: 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  position: sticky;
  top: 16px;
  z-index: 100;
}
.nav__left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__dot {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center top;
  background: var(--blue);
  flex-shrink: 0;
}
.nav__name {
  font-size: 14px;
  font-weight: 500;
}
.nav__version {
  font-size: 11px;
  color: rgba(244,242,236,0.5);
  margin-left: 4px;
}
.nav__links {
  display: flex;
  gap: 4px;
}
.nav__link {
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: border-color 0.15s ease;
  color: var(--bg);
}
.nav__link:hover,
.nav__link--active {
  border-color: rgba(244,242,236,0.3);
}
.nav__geo {
  font-size: 11px;
  color: rgba(244,242,236,0.7);
}

/* ─── HERO ────────────────────────────────────────────────────────────── */
.hero {
  padding: 32px 32px 0;
}
.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 16px;
  gap: 32px;
}
.hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 520px;
}
.hero__index {
  font-size: 11px;
  text-align: right;
  color: var(--muted);
  line-height: 1.6;
  white-space: nowrap;
}
.hero__h1 {
  font-size: clamp(80px, 13vw, 168px);
  line-height: 0.86;
  letter-spacing: -0.05em;
  margin-top: 24px;
}
.hero__bottom {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  align-items: var(--hero-bottom-align, end);
  border-top: 1px solid var(--ink);
  padding-top: 24px;
  padding-bottom: 32px;
}
.hero__lead {
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 360px;
}
.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero__status {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ─── BUTTONS ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  max-width: 220px;
  width: 100%;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
}
.btn--primary:hover {
  background: var(--blue);
  border-color: var(--blue);
}
.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn--outline:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ─── MARQUEE ─────────────────────────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--blue);
  color: #fff;
  min-height: 96px;
  padding: 16px 0;
  display: flex;
  align-items: center;
}
.marquee {
  overflow: hidden;
  cursor: default;
  width: 100%;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: marquee 30s linear infinite;
  will-change: transform;
}
.marquee__item {
  font-size: 48px;
  line-height: 1.25;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.marquee__sep {
  font-size: 48px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.25;
  display: flex;
  align-items: center;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ─── SECTION SHARED ──────────────────────────────────────────────────── */
.section {
  padding: 56px 32px;
  border-bottom: 1px solid var(--ink);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
}
.section-h2 {
  font-size: clamp(48px, 7vw, 88px);
  margin-top: 12px;
}
.punctuation { color: var(--ink); }
.archive-link {
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.archive-link:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ─── WORK GRID ───────────────────────────────────────────────────────── */
.work-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

/* ─── CARD ────────────────────────────────────────────────────────────── */
.card {
  grid-column: span var(--span, 2);
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.card--big  { min-height: 380px; }
.card--accent {
  background: var(--blue);
  color: #fff;
}
.card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.card__image {
  flex: 1;
  margin: 16px 0;
  background: repeating-linear-gradient(135deg, rgba(10,10,10,0.06) 0 8px, transparent 8px 16px);
  border: 1px dashed rgba(10,10,10,0.25);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}
.card--accent .card__image {
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.18) 0 8px, transparent 8px 16px);
  border-color: rgba(255,255,255,0.45);
}
.card__image span { font-size: 11px; opacity: 0.7; }

/* Photo / thumbnail variant — replaces the dashed placeholder */
.card__image--photo {
  position: relative;
  background: #e9e9ea;
  border: 1px solid rgba(10,10,10,0.15);
  border-radius: 4px;
  overflow: hidden;
  padding: 0;
}
.card--accent .card__image--photo {
  border-color: rgba(255,255,255,0.35);
}
.card__image--photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card__image-caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 8px;
  font-size: 10px !important;
  opacity: 1 !important;
  background: rgba(10,10,10,0.78);
  color: #fff;
  border-radius: 4px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}
.card__title {
  font-size: 30px;
  line-height: 1;
  margin-top: auto;
}
.card--big .card__title { font-size: 44px; }

.card__hover-pill {
  position: absolute;
  bottom: 20px;
  right: 20px;
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.card--accent .card__hover-pill {
  background: #fff;
  color: var(--blue);
}
.card:hover .card__hover-pill {
  opacity: 1;
  transform: translateY(0);
}
.card:hover .card__image {
  transform: translateY(-2px);
}

/* ─── ABOUT ───────────────────────────────────────────────────────────── */
.about {
  padding: 80px 32px;
  border-bottom: 1px solid var(--ink);
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
}
.about__portrait {
  margin-top: 32px;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  overflow: hidden;
}
.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
  display: block;
}
.about__lead {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.05;
}
.about__detail {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--ink);
}
.about__body {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.about__collab {
  margin-top: 12px;
  font-size: 13px;
  line-height: 2;
  color: var(--ink-soft);
}

/* ─── SERVICES ────────────────────────────────────────────────────────── */
.services { padding: 80px 32px; border-bottom: 1px solid var(--ink); }
.services .section-h2 { margin-bottom: 48px; }
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--ink);
}
.service {
  padding: 24px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--ink);
}
.service:not(:last-child) { border-right: 1px solid var(--ink); }
.service__num { font-size: 12px; color: var(--muted); }
.service__title {
  font-size: clamp(24px, 2.5vw, 32px);
  margin-top: 32px;
  margin-bottom: 20px;
  white-space: nowrap;
}
.service__body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 320px;
}
.service__link {
  margin-top: auto;
  padding-top: 24px;
  font-size: 13px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  width: fit-content;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.service__link:hover { color: var(--blue); border-color: var(--blue); }

/* ─── CONTACT ─────────────────────────────────────────────────────────── */
.contact {
  padding: 120px 32px 32px;
  max-width: 1280px;
  margin-inline: auto;
}
.contact__h2 {
  font-size: clamp(64px, 15.6vw, 200px);
  line-height: 0.86;
  letter-spacing: -0.05em;
  margin-top: 16px;
}
.contact__grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--ink);
}
.contact__col .section-label { margin-bottom: 12px; }
.contact__email {
  display: inline-block;
  font-size: clamp(18px, 2.5vw, 32px);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--ink);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.contact__email:hover { color: var(--blue); border-color: var(--blue); }
.contact__blurb {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 380px;
}
.contact__links { margin-top: 12px; font-size: 16px; line-height: 2; }
.contact__social {
  border-bottom: 1px solid var(--ink);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.contact__social:hover { color: var(--blue); border-color: var(--blue); }
.contact__now {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ─── FOOTER ──────────────────────────────────────────────────────────── */
.footer {
  max-width: 1280px;
  margin-inline: auto;
  margin-top: 96px;
  padding: 24px 32px;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer__back-to-top {
  transition: color 0.15s ease;
}
.footer__back-to-top:hover { color: var(--blue); }

/* ─── RESPONSIVE ──────────────────────────────────────────────────────── */

/* Tablet — 1024 to 1279 */
@media (max-width: 1279px) {
  .work-grid { grid-template-columns: repeat(4, 1fr); }
  .card[style*="--span:4"] { --span: 4; }
  .card[style*="--span:2"] { --span: 2; }
}

/* Small tablet — 768 to 1023 */
@media (max-width: 1023px) {
  .hero__h1 { font-size: clamp(56px, 10vw, 120px); }
  .hero__bottom { grid-template-columns: 1fr 1fr; }
  .hero__status { display: none; }

  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .card[style*="--span:4"],
  .card[style*="--span:2"] { --span: 2; }

  .about__grid { grid-template-columns: 1fr; }
  .about__left { display: flex; gap: 32px; align-items: flex-start; }
  .about__portrait { width: 180px; flex-shrink: 0; margin-top: 0; }

  .services-grid { grid-template-columns: 1fr; }
  .service { border-right: none !important; }

  .contact__grid { grid-template-columns: 1fr 1fr; }
  .contact__col:first-child { grid-column: span 2; }

  .footer { flex-direction: column; gap: 8px; text-align: center; }
}

/* Mobile — up to 767 */
@media (max-width: 767px) {
  .nav {
    padding: 14px 20px;
    margin: 12px;
    border-radius: 16px;
  }
  .nav__links { display: none; }
  .nav__geo   { display: none; }
  .nav__version { display: none; }

  .hero { padding: 20px 20px 0; }
  .hero__top { flex-direction: column; gap: 16px; }
  .hero__index { display: none; }
  .hero__h1 { font-size: clamp(48px, 14vw, 80px); }
  .hero__bottom {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero__ctas { flex-direction: row; flex-wrap: wrap; }
  .hero__status { display: none; }

  .section { padding: 40px 20px; }
  .work-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card,
  .card--big { --span: 1; min-height: 240px; }

  .about { padding: 40px 20px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__left { flex-direction: column; }
  .about__portrait { width: 100%; max-width: 240px; }
  .about__detail { grid-template-columns: 1fr; }

  .services { padding: 40px 20px; }

  .contact { padding: 60px 20px 20px; }
  .contact__h2 { font-size: clamp(48px, 16vw, 96px); }
  .contact__grid { grid-template-columns: 1fr; }
  .contact__col:first-child { grid-column: auto; }

  .footer { padding: 20px; }

  .section-h2 { font-size: clamp(40px, 10vw, 64px); }
}
