/* ————— Hariharan D — portfolio ————— */
:root {
  --cream: #F3F0E7;
  --ink: #050505;
  --ink-soft: #171717;
  --seafoam: #B3D6D3;
  --lime: #C9D64B;
  --olive: #6E7F4F;
  --forest: #1E3D34;
  --muted: rgba(5, 5, 5, .55);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 400; }

/* ══════════ TICKER ══════════ */
.ticker {
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  padding: 12px 0;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .01em;
  white-space: nowrap;
}
.ticker__track { display: flex; width: max-content; will-change: transform; animation: ticker 46s linear infinite; }
.ticker__set { display: flex; }
.ticker__set span { padding: 0 44px; position: relative; }
.ticker__set span::after {
  content: "✳"; position: absolute; right: -8px; top: 0;
  color: var(--seafoam); font-weight: 400;
}
@keyframes ticker { to { transform: translateX(-50%); } }

/* ══════════ HEADER ══════════ */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(12px);
}
.header__logo {
  font-weight: 700; font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: -0.03em;
}
.header__nav { display: flex; gap: clamp(18px, 3vw, 44px); font-weight: 600; font-size: 17px; }
.header__nav a { position: relative; padding: 4px 0; }
.header__nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: right; transition: transform .35s cubic-bezier(.65,0,.35,1);
}
.header__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.header__burger { display: none; }

/* ══════════ HERO ══════════ */
.hero {
  position: relative;
  min-height: max(88vh, 640px);
  padding: 4vh var(--gutter) 10vh;
  display: flex; align-items: flex-end;
}
.hero__arc {
  position: absolute; inset: 0 var(--gutter) auto;
  width: calc(100% - var(--gutter) * 2);
  height: 88%;
  color: var(--ink);
  opacity: .55;
}
.hero__badges { position: absolute; inset: 0; pointer-events: none; }
.badge {
  position: absolute;
  left: var(--x); top: var(--y);
  translate: -50% -50%;
  display: grid; place-items: center;
  animation: float 5.2s ease-in-out var(--d) infinite;
}
@keyframes float { 50% { transform: translateY(-14px) rotate(2deg); } }
.badge svg { width: 100%; height: auto; display: block; }
.badge--code {
  width: 84px; height: 84px; border-radius: 22px;
  background: linear-gradient(135deg, var(--lime), var(--olive));
  color: var(--forest);
  font-weight: 700; font-size: 26px; rotate: 8deg;
}
.badge--sketch {
  width: 76px; height: 76px; border-radius: 50%;
  background: color-mix(in srgb, var(--lime) 55%, var(--cream));
  color: var(--forest); padding: 16px; rotate: -6deg;
}
.badge--terminal { width: 96px; color: #8a8a82; }
.badge--dot { width: 92px; height: 92px; border-radius: 50%; background: var(--ink); }
.badge--dot span { width: 16px; height: 42px; background: var(--forest); display: block; border-radius: 3px; }
.badge--spark {
  width: 88px; height: 88px; border-radius: 26px;
  background: linear-gradient(160deg, var(--olive), var(--lime));
  color: var(--cream); padding: 20px; rotate: 12deg;
}
.badge--mono {
  width: 86px; height: 86px; border-radius: 10px;
  background: var(--forest); color: var(--lime);
  font-family: var(--serif); font-size: 34px;
  border: 3px solid color-mix(in srgb, var(--lime) 40%, var(--forest));
}
.hero__type { position: relative; width: 100%; z-index: 2; }
.hero__line--1 { display: flex; align-items: baseline; gap: 3vw; }
.hero__word {
  font-family: var(--serif);
  font-size: clamp(64px, 13.5vw, 190px);
  line-height: .92;
  letter-spacing: -0.015em;
}
.hero__amp {
  font-family: var(--serif);
  font-size: clamp(40px, 6.5vw, 92px);
  line-height: 1;
  margin: 1vh 0 0 36vw;
}
.hero__line--2 { display: flex; justify-content: flex-end; align-items: baseline; gap: 3vw; margin-top: -2vh; }
.hero__line--2 .hero__word { font-size: clamp(80px, 16vw, 230px); }
.hero__caption { font-size: clamp(15px, 1.5vw, 20px); font-weight: 500; max-width: 240px; }
.hero__caption--right { order: -1; text-align: right; }

/* ══════════ INTRO ══════════ */
.intro { padding: 14vh var(--gutter) 10vh; max-width: 1100px; }
.intro__text {
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.intro__sub { margin-top: 28px; color: var(--muted); font-weight: 500; max-width: 560px; }

/* ══════════ WORK CAROUSEL ══════════ */
.work { padding: 4vh 0 14vh; overflow: hidden; }
.work__rail { display: flex; width: max-content; will-change: transform; }
.work__set { display: flex; gap: clamp(16px, 2vw, 28px); padding-right: clamp(16px, 2vw, 28px); }
.card { width: clamp(280px, 30vw, 420px); flex-shrink: 0; }
.card__cover {
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.card:hover .card__cover { transform: translateY(-8px) rotate(-.5deg); }
.card__big {
  font-family: var(--serif);
  font-size: clamp(56px, 6vw, 88px);
  line-height: .95; text-align: center;
}
.card__small { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.card__cover--ink { background: var(--ink); color: var(--cream); }
.card__cover--ink .card__big { color: var(--lime); }
.card__cover--seafoam { background: var(--seafoam); color: var(--forest); }
.card__cover--lime { background: var(--lime); color: var(--forest); }
.card__cover--olive { background: var(--olive); color: var(--cream); }
.card__cover--cream { background: #fff; color: var(--ink); border: 1px solid rgba(5,5,5,.08); }
.card__cover--ink2 { background: var(--forest); color: var(--seafoam); }
.card__cover--seafoam2 { background: linear-gradient(150deg, var(--seafoam), #d8ebe9); color: var(--forest); }
.card__meta { display: flex; align-items: center; gap: 12px; margin: 18px 2px 8px; }
.card__meta h3 { font-size: clamp(18px, 1.8vw, 23px); font-weight: 600; letter-spacing: -0.01em; }
.chip {
  background: rgba(5,5,5,.07);
  border-radius: 99px;
  font-size: 13px; font-weight: 600;
  padding: 4px 12px; white-space: nowrap;
}
.card__desc { color: var(--muted); font-size: 15px; max-width: 92%; }

/* ══════════ DARK / ABOUT ══════════ */
.dark {
  background: var(--ink);
  color: var(--cream);
  border-radius: 32px 32px 0 0;
  padding: 16vh var(--gutter);
}
.dark__inner { max-width: 1200px; margin: 0 auto; }
.dark__quote {
  font-family: var(--serif);
  color: var(--seafoam);
  font-size: clamp(34px, 4.8vw, 66px);
  line-height: 1.12;
  max-width: 20ch;
}
.about { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: clamp(32px, 6vw, 96px); margin-top: 12vh; align-items: start; }
.about__photo { position: relative; }
.about__photo img {
  border-radius: 18px;
  aspect-ratio: 3 / 4; object-fit: cover; width: 100%;
  filter: saturate(.92);
}
.about__photo figcaption { margin-top: 14px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .55; }
.about__lede { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 36px); line-height: 1.25; margin-bottom: 24px; }
.about__body > p:not(.about__lede) { color: rgba(243,240,231,.72); max-width: 60ch; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 24px; margin-top: 48px; }
.stat strong {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 4.4vw, 64px);
  color: var(--lime); line-height: 1;
}
.stat span { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }

/* ══════════ SKILLS MARQUEE ══════════ */
.skills { background: var(--ink); color: var(--cream); padding: 4vh 0 16vh; overflow: hidden; }
.skills__title {
  font-family: var(--serif); color: var(--seafoam);
  font-size: clamp(30px, 3.6vw, 50px);
  padding: 0 var(--gutter); margin-bottom: 7vh;
}
.mrow { overflow: hidden; white-space: nowrap; padding: 14px 0; border-top: 1px solid rgba(243,240,231,.14); }
.mrow__track { display: inline-flex; will-change: transform; }
.mrow:last-child { border-bottom: 1px solid rgba(243,240,231,.14); }
.mrow__set {
  display: inline-flex; align-items: center; gap: 36px; padding-right: 36px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 46px);
  will-change: transform;
}
.mrow__set i { font-style: normal; font-size: .5em; color: var(--olive); }

/* ══════════ SERVICES ══════════ */
.services { padding: 16vh var(--gutter); }
.services__label { font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6vh; }
.services__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.svc { border-top: 2px solid var(--ink); padding-top: 32px; }
.svc__word {
  font-family: var(--serif);
  font-size: clamp(72px, 10vw, 150px);
  line-height: 1; margin-bottom: 24px;
}
.svc--ai .svc__word em { font-style: italic; color: var(--olive); }
.svc p { color: var(--muted); max-width: 46ch; margin-bottom: 24px; }
.svc ul { list-style: none; }
.svc li { padding: 12px 0; border-bottom: 1px solid rgba(5,5,5,.12); font-weight: 600; }

/* ══════════ EXPERIENCE ══════════ */
.exp { padding: 4vh var(--gutter) 16vh; }
.exp__title { font-family: var(--serif); font-size: clamp(32px, 4vw, 56px); margin-bottom: 7vh; }
.exp__list { list-style: none; max-width: 1000px; }
.exp__item {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  padding: 32px 0; border-top: 1px solid rgba(5,5,5,.15);
}
.exp__when { font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.exp__item h4 { font-size: clamp(19px, 2vw, 24px); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.exp__item p { color: var(--muted); max-width: 62ch; }

/* ══════════ FOOTER ══════════ */
.footer {
  background: var(--ink); color: var(--cream);
  border-radius: 32px 32px 0 0;
  padding: 14vh var(--gutter) 40px;
  text-align: center;
}
.footer__inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.footer__photo { width: clamp(120px, 14vw, 180px); }
.footer__photo img {
  border-radius: 50%; aspect-ratio: 1; object-fit: cover;
  border: 3px solid var(--seafoam);
}
.footer__cta {
  font-family: var(--serif); color: var(--seafoam);
  font-size: clamp(56px, 9vw, 130px);
  line-height: 1; margin: 5vh 0 4vh;
}
.footer__mail {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 40px);
  border-bottom: 1px solid rgba(243,240,231,.35);
  padding-bottom: 6px;
  transition: color .3s;
}
.footer__mail:hover { color: var(--lime); border-color: var(--lime); }
.footer__links { display: flex; gap: 16px; margin-top: 6vh; flex-wrap: wrap; justify-content: center; }
.pill {
  border: 1px solid rgba(243,240,231,.4);
  border-radius: 99px;
  padding: 12px 28px;
  font-weight: 600; font-size: 15px;
  transition: background .3s, color .3s, border-color .3s;
}
.pill:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.footer__base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  width: 100%; margin-top: 12vh;
  font-size: 13px; color: rgba(243,240,231,.5);
}

/* ══════════ REVEAL PRIMITIVES ══════════ */
[data-reveal] { opacity: 0; transform: translateY(36px); }
.no-js [data-reveal], .reveal-done[data-reveal] { opacity: 1; transform: none; }
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
[data-split] .w > span { display: inline-block; transform: translateY(110%); }

/* ══════════ RESPONSIVE ══════════ */
.mobnav {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink); color: var(--cream);
  display: none; flex-direction: column; justify-content: center;
  gap: 8px; padding: 0 32px;
}
body.nav-open .mobnav { display: flex; }
body.nav-open { overflow: hidden; }
.mobnav a { font-family: var(--serif); font-size: clamp(40px, 11vw, 64px); line-height: 1.2; }
.mobnav a:active { color: var(--seafoam); }
.mobnav__close {
  position: absolute; top: 24px; right: 24px;
  background: none; border: 0; color: var(--cream);
  font-size: 32px; cursor: pointer; padding: 8px;
}

@media (max-width: 860px) {
  .header__nav { display: none; }
  .header__burger {
    display: flex; flex-direction: column; gap: 6px;
    background: none; border: 0; padding: 8px; cursor: pointer;
  }
  .header__burger span { width: 26px; height: 2px; background: var(--ink); }
  .hero { min-height: 62vh; padding-bottom: 5vh; }
  .hero__amp { margin-left: 20vw; }
  .hero__caption { display: none; }
  .badge { scale: .5; }
  .badge--terminal, .badge--dot { display: none; }
  .intro { padding: 8vh var(--gutter) 6vh; }
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 340px; }
  .services__grid { grid-template-columns: 1fr; }
  .exp__item { grid-template-columns: 1fr; gap: 6px; }
}
