/* ==========================================================
   Vaibhav Kadam — portfolio
   Light, clean, monochrome. No gradients, no glass, no orbs.
   ========================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-sunken: #f5f5f4;

  --ink-0: #0a0a0a;   /* near black */
  --ink-1: #18181b;   /* primary text */
  --ink-2: #3f3f46;   /* body */
  --ink-3: #71717a;   /* secondary */
  --ink-4: #a1a1aa;   /* muted */

  --border: #e5e5e5;
  --border-strong: #d4d4d4;

  --focus: #0a0a0a;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  --max: 1120px;
  --pad: clamp(20px, 4vw, 48px);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 24px -10px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 50px -24px rgba(0, 0, 0, 0.18), 0 6px 16px -6px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink-1);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink-0);
}

p { margin: 0 0 1em; color: var(--ink-2); }
strong { color: var(--ink-0); font-weight: 600; }
em { font-style: italic; color: var(--ink-0); }

code, pre { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* (Decorative background layers removed — body shows clean white) */
.bg-grid, .bg-orb, .bg-noise { display: none !important; }

/* ----------------- Nav ----------------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 24px), var(--max));
  display: flex; align-items: center; gap: 16px;
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow 200ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease);
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--ink-0); }
.nav__brand-dot { color: var(--ink-4); }
.nav__brand-mark { display: inline-flex; }

.nav__links { display: flex; gap: 2px; margin-left: auto; }
.nav__links a {
  padding: 8px 14px; border-radius: 999px; color: var(--ink-3); font-size: 14px; font-weight: 500;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}
.nav__links a:hover { color: var(--ink-0); background: var(--bg-sunken); }

.nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--ink-0);
  color: #fff; font-weight: 500; font-size: 14px;
  transition: transform 160ms var(--ease), background 160ms var(--ease);
}
.nav__cta:hover { transform: translateY(-1px); background: #1f1f1f; }

.nav__menu {
  display: none; background: transparent; border: 0; padding: 8px; cursor: pointer;
  width: 38px; height: 38px; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
  border-radius: 50%;
}
.nav__menu span { display: block; width: 18px; height: 1.6px; background: var(--ink-0); border-radius: 2px; transition: transform 200ms var(--ease), opacity 200ms var(--ease); }
.nav__menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav__links { position: fixed; top: 84px; left: 12px; right: 12px;
    flex-direction: column; gap: 2px; padding: 10px;
    background: #fff; border-radius: 18px; border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform 220ms var(--ease), opacity 220ms var(--ease);
  }
  .nav__links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 12px 14px; font-size: 15px; border-radius: 12px; }
  .nav__menu { display: inline-flex; }
  .nav__cta { display: none; }
}

/* ----------------- Layout ----------------- */
main { width: 100%; }
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 11vw, 132px) var(--pad) 24px;
}
.section--contact { padding-bottom: clamp(72px, 11vw, 132px); }

.section__head { margin-bottom: clamp(36px, 6vw, 60px); max-width: 720px; }
.section__num {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--ink-3);
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  letter-spacing: 0.05em;
}
.section__title {
  font-size: clamp(32px, 4.5vw, 48px);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.section__kicker {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--ink-3);
  margin: 0;
  max-width: 620px;
}

/* ----------------- Hero ----------------- */
.hero {
  position: relative;
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(110px, 14vw, 150px) var(--pad) 80px;
}
.hero__inner { max-width: 720px; }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  margin-bottom: 28px;
}
.hero__pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.45) } 70% { box-shadow: 0 0 0 10px rgba(22,163,74,0) } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0) } }

.hero__title {
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 24px;
  color: var(--ink-0);
}
.hero__line { display: block; }
.hero__line--gradient { color: var(--ink-3); font-weight: 500; }

.hero__lede {
  font-size: clamp(16px, 1.45vw, 18px);
  color: var(--ink-2);
  max-width: 560px;
  margin: 0 0 32px;
}

.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 52px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14.5px;
  transition: transform 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary {
  background: var(--ink-0); color: #fff;
  border-color: var(--ink-0);
}
.btn--primary:hover { transform: translateY(-1px); background: #1f1f1f; }
.btn--ghost {
  background: #fff; color: var(--ink-0); border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--bg-sunken); border-color: #b4b4b4; transform: translateY(-1px); }
.btn--big { padding: 14px 26px; font-size: 15px; }

.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.hero__stats > div { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 18px 0; }
.hero__stats > div + div { padding-left: 20px; border-left: 1px solid var(--border); }
.hero__stats dt { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; order: 2; font-weight: 500; }
.hero__stats dd {
  margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 600;
  color: var(--ink-0); letter-spacing: -0.02em;
}

@media (max-width: 720px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__stats > div { padding: 16px 16px 16px 0; }
  .hero__stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .hero__stats > div:nth-child(2) { border-left: 1px solid var(--border); padding-left: 16px; }
  .hero__stats > div:nth-child(4) { border-left: 1px solid var(--border); padding-left: 16px; }
  .hero__stats > div:nth-child(3), .hero__stats > div:nth-child(4) { border-top: 1px solid var(--border); }
}

/* Hero side card */
.hero__card {
  position: relative;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 14px 16px 16px;
  font-size: 14px;
  overflow: hidden;
}
.hero__card-bar {
  display: flex; align-items: center; gap: 6px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.hero__card-bar span { width: 10px; height: 10px; border-radius: 50%; background: #d4d4d4; }
.hero__card-bar span:nth-child(2) { background: #d4d4d4; }
.hero__card-bar span:nth-child(3) { background: #d4d4d4; }
.hero__card-bar em {
  margin-left: auto; font-style: normal; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--ink-3);
}
.hero__card pre { margin: 0; white-space: pre; overflow-x: auto; line-height: 1.55; font-size: 13px; }
.hero__card code { color: var(--ink-1); }
.t-com { color: #94a3b8; font-style: italic; }
.t-key { color: #7c3aed; }
.t-str { color: #b45309; }
.t-num { color: #0e7490; }
.t-fn  { color: #be185d; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  color: var(--ink-4); opacity: 0.9;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.hero__scroll:hover { opacity: 1; transform: translateX(-50%) translateY(-2px); color: var(--ink-2); }
.hero__scroll-dot { animation: scrollDot 2s ease-in-out infinite; }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(10px); opacity: 0 } 100% { transform: translateY(0); opacity: 0 } }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 120px; min-height: auto; }
  .hero__card { order: 2; max-width: 560px; }
  .hero__scroll { display: none; }
}

/* ----------------- About ----------------- */
.about {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.about__col p { font-size: 16px; color: var(--ink-2); }

.card {
  border-radius: var(--radius);
  padding: 24px 26px;
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.card--glass { background: #fff; }
.card--glass:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.card--mini { margin-top: 14px; }
.card__title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-3); margin-bottom: 14px; font-weight: 600;
}

.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li {
  position: relative; padding-left: 28px; color: var(--ink-2); font-size: 15px;
}
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px;
  background: var(--ink-0); border-radius: 50%;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
}

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

/* ----------------- Timeline ----------------- */
.timeline {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 24px;
  position: relative;
}
.timeline::before {
  content: ''; position: absolute; left: 13px; top: 4px; bottom: 4px;
  width: 1.5px;
  background: var(--border);
  border-radius: 2px;
}
.timeline__item { position: relative; padding-left: 52px; }
.timeline__marker {
  position: absolute; left: 4px; top: 8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--ink-0);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--border);
}
.timeline__meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  color: var(--ink-3); margin-bottom: 10px;
  letter-spacing: 0.01em;
}
.timeline__date { color: var(--ink-0); font-weight: 500; }
.timeline__loc::before { content: '·'; margin-right: 14px; color: var(--ink-4); }
.timeline__body { padding: 22px 26px; box-shadow: var(--shadow-sm); }
.timeline__body h3 { font-size: 20px; margin-bottom: 4px; color: var(--ink-0); }
.timeline__body h3 span { color: var(--ink-3); font-weight: 500; font-size: 15.5px; }
.timeline__role { color: var(--ink-2); margin-bottom: 12px; font-size: 15px; }
.timeline__body ul { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 7px; color: var(--ink-2); font-size: 14.5px; }
.timeline__body li::marker { color: var(--ink-4); }

/* ----------------- Projects ----------------- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.project {
  position: relative;
  padding: 26px 26px 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.project:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.project__tag {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-sunken); color: var(--ink-2);
  border: 1px solid var(--border); margin-bottom: 12px;
}
.project h3 { font-size: 21px; margin-bottom: 8px; }
.project p { font-size: 14.5px; color: var(--ink-2); margin-bottom: 14px; }
.project__chips {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.project__chips li {
  font-size: 12px; color: var(--ink-2);
  padding: 4px 9px; border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
}

/* ----------------- Skills ----------------- */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.skill-group {
  padding: 22px 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.skill-group:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.skill-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 14px; font-weight: 600; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-size: 13px; color: var(--ink-1);
  padding: 5px 11px; border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}
.chips li:hover { background: #fff; border-color: var(--ink-0); }
.chips--flags li { font-weight: 500; }

/* ----------------- Contact ----------------- */
.contact { max-width: 980px; margin: 0 auto; }
.contact__head { margin-bottom: 40px; text-align: center; }
.contact__head .section__num { margin-bottom: 18px; }
.contact__head .section__title { font-size: clamp(32px, 5vw, 54px); }
.contact__head .section__kicker { margin: 0 auto; }

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}
.contact__card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.contact__card:hover { transform: translateY(-2px); border-color: var(--ink-0); box-shadow: var(--shadow-md); }
.contact__icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-sunken);
  color: var(--ink-0);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.contact__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); font-weight: 600; }
.contact__value { font-size: 14.5px; color: var(--ink-0); font-weight: 500; word-break: break-word; }

.contact__foot { display: flex; justify-content: center; }

/* ----------------- Footer ----------------- */
.footer { border-top: 1px solid var(--border); margin-top: 32px; background: var(--bg-soft); }
.footer__inner {
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--pad);
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  color: var(--ink-3); font-size: 13.5px;
}
.footer__sep { color: var(--ink-4); }

/* ----------------- Motion: reveal ----------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .hero__scroll-dot, .hero__pulse { animation: none; }
  html { scroll-behavior: auto; }
}

/* ----------------- Small screens fine-tuning ----------------- */
@media (max-width: 560px) {
  .nav { padding: 9px 10px 9px 14px; gap: 8px; }
  .nav__brand { font-size: 15px; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }
  .timeline__item { padding-left: 40px; }
  .timeline::before { left: 9px; }
  .timeline__marker { width: 16px; height: 16px; left: 2px; }
  .timeline__body { padding: 20px; }
  .project, .skill-group, .contact__card { padding: 20px; }
}
