/* ==============================================================================
   Vantage Style — Modern Clean Academic Portfolio CSS
   Features:
     - Lora serif typography with optimized legibility
     - Fixed boxed container with subtle dropshadows
     - Sticky left navigation with small-caps and smooth scroll tracking
     - Elegant right profile card with soft borders
     - Pure CSS expandable abstracts (click-to-toggle accordion without bloat)
     - Clean burgundy/crimson link accents (#A02020 / #633)
     - Interactive media feature showcase (Carlini-style left/right mockups)
   ============================================================================== */

:root {
  /* Default Obsidian Slate Dark Palette */
  --bg-body: #090d13;
  --bg-box: #111722;
  --bg-card: #17202e;
  --text-main: #e2e8f0;
  --text-muted: #8e9bb0;
  --heading-color: #f8fafc;
  --accent-burgundy: #f43f5e;
  --accent-burgundy-hover: #fb7185;
  --accent-link: #38bdf8;
  --accent-link-hover: #7dd3fc;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --award-bg: rgba(245, 158, 11, 0.12);
  --award-text: #fbbf24;
  --award-border: rgba(245, 158, 11, 0.25);
  --code-bg: #0d131d;
  --code-text: #38bdf8;
  --nav-bg: rgba(17, 23, 34, 0.92);
  --nav-border: rgba(255, 255, 255, 0.08);
  --nav-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"],
html[data-theme="dark"],
body[data-theme="dark"],
html.dark,
body.dark {
  /* Obsidian Slate Dark Mode (Deep, Elegant, High-Legibility) */
  --bg-body: #090d13;
  --bg-box: #111722;
  --bg-card: #17202e;
  --text-main: #e2e8f0;
  --text-muted: #8e9bb0;
  --heading-color: #f8fafc;
  --accent-burgundy: #f43f5e;
  --accent-burgundy-hover: #fb7185;
  --accent-link: #38bdf8;
  --accent-link-hover: #7dd3fc;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --award-bg: rgba(245, 158, 11, 0.12);
  --award-text: #fbbf24;
  --award-border: rgba(245, 158, 11, 0.25);
  --code-bg: #0d131d;
  --code-text: #38bdf8;
  --nav-bg: rgba(17, 23, 34, 0.92);
  --nav-border: rgba(255, 255, 255, 0.08);
  --nav-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

:root[data-theme="light"],
html[data-theme="light"],
body[data-theme="light"],
html.light,
body.light {
  /* Pure Editorial Light Mode (Warm Ivory-Stone, High-End Academic) */
  --bg-body: #f8f9fa;
  --bg-box: #ffffff;
  --bg-card: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --heading-color: #0f172a;
  --accent-burgundy: #9f1239;
  --accent-burgundy-hover: #be123c;
  --accent-link: #0369a1;
  --accent-link-hover: #0284c7;
  --border-light: #e2e8f0;
  --border-card: #e2e8f0;
  --award-bg: #fffbeb;
  --award-text: #92400e;
  --award-border: #fef3c7;
  --code-bg: #f1f5f9;
  --code-text: #0f172a;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --nav-border: rgba(0, 0, 0, 0.07);
  --nav-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background: var(--bg-body);
}

body {
  background: var(--bg-body);
  color: var(--text-main);
  font-family: "Lora", "Newsreader", "EB Garamond", Georgia, serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.68;
  margin: 0;
  padding: 0;
  font-size: 1.04rem;
  transition: background 0.25s ease, color 0.25s ease;
}

/* --------------------------------------------------------------------------
   Smart Autohiding Sticky/Fixed Header with Cursor Hover Reveal
   -------------------------------------------------------------------------- */
.topouter {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  min-height: 1.5em;
  padding: 0.6em 0;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow);
  transform: translateY(0);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  will-change: transform;
}

.topouter.nav-hidden {
  transform: translateY(-100%);
}

.top {
  max-width: 62em;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.title {
  margin: 0;
  font-size: 106%;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5em;
  white-space: nowrap;
}

.site-title-link {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-title-link:hover {
  color: var(--accent-burgundy);
}

/* Refined Minimalist Theme Toggle */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  border-radius: 4px;
  padding: 0.18em 0.55em;
  font-family: "Lora", "EB Garamond", Georgia, serif;
  font-size: 78%;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  cursor: pointer;
  user-select: none;
  outline: none;
  margin-left: 0.5em;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--accent-burgundy);
  color: var(--accent-burgundy);
  transform: translateY(-1px);
}

.theme-icon-light {
  display: none;
}
.theme-icon-dark {
  display: inline-block;
}

html[data-theme="light"] .theme-icon-light,
body[data-theme="light"] .theme-icon-light,
html.light .theme-icon-light,
body.light .theme-icon-light {
  display: inline-block;
}

html[data-theme="light"] .theme-icon-dark,
body[data-theme="light"] .theme-icon-dark,
html.light .theme-icon-dark,
body.light .theme-icon-dark {
  display: none;
}

/* --------------------------------------------------------------------------
   Compact, Small & Click-Only Curriculum Vitæ Dropdown
   -------------------------------------------------------------------------- */
.nav-dropdown {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

button.nav-dropbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 0.16em 0.5em;
  color: var(--heading-color) !important;
  background: var(--bg-card);
  font-family: "Lora", "EB Garamond", Georgia, serif;
  font-size: 78%;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  line-height: normal;
  transition: all 0.2s ease;
}

button.nav-dropbtn:hover,
.nav-dropdown.open button.nav-dropbtn {
  border-color: var(--accent-burgundy);
  color: var(--accent-burgundy) !important;
  transform: translateY(-1px);
}

.drop-arrow {
  font-size: 68%;
  display: inline-block;
  transition: transform 0.2s ease;
  margin-left: 0.12em;
  opacity: 0.75;
}

.nav-dropdown.open .drop-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* Strictly Click-Only Dropdown (No hovering popup bloat) */
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.3em;
  min-width: 175px;
  background: var(--bg-box);
  border: 1px solid var(--border-card);
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  padding: 0.25em 0;
  z-index: 1050;
  display: none;
  text-align: left;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
  animation: carliniDropdownFade 0.16s ease-out;
}

@keyframes carliniDropdownFade {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0.35em 0.7em !important;
  margin: 0 !important;
  color: var(--text-main) !important;
  font-family: "Lora", "EB Garamond", Georgia, serif !important;
  font-size: 80% !important;
  font-variant: small-caps !important;
  letter-spacing: 0.03em !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
  background: var(--bg-card) !important;
  color: var(--accent-burgundy) !important;
  transform: translateX(2px);
}

.nav-item-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 65%;
  font-weight: 600;
  padding: 0.08em 0.35em;
  border-radius: 3px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-muted);
  letter-spacing: normal;
  text-transform: uppercase;
}

.nav-dropdown-item:hover .nav-item-badge {
  border-color: var(--accent-burgundy);
  color: var(--accent-burgundy);
}

.nav-item-badge.badge-accent {
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.nav-item-badge.badge-reel {
  border-color: rgba(244, 63, 94, 0.4);
  color: var(--accent-burgundy);
}

.nav-item-badge.badge-sync {
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-link);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.2em 0;
}

.links {
  font-size: 82%;
  font-variant: small-caps;
  letter-spacing: 0.06em;
}

.links nav {
  display: flex;
  align-items: center;
  gap: 0.85em;
}

.links nav a {
  margin: 0;
  text-decoration: none;
  color: var(--accent-link);
  padding: 0.25em 0.5em;
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.links nav a:hover {
  color: var(--accent-burgundy);
  background: rgba(160, 32, 32, 0.06);
}

.links nav a.active {
  color: var(--accent-burgundy);
  background: rgba(160, 32, 32, 0.1);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Buttons & Links
   -------------------------------------------------------------------------- */
a {
  text-decoration: none;
  color: var(--accent-link);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-link-hover);
}

a.button {
  display: inline-block;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 0.25em 0.65em;
  color: #FFFFFF !important;
  background: var(--accent-burgundy);
  transition: all 0.25s ease;
  font-size: 84%;
  font-family: "Lora", "EB Garamond", Georgia, serif;
  font-variant: small-caps;
  letter-spacing: 0.04em;
}

a.button:hover {
  color: #FFFFFF !important;
  background: var(--accent-burgundy-hover);
  border-color: var(--accent-burgundy-hover);
  transform: translateY(-1px);
}

.fancy a {
  position: relative;
}

.fancy a::before {
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-burgundy);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.fancy a:hover::before {
  transform: scaleX(0.99);
}

/* --------------------------------------------------------------------------
   Main Container & Boxed Inner
   -------------------------------------------------------------------------- */
.container {
  padding-left: 1em;
  padding-right: 1em;
  padding-top: 4.6em;
}

.outer {
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 2em;
  max-width: 62em;
}

.boxed {
  border-radius: 6px;
  background: var(--bg-box);
  padding: 1.8em 2.2em;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-light);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.inner {
  width: 100%;
  position: relative;
}

p {
  margin-top: 0;
  margin-bottom: 1.1em;
}

/* --------------------------------------------------------------------------
   Outside Edge Hover Drawer: Quick Index
   Sits completely on the screen edge outside the reading column.
   Collapses to a sleek tab and expands smoothly when hovered.
   -------------------------------------------------------------------------- */
#leftnav.hover-drawer {
  position: fixed;
  top: 7em;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  transform: translateX(-160px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}

#leftnav.hover-drawer:hover {
  transform: translateX(0);
}

.drawer-peek-tab {
  order: 2;
  background: var(--bg-box);
  border: 1px solid var(--border-light);
  border-left: none;
  border-radius: 0 8px 8px 0;
  padding: 0.7em 0.45em;
  box-shadow: 3px 2px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
  user-select: none;
}

.drawer-peek-tab .peek-icon {
  font-size: 1.1em;
}

.drawer-peek-tab .peek-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-variant: small-caps;
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-burgundy);
}

.drawer-content {
  order: 1;
  width: 160px;
  background: var(--bg-box);
  border: 1px solid var(--border-light);
  border-left: none;
  box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.12);
  padding: 0.8em 0.9em 1em 0.9em;
  border-radius: 0 8px 8px 0;
  font-variant: small-caps;
}

.leftnav-header {
  border-bottom: 1px dashed var(--border-light);
  margin-bottom: 0.5em;
  padding-bottom: 0.3em;
}

#leftnav .sub {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

#leftnav a {
  color: var(--text-main);
  text-decoration: none;
  display: block;
  padding: 0.25em 0.2em;
  font-size: 0.9em;
  border-radius: 3px;
  transition: all 0.15s ease;
}

#leftnav a:hover {
  color: var(--accent-link);
  background: var(--bg-card);
  padding-left: 0.5em;
}

#leftnav a.active {
  font-weight: bold;
  font-style: italic;
  color: var(--accent-link);
}

/* Hide on mobile devices where the top menu already provides navigation */
@media all and (max-width: 50em) {
  #leftnav.hover-drawer {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Right Profile Card (Desktop Passport Format)
   -------------------------------------------------------------------------- */
.rightouter {
  width: 15.5em;
  display: inline;
  float: right;
  margin-left: 1.8em;
  margin-bottom: 1.2em;
}

.rightinner {
  padding-left: 8px;
}

.rightelement {
  background: var(--bg-card);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-card);
  box-shadow: var(--card-shadow);
  width: 14.5em;
  text-align: center;
}

.rightelement img {
  border-radius: 4px;
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  display: block;
  margin: 0 auto;
}

.card-caption {
  margin-top: 0.7em;
  font-size: 82%;
  line-height: 145%;
}

.role-affiliation {
  color: var(--accent-burgundy);
  font-weight: 600;
}

.location-tag {
  color: var(--text-muted);
  font-size: 85%;
}

.email-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 78%;
  color: var(--text-muted);
  display: inline-block;
  margin: 0.3em 0;
}

.card-social-links {
  margin-top: 0.4em;
  font-size: 92%;
}

.card-social-links .sep {
  color: var(--border-light);
  margin: 0 0.2em;
}

/* Minimalist CV & Executive Deck Action Grid */
.cv-quick-grid {
  margin-top: 0.85em;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45em;
}

.cv-quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  padding: 0.38em 0.45em;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 79%;
  font-family: "Lora", "EB Garamond", Georgia, serif;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.cv-quick-btn:hover {
  background: var(--bg-box);
  border-color: var(--accent-burgundy);
  color: var(--accent-burgundy);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cv-quick-btn.cv-featured-deck {
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--text-main);
}
.cv-quick-btn.cv-featured-deck:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

.cv-quick-btn.cv-featured-reel {
  border-color: rgba(244, 63, 94, 0.35);
  color: var(--text-main);
}
.cv-quick-btn.cv-featured-reel:hover {
  border-color: var(--accent-burgundy);
  color: var(--accent-burgundy);
}

.contact {
  display: none;
}

/* --------------------------------------------------------------------------
   Headings & Dividers
   -------------------------------------------------------------------------- */
.section-heading {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.35em;
  padding-top: 0.4em;
  line-height: 125%;
  font-size: 1.25em;
  font-weight: 600;
  margin-bottom: 0.85em;
  color: var(--heading-color);
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

hr.vintage-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 2.5em 0 2em 0;
  clear: both;
}

/* --------------------------------------------------------------------------
   Media Feature Showcase (Carlini-style Video / Terminal Mockups)
   -------------------------------------------------------------------------- */
.media-feature {
  margin-bottom: 2em;
  clear: both;
}

.video-container {
  width: 440px;
  max-width: 100%;
  margin-bottom: 1em;
}

.left-media {
  float: left;
  margin-right: 1.6em;
}

.right-media {
  float: right;
  margin-left: 1.6em;
}

.video-mockup {
  background: #1E293B;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  border: 1px solid #334155;
}

.mockup-header {
  background: #0F172A;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid #1E293B;
}

.mockup-header .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.mockup-header .dot.red { background: #EF4444; }
.mockup-header .dot.yellow { background: #F59E0B; }
.mockup-header .dot.green { background: #10B981; }

.mockup-title {
  margin-left: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 70%;
  color: #94A3B8;
}

.mockup-screen {
  padding: 12px;
  background: #090D16;
}

.code-preview {
  font-family: "JetBrains Mono", monospace;
  font-size: 72%;
  color: #38BDF8;
  line-height: 145%;
}

.mockup-badge {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #1E293B;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 72%;
  color: #E2E8F0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   Publications / Architectures (Carlini Side-by-Side Layout)
   -------------------------------------------------------------------------- */
.publication {
  padding-bottom: 2em;
  margin-bottom: 2em;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.publication:last-child {
  border-bottom: none;
}

.pub-row {
  display: flex;
  flex-direction: row;
  gap: 1.6em;
  align-items: flex-start;
}

/* Architecture Image / Diagram Column */
.pub-thumb {
  flex: 0 0 240px;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.35em;
}

.pub-thumb a.thumb-link {
  display: block;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--card-shadow);
  transition: all 0.25s ease-in-out;
}

.pub-thumb a.thumb-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--accent-burgundy);
}

.pub-thumb img {
  width: 100%;
  height: 145px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.pub-thumb a.thumb-link:hover img {
  transform: scale(1.03);
}

.pub-thumb-caption {
  font-size: 78%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-muted);
  text-align: center;
}

.pub-thumb-caption a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.pub-thumb-caption a:hover {
  color: var(--accent-link);
  text-decoration: underline;
}

/* Project Details Column */
.pub-body {
  flex: 1;
  min-width: 0;
}

.pubstuff {
  float: right;
  margin-left: 1em;
  margin-bottom: 0.5em;
}

.rightlinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em;
  justify-content: flex-end;
}

a.button.button-outline,
.button-outline {
  background: transparent !important;
  color: var(--accent-burgundy) !important;
  border: 1px solid var(--accent-burgundy) !important;
}

a.button.button-outline:hover,
.button-outline:hover {
  background: var(--accent-burgundy) !important;
  color: #FFFFFF !important;
}

.paper-title {
  font-size: 1.08em;
  cursor: pointer;
  color: var(--accent-link);
  transition: color 0.2s ease;
}

.paper-title:hover {
  color: var(--accent-link-hover);
}

.me {
  font-weight: 600;
  color: var(--heading-color);
}

.venue {
  font-style: italic;
  color: var(--text-muted);
  font-size: 90%;
  display: inline-block;
  margin-right: 0.5em;
}

span.award {
  background: var(--award-bg);
  color: var(--award-text);
  border: 1px solid var(--award-border);
  border-radius: 3px;
  font-weight: 600;
  font-size: 76%;
  padding: 0.15em 0.5em;
  display: inline-block;
  vertical-align: middle;
  font-family: "JetBrains Mono", monospace;
}

.pub-lead-desc {
  font-size: 88%;
  color: var(--text-main);
  margin: 0.3em 0 0.45em 0;
  line-height: 155%;
}

.abstract-toggle-btn {
  cursor: pointer;
  font-size: 80%;
  color: var(--accent-link);
  font-family: "Lora", "EB Garamond", Georgia, serif;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.4em;
  user-select: none;
}

.abstract-toggle-btn:hover {
  text-decoration: underline;
  color: var(--accent-link-hover);
}

/* Expandable Abstract using pure CSS checkbox hack (Carlini) */
input[type="checkbox"] {
  display: none;
}

.abstract {
  padding-left: 1.6em;
  padding-right: 1.6em;
  margin-top: 0.6em;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent-burgundy);
  border-radius: 0 4px 4px 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.3s ease;
}

input[type="checkbox"]:checked ~ .abstract {
  max-height: 45em;
  padding-top: 0.8em;
  padding-bottom: 0.8em;
  overflow: auto;
}

.tech-tag {
  font-size: 84%;
  color: var(--text-muted);
  font-style: normal;
  margin-top: 0.4em;
  line-height: 150%;
}

.deploy-tag {
  font-size: 80%;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-main);
  background: var(--code-bg);
  padding: 0.35em 0.7em;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  margin-top: 0.5em;
  overflow-x: auto;
}

.deploy-tag code {
  color: var(--accent-burgundy);
  font-weight: 600;
}

@media (max-width: 768px) {
  .pub-row {
    flex-direction: column;
    gap: 1em;
  }
  .pub-thumb {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }
  .pub-thumb img {
    height: 180px;
  }
}

/* --------------------------------------------------------------------------
   Timeline (Work Experience)
   -------------------------------------------------------------------------- */
.timeline-item {
  margin-bottom: 1.8em;
  padding-left: 1.2em;
  border-left: 2px solid var(--border-light);
}

.timeline-header {
  font-size: 1.05em;
  margin-bottom: 0.4em;
  color: var(--heading-color);
}

.role-title {
  color: var(--accent-burgundy);
  font-weight: 600;
}

.timeline-date {
  float: right;
  font-size: 85%;
  color: var(--text-muted);
  font-style: italic;
}

ul {
  margin-top: 0.4em;
  padding-left: 1.4em;
}

li {
  padding-bottom: 0.4em;
}

ul.carlini-list li {
  padding-bottom: 0.8em;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  text-align: center;
  padding-top: 2em;
  padding-bottom: 1em;
  font-size: 82%;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  margin-top: 3em;
}

/* --------------------------------------------------------------------------
   Mobile & Responsive Adaptations (matching Carlini max-width: 40em)
   -------------------------------------------------------------------------- */
.bars {
  display: none;
}

@media all and (max-width: 50em) {
  body {
    font-size: 13pt;
  }

  .boxed {
    padding: 1.2em;
  }

  .timeline-date {
    float: none;
    display: block;
    margin-top: 0.2em;
  }

  .rightouter {
    display: none;
  }

  .contact {
    display: block;
    text-align: center;
    margin-bottom: 1.5em;
    padding-bottom: 1.5em;
    border-bottom: 1px solid var(--border-light);
  }

  .contact img {
    border-radius: 4px;
    margin-bottom: 0.6em;
  }

  .left-media,
  .right-media {
    float: none;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  .bars {
    display: block;
    cursor: pointer;
    float: right;
  }

  .bar {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
  }

  .bar ~ .bar {
    margin: 4px 0;
  }

  .dropdown {
    position: absolute;
    right: 1em;
    top: 2.8em;
    width: 15.5em;
    padding: 0.8em;
    background: var(--bg-box);
    border: 1px solid var(--border-card);
    z-index: 200;
    border-radius: 6px;
    box-shadow: var(--card-shadow);
    display: none;
  }

  .dropdown a {
    display: block;
    padding: 0.4em 0;
    margin-right: 0 !important;
  }

  #mobilelinks:checked ~ .dropdown {
    display: block;
  }

  .nav-dropdown {
    display: block;
    width: 100%;
    margin-top: 0.4em;
    padding-top: 0.4em;
    border-top: 1px solid var(--border-light);
  }

  button.nav-dropbtn {
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0.35em 0.6em;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: 1px solid var(--border-light);
    margin-top: 0.35em;
    min-width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    background: var(--bg-card);
    display: none;
  }

  .nav-dropdown.open .nav-dropdown-menu,
  .nav-dropdown:hover .nav-dropdown-menu {
    display: block;
  }

  .abstract {
    padding-left: 1em;
    padding-right: 1em;
  }
}

/* --------------------------------------------------------------------------
   Ecosystem Navigation Banner & Tags
   -------------------------------------------------------------------------- */
.ecosystem-banner {
  margin: 1.5em 0;
  padding: 0.9em 1.2em;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-left: 4px solid var(--accent-burgundy);
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6em;
  font-size: 80%;
  line-height: 140%;
}

.ecosystem-label {
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-burgundy);
  margin-right: 0.4em;
}

.eco-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.28em 0.65em;
  background: var(--bg-box);
  border: 1px solid var(--border-card);
  border-radius: 3px;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s ease;
}

.eco-tag:hover {
  background: var(--bg-card);
  border-color: var(--accent-burgundy);
  color: var(--accent-link);
}

.eco-tag.active {
  background: rgba(160, 32, 32, 0.1);
  border-color: var(--accent-burgundy);
  color: var(--accent-burgundy);
  font-weight: 600;
}

.eco-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  display: inline-block;
}

.eco-dot.active {
  background-color: var(--accent-burgundy);
}

.eco-tag-reel {
  border-color: rgba(244, 63, 94, 0.35);
}
.eco-tag-reel:hover {
  border-color: var(--accent-burgundy);
  color: var(--accent-burgundy);
}
.eco-dot-reel {
  background-color: var(--accent-burgundy);
}

.eco-tag-deck {
  border-color: rgba(245, 158, 11, 0.35);
}
.eco-tag-deck:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}
.eco-dot-deck {
  background-color: #f59e0b;
}

.eco-tag-sync {
  border-color: rgba(56, 189, 248, 0.35);
}
.eco-tag-sync:hover {
  border-color: var(--accent-link);
  color: var(--accent-link);
}
.eco-dot-sync {
  background-color: var(--accent-link);
}

/* --------------------------------------------------------------------------
   AI Engineering Journey Section Grid & Cards
   -------------------------------------------------------------------------- */
.journey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2em;
  margin-top: 1.2em;
  margin-bottom: 1.5em;
}

.journey-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 1em 1.2em;
  transition: box-shadow 0.2s ease;
}

.journey-card:hover {
  box-shadow: var(--card-shadow);
  border-color: var(--accent-burgundy);
}

.journey-card h4 {
  margin: 0 0 0.6em 0;
  font-size: 92%;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--accent-burgundy);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.3em;
}

.journey-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 78%;
  line-height: 165%;
  color: var(--text-muted);
}

.journey-list li {
  margin-bottom: 0.35em;
  position: relative;
  padding-left: 1.1em;
}

.journey-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-burgundy);
}

.journey-list code {
  font-family: "JetBrains Mono", monospace;
  font-size: 88%;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 2px;
  color: var(--code-text);
  border: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   Education & Specialized Courses Cards
   -------------------------------------------------------------------------- */
.course-box {
  margin-top: 0.8em;
  padding: 0.8em 1em;
  background: var(--bg-card);
  border-left: 3px solid var(--accent-burgundy);
  font-size: 82%;
  line-height: 155%;
  color: var(--text-muted);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2em;
  margin-top: 1em;
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 4px;
  padding: 1em 1.1em;
  transition: all 0.2s ease;
}

.course-card:hover {
  border-color: var(--accent-burgundy);
  box-shadow: var(--card-shadow);
}

.course-card h4 {
  margin: 0 0 0.2em 0;
  font-size: 92%;
  color: var(--heading-color);
}

.course-issuer {
  font-size: 78%;
  font-style: italic;
  color: var(--accent-burgundy);
  margin-bottom: 0.5em;
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 0.3em;
}

.course-card p {
  margin: 0;
  font-size: 80%;
  line-height: 155%;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Live Visitor Telemetry & Edge Pulse (macos.kishor.tech Sync)
   -------------------------------------------------------------------------- */
.live-visitor-card {
  margin: 1.8em auto 1.4em auto;
  max-width: 580px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 0.85em 1.2em;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  text-align: center;
}

.live-visitor-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--card-shadow);
}

.visitor-pulse-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

.live-pulse {
  position: relative;
  width: 10px;
  height: 10px;
  display: inline-block;
}

.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.4);
  animation: pulseRing 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.pulse-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  70% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

.live-badge-label {
  font-size: 74%;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #10B981;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.visitor-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6em;
  font-size: 82%;
  color: var(--text-muted);
}

.visitor-metric-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.metric-label {
  color: var(--text-muted);
  font-size: 92%;
}

.metric-value {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: var(--heading-color);
  font-size: 108%;
  letter-spacing: -0.02em;
}

.metric-sep {
  color: var(--border-light);
}

.metric-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 88%;
  color: var(--accent-link);
  text-decoration: underline;
}

.metric-link:hover {
  color: var(--accent-burgundy);
}

.metric-latency {
  font-family: "JetBrains Mono", monospace;
  font-size: 88%;
  color: #10B981;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
