:root {
  --paper: #f8efe2;
  --paper-strong: #efe1cb;
  --ink: #2f2018;
  --muted: #705949;
  --maroon: #6f2c31;
  --maroon-deep: #4b191f;
  --saffron: #bd7a2d;
  --leaf: #425c44;
  --gold: #d8b36a;
  --line: rgba(88, 49, 35, 0.16);
  --panel: rgba(255, 251, 244, 0.72);
  --panel-strong: rgba(255, 248, 238, 0.88);
  --shadow: 0 24px 60px rgba(82, 51, 28, 0.12);
  --radius-lg: 28px;
  --radius-md: 22px;
  --sidebar-width: 292px;
  --max-content: 1320px;
  --font-body: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-display: Georgia, "Palatino Linotype", "Book Antiqua", Garamond, serif;
  --font-devanagari: "Nirmala UI", "Kokila", Mangal, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(189, 122, 45, 0.18), transparent 26%),
    radial-gradient(circle at bottom right, rgba(111, 44, 49, 0.12), transparent 22%),
    linear-gradient(180deg, #fcf6ec 0%, var(--paper) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 14px;
  border: 1px solid rgba(111, 44, 49, 0.12);
  pointer-events: none;
  z-index: 0;
}

body.offcanvas-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container-fluid {
  width: 100%;
}

.px-0 {
  padding-left: 0;
  padding-right: 0;
}

.row {
  --gutter: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(var(--gutter) * -0.5);
  margin-right: calc(var(--gutter) * -0.5);
}

[class*="col-"] {
  width: 100%;
}

.row > [class*="col-"] {
  padding-left: calc(var(--gutter) * 0.5);
  padding-right: calc(var(--gutter) * 0.5);
}

.g-3 {
  --gutter: 1rem;
}

.g-4 {
  --gutter: 1.5rem;
}

.align-items-center {
  align-items: center;
}

.d-none {
  display: none !important;
}

.d-lg-none {
  display: block;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.nav {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.offcanvas-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(34, 19, 16, 0.42);
  backdrop-filter: blur(2px);
}

.heritage-canvas,
.heritage-overlay,
.grain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.heritage-canvas {
  z-index: -3;
  background-image:
    url("assets/images/mithila-pattern.svg"),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18));
  background-repeat: repeat, no-repeat;
  background-size: 380px, cover;
  opacity: 0.34;
}

.heritage-overlay {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(239, 225, 203, 0.78), rgba(248, 239, 226, 0.58) 12%, rgba(248, 239, 226, 0.58) 88%, rgba(239, 225, 203, 0.78)),
    radial-gradient(circle at top center, rgba(216, 179, 106, 0.16), transparent 26%);
}

.grain-layer {
  z-index: -1;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(47, 32, 24, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 32, 24, 0.08) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

.menu-fab {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 13;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--maroon), var(--saffron));
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 4px;
}

.menu-fab span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fffaf0;
  border-radius: 999px;
}

.menu-fab .visually-hidden {
  width: 1px;
  height: 1px;
}

.sidebar-shell {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--sidebar-width) + 2rem);
  padding: 1.2rem 1rem;
  z-index: 8;
}

.sidebar-card,
.heritage-card,
.spotlight-card,
.portrait-card,
.quote-card,
.metric-card,
.timeline-item,
.project-item,
.skill-item,
.education-item {
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.82), var(--panel));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sidebar-card {
  height: 100%;
  border-radius: 30px;
  padding: 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 249, 239, 0.9), rgba(248, 239, 226, 0.74));
}

.sidebar-kicker,
.section-kicker,
.hero-sanskrit {
  font-family: var(--font-devanagari);
}

.sidebar-kicker {
  margin: 0;
  color: var(--saffron);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.sidebar-title,
.hero-title,
.section-heading h2,
.spotlight-card h3,
.project-title,
.skill-item h3,
.education-item h3,
.timeline-body h3,
.offcanvas-title {
  font-family: var(--font-display);
}

.sidebar-title {
  margin: 0.2rem 0 0;
  font-size: 2.2rem;
  color: var(--maroon-deep);
}

.sidebar-copy {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.sidebar-nav {
  margin-top: 1.6rem;
  gap: 0.45rem;
}

.sidebar-nav .nav-link,
.mobile-nav .nav-link {
  border-radius: 999px;
  padding: 0.75rem 0.95rem;
  color: var(--muted);
  transition: all 180ms ease;
}

.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link:hover,
.mobile-nav .nav-link.active,
.mobile-nav .nav-link:hover {
  color: var(--maroon);
  background: rgba(189, 122, 45, 0.1);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
}

.sidebar-footer a {
  color: var(--maroon);
  font-weight: 700;
}

.offcanvas {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(86vw, 360px);
  z-index: 12;
  transform: translateX(-104%);
  transition: transform 220ms ease;
}

.offcanvas.is-open {
  transform: translateX(0);
}

.heritage-offcanvas {
  background:
    linear-gradient(268deg, rgba(75, 25, 31, 0.8), rgba(238, 231, 232, 1));
  color: #1c1b1a;
}

.offcanvas-header,
.offcanvas-body {
  padding: 1.4rem 1.2rem;
}

.offcanvas-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.offcanvas-body {
  display: flex;
}

.offcanvas-title {
  font-size: 1.8rem;
  margin: 0;
}

.mobile-nav {
  width: 100%;
  gap: 0.55rem;
}

.btn-close {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-close::before,
.btn-close::after {
  content: "";
  position: absolute;
  top: 19px;
  left: 11px;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.btn-close::before {
  transform: rotate(45deg);
}

.btn-close::after {
  transform: rotate(-45deg);
}

.btn-close-white {
  color: #fff9f0;
}

.content-shell {
  position: relative;
  z-index: 4;
  max-width: var(--max-content);
  margin-left: calc(var(--sidebar-width) + 3.3rem);
  margin-right: auto;
  padding: 1.2rem 1.4rem 4rem;
}

.section-space {
  padding: 2.4rem 0 3rem;
}

.hero-panel {
  position: relative;
}

.hero-side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-side {
    max-width: none;
    margin: 0;
    align-items: flex-end;
  }
}

.hero-panel {
  padding: 2rem 2rem 1.25rem;
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 250, 242, 0.92), rgba(247, 236, 220, 0.78)),
    url("assets/images/mithila-pattern.svg");
  background-size: cover, 480px;
  background-position: center, center;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.section-kicker {
  margin: 0;
  color: var(--saffron);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.hero-seal,
.hero-sanskrit {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.48rem 0.85rem;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
}

.hero-seal {
  color: var(--maroon);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-sanskrit {
  color: var(--leaf);
  font-size: 1rem;
}

.hero-title {
  margin: 1rem 0 0;
  font-size: clamp(3rem, 5vw, 5.2rem);
  line-height: 0.95;
  color: var(--maroon-deep);
}

.hero-title span {
  display: block;
  margin-top: 0.95rem;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  color: var(--leaf);
  font-weight: 500;
}

.hero-lead {
  margin: 1.4rem 0 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.heritage-btn {
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.heritage-btn-primary {
  background: linear-gradient(135deg, var(--maroon), var(--saffron));
  color: #fff8ef;
}

.heritage-btn-primary:hover {
  color: #fff8ef;
  transform: translateY(-1px);
}

.heritage-btn-secondary {
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  border-color: var(--line);
}

.heritage-btn-secondary:hover {
  color: var(--maroon);
  border-color: rgba(189, 122, 45, 0.45);
}

.hero-metrics {
  margin-top: 1.7rem;
}

.metric-card {
  padding: 1.15rem;
  border-radius: 22px;
  min-height: 100%;
}

.metric-card strong {
  display: block;
  color: var(--maroon-deep);
  font-size: 2rem;
  line-height: 1;
}

.metric-card span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
}

.portrait-card {
  border-radius: 30px;
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
  max-width: 320px;
  width: 100%;
}

.portrait-frame {
  padding: 0.8rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.9), rgba(255, 243, 229, 0.74));
  border: 1px solid var(--line);
}

.portrait-frame img {
  width: 100%;
  border-radius: 18px;
}

.mini-scroll {
  border-radius: 20px;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
}

.mini-scroll__label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--saffron);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mini-scroll p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.quote-card {
  border-radius: 26px;
  padding: 1.2rem 1.3rem;
  color: var(--maroon-deep);
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 320px;
  width: 100%;
}

.quote-card p {
  margin: 0;
}

.section-heading {
  margin-bottom: 1.6rem;
}

.section-heading h2 {
  margin: 0.3rem 0 0;
  color: var(--maroon-deep);
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1;
}

.heritage-card,
.spotlight-card,
.timeline-item,
.project-item,
.skill-item,
.education-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.heritage-card,
.spotlight-card {
  padding: 1.5rem;
}

.card-motif {
  position: absolute;
  inset: auto -48px -48px auto;
  width: 150px;
  height: 150px;
  background: url("assets/images/mithila-pattern.svg") center/cover no-repeat;
  opacity: 0.12;
}

.heritage-card p,
.timeline-body p,
.education-item p,
.project-item p,
.skill-item p {
  color: var(--muted);
  line-height: 1.8;
}

.quest-grid {
  align-items: stretch;
}

.quest-showcase {
  background:
    linear-gradient(155deg, rgba(255, 247, 232, 0.96), rgba(241, 226, 197, 0.84)),
    url("assets/images/mithila-pattern.svg");
  background-size: cover, 420px;
  background-position: center, center;
}

.quest-lead {
  font-size: 1.06rem;
}

.quest-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0 1.1rem;
}

.quest-points span {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  color: var(--maroon);
  font-size: 0.88rem;
  font-weight: 700;
}

.quest-sidecard {
  min-height: 100%;
}

.heritage-list,
.project-highlights,
.timeline-highlights {
  margin: 0;
  padding-left: 1.2rem;
}

.heritage-list li,
.project-highlights li,
.timeline-highlights li {
  color: var(--muted);
}

.heritage-list li + li,
.project-highlights li + li,
.timeline-highlights li + li {
  margin-top: 0.55rem;
}

.filter-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.2rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 251, 245, 0.72);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.filter-ribbon__label {
  color: var(--muted);
  font-weight: 700;
}

.filter-ribbon__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.filter-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: all 180ms ease;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff8ef;
  background: linear-gradient(135deg, var(--maroon), var(--saffron));
  border-color: transparent;
}

.spotlight-card {
  min-height: 100%;
  background:
    linear-gradient(165deg, rgba(255, 248, 236, 0.96), rgba(246, 232, 208, 0.82)),
    url("assets/images/mithila-pattern.svg");
  background-size: cover, 420px;
  background-position: center, center;
}

.spotlight-meta {
  display: inline-block;
  color: var(--saffron);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.spotlight-card h3 {
  margin: 0.5rem 0 0;
  color: var(--maroon-deep);
  font-size: clamp(2rem, 3vw, 3rem);
}

.spotlight-subtitle {
  margin: 0.4rem 0 0.85rem;
  color: var(--leaf);
  font-weight: 700;
}

.spotlight-tags,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.spotlight-tags span,
.project-tags span {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 0.82rem;
}

.spotlight-link,
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  color: var(--maroon);
  font-weight: 800;
}

.project-item,
.skill-item,
.education-item {
  padding: 1.35rem;
}

.project-item {
  height: 100%;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.project-item:hover {
  transform: translateY(-4px);
}

.project-index {
  color: var(--saffron);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.project-title,
.skill-item h3,
.education-item h3,
.timeline-body h3 {
  margin: 0.35rem 0 0;
  color: var(--maroon-deep);
}

.project-subtitle {
  margin: 0.35rem 0 0.8rem;
  color: var(--leaf);
  font-weight: 700;
}

.skill-summary {
  margin: 0.7rem 0 1rem;
}

.skill-bars {
  display: grid;
  gap: 0.8rem;
}

.skill-row {
  display: grid;
  gap: 0.36rem;
}

.skill-row header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(85, 55, 35, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--saffron), var(--maroon));
  transition: width 1.2s ease;
}

.timeline-shell {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.35rem;
}

.timeline-meta span {
  display: block;
  color: var(--saffron);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.timeline-meta strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--maroon-deep);
}

.contact-space {
  padding-bottom: 2rem;
}

.site-footer {
  position: relative;
  z-index: 4;
  margin-left: calc(var(--sidebar-width) + 3.3rem);
  margin-right: auto;
  padding: 0 1.4rem 2.5rem;
  color: var(--muted);
}

.footer-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(111, 44, 49, 0.32), transparent);
  margin-bottom: 1rem;
}

.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

.reveal-delay-1 {
  transition-delay: 90ms;
}

.reveal-delay-2 {
  transition-delay: 180ms;
}

.pulse-soft {
  animation: pulseSoft 3.4s ease-in-out infinite;
}

@keyframes pulseSoft {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: var(--shadow);
  }

  50% {
    transform: translateY(-2px);
    box-shadow: 0 28px 70px rgba(82, 51, 28, 0.16);
  }
}

@media (min-width: 768px) {
  .col-md-4 {
    width: 33.3333%;
  }

  .col-md-6 {
    width: 50%;
  }
}

@media (min-width: 992px) {
  .d-lg-flex {
    display: flex !important;
  }

  .d-lg-none {
    display: none !important;
  }

  .col-lg-5 {
    width: 41.6667%;
  }

  .col-lg-6 {
    width: 50%;
  }

  .col-lg-7 {
    width: 58.3333%;
  }
}

@media (min-width: 1200px) {
  .col-xl-5 {
    width: 41.6667%;
  }

  .col-xl-7 {
    width: 58.3333%;
  }
}

@media (max-width: 1399px) {
  .content-shell,
  .site-footer {
    margin-left: calc(var(--sidebar-width) + 2.3rem);
  }
}

@media (max-width: 1199px) {
  .hero-panel {
    padding: 1.5rem;
  }
}

@media (max-width: 991px) {
  .content-shell,
  .site-footer {
    margin-left: 0;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .spotlight-card {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 767px) {
  .section-space {
    padding: 2rem 0 2.3rem;
  }

  .hero-title {
    font-size: 2.55rem;
  }

  .hero-title span {
    font-size: 1.1rem;
  }

  .hero-header {
    align-items: flex-start;
  }

  .filter-ribbon {
    padding: 0.9rem;
  }
}
