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

:root {
  --ink: #111111;
  --text: #333333;
  --muted: #555555;
  --line: #E8E8E6;
  --soft: #F4F4F1;
  --accent: #0B57E3;
  --accent-dark: #0841AD;
  --gutter: clamp(16px, 5vw, 64px);
  --header-h: 72px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-optical-sizing: auto;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, p { margin: 0; }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; min-height: var(--header-h); padding-top: 10px; padding-bottom: 10px; }
.logo { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; font-size: 15px; }
.nav-links a { color: #3F3F3F; text-decoration: none; padding: 12px 0; }
.nav-links a:hover { color: var(--ink); }
.nav-links .pill { color: #0B3A99; background: #E7EEFD; padding: 10px 22px; border-radius: 999px; font-weight: 500; }
.nav-links .pill:hover { color: #0B3A99; background: #D9E5FC; }

/* Labels and headings */
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: #3F3F3F; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.label { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; font-size: 16px; font-weight: 500; text-decoration: none; }
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-dark:hover { background: #2A2A2A; color: #FFFFFF; }
.btn-line { border: 1px solid #CFCFCC; color: var(--ink); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }

/* Hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: clamp(48px, 9vw, 120px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: clamp(42px, 6.2vw, 84px); line-height: 1.02; font-weight: 600; letter-spacing: -0.035em; }
.lead { max-width: 600px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--muted); }
.portrait { flex: 1 1 340px; max-width: 440px; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; background: #EEF0F3; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* Stats */
.stats-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats { display: flex; flex-wrap: wrap; gap: 32px 48px; padding-top: 40px; padding-bottom: 40px; }
.stat { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
.stat strong { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.stat span { font-size: 15px; line-height: 1.5; color: var(--muted); }

/* Work */
.work { padding-top: clamp(64px, 9vw, 120px); display: flex; flex-direction: column; gap: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-head > div { display: flex; flex-direction: column; gap: 12px; }
.more-link { font-size: 16px; font-weight: 500; padding: 12px 0; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; }
.card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); }
.card:hover { color: var(--ink); }
.card-img { aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: #EEF1F4; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card-tag { font-size: 13px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.card-tag em { font-style: normal; color: var(--accent); white-space: nowrap; }
.card-title { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.card-text { font-size: 16px; line-height: 1.5; color: var(--muted); }
.also { font-size: 15px; color: var(--muted); }

/* About */
.split { display: flex; flex-wrap: wrap; gap: 40px 64px; padding-top: clamp(80px, 10vw, 140px); }
.split-side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.split-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.about-lead { font-size: 19px; line-height: 1.6; color: var(--text); }
.about-sub { font-size: 17px; line-height: 1.6; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 8px 16px; border-radius: 999px; border: 1px solid #DCDCD8; font-size: 15px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px 48px; font-size: 15px; line-height: 1.6; }
.cols > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; }
.cols b { font-weight: 600; }
.cols span { color: var(--muted); }

/* Experience */
.exp { padding-top: clamp(80px, 10vw, 140px); display: flex; flex-direction: column; gap: 32px; }
.job { border-top: 1px solid #E2E2DF; padding-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 48px; }
.job-meta { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--muted); }
.job-body { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.job-title { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.job-title i { font-weight: 400; }
.job ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.55; color: #444444; }
.clients { font-size: 15px; font-style: italic; color: var(--muted); }
.edu { font-size: 17px; line-height: 1.5; }
.edu b { font-weight: 600; }
.edu i { color: #444444; }
.edu span { color: var(--muted); }

/* Contact */
.contact { padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(80px, 10vw, 140px); }
.contact-box { border-radius: 32px; background: var(--soft); padding: clamp(28px, 6vw, 72px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.contact-text { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-text h2 { font-size: clamp(30px, 4.4vw, 56px); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }
.contact-text p { max-width: 620px; font-size: 17px; line-height: 1.6; color: #444444; }
.contact-links { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.contact-links a:not(.btn) { font-size: 16px; padding: 6px 0; word-break: break-all; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding-top: 20px; padding-bottom: 20px; font-size: 14px; color: var(--muted); }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer a { padding: 10px 0; }

/* Project page */
.project-head { padding-top: clamp(40px, 8vw, 104px); padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.project-head h1 { max-width: 960px; font-size: clamp(38px, 5.6vw, 76px); line-height: 1.03; font-weight: 600; letter-spacing: -0.035em; }
.facts { margin: 8px 0 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 20px 48px; font-size: 16px; line-height: 1.5; }
.facts > div { flex: 1 1 160px; display: flex; flex-direction: column; gap: 4px; }
.facts > .wide { flex: 2 1 240px; }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 0; }
.gallery { border-radius: 16px; overflow: hidden; }
.gallery img { width: 100%; height: auto; }
.gallery .row { display: flex; }
.gallery .row img { min-width: 0; }
.behance-note { margin-top: 32px; font-size: 15px; color: var(--muted); }
.next { padding-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(72px, 9vw, 120px); }
.next a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: clamp(28px, 4vw, 48px); border-radius: 28px; background: var(--soft); color: var(--ink); text-decoration: none; }
.next a:hover { background: #ECECE8; }
.next .t { display: flex; flex-direction: column; gap: 8px; }
.next .big { font-size: clamp(26px, 3.2vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.next .arrow { font-size: 32px; }

/* Tablet */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phone */
@media (max-width: 640px) {
  :root { --header-h: 104px; }
  .nav { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 12px; padding-bottom: 4px; }
  .logo { font-size: 19px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 0 12px; font-size: 15px; }
  .nav-links .pill { padding: 8px 16px; }
  .hero { gap: 32px; }
  .hero-text { gap: 22px; }
  .lead br { display: none; }
  .btns .btn { flex: 1 1 140px; }
  .portrait { flex: 0 0 auto; width: 200px; max-width: 60%; margin: 0 auto; border-radius: 20px; }
  .eyebrow { align-items: flex-start; line-height: 1.45; }
  .eyebrow .dot { margin-top: 7px; }
  .eyebrow .sep { display: none; }
  .eyebrow .city { display: block; }
  .stats { gap: 28px; padding-top: 32px; padding-bottom: 32px; }
  .stat strong { font-size: 32px; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .card-title { font-size: 20px; }
  .about-lead { font-size: 17px; }
  .about-sub { font-size: 16px; }
  .job { gap: 8px; padding-top: 24px; }
  .job-meta { flex-direction: row; flex-wrap: wrap; gap: 0 12px; font-size: 14px; }
  .job-meta span + span::before { content: "· "; }
  .job-title { font-size: 19px; }
  .job ul { font-size: 15px; }
  .edu { font-size: 16px; }
  .contact-box { border-radius: 24px; }
  .contact-links .btn { width: 100%; }
  .gallery { border-radius: 10px; }
  .facts > div, .facts > .wide { flex: 1 1 40%; }
  .footer { flex-direction: column; align-items: flex-start; }
}
