/* ============================================================
   GAUTHAM — PORTFOLIO
   Warm paper, ink, one rust accent. Editorial, not templated.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --ink: #201f1c;
  --ink-2: #4a4741;
  --muted: #7c766a;
  --line: #e8e1d6;
  --line-strong: #d5ccbd;
  --accent: #b34a24;
  --accent-deep: #94391a;
  --on-accent: #ffffff;

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 10px;
  --container: 1120px;
  --nav-h: 76px;
  --nav-bg: rgba(250, 246, 240, 0.92);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg: #17150f;
  --surface: #211e18;
  --ink: #ece7dc;
  --ink-2: #c8c1b3;
  --muted: #8e8778;
  --line: rgba(236, 231, 220, 0.14);
  --line-strong: rgba(236, 231, 220, 0.3);
  --accent: #d16f3f;
  --accent-deep: #e08a5e;
  --nav-bg: rgba(23, 21, 15, 0.92);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
code { font-family: var(--font-mono); }
em { font-style: italic; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 300;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 4px;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Layout ---------- */
.container { width: min(var(--container), 90%); margin-inline: auto; }

.section { padding: clamp(48px, 6vw, 76px) 0; position: relative; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: height 0.35s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav.is-scrolled {
  height: 60px;
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(32, 31, 28, 0.02);
}

.js .nav { animation: rise-in 0.6s var(--ease) 0.05s forwards; }

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  transition: font-size 0.35s var(--ease);
}
.nav.is-scrolled .nav__logo { font-size: 1.15rem; }
.dot { color: var(--accent); }

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

.nav__link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 9px 14px;
  transition: color 0.2s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 5px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--ink); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.nav__cta { margin-left: 10px; }

.nav__right { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
}
.nav__burger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  margin-inline: auto;
  border-radius: 1px;
  transition: transform 0.35s var(--ease), opacity 0.25s ease;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 16px) 8vw 32px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.menu.is-open { opacity: 1; visibility: visible; }
body.menu-open, html.menu-open { overflow: hidden; }

.menu__links { display: flex; flex-direction: column; margin: auto 0; }
.menu__link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, padding-left 0.3s var(--ease);
}
.menu__link:hover { color: var(--accent); padding-left: 8px; }
.menu__link--cta { border-bottom: 0; color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(40px, 7vh, 72px)) 0 clamp(40px, 6vh, 60px);
  border-bottom: 1px solid var(--line);
}

.hero__eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  margin-top: clamp(14px, 2.5vh, 22px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 7.5vw, 5.9rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.hero__title em { font-style: italic; }

.hero__body {
  margin-top: clamp(28px, 5vh, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.hero__sub {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 30ch;
}

.hero__lede {
  margin-top: 16px;
  color: var(--muted);
  max-width: 58ch;
}

.hero__actions {
  margin-top: clamp(24px, 4vh, 34px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.hero__meta {
  border-top: 1px solid var(--line);
  padding-top: 4px;
}
.hero__meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.hero__meta-label { flex: none; color: var(--muted); }
.hero__meta-value {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  background: var(--bg);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  align-items: baseline;
  gap: 26px;
  padding-right: 26px;
}
.marquee__group span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-2);
  white-space: nowrap;
}
.marquee__group i {
  font-style: normal;
  color: var(--accent);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Section labels ---------- */
.section__label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section__label span {
  color: var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0;
  text-transform: none;
}
.section__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- About ---------- */
.about__statement {
  margin-top: clamp(24px, 3.5vw, 36px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 19ch;
  text-wrap: balance;
}

.about__layout {
  margin-top: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(28px, 4vw, 56px);
}

.about__text {
  grid-column: 1 / 8;
  color: var(--ink-2);
}
.about__text p + p { margin-top: 18px; }

.about__method {
  grid-column: 9 / 13;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.note__tag {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.method__item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.method__item:last-child { border-bottom: 0; padding-bottom: 2px; }
.method__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
}
.method__item strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
}
.method__item p { color: var(--muted); font-size: 0.95rem; margin-top: 2px; }

/* ---------- About: tools & stats ---------- */
.about__tools {
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.tools { color: var(--ink-2); font-size: 1rem; }

.stats {
  margin-top: clamp(28px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 18px 22px 18px 0; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 22px; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.stat__label {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.about__now {
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--ink-2);
  font-style: italic;
}
.about__now-num {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 500;
  padding: 13px 26px;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  min-height: 48px;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { padding: 10px 18px; font-size: 0.95rem; min-height: 40px; }
.btn--big { padding: 16px 32px; font-size: 1.05rem; min-height: 56px; }

.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--accent); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); background: transparent; }

.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
  padding: 6px 2px;
}
.link-arrow span { color: var(--accent); transition: transform 0.3s var(--ease); }
.link-arrow:hover span { transform: translateX(5px); }
.link-arrow::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 2px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s var(--ease);
}
.link-arrow:hover::after { transform: scaleX(1); }

/* ---------- Reveals & entrance (JS-gated) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--rd, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

.js .reveal-up {
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transform: translateY(20px);
  transition: clip-path 0.8s var(--ease), transform 0.8s var(--ease), opacity 0.8s var(--ease);
  transition-delay: var(--rd, 0s);
}
.js .reveal-up.is-visible { opacity: 1; clip-path: inset(0 0 0 0); transform: translateY(0); }

.work__row:nth-child(1), .proj-row:nth-child(1) { --rd: 0ms; }
.work__row:nth-child(2), .proj-row:nth-child(2) { --rd: 80ms; }
.work__row:nth-child(3), .proj-row:nth-child(3) { --rd: 160ms; }

.js .hero__eyebrow,
.js .hero__title,
.js .hero__sub,
.js .hero__lede,
.js .hero__actions,
.js .hero__meta {
  opacity: 0;
}
.js .hero__eyebrow { animation: rise-in 0.55s var(--ease) 0.1s forwards; }
.js .hero__title { animation: reveal-up 0.8s var(--ease) 0.16s forwards; }
.js .hero__sub { animation: rise-in 0.65s var(--ease) 0.3s forwards; }
.js .hero__lede { animation: rise-in 0.65s var(--ease) 0.4s forwards; }
.js .hero__actions { animation: rise-in 0.65s var(--ease) 0.5s forwards; }
.js .hero__meta { animation: rise-in 0.65s var(--ease) 0.58s forwards; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-up {
  from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(14px); }
  to { opacity: 1; clip-path: inset(0 0 0 0); transform: translateY(0); }
}

/* ---------- Work ---------- */
.work__title {
  margin-top: clamp(18px, 3vw, 30px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--ink);
  text-wrap: balance;
}

.work__rows { margin-top: clamp(24px, 3.5vw, 36px); border-bottom: 1px solid var(--line); }

.work__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 0.8fr) minmax(0, 1.2fr) 40px;
  gap: clamp(16px, 2.4vw, 40px);
  align-items: baseline;
  padding: clamp(20px, 3vw, 30px) 8px;
  border-top: 1px solid var(--line);
  transition: background-color 0.25s ease, padding-left 0.35s var(--ease);
}
.work__row:hover { background: var(--surface); padding-left: 18px; }

.work__index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--accent);
}
.work__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  transition: transform 0.4s var(--ease), color 0.25s ease;
}
.work__row:hover .work__name { transform: translateX(10px); color: var(--accent); }
.work__desc { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.work__arrow {
  font-size: 1.2rem;
  color: var(--accent);
  opacity: 0;
  transform: translate(-8px, 6px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}
.work__row:hover .work__arrow { opacity: 1; transform: translate(0, 0); }

.work__note {
  margin-top: clamp(20px, 3vw, 28px);
  color: var(--muted);
  font-style: italic;
  font-size: 1.05rem;
  max-width: 46ch;
}

/* ---------- Projects ---------- */
.projects__list { margin-top: clamp(24px, 3.5vw, 36px); border-bottom: 1px solid var(--line); }

.proj-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 116px 36px;
  gap: clamp(16px, 2.4vw, 32px);
  align-items: center;
  padding: clamp(18px, 2.6vw, 28px) 8px;
  border-top: 1px solid var(--line);
  transition: background-color 0.25s ease, padding-left 0.35s var(--ease);
}
.proj-row:hover { background: var(--surface); padding-left: 18px; }

.proj-row__index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent);
}
.proj-row__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.proj-row__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  transition: transform 0.4s var(--ease), color 0.25s ease;
}
.proj-row:hover .proj-row__name { transform: translateX(8px); color: var(--accent); }
.proj-row__meta {
  margin-top: 3px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.proj-row__handle { margin-top: 5px; }
.proj-row__handle code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.proj-row__thumb {
  width: 116px; height: 74px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.proj-row__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.proj-row:hover .proj-row__thumb img { transform: scale(1.06); }
.proj-row__arrow {
  color: var(--accent);
  font-size: 1.2rem;
  opacity: 0;
  transform: translate(-8px, 6px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}
.proj-row:hover .proj-row__arrow { opacity: 1; transform: translate(0, 0); }

/* ---------- Profiles ---------- */
.profiles {
  margin-top: clamp(24px, 3.5vw, 36px);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 22px;
}
.profiles__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.profiles a {
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s ease;
}
.profiles a:hover { color: var(--accent); }

/* ---------- Hire band ---------- */
.hire { border-top: 1px solid var(--line); }
.hire__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.hire__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hire__sub {
  margin-top: 6px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- Contact ---------- */
.contact { border-top: 1px solid var(--line); }

.contact__title {
  margin-top: clamp(22px, 3.5vw, 32px);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 14ch;
  text-wrap: balance;
}

.contact__sub {
  margin-top: clamp(16px, 2.5vw, 24px);
  max-width: 52ch;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
}

.contact__actions {
  margin-top: clamp(22px, 3.5vw, 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
}

.contact__mail {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.contact__mail span { color: var(--accent); transition: transform 0.3s var(--ease); }
.contact__mail:hover span { transform: translateX(5px); }
.contact__mail:hover { text-decoration: underline; text-underline-offset: 6px; }

.contact__meta {
  margin-top: 24px;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 24px 0;
}
.footer__brand { font-size: 0.95rem; color: var(--ink-2); }
.footer__links {
  display: flex;
  gap: 14px;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.footer__links a { transition: color 0.2s ease; }
.footer__links a:hover { color: var(--accent); }
.footer__links span { color: var(--line-strong); }
.footer__colophon {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  max-width: 36ch;
}

/* ============================================================
   PRICING PAGE
   ============================================================ */
.pricing-hero {
  padding: calc(var(--nav-h) + clamp(40px, 7vh, 72px)) 0 clamp(36px, 5vh, 56px);
  border-bottom: 1px solid var(--line);
}

.pricing-title {
  margin-top: clamp(14px, 2.5vh, 20px);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

.pricing-sub {
  margin-top: 18px;
  max-width: 52ch;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 28px);
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 3vw, 34px);
}
.plan--featured { border-color: var(--accent); }

.plan__badge {
  position: absolute;
  top: -13px; left: 26px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
}

.plan h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--ink);
}

.plan__price {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 2.7rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.plan__desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.plan__divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

.plan__features { list-style: none; flex-grow: 1; }
.plan__features li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.plan__features li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.plan__features strong { font-weight: 600; color: var(--ink); }

.plan__btn { margin-top: 26px; width: 100%; }

/* ---------- Booking ---------- */
.booking { border-top: 1px solid var(--line); }

.booking__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.booking__info h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}

.booking__info > p {
  margin-top: 12px;
  max-width: 46ch;
  color: var(--ink-2);
}

.whatsapp-btn { margin-top: 26px; }
.whatsapp-btn svg { width: 18px; height: 18px; }

.booking__form {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237c766a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 1rem;
}

.booking__form .btn { justify-self: start; }

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .booking__grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.page { min-height: 100vh; display: flex; flex-direction: column; }

.page__header {
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  background: var(--bg);
}
.page__header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.page__back {
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.2s ease;
}
.page__back:hover { color: var(--accent); }

.page__main { flex: 1; padding: 56px 0 90px; }

.legal { max-width: 740px; }
.legal__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--ink);
  text-wrap: balance;
}
.legal__updated {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
}

.legal__section { margin-top: 38px; }
.legal__section h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
}
.legal__section p { color: var(--ink-2); margin-bottom: 12px; }
.legal__section ul {
  list-style: disc;
  padding-left: 22px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.legal__section li { margin: 6px 0; }
.legal__section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page__footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}
.page__footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}
.page__footer-inner a { color: var(--muted); transition: color 0.2s ease; }
.page__footer-inner a:hover { color: var(--accent); }

/* ============================================================
   RESUME PAGE
   ============================================================ */
.resume { background: var(--bg); }

.resume__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 860px;
  margin-inline: auto;
  padding: 24px 16px 0;
}

.resume__sheet {
  max-width: 860px;
  margin: 20px auto 64px;
  padding: clamp(32px, 5vw, 52px);
  background: #ffffff;
  color: #1c1b19;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(32, 31, 28, 0.1);
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.55;
}

.r-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #1c1b19;
}
.r-name em { font-style: italic; }
.r-title {
  margin-top: 4px;
  font-size: 1.02rem;
  font-weight: 600;
  color: #4a4741;
}
.r-contact, .r-links {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #6b665c;
}
.r-links { word-break: break-word; }

.r-sec { margin-top: 22px; }
.r-sec h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1c1b19;
  border-bottom: 1px solid #ddd5c8;
  padding-bottom: 4px;
  margin-bottom: 10px;
}
.r-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.r-row h3 { font-size: 1rem; font-weight: 600; color: #1c1b19; }
.r-sub { font-size: 0.85rem; color: #6b665c; margin-top: 1px; }
.r-date {
  flex: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: #6b665c;
  white-space: nowrap;
}
.r-list { list-style: disc; padding-left: 20px; margin-top: 8px; }
.r-list li { margin: 4px 0; font-size: 0.92rem; color: #33312d; }
.r-note {
  margin-top: 8px;
  font-size: 0.9rem;
  font-style: italic;
  color: #6b665c;
}
.r-skills { list-style: none; margin-top: 8px; }
.r-skills li { margin: 4px 0; font-size: 0.92rem; color: #33312d; }

@media (max-width: 560px) {
  .r-row { flex-direction: column; gap: 2px; }
}

@media print {
  .resume { background: #ffffff; }
  .resume__toolbar { display: none; }
  .resume__sheet {
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  @page { size: A4; margin: 12mm 14mm; }
}

/* ============================================================
   AI CHAT WIDGET
   ============================================================ */
.chat-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(32, 31, 28, 0.22);
  transition: transform 0.2s var(--ease), background-color 0.2s ease, box-shadow 0.2s ease;
}
.chat-toggle:hover { transform: translateY(-2px); background: var(--accent); }
.chat-toggle svg { width: 18px; height: 18px; }
.chat-toggle[aria-expanded="true"] { background: var(--accent); }

.chat-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 96;
  width: min(380px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 44px));
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(32, 31, 28, 0.24);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s var(--ease), visibility 0.25s ease;
}
.chat-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.chat-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.chat-panel__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}
.chat-panel__status {
  display: block;
  margin-top: 1px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.chat-panel__close {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.chat-panel__close:hover { color: var(--accent); border-color: var(--accent); }

.chat-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  max-height: 380px;
}

.chat-msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg--bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: var(--ink-2);
}
.chat-msg--user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--bg);
  border-bottom-right-radius: 4px;
}
.chat-typing { color: var(--muted); font-style: italic; }

.chat-panel__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px 0;
  background: var(--surface);
}
.chat-prompt {
  font: inherit;
  font-size: 0.8rem;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 12px;
  text-align: left;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.chat-prompt:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--surface);
}

.chat-panel__form {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.chat-panel__form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 16px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.chat-panel__form input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.chat-panel__send {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.chat-panel__send:hover { background: var(--accent); transform: translateY(-1px); }
.chat-panel__send:disabled { opacity: 0.45; cursor: default; transform: none; }

@media (max-width: 520px) {
  .chat-toggle { right: 16px; bottom: 16px; }
  .chat-panel {
    right: 16px;
    bottom: 16px;
    max-height: calc(100vh - 32px);
  }
  .chat-panel__body { max-height: 55vh; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal, .js .reveal-up { opacity: 1; transform: none; clip-path: none; }
  .js .nav,
  .js .hero__eyebrow,
  .js .hero__title,
  .js .hero__sub,
  .js .hero__lede,
  .js .hero__actions,
  .js .hero__meta {
    animation: none !important;
    opacity: 1 !important;
  }
  .marquee__track { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .about__text { grid-column: 1 / 13; }
  .about__method { grid-column: 1 / 13; max-width: 560px; }
  .work__row { grid-template-columns: 56px minmax(0, 1fr); }
  .work__desc { grid-column: 2 / 3; }
  .work__arrow { display: none; }
  .proj-row { grid-template-columns: 48px minmax(0, 1fr) 96px 28px; }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .hero__body { grid-template-columns: 1fr; gap: 32px; }
  .proj-row { grid-template-columns: 44px minmax(0, 1fr) 84px 26px; }
}

@media (max-width: 720px) {
  .work__row { grid-template-columns: 40px minmax(0, 1fr); gap: 10px 14px; padding: 20px 4px; }
  .proj-row { grid-template-columns: 40px minmax(0, 1fr) 26px; gap: 10px 14px; padding: 20px 4px; }
  .proj-row__thumb { display: none; }
  .hero__meta-row { font-size: 0.9rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .contact__actions { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { width: 88%; }
  .nav__logo { font-size: 1.15rem; }
  .hero__title { font-size: clamp(2.3rem, 10.5vw, 3.2rem); }
  .hero__actions, .contact__actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero__actions .btn, .contact__actions .btn { width: 100%; }
  .link-arrow, .contact__mail { align-self: flex-start; }
  .work__name, .proj-row__name { font-size: 1.5rem; }
}

/* ============================================================
   ADDITIONS — case studies, FAQ, 404
   ============================================================ */

/* ---------- Case studies page ---------- */
.projects__note {
  margin-top: clamp(20px, 3vw, 28px);
}

.cs {
  border-top: 1px solid var(--line);
}
.cs__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 8px 0 28px;
}
.cs__index {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
}
.cs__name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.cs__tag {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 4px 0 0;
}
.cs__live {
  margin-left: auto;
}
.cs__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}
.cs__main h3 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 26px 0 10px;
}
.cs__main h3:first-child { margin-top: 0; }
.cs__main p {
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0;
}
.cs__aside {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  padding: 24px;
  align-self: start;
}
.cs__aside h3 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.cs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.cs__list li {
  color: var(--ink-2);
  font-size: 0.95rem;
  padding-left: 20px;
  position: relative;
}
.cs__list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- FAQ (pricing) ---------- */
.faq__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 16px 0 40px;
}
.faq__list {
  max-width: 760px;
  display: grid;
  gap: 12px;
}
.faq__item {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}
.faq__item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item > p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--ink-2);
  line-height: 1.65;
}

/* ---------- 404 ---------- */
.nf {
  min-height: 62vh;
  display: flex;
  align-items: center;
}
.nf__inner {
  padding: 60px 0;
  max-width: 640px;
}
.nf__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin: 14px 0 16px;
}
.nf__sub {
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 28px;
}
.nf__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 720px) {
  .cs__grid { grid-template-columns: 1fr; gap: 28px; }
  .cs__live { margin-left: 0; }
}

/* ---------- Contact socials ---------- */
.contact__socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: 32px;
}
.contact__socials-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact__social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  transition: color 0.2s ease;
}
.contact__social svg {
  width: 17px;
  height: 17px;
  color: var(--ink-2);
  transition: color 0.2s ease;
}
.contact__social:hover { color: var(--accent); }
.contact__social:hover svg { color: var(--accent); }
