/* ============================================================
   Neeraj Chormale — portfolio
   Apple-inspired design language: white / light-gray bands,
   near-black text, one restrained accent (Apple blue).
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-alt:    #f5f5f7;
  --text:      #1d1d1f;
  --text-soft: #494951;
  --text-mut:  #6e6e73;
  --line:      rgba(0, 0, 0, 0.10);
  --card:      #ffffff;
  --chip:      #f0f0f2;
  --accent:    #0071e3;
  --accent-h:  #0077ed;

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --container: 1100px;
  --nav-h: 52px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius: 18px;
}

[data-theme="dark"] {
  --bg:        #000000;
  --bg-alt:    #0e0e10;
  --text:      #f5f5f7;
  --text-soft: #c7c7cc;
  --text-mut:  #86868b;
  --line:      rgba(255, 255, 255, 0.12);
  --card:      #141416;
  --chip:      #1c1c1f;
  --accent:    #2997ff;
  --accent-h:  #47a6ff;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

::selection { background: rgba(0, 113, 227, 0.18); }

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

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

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 32px);
}

.section { padding-block: clamp(72px, 12vw, 130px); }
.section--gray { background: var(--bg-alt); }

.center { text-align: center; }
.center .hero__cta { justify-content: center; }

/* ---------- Type scale (disciplined) ---------- */
.eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.section__title {
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin-bottom: 2.6rem;
}

.lead {
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  line-height: 1.45;
  font-weight: 400;
  color: var(--text-soft);
  max-width: 40ch;
}
.about .lead, .contact .lead { margin-bottom: 1.1rem; }

.body { color: var(--text-mut); max-width: 46ch; margin-top: 1rem; }

/* ============================================================
   Nav — frosted glass on scroll
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__brand {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav__brand:hover { color: var(--text); text-decoration: none; }

.nav__links { display: flex; gap: clamp(1.2rem, 3vw, 2.2rem); }
.nav__links a {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-soft);
}
.nav__links a:hover { color: var(--text); text-decoration: none; }

.nav__actions { display: flex; align-items: center; gap: 0.4rem; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border: none; border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.theme-toggle:hover { background: var(--chip); color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: block; }

/* Mobile burger */
.nav__burger {
  display: none;
  width: 34px; height: 34px;
  border: none; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav__burger span {
  width: 18px; height: 1.5px; background: var(--text);
  border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ============================================================
   Hero — full viewport
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    var(--bg);
}
.hero__inner { padding-block: 8rem 6rem; }

.hero__eyebrow {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-mut);
  letter-spacing: 0.01em;
  margin-bottom: 1.4rem;
}
.hero__title {
  font-size: clamp(3rem, 1.6rem + 7vw, 6.5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-bottom: 1.6rem;
}
.hero__lead {
  font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem);
  line-height: 1.4;
  font-weight: 400;
  color: var(--text-soft);
  max-width: 30ch;
  margin: 0 auto 2.4rem;
  text-wrap: balance;
}

.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__inner .hero__cta { justify-content: center; }

/* Scroll cue */
.hero__scroll {
  position: absolute;
  left: 50%; bottom: 2rem;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-mut);
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero__scroll:hover { color: var(--text); text-decoration: none; }
.hero__scroll-chev {
  width: 16px; height: 16px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  animation: bob 1.8s var(--ease) infinite;
}
@keyframes bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50%      { transform: rotate(45deg) translate(3px, 3px); opacity: 1; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72em 1.4em;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-h); color: #fff; box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn--ghost {
  background: transparent; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.btn--ghost:hover { color: var(--accent-h); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* ============================================================
   About
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.about__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ============================================================
   Experience
   ============================================================ */
.roles { display: flex; flex-direction: column; }
.role {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: 2.4rem;
  border-top: 1px solid var(--line);
}
.role:last-child { border-bottom: 1px solid var(--line); }
.role__meta { display: flex; flex-direction: column; gap: 0.25rem; padding-top: 0.35rem; }
.role__date { font-size: 0.92rem; font-weight: 500; color: var(--text); }
.role__place { font-size: 0.85rem; color: var(--text-mut); }

.role__title {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.role__org { color: var(--text-mut); margin-bottom: 1.1rem; font-size: 1.02rem; }
.role__points { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.role__points li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--text-soft);
  max-width: 56ch;
}
.role__points li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.role__points strong { color: var(--text); font-weight: 600; }
.role__stack {
  margin-top: 1.1rem;
  font-size: 0.86rem;
  color: var(--text-mut);
  letter-spacing: 0.01em;
}

/* ============================================================
   Projects — card grid
   ============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
  margin-top: clamp(2.2rem, 4vw, 3.2rem);
}
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.30);
  border-color: color-mix(in srgb, var(--text) 14%, transparent);
}
.project-card__title {
  font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.8rem;
}
.project-card__pitch { color: var(--text-soft); line-height: 1.5; }
.project-card .tags { margin-top: 1.4rem; }
.project-card .feature__links { margin-top: auto; padding-top: 1.5rem; }
.feature__links { display: flex; gap: 1.4rem; font-weight: 400; }

/* Tag pills */
.tags, .chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags { margin-top: 1.3rem; }
.tags li, .chips li {
  font-size: 0.82rem;
  color: var(--text-soft);
  background: var(--chip);
  padding: 0.4em 0.9em;
  border-radius: 980px;
  white-space: nowrap;
}

.center-more { margin-top: clamp(2.5rem, 5vw, 4rem); text-align: center; color: var(--text-mut); }

/* ============================================================
   Skills
   ============================================================ */
.skills { display: flex; flex-direction: column; gap: 0; }
.skill-group {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: baseline;
  padding-block: 1.8rem;
  border-top: 1px solid var(--line);
}
.skill-group:last-child { border-bottom: 1px solid var(--line); }
.skill-group__name {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.chips li { font-size: 0.92rem; padding: 0.5em 1.05em; }

/* ============================================================
   Education & Certifications
   ============================================================ */
.creds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
}
.creds__head {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-mut);
  margin-bottom: 1.2rem;
}
.creds__list { list-style: none; display: flex; flex-direction: column; }
.creds__list li {
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.25rem;
}
.creds__list li:first-child { border-top: none; padding-top: 0; }
.creds__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.creds__name { font-size: 1.05rem; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
.creds__detail { font-size: 0.88rem; color: var(--text-mut); white-space: nowrap; }
.creds__sub { font-size: 0.9rem; color: var(--text-mut); }
.creds__link { color: var(--accent); }
.creds__link:hover { color: var(--accent-h); }

/* ============================================================
   Contact
   ============================================================ */
.contact__title {
  font-size: clamp(2.4rem, 1.4rem + 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 1.4rem;
}
.contact .lead { margin-inline: auto; }
.contact__links {
  display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: center;
  margin-top: 2.4rem;
  font-size: 0.95rem;
}
.contact__links a { color: var(--text-mut); }
.contact__links a:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding-block: 2.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-mut);
}
.footer__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ============================================================
   Reveal-on-scroll (progressive enhancement; .js gates it)
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.99);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Hero loads in on its own (above the fold) */
.js .hero__eyebrow,
.js .hero__title,
.js .hero__lead,
.js .hero__cta,
.js .hero__scroll { opacity: 0; transform: translateY(22px); animation: heroIn 0.9s var(--ease) forwards; }
.js .hero__eyebrow { animation-delay: 0.05s; }
.js .hero__title   { animation-delay: 0.14s; }
.js .hero__lead    { animation-delay: 0.24s; }
.js .hero__cta     { animation-delay: 0.34s; }
.js .hero__scroll  { animation-delay: 0.7s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .hero__eyebrow, .js .hero__title, .js .hero__lead,
  .js .hero__cta, .js .hero__scroll { opacity: 1; transform: none; animation: none; }
  .hero__scroll-chev { animation: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  .role { grid-template-columns: 1fr; gap: 0.9rem; }
  .role__meta { flex-direction: row; gap: 0.8rem; align-items: baseline; padding-top: 0; }
  .skill-group { grid-template-columns: 1fr; gap: 0.9rem; }
}

@media (max-width: 720px) {
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem clamp(20px, 5vw, 32px) 1rem;
    transform: translateY(-8px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding-block: 0.85rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav__links a:last-child { border-bottom: none; }
  .nav__burger { display: flex; }

  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 320px; }
  .project-grid { grid-template-columns: 1fr; }
  .creds { grid-template-columns: 1fr; gap: 2.5rem; }
}
