/* =============================================================
   ASWATH KARTHIKEYAN — MINIMALIST PORTFOLIO
   A restrained, CTO-grade design system.
   Every pixel is intentional. Every interaction earns its place.
   ============================================================= */

/* --- Design Tokens --- */
:root {
  --white: #ffffff;
  --bg: #fafaf8;
  --bg-alt: #f3f2ef;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-secondary: #555555;
  --ink-tertiary: #999999;
  --ink-faint: #cccccc;
  --border: #e8e8e4;
  --border-hover: #d0d0cc;
  --accent: #1a1a1a;

  --ff-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --fs-xs: 0.75rem;    /* 12px */
  --fs-sm: 0.875rem;   /* 14px */
  --fs-base: 1rem;     /* 16px */
  --fs-md: 1.125rem;   /* 18px */
  --fs-lg: 1.5rem;     /* 24px */

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.25s;
  --dur-normal: 0.5s;
  --dur-slow: 0.8s;

  --space-section: clamp(100px, 12vw, 160px);
  --space-inner: clamp(20px, 5vw, 80px);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  background-color: var(--bg);
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(100px + env(safe-area-inset-top, 0px));
}
body {
  font-family: var(--ff-sans);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(26, 26, 26, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;       /* hide native cursor for custom one */
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-family: var(--ff-serif); font-style: italic; }
::selection { background: var(--ink); color: var(--bg); }
img { display: block; max-width: 100%; }

/* fallback for touch devices — show native cursor */
@media (hover: none) {
  body { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none !important; }
}

/* =============================================================
   CUSTOM CURSOR
   A small dot + expanding ring. Ring scales up on interactive
   elements. Shows "VIEW" label on project cards.
   ============================================================= */
#cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--ink);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width var(--dur-fast) var(--ease-out),
              height var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast);
  mix-blend-mode: difference;
}

#cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(26, 26, 26, 0.2);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width var(--dur-normal) var(--ease-out),
              height var(--dur-normal) var(--ease-out),
              border-color var(--dur-normal) var(--ease-out),
              background var(--dur-normal) var(--ease-out),
              opacity var(--dur-fast);
}

/* Cursor states */
body.cursor-sm #cursor-ring {
  width: 44px;
  height: 44px;
  border-color: rgba(26, 26, 26, 0.35);
}

body.cursor-lg #cursor-ring {
  width: 64px;
  height: 64px;
  border-color: rgba(26, 26, 26, 0.15);
  background: rgba(26, 26, 26, 0.04);
}

body.cursor-view #cursor-ring {
  width: 80px;
  height: 80px;
  border-color: var(--ink);
  background: var(--ink);
  mix-blend-mode: difference;
}

body.cursor-view #cursor-dot {
  opacity: 0;
}

body.cursor-view #cursor-ring::after {
  content: 'VIEW';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--ff-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--bg);
  mix-blend-mode: difference;
}

/* =============================================================
   GRAIN TEXTURE — Adds tactile depth to flat white
   ============================================================= */
.grain {
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  z-index: 99990;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* =============================================================
   NAVIGATION
   ============================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  z-index: 1000;
  padding-top: constant(safe-area-inset-top);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(var(--space-inner), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-inner), env(safe-area-inset-right, 0px));
  padding-bottom: 0;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast);
  box-sizing: border-box;
}

.nav.scrolled {
  border-color: var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--ff-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--ink);
  cursor: none;
}

.logo-period {
  color: var(--ink-tertiary);
  transition: color var(--dur-fast);
}

.nav-logo:hover .logo-period {
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-secondary);
  position: relative;
  cursor: none;
  transition: color var(--dur-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--ink);
  transition: width var(--dur-normal) var(--ease-out);
}

.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { width: 100%; }

.nav-link--cta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all var(--dur-fast);
}

.nav-link--cta::after { display: none; }

.nav-link--cta:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

/* Elegant Hamburger Menu Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 16px;
  background: none;
  border: none;
  padding: 0;
  cursor: none;
  z-index: 1010;
}

.nav-toggle-bar {
  width: 100%;
  height: 1.5px;
  background-color: var(--ink);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform-origin: center;
}

@media (max-width: 900px) {
  .nav-inner {
    height: 60px;
  }

  .nav-toggle {
    display: flex;
  }

  /* Full-screen Slide-down Mobile Navigation Overlay */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    display: flex; /* Force flex in media queries override */
    box-sizing: border-box;
  }

  .nav.nav-open .nav-links {
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7.25px) rotate(45deg);
  }

  .nav.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7.25px) rotate(-45deg);
  }

  .nav-links .nav-link {
    font-family: var(--ff-serif);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: var(--ink);
  }

  .nav-links .nav-link--cta {
    margin-top: 16px;
    font-size: 1.2rem;
    padding: 12px 28px;
    width: auto;
  }
}

/* =============================================================
   HERO SECTION
   ============================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px var(--space-inner) 60px;
  position: relative;
}

.hero-inner {
  max-width: 900px;
}

.hero-eyebrow {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--ff-sans);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -2px;
  line-height: 1.08;
  margin-bottom: 32px;
  color: var(--ink);
}

.hero-line {
  display: block;
}

.hero-title em {
  font-weight: 400;
}

.hero-sub {
  font-size: var(--fs-md);
  color: var(--ink-secondary);
  max-width: 540px;
  margin-bottom: 48px;
  line-height: 1.7;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: var(--space-inner);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--ink-tertiary), transparent);
  animation: scrollDrift 2s ease-in-out infinite;
}

@keyframes scrollDrift {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.3); transform-origin: top; }
}

/* =============================================================
   BUTTONS — 6 CREATIVE TYPES
   Each earns its place through distinct interactive behavior.
   ============================================================= */

/* Base */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: none;
  position: relative;
  transition: color var(--dur-fast);
}

/* --- 1. BORDER-DRAW BUTTON ---
   An SVG rect traces its perimeter on hover. */
.btn-border-draw {
  padding: 16px 32px;
  color: var(--ink);
  overflow: visible;
}

.btn-border-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.btn-border-rect {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 464;          /* perimeter of 178x54 rounded rect */
  stroke-dashoffset: 464;
  transition: stroke-dashoffset 0.7s var(--ease-out);
}

.btn-border-draw:hover .btn-border-rect {
  stroke-dashoffset: 0;
}

.btn-border-draw .btn-label {
  position: relative;
  z-index: 2;
}

/* --- 2. REVEAL BUTTON ---
   Text slides up, second line reveals from below. */
.btn-reveal {
  padding: 16px 32px;
  border: 1px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  height: 52px;
}

.btn-reveal-top,
.btn-reveal-bottom {
  display: block;
  transition: transform var(--dur-normal) var(--ease-out);
  line-height: 20px;
}

.btn-reveal-bottom {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--ink-secondary);
}

.btn-reveal:hover .btn-reveal-top {
  transform: translateY(-140%);
}

.btn-reveal:hover .btn-reveal-bottom {
  transform: translateY(calc(-100% - 16px));
}

/* --- 3. ELASTIC BUTTON ---
   Physically squishes on mousedown with a spring-back. */
.btn-elastic {
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--ink);
  transition: transform 0.4s var(--ease-elastic),
              border-color var(--dur-fast),
              background var(--dur-fast),
              color var(--dur-fast);
}

.btn-elastic:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.btn-elastic:active {
  transform: scale(0.92);
  transition-duration: 0.08s;
}

.btn-elastic svg {
  transition: transform var(--dur-fast) var(--ease-out);
}

.btn-elastic:hover svg {
  transform: translateX(4px);
}

/* --- 4. GLOW-PULSE BUTTON ---
   A radial glow emanates from center on hover. */
.btn-glow {
  padding: 18px 36px;
  border: 1px solid var(--ink);
  border-radius: 100px;
  color: var(--ink);
  overflow: hidden;
  z-index: 1;
}

.btn-glow-bg {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s var(--ease-out), height 0.6s var(--ease-out);
  z-index: -1;
}

.btn-glow:hover .btn-glow-bg {
  width: 300px;
  height: 300px;
}

.btn-glow:hover {
  color: var(--bg);
  border-color: var(--ink);
  box-shadow: 0 0 40px rgba(26, 26, 26, 0.12);
}

.btn-glow .btn-label {
  position: relative;
  z-index: 2;
}

/* --- 5. FILL BUTTON ---
   Background sweeps left-to-right. */
.btn-fill {
  padding: 16px 32px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--ink);
  overflow: hidden;
  z-index: 1;
}

.btn-fill-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
  z-index: -1;
}

.btn-fill:hover .btn-fill-bg {
  transform: scaleX(1);
}

.btn-fill:hover {
  color: var(--bg);
  border-color: var(--ink);
}

.btn-fill .btn-label {
  position: relative;
  z-index: 2;
}

/* =============================================================
   MARQUEE — Infinite skill ticker
   ============================================================= */
.marquee-section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  overflow: hidden;
  gap: 0;
  margin-bottom: 12px;
}

.marquee-track:last-child { margin-bottom: 0; }

.marquee-content {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  animation: marqueeScroll 40s linear infinite;
  will-change: transform;
}

.marquee-content--reverse {
  animation-name: marqueeScrollReverse;
}

.marquee-content span {
  font-family: var(--ff-sans);
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 400;
  color: var(--ink-tertiary);
  white-space: nowrap;
  padding: 0 16px;
  transition: color 0.3s;
}

.marquee-content span:hover {
  color: var(--ink);
}

.mq-dot {
  font-size: 10px !important;
  color: var(--ink-faint) !important;
  padding: 0 4px !important;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes marqueeScrollReverse {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

/* =============================================================
   SECTIONS — Shared layout
   ============================================================= */
.section {
  padding: clamp(40px, 5vw, 60px) var(--space-inner);
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 20px;
}

.section-heading {
  font-family: var(--ff-sans);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 60px;
  color: var(--ink);
}

.section-heading em { font-weight: 400; }

/* =============================================================
   SELECTED WORK — Showcase alternating split-screen rows
   ============================================================= */
.clean-project-grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-inner);
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 769px) {
  .clean-project-grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

.clean-project-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.clean-project-item {
  display: flex;
  flex-direction: column;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  transition: border-color var(--dur-normal) var(--ease-out);
}

.clean-project-item:hover {
  border-top-color: var(--accent);
}

.clean-project-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.clean-project-num {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  opacity: 0.8;
}

.clean-project-cat {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.clean-project-title {
  font-family: var(--ff-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin: 0 0 6px 0;
  transition: transform var(--dur-normal) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.clean-project-item:hover .clean-project-title {
  transform: translateX(4px);
  color: var(--accent);
}

.clean-project-desc {
  font-family: var(--ff-sans);
  font-size: 0.8rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.clean-project-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.clean-project-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--ff-sans);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.clean-project-link svg {
  width: 10px;
  height: 10px;
  transition: transform var(--dur-fast) var(--ease-out);
}

.clean-project-link:hover {
  color: var(--accent);
}

.clean-project-link:hover svg {
  transform: translateX(2px);
}

/* Compact Text and Arrow Link Styling */
.compact-text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--ff-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.compact-text-link svg {
  width: 12px;
  height: 12px;
  transition: transform var(--dur-fast) var(--ease-out);
}

.compact-text-link:hover {
  color: var(--accent);
}

.compact-text-link:hover svg {
  transform: translateX(3px);
}

/* =============================================================
   ABOUT
   ============================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.about-heading {
  font-family: var(--ff-sans);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--ink);
}

.about-heading em { font-weight: 400; }

.about-body {
  font-size: var(--fs-md);
  color: var(--ink-secondary);
  line-height: 1.75;
  margin-bottom: 28px;
}

.about-stats {
  display: flex;
  gap: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

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

.stat-num {
  font-family: var(--ff-sans);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -1px;
  color: var(--ink);
}

.stat-lbl {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-tertiary);
  letter-spacing: 0.5px;
}

/* =============================================================
   EXPERIENCE
   ============================================================= */
.exp-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-inner);
}

.exp-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.exp-item:first-child {
  border-top: 1px solid var(--border);
}

.exp-period {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-tertiary);
  padding-top: 4px;
}

.exp-role {
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  color: var(--ink);
}

.exp-company {
  font-size: var(--fs-sm);
  color: var(--ink-tertiary);
  margin-bottom: 16px;
}

.company-link {
  color: var(--ink-secondary);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--dur-fast) var(--ease-out);
}

.company-link:hover {
  color: var(--ink);
}

.company-link svg {
  display: inline-block;
  opacity: 0.7;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

.company-link:hover svg {
  transform: translate(1px, -1px);
  opacity: 1;
}

.exp-desc {
  font-size: var(--fs-sm);
  color: var(--ink-secondary);
  line-height: 1.7;
  max-width: 600px;
}

.edu-content {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.edu-info {
  flex: 1;
}

.edu-logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: transform var(--dur-normal) var(--ease-out), border-color var(--dur-normal), box-shadow var(--dur-normal) var(--ease-out);
  flex-shrink: 0;
  margin-top: 4px;
}

.exp-item:hover .edu-logo-wrapper {
  transform: translateY(-2px);
  border-color: var(--ink-secondary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.edu-logo-wrapper svg {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  display: block;
}

/* =============================================================
   CONTACT
   ============================================================= */
.contact-inner {
  max-width: 700px;
  text-align: center;
  margin: 0 auto;
}

.contact-heading {
  font-family: var(--ff-sans);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--ink);
}

.contact-heading em { font-weight: 400; }

.contact-sub {
  font-size: var(--fs-md);
  color: var(--ink-secondary);
  line-height: 1.7;
  margin-bottom: 48px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.contact-primary {
  width: 100%;
  display: flex;
  justify-content: center;
}

.contact-secondary {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  padding: 40px var(--space-inner);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  color: var(--ink-tertiary);
  letter-spacing: 0.5px;
}

.footer-sep { opacity: 0.4; }

/* =============================================================
   REVEAL ANIMATIONS
   ============================================================= */
.reveal-text {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.reveal-text.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.reveal-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================
   THE DISCOVERY RACETRACK
   ============================================================= */
.racetrack-section {
  position: relative;
  overflow: hidden;
}

.racetrack-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px var(--space-inner) 60px;
  position: relative;
}

.racetrack-layout {
  display: grid;
  grid-template-columns: 1fr 200px 1fr;
  row-gap: 45px;
  column-gap: 40px;
  align-items: center;
  position: relative;
}

.racetrack-track-col {
  grid-column: 2;
  grid-row: 1 / span 4;
  position: relative;
  width: 200px;
  height: calc(100% - 150px);
  margin-top: 75px;
  margin-bottom: 75px;
  min-height: auto;
  display: flex;
  justify-content: center;
}

.racetrack-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* Road Styles */
.road-base {
  stroke: var(--border);
  stroke-width: 32px;
  transition: stroke var(--dur-normal);
}

.road-center-line {
  stroke-linecap: round;
}

/* Glow Nodes along track */
.track-node-glow {
  fill: var(--bg-alt);
  stroke: var(--border);
  stroke-width: 2px;
  transition: fill var(--dur-normal), stroke var(--dur-normal), r var(--dur-normal) var(--ease-elastic);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.04));
}

.track-node-glow.active {
  fill: #8fe3d3;
  stroke: var(--ink);
  stroke-width: 3px;
  r: 10px;
  filter: drop-shadow(0 0 10px rgba(143, 227, 211, 0.8));
}

/* Milestone wrappers with grid alignment */
.racetrack-milestone-wrapper {
  width: 100%;
  max-width: 440px;
  transition: transform var(--dur-slow) var(--ease-out);
}

.racetrack-milestone-wrapper--left {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}

.racetrack-milestone-wrapper--right {
  grid-column: 3;
  justify-self: start;
  text-align: left;
}

.racetrack-milestone-wrapper[data-index="0"] { grid-row: 1; }
.racetrack-milestone-wrapper[data-index="1"] { grid-row: 1; }
.racetrack-milestone-wrapper[data-index="2"] { grid-row: 2; }
.racetrack-milestone-wrapper[data-index="3"] { grid-row: 2; }
.racetrack-milestone-wrapper[data-index="4"] { grid-row: 3; }
.racetrack-milestone-wrapper[data-index="5"] { grid-row: 3; }
.racetrack-milestone-wrapper[data-index="6"] { grid-row: 4; }

.milestone-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  position: relative;
  transition: border-color var(--dur-normal), box-shadow var(--dur-normal) var(--ease-out), transform var(--dur-normal);
}

.milestone-card.active {
  border-color: var(--ink);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.06);
}

.milestone-num {
  display: block;
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.milestone-badge {
  display: inline-block;
  font-family: var(--ff-sans);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-secondary);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.milestone-title {
  font-family: var(--ff-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
}

.milestone-desc {
  font-size: var(--fs-xs);
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.milestone-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
}

.milestone-btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.milestone-btn svg {
  transition: transform var(--dur-fast) var(--ease-out);
}

.milestone-btn:hover svg {
  transform: translateX(3px);
}

.milestone-pivot {
  display: flex;
  gap: 12px;
  text-align: left;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.pivot-arrow {
  font-size: var(--fs-md);
  color: var(--ink-tertiary);
  font-weight: bold;
}

.pivot-content {
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--ink-secondary);
}

.pivot-content strong {
  color: var(--ink);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

/* =============================================================
   CORPORATE LEADERSHIP WORKSHOPS — Horizontal Syllabus/Curriculum List
   ============================================================= */
.workshops-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-inner);
  display: flex;
  flex-direction: column;
}

.workshop-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 80px;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  transition: all var(--dur-normal) var(--ease-out);
  position: relative;
  align-items: center;
}

.workshop-row:first-child {
  border-top: 1px solid var(--border);
}

.workshop-row-header {
  display: flex;
  flex-direction: column;
}

.workshop-row-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.workshop-row-num {
  font-family: var(--ff-serif);
  font-size: var(--fs-md);
  color: var(--ink-tertiary);
  opacity: 0.6;
}

.workshop-row-cat {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.workshop-row-title {
  font-family: var(--ff-sans);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.5px;
  color: var(--ink);
  line-height: 1.25;
}

.workshop-row-body {
  display: flex;
  flex-direction: column;
}

.workshop-row-desc {
  font-size: var(--fs-sm);
  color: var(--ink-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.workshop-row-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.workshop-row-stack span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--ink-secondary);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 4px;
}

.workshop-row-action {
  justify-self: end;
}

/* =============================================================
   WORKSHOP EXPANDABLE DETAILS
   ============================================================= */
.workshop-row {
  cursor: pointer;
}

.workshop-row-details {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  margin-top: 0;
  border-top: 1px dashed transparent;
  transition: max-height var(--dur-normal) cubic-bezier(0.16, 1, 0.3, 1), 
              opacity var(--dur-normal) var(--ease-out),
              padding var(--dur-normal) var(--ease-out),
              margin-top var(--dur-normal) var(--ease-out);
}

.workshop-row.expanded {
  background: var(--bg-alt);
  border-bottom-color: var(--ink);
  padding-left: 32px;
  padding-right: 32px;
}

.workshop-row.expanded .workshop-row-details {
  max-height: 1500px;
  opacity: 1;
  padding-top: 40px;
  margin-top: 24px;
  border-top: 1px dashed var(--border);
}

.workshop-row.expanded .workshop-row-icon-circle {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
  transform: rotate(135deg);
}

.workshop-details-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: start;
}

/* Metadata column */
.workshop-details-meta {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.workshop-meta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.workshop-meta-card.highlight {
  border-color: var(--ink);
  background: var(--surface);
}

.workshop-meta-card h4 {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.workshop-meta-card p {
  font-size: var(--fs-sm);
  color: var(--ink);
  line-height: 1.5;
  margin: 0;
}

.workshop-meta-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workshop-meta-card ul li {
  font-size: var(--fs-sm);
  color: var(--ink);
  line-height: 1.45;
  position: relative;
  padding-left: 16px;
}

.workshop-meta-card ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-tertiary);
}

/* Syllabus column */
.workshop-details-syllabus {
  display: flex;
  flex-direction: column;
}

.syllabus-header {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.syllabus-modules {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.syllabus-module {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  align-items: start;
}

.module-num {
  font-family: var(--ff-serif);
  font-size: var(--fs-sm);
  color: var(--ink-tertiary);
  font-style: italic;
  margin-top: 2px;
}

.module-content h5 {
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.module-content p {
  font-size: var(--fs-xs);
  color: var(--ink-secondary);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 900px) {
  .workshop-details-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .workshop-row.expanded {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.workshop-row-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--ink-tertiary);
  transition: all var(--dur-normal) var(--ease-out);
}

.workshop-row:hover {
  background: rgba(0, 0, 0, 0.012);
  padding-left: 20px;
  padding-right: 20px;
}

.workshop-row:hover .workshop-row-icon-circle {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
  transform: rotate(-45deg);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 900px) {
  .racetrack-layout {
    grid-template-columns: 40px 1fr;
    row-gap: 24px;
    column-gap: 16px;
  }

  .racetrack-track-col {
    grid-column: 1;
    grid-row: 1 / span 7;
    width: 40px;
    height: calc(100% - 150px);
    margin-top: 75px;
    margin-bottom: 75px;
    min-height: auto;
  }

  .racetrack-milestone-wrapper {
    max-width: 100%;
  }

  .racetrack-milestone-wrapper[data-index="0"] { grid-row: 1; }
  .racetrack-milestone-wrapper[data-index="1"] { grid-row: 2; }
  .racetrack-milestone-wrapper[data-index="2"] { grid-row: 3; }
  .racetrack-milestone-wrapper[data-index="3"] { grid-row: 4; }
  .racetrack-milestone-wrapper[data-index="4"] { grid-row: 5; }
  .racetrack-milestone-wrapper[data-index="5"] { grid-row: 6; }
  .racetrack-milestone-wrapper[data-index="6"] { grid-row: 7; }

  .racetrack-milestone-wrapper--left,
  .racetrack-milestone-wrapper--right {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .workshop-row {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px 0;
  }
  
  .workshop-row:hover {
    padding-left: 0;
    padding-right: 0;
  }
  
  .workshop-row-action {
    display: none;
  }

  /* Showcase rows styled compactly and responsively by default */

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .edu-content {
    display: block;
  }

  .edu-logo-wrapper {
    display: none;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }

  .nav-links {
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .about-stats {
    flex-direction: column;
    gap: 24px;
  }

  .contact-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .contact-secondary {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 16px;
  }

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

  .btn-border-draw,
  .btn-reveal,
  .btn-glow,
  .btn-fill {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .footer-sep {
    display: none;
  }
}

/* =============================================================
   MULTI-THEME ENGINE OVERRIDES
   ============================================================= */
body.theme-cosmic {
  --bg: #09090b;
  --bg-alt: #121214;
  --surface: #0f0f11;
  --ink: #f4f4f5;
  --ink-secondary: #a1a1aa;
  --ink-tertiary: #71717a;
  --ink-faint: #27272a;
  --border: #222225;
  --border-hover: #3f3f46;
  --accent: #ffffff;
}
body.theme-emerald {
  --bg: #040806;
  --bg-alt: #0b120d;
  --surface: #070e0a;
  --ink: #4ade80;
  --ink-secondary: #22c55e;
  --ink-tertiary: #15803d;
  --ink-faint: #14532d;
  --border: #143522;
  --border-hover: #22c55e;
  --accent: #4ade80;
}
body.theme-gold {
  --bg: #0d0a08;
  --bg-alt: #17120e;
  --surface: #120e0b;
  --ink: #f3e8d2;
  --ink-secondary: #d4af37;
  --ink-tertiary: #aa7c11;
  --ink-faint: #543d0a;
  --border: #2c200b;
  --border-hover: #d4af37;
  --accent: #f3e8d2;
}

/* =============================================================
   COMMAND PALETTE STYLING
   ============================================================= */
.command-palette-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.command-palette-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.command-palette {
  width: 90%;
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 32px 64px rgba(0,0,0,0.25), 0 0 0 1px var(--border) inset;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.97) translateY(-8px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--ink);
  font-family: var(--ff-sans);
}
.command-palette-overlay.open .command-palette {
  transform: scale(1) translateY(0);
}
.command-palette-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.command-palette-search-icon {
  font-size: 16px;
  margin-right: 12px;
  opacity: 0.6;
}
.command-palette-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  color: inherit;
  font-family: inherit;
}
.command-palette-input::placeholder {
  color: var(--ink-tertiary);
}
.command-palette-kbd {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink-secondary);
  letter-spacing: 0.5px;
}
.command-palette-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}
.command-palette-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  user-select: none;
}
.command-palette-item.selected {
  background: var(--bg-alt);
  transform: translateX(2px);
}
.command-palette-item-icon {
  font-size: 16px;
  margin-right: 12px;
  width: 20px;
  text-align: center;
}
.command-palette-item-text-group {
  display: flex;
  flex-direction: column;
}
.command-palette-item-title {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink);
}
.command-palette-item-desc {
  font-size: 11.5px;
  color: var(--ink-secondary);
  margin-top: 1px;
}
.command-palette-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--ink-tertiary);
  background: var(--bg-alt);
}
.command-palette-shortcut-tips {
  display: flex;
  gap: 12px;
}
.command-palette-tip span {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 2px;
}

/* =============================================================
   SYSTEM TOPOLOGY & PROJECT TABS STYLING
   ============================================================= */
.project-tab-switcher {
  display: flex;
  gap: 8px;
  margin: 16px 0 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.project-tab-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-fast);
  font-family: var(--ff-sans);
}
.project-tab-btn:hover {
  color: var(--ink);
  background: var(--bg-alt);
}
.project-tab-btn.active {
  color: var(--ink);
  background: var(--bg-alt);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.project-tab-content {
  display: none;
}
.project-tab-content.active {
  display: block;
  animation: fadeIn 0.4s var(--ease-out);
}

/* Topology Container */
.topology-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-top: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  overflow: hidden;
}
@media (max-width: 900px) {
  .topology-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.topology-graph {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  height: 280px;
  position: relative;
  overflow: hidden;
}
.topology-inspector {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: 280px;
  overflow-y: auto;
}
.inspector-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-tertiary);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.inspector-placeholder {
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin: auto 0;
  text-align: center;
  font-style: italic;
}
.inspector-node-type {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.inspector-node-type.node-badge {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}
.inspector-node-type.link-badge {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}
.inspector-node-name {
  font-family: var(--ff-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.inspector-node-desc {
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.inspector-metric-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.inspector-metric {
  display: flex;
  flex-direction: column;
}
.metric-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-tertiary);
  margin-bottom: 2px;
}
.metric-value {
  font-family: var(--ff-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

/* D3 Node Graph Custom Styles */
.node-circle {
  transition: stroke var(--dur-fast), fill var(--dur-fast);
}
.node-label {
  pointer-events: none;
  user-select: none;
}
.node-icon {
  pointer-events: none;
  user-select: none;
}

/* Animated connections */
@keyframes strokeFlow {
  to {
    stroke-dashoffset: -20;
  }
}
.topo-line-flow {
  animation: strokeFlow 1s linear infinite;
}

/* =============================================================
   EXPANDABLE PROJECT ROWS WITH SYSTEM GRAPHS
   ============================================================= */
.project-row {
  transition: background var(--dur-fast), padding var(--dur-fast), border-radius var(--dur-fast);
}
.project-row-expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}
.project-row.expanded .project-row-expandable-content {
  max-height: 600px; /* high enough to cover layout on mobile */
  margin-top: 16px;
}
.project-row.expanded {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px !important;
  padding-top: 24px !important;
  padding-bottom: 24px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04), 0 0 0 1px var(--border) inset;
}
.row-topology-inner {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
}

/* =============================================================
   CREATIVE AMBIENT CONTACT OVERLAY (MODAL)
   ============================================================= */
.contact-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.contact-overlay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(250, 250, 248, 0.7);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  transition: opacity 0.5s ease;
}

.contact-overlay-container {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 0 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
  padding: 44px 36px;
  transform: scale(0.94) translateY(20px);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
  overflow: hidden;
}

.contact-overlay.is-active .contact-overlay-container {
  transform: scale(1) translateY(0);
}

/* Close Button */
.contact-overlay-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-overlay-close-btn:hover {
  background: var(--ink);
  color: var(--white);
  transform: rotate(90deg) scale(1.05);
}

/* Header Content */
.contact-overlay-content {
  display: flex;
  flex-direction: column;
}

.contact-overlay-label {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink-secondary);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.contact-overlay-title {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -1px;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.contact-overlay-sub {
  font-size: var(--fs-sm);
  color: var(--ink-secondary);
  line-height: 1.5;
  max-width: 520px;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.contact-overlay.is-active .contact-overlay-label,
.contact-overlay.is-active .contact-overlay-title,
.contact-overlay.is-active .contact-overlay-sub {
  opacity: 1;
  transform: translateY(0);
}

/* Grid layout of 3 Cards */
.contact-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.contact-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(30px);
}

.contact-overlay.is-active .contact-card {
  opacity: 1;
  transform: translateY(0);
}

.contact-overlay.is-active .contact-card:nth-child(1) {
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-overlay.is-active .contact-card:nth-child(2) {
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-overlay.is-active .contact-card:nth-child(3) {
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 0, 0, 0.02) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.contact-card:hover {
  border-color: var(--ink);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.contact-card:hover .contact-card-bg {
  opacity: 1;
}

/* Icon style */
.contact-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-card-icon svg {
  width: 20px;
  height: 20px;
}

.contact-card:hover .contact-card-icon {
  background: var(--ink);
  color: var(--white);
  transform: scale(1.1) rotate(-3deg);
}

.contact-card-title {
  font-size: var(--fs-md);
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
  transition: color 0.3s ease;
}

.contact-card-desc {
  font-size: var(--fs-xs);
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.contact-card-action {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.contact-card-action .arrow {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-card:hover .contact-card-action .arrow {
  transform: translateX(5px);
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .contact-overlay-container {
    padding: 40px 24px;
    margin: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }
  
  .contact-overlay-title {
    font-size: 2rem;
  }
  
  .contact-overlay-sub {
    margin-bottom: 24px;
  }

  .contact-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .contact-card {
    padding: 24px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  
  .contact-card-icon {
    margin-bottom: 0;
    width: 40px;
    height: 40px;
  }
  
  .contact-card-desc {
    display: none;
  }
  
  .contact-card-action {
    margin-top: 0;
    margin-left: auto;
  }
}

/* =============================================================
   AUTOPLAY LINKEDIN FEATURE CAROUSEL COMPONENT
   ============================================================= */
.linkedin-carousel-container {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.04);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}

.linkedin-carousel-container:hover {
  border-color: var(--border-hover);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.linkedin-carousel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.linkedin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.linkedin-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.linkedin-topbar-title {
  display: flex;
  flex-direction: column;
}

.linkedin-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #0a66c2;
}

.carousel-counter {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-tertiary);
}

.carousel-nav-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: var(--white);
  border-color: var(--border-hover);
  color: #0a66c2;
  transform: scale(1.05);
}

.carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 24px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.embed-card-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.embed-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.embed-logo {
  width: 44px;
  height: 44px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.embed-title-wrap {
  display: flex;
  flex-direction: column;
}

.embed-source {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #0a66c2;
}

.embed-heading {
  font-family: var(--ff-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}

.linkedin-iframe-wrapper {
  position: relative;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.linkedin-iframe-wrapper iframe {
  width: 100%;
  max-width: 504px;
  height: 480px;
  border: none;
  background: var(--white);
}

.embed-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.embed-desc {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.carousel-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot-btn {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot-btn.active {
  width: 24px;
  border-radius: 100px;
  background: #0a66c2;
}

.autoplay-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0a66c2;
  box-shadow: 0 0 8px #0a66c2;
  animation: pulseStatus 2s infinite ease-in-out;
}

.linkedin-carousel-container.is-paused .status-indicator {
  background: var(--ink-tertiary);
  box-shadow: none;
  animation: none;
}

@keyframes pulseStatus {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.autoplay-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(10, 102, 194, 0.1);
  overflow: hidden;
}

.autoplay-progress-fill {
  height: 100%;
  width: 0%;
  background: #0a66c2;
  transition: width 0.05s linear;
}


/* Widescreen PC layout support for experience section in index.html */
@media (min-width: 1024px) {
  .exp-content-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: start;
  }
}

/* Interactive Tech Spec Modal */
.spec-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(8px);
  z-index: 99990;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.spec-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.spec-modal-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s var(--ease-out);
}

.spec-modal-overlay.active .spec-modal-container {
  transform: translateY(0) scale(1);
}

.spec-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.2s ease;
}

.spec-modal-close:hover {
  background: var(--ink);
  color: var(--bg);
}

.spec-modal-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: 8px;
}

.spec-modal-subtitle {
  font-size: var(--fs-sm);
  color: var(--ink-secondary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.spec-modal-section {
  margin-bottom: 24px;
}

.spec-modal-section-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-tertiary);
  margin-bottom: 12px;
}

.spec-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--ink);
  line-height: 1.5;
}

.spec-bullet-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: #10b981;
}

.spec-code-block {
  background: #111115;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  line-height: 1.5;
}

/* =============================================================
   NEXUSTHOUGHT — TRADITIONAL "BUILDING:" SECTION
   ============================================================= */
.building-section {
  padding-top: clamp(40px, 5vw, 60px);
  padding-bottom: clamp(24px, 3vw, 36px);
}

.building-section-heading {
  margin-bottom: 24px;
}

.building-box-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

.building-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.building-project-name {
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
  display: inline-block;
}

.building-box-desc {
  font-size: var(--fs-sm);
  color: var(--ink-secondary);
  line-height: 1.65;
  margin: 0;
  max-width: 950px;
}

.building-box-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding-top: 4px;
}

.building-github-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.building-github-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.building-github-btn svg {
  flex-shrink: 0;
}




