/* ==========================================================================
   Abhishek Mandal — Civil Engineering Portfolio
   Editorial Architectural Theme: Warm Limestone, Slate Navy, Pine Green & Paper
   ========================================================================== */

:root {
  --ink-950: #0C1524;
  --slate-900: #111C2D;
  --slate-800: #1C2A3E;
  --slate-700: #334155;
  --slate-600: #4E5B6D;
  --slate-500: #6B7789;
  --slate-400: #94A3B8;

  --limestone-100: #F5F4EF;
  --limestone-200: #ECEAE3;
  --rule: #DBD8CE;
  --rule-dark: rgba(245, 244, 239, 0.14);
  --paper: #FFFFFF;

  --pine-700: #144837;
  --pine-600: #1B5E48;
  --pine-500: #237A5E;
  --pine-soft: rgba(27, 94, 72, 0.09);
  --river-accent: #38BDF8;

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 8px 30px rgba(17, 28, 45, 0.06);
  --shadow-lift: 0 18px 42px rgba(17, 28, 45, 0.11);

  --nav-height: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--slate-800);
  background-color: var(--limestone-100);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--pine-600);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 2000;
  background: var(--slate-900);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 14px;
}

/* Containers & Sections */
.container {
  width: min(1180px, 90%);
  margin-inline: auto;
}

.section {
  padding: clamp(78px, 8.5vw, 118px) 0;
  position: relative;
}

.section-limestone {
  background-color: var(--limestone-100);
}

.section-white {
  background-color: var(--paper);
}

.section-slate {
  background-color: var(--slate-900);
  color: var(--limestone-100);
}

/* Editorial Section Headers */
.section-header {
  max-width: 760px;
  margin-bottom: 52px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pine-600);
  margin-bottom: 12px;
}

.section-eyebrow::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--pine-600);
}

.section-header-dark .section-eyebrow {
  color: #6EE7B7;
}

.section-header-dark .section-eyebrow::before {
  background: #6EE7B7;
}

.section-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 2.95rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.028em;
  color: var(--slate-900);
}

.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  color: var(--pine-600);
}

.section-header-dark .section-title {
  color: var(--paper);
}

.section-header-dark .section-title em {
  color: #86EFAC;
}

.section-lead {
  margin: 0;
  font-size: 1.06rem;
  color: var(--slate-600);
  max-width: 68ch;
}

.section-header-dark .section-lead {
  color: #CBD5E1;
}

/* Tactile Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.93rem;
  border: 1px solid transparent;
  transition: transform 0.24s var(--ease), background-color 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, color 0.24s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.84rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background-color: var(--pine-600);
  color: var(--paper);
  box-shadow: 0 8px 22px rgba(27, 94, 72, 0.22);
}

.btn-primary:hover {
  background-color: var(--pine-700);
  box-shadow: 0 12px 28px rgba(20, 72, 55, 0.28);
}

.btn-outline-dark {
  background-color: transparent;
  color: var(--slate-900);
  border-color: var(--rule);
}

.btn-outline-dark:hover {
  border-color: var(--slate-900);
  background-color: var(--limestone-100);
}

/* ==========================================================================
   Floating Pill Navbar & Seamless Top-Left Circle Wordmark
   ========================================================================== */
.navbar {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  pointer-events: none;
}

.navbar-row {
  position: relative;
  width: 100%;
  max-width: 1320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-wordmark {
  pointer-events: auto;
  position: absolute;
  left: clamp(8px, 2vw, 24px);
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  padding: 8px 16px 8px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.brand-wordmark:hover {
  transform: translateY(-50%) scale(1.02);
}

.navbar.scrolled .brand-wordmark {
  background: rgba(12, 21, 36, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(4, 9, 22, 0.38);
}

.logo-text {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-sans);
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  user-select: none;
}

.logo-initial {
  position: relative;
  font-weight: 700;
  color: #FFFFFF;
  z-index: 1;
}

.logo-initial::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.48em;
  height: 1.48em;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(135deg, #1B5E48 0%, #1F6E7A 100%);
  box-shadow: 0 4px 16px rgba(27, 94, 72, 0.45);
  z-index: -1;
}

.logo-rest {
  position: relative;
  font-weight: 400;
  color: #FFFFFF;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(4, 9, 22, 0.35);
}

.logo-text-sm {
  font-size: 1.22rem;
  padding-left: 8px;
}

.navbar-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 999px;
  background: rgba(12, 21, 36, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 12px 34px rgba(6, 12, 24, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.navbar.scrolled .navbar-pill {
  background: rgba(12, 21, 36, 0.92);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 16px 40px rgba(6, 12, 24, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mobile-brand {
  display: none;
  align-items: center;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  padding: 4px 2px 8px;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #9AA6B8;
  transition: color 0.22s ease;
}

.nav-link:hover {
  color: #E2E8F0;
}

.nav-link.active {
  color: #FFFFFF;
  font-weight: 600;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 34px;
  height: 2px;
  transform: translateX(-50%) scaleX(0);
  border-radius: 999px;
  background: linear-gradient(90deg, #38BDF8 0%, #6EE7B7 50%, #818CF8 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.65);
  opacity: 0;
  transition: transform 0.25s var(--ease), opacity 0.22s ease;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 8px 2px rgba(56, 189, 248, 0.9);
  transform: translateX(-50%) scale(0);
  opacity: 0;
  z-index: 2;
  transition: transform 0.25s var(--ease), opacity 0.22s ease;
}

.nav-link.active::after,
.nav-link.active::before {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: var(--paper);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded='true'] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded='true'] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  pointer-events: auto;
  width: min(420px, 100%);
  margin-top: 10px;
  background: rgba(12, 21, 36, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 16px 20px 22px;
  box-shadow: 0 20px 45px rgba(4, 9, 22, 0.5);
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-link {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: #CBD5E1;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-link:hover,
.mobile-link.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-resume-cta {
  margin-top: 12px;
}

/* ==========================================================================
   Hero Section — Clean Architectural Panorama
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 132px 0 64px;
  display: flex;
  align-items: center;
  background: var(--ink-950);
  color: var(--paper);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.88) contrast(1.03);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(10, 18, 30, 0.90) 0%,
    rgba(17, 28, 45, 0.78) 54%,
    rgba(17, 28, 45, 0.45) 100%
  );
}

.hero-contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.contour-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.2;
}

.contour-2 {
  stroke: rgba(134, 239, 172, 0.16);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.hero-kicker {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #86EFAC;
}

.hero-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 6.4vw, 4.9rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.032em;
  color: var(--paper);
}

.hero-subtitle {
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 400;
  color: #E2E8F0;
}

.hero-subtitle .sep {
  font-style: normal;
  color: #86EFAC;
  margin-inline: 8px;
  font-size: 0.8em;
}

.hero-intro {
  margin: 0 0 34px;
  max-width: 630px;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  color: #DCE3EC;
  line-height: 1.72;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 58px;
}

.btn-hero-primary {
  background: var(--paper);
  color: var(--slate-900);
}

.btn-hero-primary:hover {
  background: var(--limestone-100);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.btn-hero-secondary {
  background: var(--pine-600);
  color: var(--paper);
}

.btn-hero-secondary:hover {
  background: var(--pine-500);
}

.btn-hero-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.btn-hero-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--paper);
}

/* Hairline Architectural Fact Strip */
.hero-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.ledger-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ledger-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--paper);
}

.ledger-label {
  font-size: 0.82rem;
  color: #CBD5E1;
  line-height: 1.45;
}

.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 6px;
}

.scroll-line {
  display: block;
  width: 1.5px;
  height: 30px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 0.95; transform: translateY(6px); }
}

/* ==========================================================================
   About Me & Languages
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: start;
}

.portrait-frame {
  margin: 0;
  background: var(--paper);
  padding: 14px 14px 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.portrait-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius-sm);
}

.portrait-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-top: 14px;
  font-size: 0.86rem;
}

.portrait-caption strong {
  font-family: var(--font-display);
  color: var(--slate-900);
}

.portrait-caption span {
  color: var(--slate-500);
}

.about-lead-paragraph {
  margin: 0 0 20px;
  font-size: 1.22rem;
  line-height: 1.6;
  color: var(--slate-900);
}

.about-paragraph {
  margin: 0 0 18px;
  font-size: 1.02rem;
  color: var(--slate-700);
}

.about-focus-block {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.subsection-label {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate-500);
}

.focus-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
}

.focus-list li {
  position: relative;
  padding-left: 16px;
  font-weight: 500;
  font-size: 0.96rem;
  color: var(--slate-900);
}

.focus-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pine-600);
}

.languages-strip {
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.languages-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pine-600);
}

.language-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--slate-900);
}

.language-items .dot {
  color: var(--slate-400);
}

/* ==========================================================================
   Featured Project Case Study
   ========================================================================== */
.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule-dark);
  border-bottom: 1px solid var(--rule-dark);
  margin-bottom: 40px;
}

.spec-cell {
  padding: 22px 20px 22px 0;
  border-right: 1px solid var(--rule-dark);
  padding-left: 20px;
}

.spec-cell:first-child {
  padding-left: 0;
}

.spec-cell:last-child {
  border-right: none;
  padding-right: 0;
}

.spec-key {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #86EFAC;
  margin-bottom: 6px;
}

.spec-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--paper);
  margin-bottom: 4px;
}

.spec-sub {
  font-size: 0.86rem;
  color: #94A3B8;
}

.case-study-layout {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 32px;
  align-items: start;
}

.details-card {
  padding: 30px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--rule-dark);
}

.details-card h3 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  color: var(--paper);
}

.technical-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  gap: 15px;
}

.technical-list li {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  font-size: 0.94rem;
  color: #E2E8F0;
}

.bullet-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86EFAC;
  margin-top: 9px;
}

.placeholder-notice {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.24);
  border-left: 2.5px solid #86EFAC;
  font-size: 0.85rem;
  color: #CBD5E1;
}

.placeholder-notice code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #86EFAC;
}

.case-study-viewer {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.viewer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.viewer-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #CBD5E1;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.viewer-tab:hover {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--paper);
}

.viewer-tab.active {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--slate-900);
  font-weight: 600;
}

.viewer-stage {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--rule-dark);
  background: var(--ink-950);
}

.viewer-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 0.22s ease;
}

.viewer-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border-top: 1px solid var(--rule-dark);
}

.viewer-tag {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86EFAC;
}

.viewer-stage-bar h4 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--paper);
}

.btn-stage-inspect {
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-stage-inspect:hover {
  background: var(--paper);
  color: var(--slate-900);
}

.viewer-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.thumb-btn {
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.thumb-btn img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 3px;
}

.thumb-btn span {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
}

.thumb-btn:hover,
.thumb-btn.active {
  border-color: #86EFAC;
  color: var(--paper);
  transform: translateY(-2px);
}

/* ==========================================================================
   Experience & Field Exposure
   ========================================================================== */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.exp-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.exp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.exp-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-900);
}

.exp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.exp-card:hover .exp-media img {
  transform: scale(1.03);
}

.exp-content {
  padding: 24px;
  flex: 1;
}

.exp-kicker {
  display: block;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pine-600);
  margin-bottom: 8px;
}

.exp-content h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--slate-900);
  line-height: 1.3;
}

.exp-list {
  margin: 0;
  padding-left: 18px;
  color: var(--slate-700);
  display: grid;
  gap: 7px;
  font-size: 0.94rem;
}

.exp-list li::marker {
  color: var(--pine-600);
}

/* ==========================================================================
   Technical Skills
   ========================================================================== */
.skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--limestone-100);
  color: var(--slate-700);
  font-size: 0.87rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--slate-900);
  color: var(--slate-900);
}

.filter-btn.active {
  background: var(--slate-900);
  border-color: var(--slate-900);
  color: var(--paper);
  font-weight: 600;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.skill-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--limestone-100);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.25s var(--ease), border-color 0.25s ease, box-shadow 0.25s ease;
}

.skill-card.is-hidden {
  display: none;
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: var(--pine-600);
  box-shadow: var(--shadow-soft);
}

.skill-cat {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--pine-600);
}

.skill-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--slate-900);
}

.skill-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--slate-600);
  line-height: 1.55;
}

/* ==========================================================================
   Education Architectural Ledger
   ========================================================================== */
.timeline-ledger {
  border-top: 1px solid var(--rule);
}

.edu-row {
  display: grid;
  grid-template-columns: 180px 1fr 1.1fr;
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.2s ease, padding-inline 0.2s ease;
}

.edu-row:hover {
  background-color: var(--limestone-100);
  padding-inline: 16px;
}

.edu-period {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--pine-600);
}

.edu-degree h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.24rem;
  color: var(--slate-900);
}

.edu-institution {
  font-size: 1rem;
  color: var(--slate-600);
}

/* ==========================================================================
   Research Interests
   ========================================================================== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.research-card {
  padding: 28px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--rule-dark);
  transition: border-color 0.25s ease, transform 0.25s var(--ease), background-color 0.25s ease;
}

.research-card:hover {
  border-color: rgba(134, 239, 172, 0.55);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-4px);
}

.research-index {
  display: inline-block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.9rem;
  line-height: 1;
  color: #86EFAC;
  margin-bottom: 14px;
}

.research-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--paper);
  line-height: 1.35;
}

.research-card p {
  margin: 0;
  font-size: 0.92rem;
  color: #CBD5E1;
}

/* ==========================================================================
   Leadership & Activities
   ========================================================================== */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.lead-card {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--pine-600);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.lead-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.lead-card h3 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--slate-900);
}

.lead-list {
  margin: 0;
  padding-left: 18px;
  color: var(--slate-700);
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
}

.lead-list li::marker {
  color: var(--pine-600);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 32px;
  align-items: start;
}

.contact-info-panel,
.contact-form-panel {
  padding: 32px;
  border-radius: var(--radius-md);
  background: var(--limestone-100);
  border: 1px solid var(--rule);
}

.contact-info-panel h3,
.contact-form-panel h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.28rem;
  color: var(--slate-900);
}

.contact-subtext {
  margin: 0 0 24px;
  font-size: 0.94rem;
  color: var(--slate-600);
}

.contact-methods {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--rule);
}

.contact-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--pine-soft);
  color: var(--pine-600);
}

.contact-row-body {
  flex: 1;
  min-width: 0;
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
}

.contact-value {
  font-weight: 600;
  color: var(--slate-900);
  word-break: break-word;
}

.contact-value:hover {
  color: var(--pine-600);
}

.copy-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--limestone-100);
  color: var(--slate-700);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  border-color: var(--slate-900);
  color: var(--slate-900);
}

.contact-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.social-placeholders {
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.social-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  margin-bottom: 12px;
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--rule);
  background: var(--paper);
  color: var(--slate-700);
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.social-btn:hover {
  border-color: var(--pine-600);
  color: var(--slate-900);
}

.social-hint {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--slate-500);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--slate-800);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--pine-600);
  box-shadow: 0 0 0 3px rgba(27, 94, 72, 0.14);
}

.form-feedback {
  margin-top: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.form-feedback.is-error {
  color: #B91C1C;
}

.form-feedback.is-success {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(27, 94, 72, 0.1);
  border: 1px solid var(--pine-600);
  color: var(--slate-900);
}

/* ==========================================================================
   Footer, Back to Top, Lightbox, Toast
   ========================================================================== */
.footer {
  background: var(--ink-950);
  color: var(--slate-400);
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  color: var(--paper);
}

.footer-brand span {
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: #86EFAC;
}

.footer-copy {
  margin: 0;
  font-size: 0.82rem;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--slate-900);
  color: var(--paper);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--pine-600);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 30, 0.86);
  backdrop-filter: blur(6px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 95vw);
  background: var(--slate-900);
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule-dark);
}

.lightbox-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--paper);
}

.lightbox-close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--paper);
  font-size: 1.35rem;
  line-height: 1;
}

.lightbox-body {
  padding: 16px;
  background: var(--ink-950);
}

.lightbox-body img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  margin-inline: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1600;
  transform: translate(-50%, 18px);
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  background: var(--slate-900);
  color: var(--paper);
  border: 1px solid rgba(134, 239, 172, 0.45);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1120px) {
  .nav-desktop {
    gap: 18px;
  }

  .navbar-pill {
    padding: 11px 24px;
  }
}

@media (max-width: 1040px) {
  .about-grid {
    grid-template-columns: 320px 1fr;
    gap: 36px;
  }

  .case-study-layout {
    grid-template-columns: 1fr;
  }

  .spec-strip,
  .hero-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .spec-cell:nth-child(2) {
    border-right: none;
  }

  .experience-grid,
  .skills-grid,
  .research-grid,
  .leadership-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .navbar {
    top: 14px;
  }

  .brand-wordmark {
    display: none;
  }

  .navbar-pill {
    width: min(440px, 100%);
    justify-content: space-between;
    padding: 9px 16px;
  }

  .mobile-brand {
    display: inline-flex;
  }

  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}

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

  .portrait-frame {
    max-width: 360px;
  }

  .edu-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 22px 0;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 108px;
    padding-bottom: 64px;
  }

  .hero-ledger,
  .spec-strip,
  .experience-grid,
  .skills-grid,
  .research-grid,
  .leadership-grid,
  .focus-list {
    grid-template-columns: 1fr;
  }

  .spec-cell {
    border-right: none;
    border-bottom: 1px solid var(--rule-dark);
    padding: 16px 0;
  }

  .spec-cell:last-child {
    border-bottom: none;
  }

  .viewer-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scroll-indicator {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
