/* =========================================================
   Eshan Deane - Portfolio
   Light, editorial, content-first. Whitespace over lines,
   borderless tiles, centered intros, quiet motion.
   Near-white bg, near-black text, muted slate-blue accent.
   ========================================================= */

:root {
  --bg: #fbfbfd;
  --bg-tint: #f2f3f6;
  --bg-tint-2: #eceef2;
  --ink: #0f1420;
  --ink-soft: #3a4250;
  --muted: #6a7382;
  --muted-2: #8b94a3;
  --border: #e6e8ee;
  --border-strong: #d5d9e2;
  --accent: #1f3a66;        /* deep navy */
  --accent-hover: #16294a;
  --accent-tint: #e9edf5;
  --accent-line: #c5cfdf;
  --brass: #a07c2c;         /* reserved for stat numerals */
  --pos: #2f6f4f;
  --maxw: 1080px;
  --radius: 24px;
  --radius-sm: 12px;
  --shadow-lift: 0 24px 48px -28px rgba(15, 20, 32, 0.3), 0 6px 16px -8px rgba(15, 20, 32, 0.08);
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", "Menlo", "Cascadia Code", "Roboto Mono", monospace;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "DM Serif Display", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }

/* anchor targets clear the sticky nav */
section[id] { scroll-margin-top: 76px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.022em; color: var(--ink); font-weight: 400; margin: 0; }
h1, h2 { font-family: var(--serif); }
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 620; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
  font-weight: 500;
}

.lede { font-size: 1.18rem; color: var(--ink-soft); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(15, 20, 32, 0.06);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 650;
  font-size: 0.98rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color .18s ease;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 6px 14px; cursor: pointer;
  color: var(--ink);
  font-family: var(--mono); font-size: 0.76rem;
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 64px;
  justify-content: space-between;
}
.hero-text { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.hero-photo { flex-shrink: 0; order: 2; }
.hero-photo img {
  width: 200px; height: 200px; object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 10px 30px -14px rgba(15, 20, 32, 0.3);
}
.hero .name { font-size: 0.78rem; }
.hero h1 { max-width: 19ch; margin: 0 0 20px; }
.hero .accent-text { color: var(--accent); }
.hero .positioning {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 24px;
}
.hero .meta-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px;
  font-family: var(--mono); font-size: 0.82rem; color: var(--muted);
  margin-bottom: 32px;
}
.hero .meta-row span { display: inline-flex; align-items: center; gap: 8px; }
.hero .meta-row .sep { color: var(--accent-line); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.hero-text > * { animation: rise .6s cubic-bezier(.2, .7, .3, 1) both; }
.hero-text > *:nth-child(2) { animation-delay: .07s; }
.hero-text > *:nth-child(3) { animation-delay: .14s; }
.hero-text > *:nth-child(4) { animation-delay: .21s; }
.hero-photo { animation: rise .6s both; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.94rem; font-weight: 550;
  padding: 12px 26px; border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent); color: #fff;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover {
  background: var(--accent-hover); border-color: var(--accent-hover);
  color: #fff; text-decoration: none;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent-line);
}
.btn-ghost:hover { background: var(--accent-tint); color: var(--accent-hover); border-color: var(--accent-line); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; }

/* ---------- Stat band (bento tiles) ---------- */
.statband { padding: 8px 0 32px; }
.statgrid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat {
  background: var(--bg-tint);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.stat .num {
  font-family: var(--sans);
  font-size: 2.4rem; font-weight: 650; letter-spacing: -0.03em;
  color: var(--accent); line-height: 1.05;
  display: block; margin-bottom: 10px;
}
.stat .lbl { font-size: 0.82rem; color: var(--muted); line-height: 1.45; display: block; }
a.stat {
  display: block;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease, background .25s ease;
}
a.stat:hover {
  background: #fff;
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
  text-decoration: none;
}
.stat .asof {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: block;
  margin: -2px 0 8px;
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head {
  margin: 0 auto 56px;
  max-width: 64ch;
  text-align: center;
}
.section-head h2 { margin-bottom: 16px; }
.section-head p { color: var(--muted); margin: 0 auto; font-size: 1.06rem; max-width: 52ch; }
.divider { display: none; }

/* ---------- "How I think" ---------- */
.think { text-align: center; }
.think .eyebrow { text-align: center; }
.think .quote {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 400; letter-spacing: -0.02em;
  color: var(--ink); line-height: 1.25; max-width: 28ch;
  margin: 0 auto 22px;
}
.think .quote .step { color: var(--accent); }
.think p { max-width: 56ch; margin-left: auto; margin-right: auto; color: var(--muted); }
.think .steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 48px;
  text-align: left;
}
.think .steps .step-card {
  background: var(--bg-tint);
  border-radius: var(--radius);
  padding: 28px;
}
.think .steps .step-card .k {
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px;
}
.think .steps .step-card .t { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.think .steps .step-card .d { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ---------- Case cards ---------- */
.cases { display: grid; gap: 16px; }
.case-card {
  display: block;
  background: var(--bg-tint);
  border-radius: var(--radius);
  padding: 40px 44px;
  transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease, background .25s ease;
}
.case-card:hover {
  text-decoration: none;
  background: #fff;
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}
.case-card .idx {
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent);
  letter-spacing: 0.12em;
}
.case-card h3 {
  font-family: var(--serif);
  font-size: 1.65rem; margin: 12px 0 12px; color: var(--ink);
  letter-spacing: -0.015em;
}
.case-card p { color: var(--ink-soft); margin-bottom: 22px; max-width: 72ch; }
.case-card .metrics {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px;
}
.chip {
  font-family: var(--mono); font-size: 0.78rem;
  background: #fff; color: var(--accent);
  border-radius: 999px; padding: 6px 14px; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 20, 32, 0.06);
}
.chip-plain {
  font-family: var(--mono); font-size: 0.78rem;
  background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 6px 14px;
  box-shadow: 0 1px 2px rgba(15, 20, 32, 0.06);
}
.case-card .more {
  font-size: 0.92rem; font-weight: 550; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.case-card:hover .more .arr { transform: translateX(4px); }
.more .arr { transition: transform .2s ease; }

/* ---------- AI feature grid ---------- */
.ai-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ai-item {
  background: var(--bg-tint);
  border-radius: var(--radius);
  padding: 34px 38px;
  transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease, background .25s ease;
}
.ai-item:hover {
  background: #fff;
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}
.ai-item.full { grid-column: 1 / -1; }
.ai-item .h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.ai-item .h .name { font-weight: 620; color: var(--ink); font-size: 1.12rem; }
.ai-item .h .tag {
  font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  background: #fff; border-radius: 999px; padding: 4px 12px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 20, 32, 0.06);
}
.ai-item p { font-size: 0.96rem; margin: 0; color: var(--ink-soft); }
.ai-item .save {
  margin-top: 16px;
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--accent);
}

/* ---------- Domains / transfer ---------- */
.domain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.domain-card {
  background: var(--bg-tint);
  border-radius: var(--radius);
  padding: 30px 32px;
}
.domain-card .target {
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent);
  letter-spacing: 0.08em; margin-bottom: 10px; text-transform: uppercase;
}
.domain-card .t { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.domain-card p { font-size: 0.92rem; margin: 0; color: var(--muted); }

.tag-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }

/* ---------- Background list ---------- */
.bg-list { display: grid; gap: 0; }
.bg-row {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  padding: 28px 0; border-bottom: 1px solid var(--border);
}
.bg-row:first-child { border-top: 1px solid var(--border); }
.bg-row .when { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 4px; }
.bg-row .what h4 { font-size: 1.06rem; margin-bottom: 6px; }
.bg-row .what p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Case study page ---------- */
.case-hero { padding: 80px 0 56px; }
.back-link {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 32px;
}
.back-link:hover { color: var(--accent); text-decoration: none; }
.case-hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.1rem); max-width: 24ch; margin-bottom: 22px; }
.case-hero .sub { font-size: 1.16rem; color: var(--ink-soft); max-width: 58ch; }

.result-band { padding-bottom: 16px; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.result-grid .r {
  background: var(--bg-tint);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.result-grid .r .num {
  font-family: var(--serif);
  font-size: 1.95rem; font-weight: 400; letter-spacing: -0.02em; color: var(--brass);
  display: block; margin-bottom: 8px;
}
.result-grid .r .num .from { color: var(--muted-2); }
.result-grid .r .lbl { font-size: 0.84rem; color: var(--muted); }

.prose { padding: 64px 0 80px; }
.prose h2 { margin: 52px 0 16px; font-size: 1.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 32px 0 10px; font-size: 1.1rem; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.prose p { max-width: 70ch; }
.prose ul { margin: 0 0 1.2em; padding-left: 0; list-style: none; max-width: 70ch; }
.prose ul li {
  position: relative; padding-left: 22px; margin-bottom: 10px; color: var(--ink-soft);
}
.prose ul li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-line);
}
.prose blockquote {
  margin: 26px 0; padding: 20px 26px;
  background: var(--bg-tint); border-radius: var(--radius-sm);
  color: var(--ink-soft); font-style: normal;
}
.prose blockquote p { margin: 0; }
.prose blockquote cite { display: block; margin-top: 10px; font-style: normal; font-size: 0.85rem; color: var(--muted); font-family: var(--mono); }

.callout {
  background: var(--accent-tint);
  border-radius: var(--radius);
  padding: 26px 30px; margin: 30px 0;
}
.callout .k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.callout p { margin: 0; color: var(--ink-soft); }

/* data table */
.dtable { width: 100%; border-collapse: collapse; margin: 18px 0 30px; font-size: 0.94rem; }
.dtable th, .dtable td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--border); }
.dtable th { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.dtable td { color: var(--ink-soft); }
.dtable td:first-child { color: var(--ink); font-weight: 500; }

.stack-list { display: flex; flex-wrap: wrap; gap: 9px; margin: 6px 0 26px; }

/* next-case nav */
.case-next { padding: 0 0 88px; }
.case-next .lbl { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.case-next a { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; color: var(--ink); letter-spacing: -0.015em; display: inline-flex; align-items: center; gap: 10px; }
.case-next a:hover { color: var(--accent); text-decoration: none; }

/* ---------- About ---------- */
.signature {
  background: var(--bg-tint); border-radius: var(--radius);
  padding: 26px 32px; margin: 32px 0;
}
.signature .q { font-family: var(--serif); font-size: 1.45rem; font-weight: 400; color: var(--ink); letter-spacing: -0.01em; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 36px 0; }
.contact-card {
  background: var(--bg-tint);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s ease, background .25s ease;
}
.contact-card:hover {
  text-decoration: none;
  background: #fff;
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}
.contact-card .k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.contact-card .v { font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.contact-card:hover .v { color: var(--accent); }

.open-banner {
  background: var(--accent-tint);
  border-radius: var(--radius);
  padding: 26px 30px; margin: 8px 0 0;
  display: flex; align-items: center; gap: 14px;
}
.open-banner .pulse {
  width: 10px; height: 10px; border-radius: 50%; background: var(--pos);
  flex: none; box-shadow: 0 0 0 4px rgba(47, 111, 79, 0.14);
}
.open-banner p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }
.open-banner strong { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { background: var(--bg-tint); padding: 48px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer .brand-blk .n { font-weight: 650; color: var(--ink); margin-bottom: 4px; font-size: 0.95rem; }
.footer .brand-blk .t { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.footer .links { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: flex-start; }
.footer .links a { color: var(--ink-soft); font-size: 0.86rem; }
.footer .links a:hover { color: var(--accent); }
.footer .fine { font-family: var(--mono); font-size: 0.74rem; color: var(--muted-2); margin-top: 26px; }

/* ---------- Scroll reveal (progressive enhancement) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .6, .25, 1);
}
html.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 56px; left: 0; right: 0;
    background: rgba(251, 251, 253, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
  .nav-links.open a { padding: 13px 28px; width: 100%; border-top: 1px solid var(--border); }
  .nav-toggle { display: inline-flex; }
  .statgrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .think .steps { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr; }
  .domain-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .bg-row { grid-template-columns: 1fr; gap: 6px; }
  .hero { padding: 48px 0 40px; }
  .hero-inner { flex-direction: column-reverse; text-align: center; gap: 28px; justify-content: center; }
  .hero-text { align-items: center; }
  .hero .positioning { margin: 0 auto 24px; }
  .btn-row { justify-content: center; }
  .hero-photo { order: 0; }
  .hero-photo img { width: 140px; height: 140px; }
  .case-card { padding: 30px 26px; }
  .ai-item { padding: 26px 24px; }
  section { padding: 68px 0; }
}

@media (max-width: 480px) {
  .statgrid { grid-template-columns: 1fr; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
