/* =========================================================
   Anjali Devi — Landing Page
   Palette: ink + cream + coral, editorial / awwwards style
   ========================================================= */

:root {
  --ink:        #0c0b0e;
  --ink-soft:   #141318;
  --cream:      #ece6dc;
  --cream-dim:  #a8a299;
  --coral:      #ff4d23;
  --coral-soft: #ff7a52;
  --clay:       #d9c3a8;
  --line:       rgba(236, 230, 220, 0.14);

  --f-display: "Syne", sans-serif;
  --f-body:    "Space Grotesk", sans-serif;
  --f-serif:   "Instrument Serif", serif;

  --pad: clamp(1.25rem, 4vw, 4rem);
  --ease: cubic-bezier(0.65, 0.05, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--f-body);
  font-weight: 300;
  line-height: 1.4;
  overflow-x: hidden;
  cursor: none;
}

@media (pointer: coarse) { body { cursor: auto; } }

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
em { font-style: normal; }
.display em { font-family: var(--f-serif); font-style: italic; font-weight: 400; }

::selection { background: var(--coral); color: var(--ink); }

/* ---------- WebGL canvas + grain ---------- */
#webgl {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none;
}
.grain {
  position: fixed; inset: -50%;
  z-index: 1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(8) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-5%, 5%); }
  40% { transform: translate(3%, -8%); }
  60% { transform: translate(-8%, 2%); }
  80% { transform: translate(6%, 6%); }
}

main { position: relative; z-index: 2; }

/* =========================================================
   Preloader
   ========================================================= */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  display: flex; align-items: flex-end;
  padding: var(--pad);
}
.preloader__inner { width: 100%; }
.preloader__row {
  display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream-dim); margin-bottom: 1rem;
}
.preloader__count { font-family: var(--f-display); font-size: clamp(2rem,7vw,4rem); color: var(--cream); }
.preloader__pct { font-size: 0.4em; vertical-align: super; color: var(--coral); }
.preloader__name {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(3rem, 16vw, 13rem); line-height: 0.86;
  letter-spacing: -0.02em; display: flex; gap: 0.4em; overflow: hidden;
  text-transform: uppercase;
}
.preloader__name .pl-word { display: inline-block; transform: translateY(110%); }
.preloader__bar { height: 2px; background: var(--line); margin-top: 1.6rem; overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0; background: var(--coral); }

/* =========================================================
   Cursor
   ========================================================= */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; border-radius: 50%; }
.cursor {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid var(--cream); mix-blend-mode: difference;
  transition: width .35s var(--ease), height .35s var(--ease), background .35s, opacity .3s;
}
.cursor-dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--coral); }
.cursor.is-link { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: var(--cream); mix-blend-mode: difference; }
.cursor.is-view, .cursor.is-cta {
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  background: var(--coral); border-color: transparent; mix-blend-mode: normal;
}
.cursor.is-view::after, .cursor.is-cta::after {
  content: "VIEW"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ink);
}
.cursor.is-cta::after { content: "MAIL"; }
@media (pointer: coarse) { .cursor, .cursor-dot { display: none; } }

/* =========================================================
   Side rail
   ========================================================= */
.rail {
  position: fixed; left: var(--pad); bottom: var(--pad); z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.rail__line { width: 1px; height: 120px; background: var(--line); position: relative; }
.rail__line span { position: absolute; top: 0; left: 0; width: 100%; height: 0; background: var(--coral); }
.rail__loc {
  writing-mode: vertical-rl; font-size: 0.62rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--cream-dim);
}
@media (max-width: 760px) { .rail { display: none; } }

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem var(--pad);
  mix-blend-mode: difference;
}
.nav__brand { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; letter-spacing: 0.02em; }
.nav__brand-dot { color: var(--coral); }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.4rem); font-size: 0.82rem; letter-spacing: 0.04em; }
.nav__links a span { position: relative; display: inline-block; }
.nav__links a:not(.nav__cta) span::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 1px;
  background: currentColor; transition: width .4s var(--ease);
}
.nav__links a:not(.nav__cta):hover span::after { width: 100%; }
.nav__cta {
  border: 1px solid var(--cream); border-radius: 100px;
  padding: 0.5rem 1.1rem; transition: background .35s, color .35s;
}
.nav__cta:hover { background: var(--cream); color: var(--ink); }
@media (max-width: 640px) {
  .nav__links a:not(.nav__cta):not(.nav__brand) { display: none; }
}

/* =========================================================
   Generic section bits
   ========================================================= */
section { padding: clamp(5rem, 12vh, 11rem) var(--pad); position: relative; }
.section-head {
  display: flex; align-items: baseline; gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cream-dim); border-top: 1px solid var(--line); padding-top: 1.2rem;
}
.section-index { color: var(--coral); }
.section-label { color: var(--cream); }

.display {
  font-family: var(--f-display); font-weight: 800;
  line-height: 0.92; letter-spacing: -0.025em; text-transform: none;
}
.line { display: block; overflow: hidden; }
.line__inner { display: block; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between;
  padding-top: clamp(7rem, 16vh, 11rem);
  padding-bottom: clamp(2rem, 5vh, 4rem);
}
.hero__meta {
  position: absolute; top: clamp(7rem, 15vh, 10rem);
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-dim);
  display: flex; flex-direction: column; gap: 0.35rem;
}
.hero__meta--tl { left: var(--pad); }
.hero__meta--tr { right: var(--pad); text-align: right; }
.tag {
  display: inline-block; border: 1px solid var(--coral); color: var(--coral);
  border-radius: 100px; padding: 0.35rem 0.8rem; font-size: 0.68rem;
}
.hero__title { margin-top: auto; }
.hero h1.display {
  font-size: clamp(2.7rem, 11.5vw, 12rem);
  max-width: 14ch;
}
.hero__foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: clamp(2rem, 5vw, 4rem); gap: 2rem;
}
.hero__intro { max-width: 42ch; font-size: clamp(0.95rem, 1.4vw, 1.15rem); color: var(--cream-dim); }
.hero__intro strong { color: var(--cream); font-weight: 500; }
.hero__scroll { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.hero__scroll-txt { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream-dim); }
.hero__scroll-line { width: 1px; height: 48px; background: var(--cream-dim); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0; background: var(--coral);
  transform: translateY(-100%); animation: scrolldown 1.8s var(--ease) infinite;
}
@keyframes scrolldown { 0% { transform: translateY(-100%);} 60%,100% { transform: translateY(100%);} }

.hero__portrait {
  position: absolute; top: 50%; right: clamp(1rem, 8vw, 9rem); transform: translateY(-50%);
  width: clamp(150px, 17vw, 260px); z-index: -1;
}
.hero__portrait-mask {
  aspect-ratio: 3/4; overflow: hidden; border-radius: 2px;
  filter: grayscale(0.25) contrast(1.02);
}
.hero__portrait-mask img { transform: scale(1.2); }
.hero__portrait-tag {
  display: block; margin-top: 0.6rem; font-size: 0.66rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-dim); text-align: right;
}
@media (max-width: 900px) {
  .hero__portrait { opacity: 0.22; right: 0; width: 46vw; }
  .hero__meta--tr { display: none; }
}

/* =========================================================
   Marquee
   ========================================================= */
.marquee {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.4rem 0; background: var(--coral); color: var(--ink);
}
.marquee__track {
  display: flex; align-items: center; gap: 2rem; width: max-content;
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 3rem); white-space: nowrap; will-change: transform;
}
.marquee__track .dot { font-size: 0.6em; opacity: 0.7; }

/* =========================================================
   About
   ========================================================= */
.about__statement { margin-bottom: clamp(3rem, 8vw, 6rem); }
.reveal-text {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(1.5rem, 4.2vw, 3.4rem); line-height: 1.18; letter-spacing: -0.01em;
  max-width: 22ch;
}
.reveal-text em { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--clay); }
.reveal-text .hl { color: var(--coral); }
.reveal-text .word { display: inline-block; opacity: 0.16; transition: opacity .1s; }

.about__grid { display: grid; grid-template-columns: 0.85fr 1.4fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.about__photo { aspect-ratio: 4/5; overflow: hidden; border-radius: 3px; filter: grayscale(0.2); }
.about__photo img { transition: transform 1.2s var(--ease); }
.about__photo:hover img { transform: scale(1.06); }
.about__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 2rem; }
.about__col h4 {
  font-family: var(--f-display); font-weight: 600; font-size: 1rem;
  margin-bottom: 0.7rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line);
}
.about__col p { color: var(--cream-dim); font-size: 0.95rem; }
@media (max-width: 760px) { .about__grid { grid-template-columns: 1fr; } }

/* =========================================================
   Stats
   ========================================================= */
.stats { padding-top: 0; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.stat { padding: clamp(1.5rem,4vw,3rem) 1rem clamp(1.5rem,4vw,3rem) 0; border-bottom: 1px solid var(--line); }
.stat__num {
  display: block; font-family: var(--f-display); font-weight: 800;
  font-size: clamp(3rem, 9vw, 8rem); line-height: 0.9; letter-spacing: -0.03em; color: var(--coral);
}
.stat__label { display: block; margin-top: 0.8rem; font-size: 0.86rem; color: var(--cream-dim); max-width: 18ch; }
@media (max-width: 760px) { .stats__grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 420px) { .stats__grid { grid-template-columns: 1fr; } }

/* =========================================================
   Skills
   ========================================================= */
.skills__list { list-style: none; }
.skill {
  position: relative; display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: clamp(1rem, 4vw, 3.5rem);
  padding: clamp(1.6rem, 4vw, 2.8rem) 0; border-top: 1px solid var(--line);
  transition: padding-left .5s var(--ease);
}
.skills__list .skill:last-child { border-bottom: 1px solid var(--line); }
.skill__no { font-size: 0.8rem; color: var(--cream-dim); font-family: var(--f-display); }
.skill__title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.02em;
  transition: color .4s, transform .5s var(--ease);
}
.skill__desc {
  grid-column: 2; max-width: 52ch; color: var(--cream-dim); font-size: 0.92rem;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s, margin .5s;
}
.skill__arrow {
  font-size: 1.6rem; color: var(--coral); opacity: 0;
  transform: translateX(-12px); transition: opacity .4s, transform .5s var(--ease);
}
.skill:hover { padding-left: clamp(0.8rem, 3vw, 2.5rem); }
.skill:hover .skill__title { color: var(--coral); }
.skill:hover .skill__desc { max-height: 120px; opacity: 1; margin-top: 1rem; }
.skill:hover .skill__arrow { opacity: 1; transform: translateX(0); }

/* =========================================================
   Tools
   ========================================================= */
.tools__intro {
  font-family: var(--f-display); font-weight: 600; font-size: clamp(1.3rem, 3.5vw, 2.6rem);
  line-height: 1.2; max-width: 24ch; margin-bottom: clamp(2rem,5vw,3.5rem);
}
.tools__intro span { color: var(--cream-dim); }
.tools__cloud { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.tools__cloud span {
  border: 1px solid var(--line); border-radius: 100px;
  padding: 0.6rem 1.2rem; font-size: 0.9rem; color: var(--cream-dim);
  transition: background .3s, color .3s, border-color .3s, transform .3s;
}
.tools__cloud span:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); transform: translateY(-3px); }

/* =========================================================
   Experience timeline
   ========================================================= */
.timeline { list-style: none; }
.job {
  display: grid; grid-template-columns: 0.4fr 1.6fr; gap: clamp(1.5rem, 5vw, 5rem);
  padding: clamp(2rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--line);
}
.timeline .job:last-child { border-bottom: 1px solid var(--line); }
.job__period { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream-dim); padding-top: 0.5rem; }
.job__role { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.5rem, 4.5vw, 3.2rem); line-height: 1.02; letter-spacing: -0.02em; }
.job__company { color: var(--coral); margin: 0.4rem 0 1.4rem; font-size: 0.95rem; letter-spacing: 0.02em; }
.job__points { list-style: none; display: grid; gap: 0.7rem; max-width: 62ch; }
.job__points li { position: relative; padding-left: 1.4rem; color: var(--cream-dim); font-size: 0.95rem; }
.job__points li::before { content: "→"; position: absolute; left: 0; color: var(--coral); }
.job__points b { color: var(--cream); font-weight: 500; }
@media (max-width: 760px) { .job { grid-template-columns: 1fr; gap: 1rem; } }

/* =========================================================
   Certifications
   ========================================================= */
.certs__wrap { display: flex; flex-wrap: wrap; gap: clamp(0.8rem,2vw,1.5rem); }
.certs__item {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(1.1rem, 3vw, 2rem); color: var(--cream-dim);
  transition: color .35s; cursor: default;
}
.certs__item:not(:last-child)::after { content: " /"; color: var(--coral); }
.certs__item:hover { color: var(--cream); }

/* =========================================================
   Contact
   ========================================================= */
.contact { background: var(--cream); color: var(--ink); border-radius: 32px 32px 0 0; }
.section-head--light { color: rgba(12,11,14,0.5); border-top-color: rgba(12,11,14,0.15); }
.section-head--light .section-label { color: var(--ink); }
.section-head--light .section-index { color: var(--coral); }
.contact__big { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.contact h2.display { font-size: clamp(2.6rem, 10vw, 9rem); }
.contact h2 em { color: var(--coral); }
.contact__cta {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: clamp(1.4rem, 4vw, 2.6rem) clamp(2rem, 6vw, 4rem); margin-bottom: clamp(3rem,7vw,4.5rem);
  border-radius: 100px; overflow: hidden; border: 1px solid var(--ink); will-change: transform;
}
.contact__cta-bg { position: absolute; inset: 0; background: var(--ink); transform: translateY(101%); border-radius: 50%; transition: transform .55s var(--ease); z-index: 0; }
.contact__cta:hover .contact__cta-bg { transform: translateY(0); border-radius: 0; }
.contact__cta-txt { position: relative; z-index: 1; font-family: var(--f-display); font-weight: 600; font-size: clamp(1.1rem, 3.5vw, 2.2rem); transition: color .4s; }
.contact__cta:hover .contact__cta-txt { color: var(--cream); }
.contact__links { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 4rem); border-top: 1px solid rgba(12,11,14,0.15); padding-top: 2rem; font-size: 1rem; }
.contact__links a { position: relative; }
.contact__links a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px; background: var(--ink); transition: width .4s var(--ease); }
.contact__links a:hover::after { width: 100%; }

/* ---------- Footer ---------- */
.footer {
  background: var(--cream); color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  padding: 2rem var(--pad); font-size: 0.8rem; letter-spacing: 0.04em;
  border-top: 1px solid rgba(12,11,14,0.12);
}
.footer__mid { color: rgba(12,11,14,0.5); }
.footer__top { background: none; border: none; font: inherit; color: var(--ink); cursor: none; }
@media (pointer: coarse) { .footer__top { cursor: pointer; } }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .line__inner, .pl-word { transform: none !important; }
}
