/* ============================================================
   dhinic.com — design tokens, themes
   ============================================================ */
:root {
  --bg: #F7F5F1;
  --bg-2: #EFEBE2;
  --paper: #FFFFFF;
  --ink: #14181C;
  --ink-2: #2A2F35;
  --muted: #6F7681;
  --rule: #E5E1D8;
  --accent: #C2693B;
  --accent-2: #E89875;
  --accent-soft: #F4E5DA;
  --shadow: 0 30px 80px -30px rgba(20, 24, 28, .25);
  --display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

[data-theme="dark"] {
  --bg: #0B0C0F;
  --bg-2: #14171C;
  --paper: #14171C;
  --ink: #F4F1EA;
  --ink-2: #C9C5BC;
  --muted: #7C8390;
  --rule: #20242A;
  --accent: #E89875;
  --accent-2: #FFB58C;
  --accent-soft: rgba(232, 152, 117, 0.10);
  --shadow: 0 40px 100px -40px rgba(0, 0, 0, .65);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiaso  sed;
  text-rendering: optimizeLegibility;
}

html { transition: background-color .6s var(--ease-in-out), color .6s var(--ease-in-out); }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

em { font-style: normal; color: var(--accent); font-weight: 500; }

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

/* ============================================================
   atmosphere: grain + blob
   ============================================================ */
/* No mix-blend-mode: a blended full-screen overlay forces a viewport-wide
   recomposite on every scroll frame. Plain low-opacity overlay is free. */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
[data-theme="dark"] .grain { opacity: .06; }

.blob {
  position: fixed;
  top: -20vmax;
  left: -20vmax;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(closest-side, var(--accent) 0%, transparent 70%);
  filter: blur(80px);
  opacity: .35;
  transform: translate3d(var(--bx, 0), var(--by, 0), 0);
  transition: opacity .6s var(--ease-out);
  will-change: transform;
}
[data-theme="dark"] .blob { opacity: .25; }

/* ============================================================
   custom cursor
   ============================================================ */
.cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity .3s var(--ease-out);
}
.cursor.is-ready { opacity: 1; }
.cursor-dot, .cursor-ring {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: border-color .25s, background-color .25s;
}
.cursor.is-hover .cursor-ring { background: rgba(255,255,255,.08); }
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
  body { cursor: auto; }
}
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button { cursor: none; }
}

/* ============================================================
   scroll progress
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 100;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: left center;
  will-change: width;
}

/* ============================================================
   nav
   ============================================================ */
.nav {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  width: min(1200px, calc(100% - 32px));
  padding: 10px 14px 10px 18px;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border: 1px solid var(--rule);
  border-radius: 999px;
  z-index: 50;
  transition: border-color .3s, background-color .3s;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -.2px;
}
.brand-mark {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
}
.brand-name { font-size: 14px; }
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav-actions { display: flex; gap: 8px; }
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  color: var(--ink);
  transition: border-color .2s, background-color .2s, color .2s;
}
.theme-toggle:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 720px) {
  .nav { grid-template-columns: auto auto; gap: 12px; }
  .nav-links { display: none; }
  .brand-name { display: none; }
}

/* ============================================================
   layout
   ============================================================ */
main { position: relative; z-index: 1; padding-bottom: 8vh; }

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14vh clamp(20px, 5vw, 60px) 6vh;
}

.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: baseline;
  margin-bottom: 8vh;
}
.section-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -1.2px;
  margin: 0;
  max-width: 18ch;
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 6vh; }
  .section-title { font-size: clamp(28px, 9vw, 42px); }
}
.section-body { padding-left: 232px; }
@media (max-width: 720px) {
  .section-body { padding-left: 0; }
}

/* ============================================================
   hero
   ============================================================ */
.hero {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: max(120px, 16vh) clamp(20px, 5vw, 60px) 8vh;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  width: max-content;
  margin-bottom: clamp(24px, 4vh, 40px);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s var(--ease-in-out) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); }
  50%      { box-shadow: 0 0 0 10px color-mix(in oklab, var(--accent) 0%, transparent); }
}

.hero-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(64px, 14vw, 220px);
  line-height: .9;
  letter-spacing: -6px;
  margin: 0 0 clamp(24px, 4vh, 40px);
  color: var(--ink);
}
.hero-name .line { display: block; overflow: hidden; }
.hero-name .char {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform .9s var(--ease-out), opacity .9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.hero-name.is-in .char { transform: translateY(0); opacity: 1; }
.hero-name .dot-accent { color: var(--accent); }
@media (max-width: 720px) { .hero-name { letter-spacing: -2px; } }

.hero-tagline {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.45;
  letter-spacing: -.2px;
  max-width: 60ch;
  margin: 0 0 clamp(28px, 4vh, 44px);
  color: var(--ink-2);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -.1px;
  border: 1px solid transparent;
  transition: transform .35s var(--ease-out), background-color .25s, color .25s, border-color .25s;
  position: relative;
  overflow: hidden;
}
.btn svg { transition: transform .35s var(--ease-out); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); color: var(--bg); }
.btn-ghost {
  border-color: var(--rule);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

.scroll-cue {
  position: absolute;
  right: clamp(20px, 5vw, 60px);
  bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Hide when the viewport is too short/narrow to fit the cue without
   colliding with the centered hero content. */
@media (max-height: 760px), (max-width: 760px) {
  .scroll-cue { display: none; }
}
.scroll-cue .line-down {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--rule), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue .line-down::after {
  content: "";
  position: absolute;
  top: -40%; left: 0;
  width: 1px;
  height: 40%;
  background: var(--accent);
  animation: drop 2s var(--ease-in-out) infinite;
}
@keyframes drop {
  0%   { transform: translateY(0); }
  100% { transform: translateY(280%); }
}

/* ============================================================
   reveal animations
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }
[data-stagger] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 50ms);
}
[data-stagger].is-in > * { opacity: 1; transform: none; }

/* ============================================================
   about
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.about-lead {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.45;
  letter-spacing: -.3px;
  margin: 0;
  color: var(--ink);
}
.about-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}
.about-stats li {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 6px;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}
.stat-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 4vw, 56px);
  letter-spacing: -2px;
  color: var(--accent);
}
.stat-suffix {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  color: var(--accent);
}
.stat-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: end;
  padding-left: 12px;
  text-align: right;
}
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; } }

/* ============================================================
   expertise
   ============================================================ */
.pill-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.pill-row:last-of-type { border-bottom: 1px solid var(--rule); }
.pill-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  transition: transform .25s var(--ease-out), border-color .25s, background-color .25s, color .25s;
}
.pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}
.pill.accent {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}
@media (max-width: 720px) {
  .pill-row { grid-template-columns: 1fr; gap: 8px; }
}

.marquee {
  position: relative;
  margin: 60px calc(50% - 50vw) 0;
  width: 100vw;
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 0;
}
.marquee::before, .marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 12vw;
  z-index: 2;
  pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.marquee::after  { right: 0; background: linear-gradient(to left, var(--bg), transparent); }
.marquee-track {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
  animation: marquee 50s linear infinite;
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 500;
  letter-spacing: -.5px;
  color: var(--ink);
  padding-right: 24px;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.m-pill { white-space: nowrap; }
.m-dot { color: var(--accent); }
@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* ============================================================
   timeline / experience
   ============================================================ */
.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}
.job-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--paper);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s;
  transform-style: preserve-3d;
}
.job-card:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--rule));
  box-shadow: var(--shadow);
}
.job-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  align-items: baseline;
  margin-bottom: 4px;
}
.job-dates {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
}
.job-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -.3px;
}
.job-title .at { color: var(--muted); font-weight: 500; }
.job-rename {
  display: inline-block;
  font-family: var(--sans);
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  font-size: .8em;
  margin-left: .4em;
}
.job-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 4px 0 14px;
}
.job-summary {
  margin: 12px 0 14px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
  max-width: 75ch;
}
.job-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}
.job-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.job-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .8em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}
.job-bullets strong { color: var(--ink); font-weight: 600; }
.job-toggle {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
}
.job-extra { display: none; }
.job-card.is-open .job-extra { display: grid; }
.job-card.is-open .job-toggle .arrow { transform: rotate(180deg); }
.job-toggle .arrow {
  display: inline-block;
  transition: transform .3s var(--ease-out);
}

/* ============================================================
   education
   ============================================================ */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 720px) { .edu-grid { grid-template-columns: 1fr; } }
.edu-card {
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--paper);
  transition: border-color .25s, box-shadow .25s, transform .35s var(--ease-out);
  transform-style: preserve-3d;
}
.edu-card:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--rule));
  box-shadow: var(--shadow);
}
.edu-dates {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.edu-school {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.2px;
  margin: 0 0 4px;
}
.edu-degree { margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* ============================================================
   contact
   ============================================================ */
.section-contact { padding-bottom: 18vh; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--paper);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color .25s, transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.contact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.contact-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.contact-card:hover::after { opacity: 1; }
.contact-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-value {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -.4px;
  color: var(--ink);
  word-break: break-word;
}
.contact-cta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--accent);
}
.contact-cta .arrow {
  display: inline-block;
  transition: transform .3s var(--ease-out);
}
.contact-card:hover .contact-cta .arrow { transform: translateX(4px); }

/* ============================================================
   footer
   ============================================================ */
.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px clamp(20px, 5vw, 60px);
  border-top: 1px solid var(--rule);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-row a { color: var(--ink); border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.footer-row a:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   view transitions for theme toggle
   ============================================================ */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .6s;
  animation-timing-function: var(--ease-in-out);
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  animation-name: clipReveal;
}
@keyframes clipReveal {
  from { clip-path: circle(0% at var(--toggle-x, 100%) var(--toggle-y, 0)); }
  to   { clip-path: circle(150% at var(--toggle-x, 100%) var(--toggle-y, 0)); }
}
