*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #09090b;
  --white: #ffffff;
  --surface: #ffffff;
  --bg: #f8f8f6;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-400: #a1a1aa;
  --gray-600: #52525b;
  --font: 'Space Grotesk', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 24px;
  --radius-sm: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--black);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

/* ── Landing background ── */

.landing .bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(0, 0, 0, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(0, 0, 0, 0.03) 0%, transparent 55%),
    var(--bg);
}

.landing .bg-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, black 30%, transparent 90%);
}

/* ── Header ── */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.logo-link {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  padding: 10px 18px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

nav a:hover {
  color: var(--black);
  background: var(--gray-100);
}

.nav-cta,
.nav-contact {
  background: var(--black) !important;
  color: var(--white) !important;
}

.nav-cta:hover,
.nav-contact:hover {
  background: #27272a !important;
  color: var(--white) !important;
}

/* ── Hero ── */

.landing .hero {
  padding: 140px 0 60px;
  min-height: auto;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  animation: fade-up 0.8s var(--ease) both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-600);
  background: var(--surface);
  border: 1px solid var(--gray-200);
  padding: 8px 16px;
  border-radius: 999px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  animation: pulse 2.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.hero-year {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.hero-title {
  margin-bottom: 56px;
}

.hero-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
  animation: fade-up 0.8s var(--ease) 0.1s both;
}

.hero-line-accent {
  color: var(--black);
}

.hero-dot {
  font-family: var(--font-display);
  color: var(--gray-400);
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: end;
  padding-top: 40px;
  border-top: 1px solid var(--gray-200);
  animation: fade-up 0.8s var(--ease) 0.25s both;
}

.hero-role {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--gray-600);
  max-width: 46ch;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 16px 28px;
  border-radius: 999px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.2s;
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.btn-ghost {
  background: var(--surface);
  color: var(--black);
  border: 1px solid var(--gray-200);
}

.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: var(--black);
}

.hero-stats {
  display: flex;
  gap: 12px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px;
  min-width: 120px;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.stat-card-dark {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.stat-card-dark .stat-label {
  color: rgba(255, 255, 255, 0.5);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Marquee ── */

.marquee {
  border-block: 1px solid var(--gray-200);
  background: var(--surface);
  padding: 18px 0;
  overflow: hidden;
  margin-bottom: 80px;
}

.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-track span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  white-space: nowrap;
}

.marquee-track span::after {
  content: '◆';
  margin-left: 48px;
  font-size: 8px;
  vertical-align: middle;
  opacity: 0.5;
}

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

/* ── Work / Bento ── */

.landing .work {
  padding: 0 0 100px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.section-label-light {
  color: rgba(255, 255, 255, 0.45);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--gray-200);
  transition: color 0.2s, border-color 0.2s;
}

.section-link:hover {
  color: var(--black);
  border-color: var(--black);
}

.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
}

.bento-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.bento-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.1);
}

.bento-large {
  grid-row: span 2;
}

.bento-preview {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.bento-large .bento-preview {
  height: 240px;
  flex: 1;
  min-height: 280px;
}

.bento-preview-1 {
  background: linear-gradient(135deg, #18181b 0%, #3f3f46 50%, #09090b 100%);
}

.bento-preview-2 {
  background: linear-gradient(135deg, #e4e4e7 0%, #fafafa 40%, #a1a1aa 100%);
}

.bento-preview-3 {
  background: linear-gradient(135deg, #09090b 0%, #52525b 60%, #27272a 100%);
}

.bento-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
}

.bento-preview::after {
  content: '';
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.bento-preview-2::after {
  border-color: rgba(0, 0, 0, 0.1);
}

.bento-content {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.bento-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bento-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gray-400);
}

.bento-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 6px 12px;
  border-radius: 999px;
}

.bento-content h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 10px;
}

.bento-content p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.65;
  flex: 1;
}

.bento-cta {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
  transition: transform 0.25s var(--ease);
}

.bento-card:hover .bento-cta {
  transform: translateX(6px);
}

/* ── Contact ── */

.landing .contact {
  margin: 0 20px 32px;
  padding: clamp(56px, 8vw, 88px);
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.landing .contact::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
}

.contact-left h2 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.contact-desc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 15px;
  line-height: 1.7;
  max-width: 40ch;
  margin-bottom: 28px;
}

.contact-social {
  display: flex;
  gap: 16px;
}

.contact-social a {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.contact-social a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 36px 40px;
  background: var(--white);
  color: var(--black);
  border-radius: var(--radius-sm);
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.contact-card:hover {
  transform: scale(1.02);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.contact-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.contact-card-value {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-all;
}

.contact-card-arrow {
  position: absolute;
  top: 36px;
  right: 36px;
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s var(--ease);
}

.contact-card:hover .contact-card-arrow {
  transform: translate(4px, -4px);
}

/* ── Footer ── */

footer {
  padding: 28px 0 48px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

footer p {
  font-size: 13px;
  color: var(--gray-400);
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--black);
}

/* ── Project pages ── */

body:not(.landing) {
  background: var(--bg);
}

body:not(.landing) header {
  padding: 0;
}

body:not(.landing) .header-inner,
body:not(.landing) header .wrap {
  border-radius: 0;
  margin-top: 0;
  box-shadow: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: min(100% - 40px, var(--max));
  padding: 16px 0;
  background: rgba(248, 248, 246, 0.92);
}

.page-hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.back {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 40px;
  transition: color 0.2s;
}

.back:hover {
  color: var(--black);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.page-hero .lead {
  font-size: 18px;
  color: var(--gray-600);
  max-width: 50ch;
  line-height: 1.65;
  margin-bottom: 36px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-black {
  background: var(--black);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 18px 32px;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn-black:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* ── Responsive ── */

@media (max-width: 960px) {
  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-stats {
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 1;
    min-width: 100px;
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .bento-large {
    grid-row: auto;
  }

  .bento-large .bento-preview {
    min-height: 200px;
    height: 200px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 600px) {
  .wrap {
    width: min(100% - 32px, var(--max));
  }

  .landing .contact {
    margin: 0 16px 24px;
    padding: 40px 24px;
  }

  .hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-stats {
    width: 100%;
  }

  .stat-card {
    min-width: 0;
    flex: 1;
    padding: 16px;
  }

  nav a:not(.nav-cta):not(.nav-contact) {
    display: none;
  }
}

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
