/* ==========================================================================
   WARM GRAY & AMBER — Gruvbox-Inspired Premium Portfolio
   Pranav Kapale | MkDocs Material Override
   ========================================================================== */

/* ─── DESIGN TOKENS ─── */
:root {
  --accent:        #d79921;
  --accent-2:      #fabd2f;
  --accent-soft:   rgba(215, 153, 33, 0.10);
  --accent-line:   rgba(215, 153, 33, 0.28);
  --accent-glow:   rgba(215, 153, 33, 0.06);

  --serif: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --card-radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── LIGHT MODE ─── */
[data-md-color-scheme="default"] {
  --bg:          #fbf1c7;
  --bg-1:        #f2e5bc;
  --bg-card:     rgba(242, 229, 188, 0.6);
  --line:        #d5c4a1;
  --ink:         #3c3836;
  --ink-2:       #504945;
  --ink-3:       #7c6f64;
  --ink-4:       #928374;

  --glass-bg:    rgba(251, 241, 199, 0.5);
  --glass-border: rgba(213, 196, 161, 0.5);
  --glass-shadow: rgba(215, 153, 33, 0.06);

  --hero-bg:     linear-gradient(170deg, #fbf1c7 0%, #f2e5bc 40%, #ebdbb2 100%);
  --grid-color:  rgba(60, 56, 54, 0.06);
}

/* ─── DARK MODE ─── */
[data-md-color-scheme="slate"] {
  --bg:          #282828;
  --bg-1:        #1d2021;
  --bg-card:     rgba(40, 40, 40, 0.7);
  --line:        #3c3836;
  --ink:         #ebdbb2;
  --ink-2:       #d5c4a1;
  --ink-3:       #a89984;
  --ink-4:       #7c6f64;

  --glass-bg:    rgba(29, 32, 33, 0.6);
  --glass-border: rgba(60, 56, 54, 0.6);
  --glass-shadow: rgba(215, 153, 33, 0.08);

  --hero-bg:     linear-gradient(170deg, #1d2021 0%, #282828 40%, #32302f 100%);
  --grid-color:  rgba(235, 219, 178, 0.04);
}


/* ─── GLOBAL OVERRIDES ─── */
[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-tabs {
  background-color: rgba(29, 32, 33, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

[data-md-color-scheme="default"] .md-header,
[data-md-color-scheme="default"] .md-tabs {
  background-color: rgba(251, 241, 199, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

/* Warm text selection */
::selection {
  background: var(--accent);
  color: #1d2021;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb {
  background: var(--accent-line);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Film grain overlay for texture */
.md-content::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.9 0 0 0 0 0.9 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}


/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92vh;
  padding: 120px clamp(20px, 4vw, 48px) 80px;
  background: var(--hero-bg);
  overflow: hidden;
  text-align: left;
}

/* ── Grid backdrop ── */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 80%);
  opacity: 0.6;
  pointer-events: none;
}

/* ── Ambient glow ── */
.hero__glow {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle at center, var(--accent-glow), transparent 60%);
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.8;
}


/* ── Hero Content ── */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  width: 100%;
}

/* Eyebrow badge */
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg);
  margin-bottom: 40px;
  text-transform: lowercase;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 0.2s forwards;
}

.hero__live-dot {
  width: 6px;
  height: 6px;
  background: #b8bb26;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(184, 187, 38, 0.6);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(184, 187, 38, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(184, 187, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 187, 38, 0); }
}

/* Name heading */
.hero__name {
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
  color: var(--ink);
}

.hero__line {
  display: block;
  overflow: hidden;
}

.hero__line span {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  animation: revealLine 0.9s var(--ease) forwards;
}

.hero__line:nth-child(1) span { animation-delay: 0.3s; }
.hero__line:nth-child(2) span { animation-delay: 0.5s; }

@keyframes revealLine {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__accent {
  font-style: italic;
  color: var(--accent);
}

/* Subtitle & typewriter */
.hero__title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 16px;
  min-height: 1.8em;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 0.7s forwards;
}

.hero__cursor {
  display: inline-block;
  color: var(--accent);
  font-weight: 300;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.hero__subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-3);
  max-width: 580px;
  margin: 0 0 36px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 0.9s forwards;
}


/* ── CTA Buttons ── */
.hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s var(--ease) 1.1s forwards;
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all 0.25s var(--ease);
  cursor: pointer;
}

.hero__btn--primary {
  background: var(--accent) !important;
  color: #1d2021 !important;
  border: 1px solid var(--accent) !important;
}

.hero__btn--primary:hover {
  background: var(--accent-2) !important;
  box-shadow: 0 4px 20px rgba(215, 153, 33, 0.3) !important;
  transform: translateY(-2px) !important;
  color: #1d2021 !important;
}

.hero__btn--outline {
  background: transparent !important;
  color: var(--ink) !important;
  border: 1px solid var(--glass-border) !important;
}

.hero__btn--outline:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--accent-soft) !important;
  transform: translateY(-2px) !important;
}

.hero__btn--ghost {
  background: transparent !important;
  color: var(--ink-2) !important;
  border: 1px solid transparent !important;
  padding-left: 4px !important;
}

.hero__btn--ghost:hover {
  color: var(--accent) !important;
}


/* ==========================================================================
   TYPOGRAPHY OVERRIDES
   ========================================================================== */
.md-typeset h2 {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-top: 4rem;
}

.md-typeset h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.md-typeset h4 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink-2);
}

/* Amber highlight for bold metric text */
.md-typeset strong {
  color: var(--ink);
  font-weight: 650;
}

/* Make inline code warm */
.md-typeset code {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.85em;
}


/* ==========================================================================
   GLASSMORPHISM ADMONITION CARDS
   ========================================================================== */
.md-typeset .admonition,
.md-typeset details {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-left: 3px solid var(--accent) !important;
  border-radius: var(--card-radius) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px var(--glass-shadow);
  transition: all 0.35s var(--ease);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.md-typeset .admonition:hover,
.md-typeset details:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 32px var(--glass-shadow),
    0 0 0 1px var(--accent-line);
  border-color: var(--accent-line) !important;
}

.md-typeset .admonition > .admonition-title,
.md-typeset details > summary {
  background: var(--accent-soft) !important;
  border-bottom: 1px solid var(--glass-border);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

/* Tip admonitions — slightly different accent */
.md-typeset .admonition.tip {
  border-left-color: #b8bb26 !important;
}

.md-typeset .admonition.tip > .admonition-title {
  background: rgba(184, 187, 38, 0.08) !important;
}

/* Info admonitions */
.md-typeset .admonition.info {
  border-left-color: #83a598 !important;
}

.md-typeset .admonition.info > .admonition-title {
  background: rgba(131, 165, 152, 0.08) !important;
}


/* ==========================================================================
   TABLES
   ========================================================================== */
.md-typeset table:not([class]) {
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--glass-shadow);
}

.md-typeset table:not([class]) thead {
  background: var(--accent-soft);
}

.md-typeset table:not([class]) th {
  font-family: var(--mono);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.md-typeset table:not([class]) td {
  border-color: var(--glass-border);
}

.md-typeset table:not([class]) tbody tr {
  transition: background 0.2s ease;
}

.md-typeset table:not([class]) tbody tr:hover {
  background: var(--accent-soft);
}


/* ==========================================================================
   SCROLL-REVEAL ANIMATIONS
   ========================================================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.65s var(--ease),
    transform 0.65s var(--ease);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.scroll-reveal:nth-child(2)  { transition-delay: 0.04s; }
.scroll-reveal:nth-child(3)  { transition-delay: 0.08s; }
.scroll-reveal:nth-child(4)  { transition-delay: 0.12s; }
.scroll-reveal:nth-child(5)  { transition-delay: 0.16s; }


/* ==========================================================================
   HR DIVIDERS — Warm Gradient
   ========================================================================== */
.md-typeset hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--line) 20%,
    var(--accent-line) 50%,
    var(--line) 80%,
    transparent 100%
  );
  margin: 3.5rem 0;
  opacity: 0.6;
}


/* ==========================================================================
   EXPERIENCE BULLETS — Clean Spacing
   ========================================================================== */
.md-content__inner > ul > li,
.md-typeset .md-content__inner > ul > li {
  position: relative;
  padding-left: 0.5rem;
  margin-bottom: 1.1rem;
  line-height: 1.75;
}


/* ==========================================================================
   ENTRY ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ==========================================================================
   NARROW READING COLUMN — Editorial Layout
   ========================================================================== */
.md-content__inner {
  max-width: 820px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 48px);
  padding-right: clamp(20px, 4vw, 48px);
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    padding: 100px 20px 60px;
  }

  .hero__name {
    font-size: clamp(2.4rem, 12vw, 3.5rem);
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__btn {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 70vh;
    padding: 80px 16px 40px;
  }
}