:root {
  --bg: #f5f0e8;
  --surface: #fffaf4;
  --surface-2: #e9e7f5;
  --ink: #1b2942;
  --muted: #646b78;
  --line: rgba(27, 41, 66, 0.14);
  --accent: #b94735;
  --accent-ink: #fffaf4;
  --secondary: #5d66bd;
  --feature: #dfe1fb;
  --feature-muted: #4f5972;
  --deep: #203252;
  --warm: #efa38f;
  --shadow: 0 24px 80px rgba(49, 58, 84, 0.15);
  --page: min(1180px, calc(100vw - 48px));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 99;
  padding: 10px 14px;
  color: #fffaf4;
  background: var(--accent);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  width: var(--page);
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  text-decoration: none;
}

.wordmark > span:first-child {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 50%;
  font-family: "DM Mono", monospace;
  font-size: 13px;
}

.wordmark-copy { letter-spacing: -0.02em; }

nav { display: flex; align-items: center; gap: 30px; }
nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}
nav a:hover { color: var(--ink); }

.hero {
  position: relative;
  width: var(--page);
  min-height: calc(100vh - 92px);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 124px) 0 54px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.72fr);
  align-content: center;
  gap: 64px;
}

.hero-copy { position: relative; z-index: 2; }

.eyebrow,
.availability {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 28px;
  height: 2px;
  background: var(--accent);
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 850px;
  margin: 26px 0 30px;
  font-size: clamp(50px, 7.2vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h1 em, h2 em {
  color: var(--accent);
  font-family: Georgia, serif;
  font-weight: 400;
}

.hero-intro {
  max-width: 665px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.65;
}

.hero-actions { display: flex; align-items: center; gap: 28px; }

.button {
  display: inline-flex;
  min-height: 56px;
  padding: 0 22px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button-primary { color: var(--accent-ink); background: var(--accent); }
.button-dark { color: #fffaf4; background: var(--deep); }
.button-light { color: var(--deep); background: #fffaf4; }

.text-link {
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 7px;
  text-decoration-color: var(--line);
}

.signal-card {
  position: relative;
  z-index: 2;
  min-height: 430px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #fffaf4;
  background: linear-gradient(145deg, rgba(255,255,255,.08), transparent 70%), var(--deep);
  border: 1px solid rgba(32, 50, 82, .2);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.signal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  opacity: .3;
}

.signal-topline { display: flex; justify-content: space-between; align-items: center; }
.signal-topline .mono { color: rgba(255, 250, 244, .68); }
.mono { font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .08em; }

.pulse-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(185, 71, 53, .18);
}

.portrait-frame {
  position: relative;
  z-index: 2;
  height: 292px;
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.signal-card > p {
  position: relative;
  z-index: 2;
  max-width: 290px;
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.signal-card .signal-tags span {
  color: rgba(255, 250, 244, .78);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.18);
}

.signal-tags, .project-chips { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 7px; }
.signal-tags span, .project-chips span {
  padding: 7px 9px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.hero-stats {
  grid-column: 1 / -1;
  padding-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.hero-stats > div { display: flex; align-items: baseline; gap: 12px; }
.hero-stats strong { font-size: 21px; letter-spacing: -0.04em; }
.hero-stats span { color: var(--muted); font-size: 12px; text-transform: uppercase; }

.hero-ambient { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.ambient-one { width: 250px; height: 250px; top: 20%; right: 18%; background: rgba(93,102,189,.15); }
.ambient-two { width: 200px; height: 200px; bottom: 10%; left: 10%; background: rgba(185,71,53,.12); }

.section-shell { width: var(--page); margin: 0 auto; padding: 130px 0; }

.projects { border-top: 1px solid var(--line); }

.section-heading {
  margin-bottom: 54px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: end;
  gap: 40px;
}

.section-index { display: block; margin-bottom: 22px; color: var(--accent); text-transform: uppercase; }

.section-heading h2,
.profile-intro h2 {
  margin: 0;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.section-heading > p,
.profile-intro > p {
  max-width: 480px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.project-card {
  min-height: 440px;
  padding: clamp(26px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 220ms ease, border-color 220ms ease;
}

.project-card:hover { transform: translateY(-4px); border-color: rgba(93,102,189,.55); }
.project-featured { grid-column: 1 / -1; min-height: 480px; background: var(--feature); color: var(--ink); }
.project-featured .project-meta,
.project-featured p,
.project-featured .result-label { color: var(--feature-muted); }
.project-featured .project-chips span { color: var(--ink); border-color: rgba(27,41,66,.24); background: rgba(255,255,255,.2); }
.project-wide { grid-column: 1 / -1; min-height: 400px; background: var(--surface-2); }
.project-wide h3 { margin-top: 0; }

.project-meta { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.project-content { margin: auto 0; display: grid; grid-template-columns: 1.2fr .8fr; gap: 72px; align-items: end; }
.project-card h3 { margin: 48px 0 22px; font-size: clamp(30px, 3.5vw, 52px); line-height: 1.05; letter-spacing: -.05em; }
.project-featured h3 { margin-top: 0; font-size: clamp(40px, 5vw, 72px); }
.project-card p { max-width: 680px; color: var(--muted); line-height: 1.65; }
.project-featured p { max-width: 620px; }
.project-result { padding-left: 24px; border-left: 1px solid rgba(27,41,66,.26); }
.project-result span { display: block; margin-bottom: 12px; }
.project-result strong { display: block; font-size: 19px; line-height: 1.45; }
.case-shift { margin: auto 0 28px; padding: 18px 20px; background: var(--surface-2); border-radius: 6px; }
.case-shift span { display: block; margin-bottom: 9px; color: var(--secondary); }
.case-shift strong { display: block; font-size: 16px; line-height: 1.5; }
.metric { margin: auto 0 28px; display: flex; flex-direction: column; }
.metric strong { color: var(--accent); font-size: 34px; letter-spacing: -.04em; }
.metric span { color: var(--muted); font-size: 12px; }
.metric-split { flex-direction: row; align-items: center; gap: 14px; }
.metric-split strong { font-size: 58px; }

.profile { border-top: 1px solid var(--line); }
.profile-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; }
.profile-intro > p { margin: 28px 0; }
.availability { padding-top: 24px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.5; }

.profile-panels { display: grid; gap: 12px; }
.profile-panel { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.profile-panel > .mono { color: var(--muted); }
.profile-panel ul { margin: 24px 0 0; padding: 0; list-style: none; }
.profile-panel li { padding: 14px 0; display: flex; gap: 18px; font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--line); }
.profile-panel li:last-child { border: 0; padding-bottom: 0; }
.profile-panel li span { color: var(--accent); font-family: "DM Mono", monospace; font-size: 11px; font-weight: 400; }

.timeline-item { margin-top: 25px; display: grid; grid-template-columns: 100px 1fr; gap: 20px; }
.timeline-item time { color: var(--accent); font-family: "DM Mono", monospace; font-size: 10px; }
.timeline-item div { display: flex; flex-direction: column; gap: 4px; }
.timeline-item strong { font-size: 15px; }
.timeline-item span { color: var(--muted); font-size: 12px; }

.experience-block {
  margin-top: 100px;
  padding-top: 100px;
  border-top: 1px solid var(--line);
}

.experience-heading {
  margin-bottom: 42px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.experience-heading .section-index { margin-bottom: 0; }

.experience-heading h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(38px, 4.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -.05em;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.experience-card {
  min-height: 350px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.experience-card:nth-child(2) { background: var(--surface-2); }

.experience-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: .06em;
}

.experience-card h3 {
  margin: 52px 0 22px;
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.experience-card p {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.closing-card {
  margin-top: 90px;
  padding: clamp(30px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  color: #fffaf4;
  background: var(--accent);
  border-radius: 8px;
}
.closing-card .mono { display: block; margin-bottom: 12px; opacity: .65; }
.closing-card h2 { margin: 0; font-size: clamp(30px, 4vw, 54px); letter-spacing: -.05em; }

.closing-copy { max-width: 590px; }

.contact-links {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  color: rgba(255, 250, 244, .88);
  font-size: 14px;
}

.contact-links a { text-underline-offset: 4px; }

.closing-actions {
  min-width: 245px;
  display: grid;
  gap: 10px;
}

footer {
  width: var(--page);
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 650ms ease, transform 650ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  :root { --page: min(100% - 32px, 720px); }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 80px; }
  .signal-card { min-height: 390px; }
  .section-heading, .profile-grid { grid-template-columns: 1fr; gap: 32px; }
  .project-content { grid-template-columns: 1fr; gap: 32px; margin: 70px 0 40px; }
  .profile-grid { gap: 54px; }
  .experience-heading { align-items: flex-start; flex-direction: column; }
  .experience-grid { grid-template-columns: 1fr; }
  .experience-card { min-height: 280px; }
  .section-shell { padding: 100px 0; }
}

@media (max-width: 640px) {
  .site-header { height: 76px; }
  .wordmark-copy, nav a { display: none; }
  nav { gap: 12px; }
  .hero { min-height: auto; padding: 70px 0 36px; }
  h1 { font-size: clamp(44px, 14vw, 64px); }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 20px; }
  .button { width: 100%; }
  .text-link { text-align: center; }
  .hero-stats { grid-template-columns: 1fr; gap: 18px; }
  .signal-card { min-height: 360px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-featured, .project-wide { grid-column: auto; }
  .project-meta { flex-direction: column; gap: 8px; }
  .project-card, .project-featured { min-height: 0; }
  .project-card h3 { margin-top: 54px; }
  .project-featured h3, .project-wide h3 { margin-top: 0; }
  .project-content { margin: 56px 0 30px; }
  .experience-block { margin-top: 75px; padding-top: 75px; }
  .closing-card { align-items: stretch; flex-direction: column; }
  .closing-actions { min-width: 0; }
  footer { flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
