/* ==========================================================================
   Manas Vallabh Bharadia — personal site
   Pure HTML/CSS/JS port. Design tokens, layout & animations from the
   original Tailwind/React build are preserved here as plain CSS.
   ========================================================================== */

/* ---------------------------------- Tokens -------------------------------- */
:root {
  --radius: 0.75rem;
  --radius-xl: calc(var(--radius) + 4px);

  --background: oklch(0.16 0.012 250);
  --foreground: oklch(0.97 0.005 250);

  --card: oklch(0.20 0.014 250);
  --card-foreground: oklch(0.97 0.005 250);

  --primary: oklch(0.86 0.13 85);
  --primary-foreground: oklch(0.18 0.012 250);
  --primary-glow: oklch(0.92 0.10 90);

  --muted: oklch(0.24 0.014 250);
  --muted-foreground: oklch(0.68 0.020 250);

  --border: oklch(1 0 0 / 8%);

  --gradient-hero:
    radial-gradient(ellipse 80% 60% at 50% 0%, oklch(0.86 0.13 85 / 0.12), transparent 60%),
    linear-gradient(180deg, oklch(0.18 0.012 250) 0%, oklch(0.14 0.010 250) 100%);
  --gradient-text: linear-gradient(135deg, oklch(0.97 0.005 250) 0%, oklch(0.86 0.13 85) 100%);
  --shadow-elegant: 0 20px 60px -20px oklch(0 0 0 / 0.6);
  --shadow-glow: 0 0 80px -20px oklch(0.86 0.13 85 / 0.35);
  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ---------------------------------- Reset --------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--border);
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.05; font-weight: 600; }
::selection { background: oklch(0.86 0.13 85 / 0.3); color: var(--foreground); }

/* ------------------------------- Utilities -------------------------------- */
.container { max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
.muted { color: var(--muted-foreground); }
.fg { color: var(--foreground); }
.mono { font-family: var(--font-mono); }
.italic { font-style: italic; }
.display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 400;
}
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.bg-hero { background: var(--gradient-hero); }
.bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, oklch(1 0 0 / 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(1 0 0 / 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, black 40%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, black 40%, transparent 80%);
}
.bg-grid.faded { opacity: 0.6; }
.glass {
  background: oklch(1 0 0 / 0.03);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border: 1px solid oklch(1 0 0 / 0.08);
}

.dot {
  display: inline-block;
  width: 0.5rem; height: 0.5rem;
  border-radius: 9999px;
  background: var(--primary);
}
.glow-dot {
  box-shadow:
    0 0 0 4px oklch(0.86 0.13 85 / 0.15),
    0 0 20px oklch(0.86 0.13 85 / 0.6);
}

/* --------------------------------- Buttons -------------------------------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: transform 0.25s var(--transition-smooth),
              box-shadow 0.25s var(--transition-smooth);
  will-change: transform;
}
.btn-primary:hover {
  transform: scale(1.03);
  box-shadow: 0 0 40px -8px oklch(0.86 0.13 85 / 0.6);
}
.btn-primary .arrow { transition: transform 0.25s var(--transition-smooth); }
.btn-primary:hover .arrow { transform: translateX(2px); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.75rem; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: oklch(0.20 0.014 250 / 0.4);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  transition: background-color 0.25s var(--transition-smooth);
}
.btn-ghost:hover { background: var(--card); }

.btn-link {
  display: inline-flex; align-items: center;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  border-radius: 9999px;
  transition: color 0.25s var(--transition-smooth);
}
.btn-link:hover { color: var(--foreground); }

/* ----------------------------------- Nav ---------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
}
.nav-wrap {
  max-width: 72rem;
  margin: 1rem auto 0;
  padding-inline: 1rem;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.nav-links a { transition: color 0.2s var(--transition-smooth); }
.nav-links a:hover { color: var(--foreground); }
@media (min-width: 768px) {
  .nav-links { display: flex; }
}

/* ----------------------------------- Hero --------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 8rem 0 6rem;
}
@media (min-width: 768px) {
  .hero { padding: 10rem 0 8rem; }
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 768px) {
  .hero-inner { grid-template-columns: 1.3fr 1fr; align-items: center; }
}

.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  background: oklch(0.20 0.014 250 / 0.4);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.hero-title {
  margin-top: 1.5rem;
  font-size: clamp(2.75rem, 7vw, 6rem);
  line-height: 0.95;
}
.hero-sub {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.6;
}
@media (min-width: 768px) {
  .hero-sub { font-size: 1.125rem; }
}
.hero-cta {
  margin-top: 2rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
}
.stats {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
@media (min-width: 640px) { .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stats dt {
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  color: var(--foreground);
}
.stats dd {
  margin-top: 0.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* Portrait */
.hero-portrait {
  position: relative;
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
}
.portrait-glow {
  position: absolute; inset: -1rem;
  background: oklch(0.86 0.13 85 / 0.10);
  border-radius: 1.5rem;
  filter: blur(48px);
}
.portrait-frame {
  position: relative; overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elegant);
}
.portrait-frame img {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
}
.portrait-caption {
  position: absolute; inset: auto 0 0 0;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}
.caption-name { font-size: 1.5rem; color: #fff; }
.caption-sub  { font-size: 0.75rem; color: rgba(255, 255, 255, 0.7); }

/* --------------------------------- Sections ------------------------------- */
.section { position: relative; padding: 6rem 0; }
@media (min-width: 768px) { .section { padding: 8rem 0; } }

.section-head { margin-bottom: 3rem; max-width: 48rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow.centered { justify-content: center; display: flex; }
.eyebrow.plain { letter-spacing: 0.2em; }
.eyebrow .rule {
  display: inline-block;
  width: 2rem; height: 1px;
  background: oklch(0.86 0.13 85 / 0.6);
}
.section-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
}

/* --------------------------------- About ---------------------------------- */
.about-grid {
  display: grid; gap: 2.5rem;
}
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 2fr 1fr; }
}
.about-copy { display: flex; flex-direction: column; gap: 1.25rem; font-size: 1rem; line-height: 1.7; }
@media (min-width: 768px) { .about-copy { font-size: 1.125rem; } }
.about-meta { display: flex; flex-direction: column; gap: 1rem; }
.about-meta li {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.about-meta .k { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
.about-meta .v { text-align: right; font-size: 0.875rem; font-weight: 500; }

/* ------------------------------ Card premium ------------------------------ */
.card-premium {
  position: relative;
  background: linear-gradient(180deg, oklch(0.22 0.014 250) 0%, oklch(0.19 0.012 250) 100%);
  border: 1px solid oklch(1 0 0 / 0.08);
  border-radius: var(--radius-xl);
  transition: all 0.5s var(--transition-smooth);
}
.card-premium:hover {
  border-color: oklch(0.86 0.13 85 / 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-elegant), var(--shadow-glow);
}
.pad { padding: 1.75rem; }

/* --------------------------------- Timeline ------------------------------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 768px) { .timeline { gap: 2rem; } }
.timeline-line {
  position: absolute; left: 1rem; top: 0.5rem; bottom: 0.5rem; width: 1px;
  background: linear-gradient(to bottom, oklch(0.86 0.13 85 / 0.4), var(--border), transparent);
}
@media (min-width: 768px) { .timeline-line { left: 140px; } }

.timeline-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .timeline-item { grid-template-columns: 140px 24px 1fr; gap: 1.5rem; }
}
.timeline-year {
  display: none;
  padding-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
}
@media (min-width: 768px) { .timeline-year { display: block; } }

.timeline-node {
  position: relative;
  display: flex; justify-content: center;
  padding-top: 1.5rem;
}
.timeline-node .dot { width: 0.75rem; height: 0.75rem; margin-top: 0.25rem; z-index: 1; }

.timeline-card { padding: 1.5rem; }
@media (min-width: 768px) { .timeline-card { padding: 1.75rem; } }
.timeline-card-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
}
.timeline-card-head h3 { font-size: 1.5rem; }
@media (min-width: 768px) { .timeline-card-head h3 { font-size: 1.875rem; } }
.timeline-card .muted {
  margin-top: 0.75rem;
  font-size: 0.875rem; line-height: 1.65;
}
@media (min-width: 768px) { .timeline-card .muted { font-size: 1rem; } }
.chip {
  border: 1px solid var(--border);
  background: oklch(0.16 0.012 250 / 0.4);
  border-radius: 9999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.chip-mobile { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
@media (min-width: 768px) { .chip-mobile { display: none; } }

/* -------------------------------- Grids ---------------------------------- */
.grid-2, .grid-3 { display: grid; gap: 1.25rem; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.role { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); }
.pad h3 { margin-top: 0.5rem; font-size: 1.5rem; }
@media (min-width: 768px) { .pad h3 { font-size: 1.875rem; } }
.pad .muted { margin-top: 1rem; font-size: 0.875rem; line-height: 1.65; }
@media (min-width: 768px) { .pad .muted { font-size: 1rem; } }
.card-title { font-size: 1.5rem; }
.achievement-k { font-size: clamp(2.25rem, 4vw, 3rem); }

/* --------------------------------- Skills --------------------------------- */
.skills { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.skill-chip {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border);
  background: oklch(0.20 0.014 250 / 0.5);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--foreground);
  transition: transform 0.25s var(--transition-smooth),
              border-color 0.25s var(--transition-smooth),
              background-color 0.25s var(--transition-smooth);
}
.skill-chip:hover {
  border-color: oklch(0.86 0.13 85 / 0.5);
  background: var(--card);
  transform: translateY(-2px);
}

/* --------------------------------- Vision --------------------------------- */
.vision { padding: 8rem 0; overflow: hidden; }
@media (min-width: 768px) { .vision { padding: 10rem 0; } }
.vision-glow {
  position: absolute; inset: 0;
  top: 50%; transform: translateY(-50%);
  height: 400px;
  background: oklch(0.86 0.13 85 / 0.05);
  filter: blur(48px);
  pointer-events: none;
}
.vision-inner { position: relative; max-width: 56rem; text-align: center; }
.vision-title {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.05;
}
.vision-body {
  margin: 2rem auto 0;
  max-width: 36rem;
  font-size: 1rem; line-height: 1.7;
}
@media (min-width: 768px) { .vision-body { font-size: 1.25rem; } }

/* --------------------------------- Contact -------------------------------- */
.contact { padding: 8rem 0; }
@media (min-width: 768px) { .contact { padding: 10rem 0; } }
.contact-container { max-width: 64rem; }
.contact-card { position: relative; overflow: hidden; padding: 2.5rem; }
@media (min-width: 768px) { .contact-card { padding: 4rem; } }
.contact-glow {
  position: absolute; top: -6rem; right: -6rem;
  width: 18rem; height: 18rem;
  background: oklch(0.86 0.13 85 / 0.20);
  border-radius: 9999px;
  filter: blur(48px);
  pointer-events: none;
}
.contact-title { margin-top: 1rem; font-size: clamp(2.25rem, 5vw, 3.75rem); }
.contact-sub { margin-top: 1.25rem; max-width: 36rem; font-size: 1rem; }
@media (min-width: 768px) { .contact-sub { font-size: 1.125rem; } }
.contact-grid { margin-top: 2.5rem; }

.contact-tile {
  display: block;
  border: 1px solid var(--border);
  background: oklch(0.16 0.012 250 / 0.4);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: border-color 0.25s var(--transition-smooth),
              background-color 0.25s var(--transition-smooth);
}
.contact-tile:hover {
  border-color: oklch(0.86 0.13 85 / 0.5);
  background: var(--background);
}
.contact-tile .k { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
.contact-tile .v {
  margin-top: 0.5rem;
  font-weight: 500;
  color: var(--foreground);
  transition: color 0.25s var(--transition-smooth);
}
.contact-tile:hover .v { color: var(--primary); }
.contact-tile .arrow {
  display: inline-block;
  margin-left: 0.25rem;
  transition: transform 0.25s var(--transition-smooth);
}
.contact-tile:hover .arrow { transform: translateX(2px); }

.footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
@media (min-width: 768px) { .footer { flex-direction: row; } }

/* ------------------------------- Reveal anim ------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s var(--transition-smooth),
    transform 0.9s var(--transition-smooth);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ----------------------------- Custom cursor ------------------------------ */
html.custom-cursor,
html.custom-cursor * { cursor: none !important; }
.cursor-dot,
.cursor-ring {
  position: fixed;
  left: 0; top: 0;
  pointer-events: none;
  z-index: 100;
  display: none;
  will-change: transform;
}
html.custom-cursor .cursor-dot,
html.custom-cursor .cursor-ring { display: block; }
.cursor-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 9999px;
  background: var(--primary);
  mix-blend-mode: screen;
  box-shadow:
    0 0 12px oklch(0.86 0.13 85 / 0.9),
    0 0 28px oklch(0.86 0.13 85 / 0.5);
  animation: cursor-pulse 2.4s ease-in-out infinite;
}
.cursor-ring {
  width: 2.25rem; height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid oklch(0.86 0.13 85 / 0.4);
  transition:
    width 0.3s var(--transition-smooth),
    height 0.3s var(--transition-smooth),
    margin 0.3s var(--transition-smooth),
    border-color 0.3s var(--transition-smooth),
    background-color 0.3s var(--transition-smooth);
}
.cursor-ring.hovering {
  width: 3.5rem; height: 3.5rem;
  margin: -10px 0 0 -10px;
  border-color: var(--primary);
  background: oklch(0.86 0.13 85 / 0.10);
}
@keyframes cursor-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.75; }
}

/* ------------------------------ Reduced motion ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
