/* ============================================
   PORTFOLIO — 3D GLASSMORPHISM EDITION
   Deep-space aesthetic with perspective layers
   ============================================ */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  color-scheme: dark;

  /* Dark theme: neutral charcoal with a restrained teal accent */
  --bg-primary: #0b1014;
  --bg-secondary: rgba(17, 25, 30, 0.82);
  --bg-tertiary: rgba(23, 33, 39, 0.9);
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(111, 189, 180, 0.075);

  /* Text Colors */
  --text-primary: #edf3f2;
  --text-secondary: rgba(222, 234, 232, 0.8);
  --text-tertiary: rgba(190, 207, 204, 0.58);

  /* Accent palette */
  --accent-primary: #6fbdb4;
  --accent-secondary: #95cec8;
  --accent-purple: #9caeca;
  --accent-cyan: #80c9c1;
  --accent-green: #7ac9a5;
  --accent-orange: #dfa96d;
  --accent-pink: #c89ab5;
  --accent-indigo: #789fbe;

  /* Glow colors */
  --glow-blue: rgba(111, 189, 180, 0.18);
  --glow-purple: rgba(156, 174, 202, 0.14);
  --glow-cyan: rgba(128, 201, 193, 0.16);

  /* Link Colors */
  --link-color: #8fcfc7;
  --link-hover: #c9eee9;

  /* Glass */
  --glass-bg: rgba(16, 24, 29, 0.72);
  --glass-border: rgba(183, 211, 207, 0.14);
  --glass-blur: 22px;

  /* Borders */
  --border-subtle: rgba(183, 211, 207, 0.1);
  --border-medium: rgba(111, 189, 180, 0.28);

  /* Shadows */
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.42);
  --shadow-glow: 0 0 48px rgba(111, 189, 180, 0.08);

  /* Theme-aware surfaces and states */
  --sidebar-bg: rgba(9, 15, 18, 0.58);
  --surface-raised: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(111, 189, 180, 0.075);
  --surface-inset: rgba(0, 0, 0, 0.2);
  --logo-bg: rgba(255, 255, 255, 0.92);
  --logo-border: rgba(255, 255, 255, 0.18);
  --terminal-header-bg: rgba(18, 27, 32, 0.96);
  --terminal-body-bg: rgba(8, 14, 17, 0.84);
  --accent-wash: rgba(111, 189, 180, 0.08);
  --accent-wash-strong: rgba(111, 189, 180, 0.14);
  --accent-border: rgba(111, 189, 180, 0.3);
  --inset-highlight: rgba(255, 255, 255, 0.07);
  --grid-color: rgba(126, 169, 164, 0.52);
  --ambient-one: rgba(58, 116, 108, 0.16);
  --ambient-two: rgba(61, 91, 119, 0.12);
  --ambient-center: rgba(11, 16, 20, 1);
  --success-bg: rgba(80, 168, 123, 0.13);
  --success-text: #86d3aa;
  --success-border: rgba(122, 201, 165, 0.22);
  --info-bg: rgba(83, 135, 157, 0.14);
  --info-text: #9bc6d5;
  --info-border: rgba(120, 173, 194, 0.22);
  --warning-bg: rgba(191, 139, 76, 0.14);
  --warning-text: #e7b875;
  --warning-border: rgba(223, 169, 109, 0.22);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Space Grotesk', var(--font-primary);
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Spacing */
  --gap-panes: 4rem;
  --left-pane-width: clamp(260px, 28vw, 360px);
  --container-padding: clamp(1.5rem, 2.5vw, 2.5rem);

  /* Components */
  --terminal-max-h: clamp(500px, 100vh, 560px);
  --terminal-max-w: 100%;
  --terminal-min-h: 220px;
  --terminal-init-h: clamp(300px, 45vh, 500px);
  --profile-photo-zoom: 1.4;

  /* Cursor */
  --cursor-color: #6fbdb4;

  /* Name shadow */
  --name-shadow-block: rgba(111, 189, 180, 0.26);
  --name-shadow-soft: rgba(0, 0, 0, 0.42);

  /* 3D Scene */
  --scene-perspective: 1400px;
  --tilt-max: 3deg;
}

/* Light theme */
:root[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #f4f6f5;
  --bg-secondary: rgba(255, 255, 255, 0.82);
  --bg-tertiary: rgba(238, 243, 241, 0.94);
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(31, 116, 110, 0.07);
  --text-primary: #182126;
  --text-secondary: rgba(31, 46, 49, 0.78);
  --text-tertiary: rgba(45, 65, 68, 0.6);
  --accent-primary: #1f746e;
  --accent-secondary: #2d7778;
  --accent-purple: #596f8c;
  --accent-cyan: #287b75;
  --accent-green: #2e7655;
  --accent-orange: #945f26;
  --accent-pink: #84566d;
  --accent-indigo: #46677e;
  --link-color: #236f6a;
  --link-hover: #104f4b;
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(47, 83, 79, 0.14);
  --border-subtle: rgba(43, 72, 70, 0.12);
  --border-medium: rgba(31, 116, 110, 0.3);
  --cursor-color: #1f746e;
  --name-shadow-block: rgba(31, 116, 110, 0.18);
  --name-shadow-soft: rgba(35, 55, 52, 0.1);
  --glow-blue: rgba(31, 116, 110, 0.1);
  --glow-purple: rgba(89, 111, 140, 0.08);
  --glow-cyan: rgba(40, 123, 117, 0.1);
  --shadow-sm: 0 4px 18px rgba(27, 48, 44, 0.08);
  --shadow-md: 0 18px 50px rgba(27, 48, 44, 0.1);
  --shadow-lg: 0 28px 80px rgba(27, 48, 44, 0.13);
  --shadow-glow: 0 0 42px rgba(31, 116, 110, 0.05);
  --sidebar-bg: rgba(238, 243, 241, 0.7);
  --surface-raised: rgba(255, 255, 255, 0.72);
  --surface-hover: rgba(31, 116, 110, 0.065);
  --surface-inset: rgba(29, 57, 52, 0.055);
  --logo-bg: rgba(255, 255, 255, 0.92);
  --logo-border: rgba(43, 72, 70, 0.15);
  --terminal-header-bg: rgba(232, 239, 236, 0.96);
  --terminal-body-bg: rgba(248, 250, 249, 0.92);
  --accent-wash: rgba(31, 116, 110, 0.065);
  --accent-wash-strong: rgba(31, 116, 110, 0.11);
  --accent-border: rgba(31, 116, 110, 0.26);
  --inset-highlight: rgba(255, 255, 255, 0.72);
  --grid-color: rgba(53, 104, 97, 0.3);
  --ambient-one: rgba(88, 153, 145, 0.13);
  --ambient-two: rgba(104, 134, 157, 0.1);
  --ambient-center: rgba(244, 246, 245, 0.96);
  --success-bg: rgba(46, 118, 85, 0.09);
  --success-text: #245f46;
  --success-border: rgba(46, 118, 85, 0.2);
  --info-bg: rgba(70, 103, 126, 0.09);
  --info-text: #36566d;
  --info-border: rgba(70, 103, 126, 0.2);
  --warning-bg: rgba(148, 95, 38, 0.09);
  --warning-text: #7c4c1d;
  --warning-border: rgba(148, 95, 38, 0.2);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg-primary);
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 220ms ease, color 220ms ease;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

/* ============================================
   3D Starfield Canvas
   ============================================ */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.52;
  transition: opacity 220ms ease;
}

:root[data-theme="light"] #bg-canvas { opacity: 0.16; }

/* ============================================
   Animated Background Gradient
   ============================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, var(--ambient-one) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, var(--ambient-two) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, var(--ambient-center) 0%, var(--bg-primary) 100%);
  pointer-events: none;
  transition: background 220ms ease;
}

/* ============================================
   Floating Orbs (Depth Layer)
   ============================================ */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  filter: blur(80px);
  animation: orbDrift 20s ease-in-out infinite alternate;
  will-change: transform;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--ambient-one) 0%, transparent 70%);
  top: -15%;
  left: -10%;
  animation-duration: 22s;
  animation-delay: 0s;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--ambient-two) 0%, transparent 70%);
  bottom: -20%;
  right: -15%;
  animation-duration: 28s;
  animation-delay: -8s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--glow-purple) 0%, transparent 70%);
  top: 40%;
  left: 35%;
  animation-duration: 18s;
  animation-delay: -4s;
}

.orb-4 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 70%);
  top: 15%;
  right: 5%;
  animation-duration: 24s;
  animation-delay: -12s;
}

@keyframes orbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -30px) scale(1.05); }
  66%  { transform: translate(-20px, 40px) scale(0.97); }
  100% { transform: translate(30px, -20px) scale(1.03); }
}

/* ============================================
   Grid Overlay
   ============================================ */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 50%, black 20%, transparent 80%);
}

:root[data-theme="light"] .grid-overlay {
  opacity: 0.03;
}

/* ============================================
   3D Scene Container
   ============================================ */
.scene-3d {
  position: relative;
  z-index: 2;
  perspective: var(--scene-perspective);
  perspective-origin: 50% 42%;
  min-height: 100vh;
  /* smooth 3D tilt transitions */
  transition: none; /* handled per frame in JS */
}

/* ============================================
   Custom Cursor
   ============================================ */
@media (pointer: fine) {
  body { cursor: none; }
  a, button, .btn, .terminal-btn, [role="button"], input, textarea, select, .clickable { cursor: pointer; }

  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cursor-color);
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: opacity 200ms ease, background-color 200ms ease, width 150ms ease, height 150ms ease;
    box-shadow: 0 0 12px var(--cursor-color), 0 0 24px var(--glow-blue);
  }

  .cursor-dot.hover {
    width: 18px;
    height: 18px;
    background: transparent;
    border: 2px solid var(--cursor-color);
    box-shadow: 0 0 16px var(--cursor-color), 0 0 32px var(--glow-blue);
  }
  .cursor-dot.active { transform: translate(-50%, -50%) scale(0.85); }
  .cursor-dot.hidden { opacity: 0; }
}

/* ============================================
   Glass Panel Mixin (shared)
   ============================================ */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(var(--glass-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 var(--inset-highlight),
    var(--shadow-glow);
  border-radius: 24px;
}

/* ============================================
   Main Split Container
   ============================================ */
.container-split {
  display: flex;
  min-height: 100vh;
  gap: var(--gap-panes);
  padding: var(--container-padding);
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

@supports (padding: max(0px)) {
  .container-split {
    padding-left: max(clamp(1.5rem, 2.5vw, 2.5rem), env(safe-area-inset-left));
    padding-right: max(clamp(1.5rem, 2.5vw, 2.5rem), env(safe-area-inset-right));
  }
}

.container-split, .left-pane, .right-pane { min-width: 0; }

/* ============================================
   Left Pane - Fixed Profile Section
   ============================================ */
.left-pane {
  position: fixed;
  top: 2rem;
  left: max(
    var(--container-padding),
    calc((100vw - 1440px) / 2 + var(--container-padding))
  );
  z-index: 3;
  width: var(--left-pane-width);
  height: fit-content;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 4rem);

  padding-right: clamp(1.5rem, 3vw, 2.5rem);
  border-right: 1px solid var(--border-subtle);
}

/* Bleed background to the left so it doesn't look like a separate box */
.left-pane::before {
  content: '';
  position: absolute;
  top: -100vh;
  bottom: -100vh;
  left: -50vw;
  right: 0;
  background: var(--sidebar-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}

.profile-section {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

/* ============================================
   Profile Image
   ============================================ */
.profile-image-wrapper {
  position: relative;
  width: min(200px, 70%);
  height: min(200px, 70vw);
  aspect-ratio: 1;
  border-radius: clamp(12px, 1.5vw, 18px);
  /* Allow badge to hang outside the right edge */
  overflow: visible;
  border: none;
  box-shadow: none;
  margin-bottom: clamp(2rem, 4vw, 4rem);
}

.profile-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform-origin: center top;
  transform: scale(var(--profile-photo-zoom));
  transition: transform 0.3s ease;
}

.profile-image-frame {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: clamp(12px, 1.5vw, 18px);
}

.profile-image-wrapper:hover .profile-image {
  transform: scale(calc(var(--profile-photo-zoom) + 0.05));
}

/* Role badge overlay on photo (bottom-right) */
.profile-image-wrapper .role-badge.role-badge--by-photo {
  position: absolute;
  bottom: 0px;               /* touch bottom edge */
  left: 100%;                /* anchor to right edge of photo */
  right: auto;
  top: auto;
  /* 80% over the photo, 20% outside */
  transform: translateX(-80%);
  white-space: nowrap;
  background: var(--glass-bg);
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-sm);
  border-radius: 14px;
  padding: 0.2rem 0.25rem;
  backdrop-filter: saturate(140%) blur(10px);
  z-index: 2;
  pointer-events: none;
  max-width: none;
  box-sizing: border-box; /* JS width includes padding */
  display: inline-flex;
  justify-content: center; /* center horizontally */
  align-items: center;      /* center vertically */
  text-align: center;
}

.profile-image-wrapper .role-badge.role-badge--by-photo .role-article,
.profile-image-wrapper .role-badge.role-badge--by-photo .role-text {
  min-width: 0;
}

/* ============================================
   Theme Toggle Button
   ============================================ */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  padding: 0;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow:
    var(--shadow-sm),
    0 0 16px var(--glow-blue);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}
.theme-toggle:hover {
  background: var(--accent-wash-strong);
  box-shadow: var(--shadow-sm), 0 0 24px var(--glow-blue);
  transform: scale(1.05);
}
.theme-toggle:active { transform: scale(0.95); }
.theme-toggle .label { font-size: 0.9rem; display: none; }
.theme-toggle .icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
}

.profile-image-wrapper .role-badge.role-badge--by-photo .role-article {
  color: var(--text-primary);
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
}

.profile-image-wrapper .role-badge.role-badge--by-photo .role-text {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
}

/* Name */
.profile-name {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3.5vw, 1.875rem);
  font-weight: 700;
  margin: 0 0 clamp(0.4rem, 1.2vw, 0.9rem) 0;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
  text-decoration: none;
  /* Screenshot-style: crisp offset block shadow + subtle depth */
  text-shadow:
    3px 3px 0 var(--name-shadow-block),
    6px 6px 14px var(--name-shadow-soft);
}

/* Softer effect in light theme so it doesn't look heavy */
:root[data-theme="light"] .profile-name {
  /* Keep the same geometry in light mode; vars handle contrast */
  text-shadow:
    3px 3px 0 var(--name-shadow-block),
    6px 6px 14px var(--name-shadow-soft);
}

/* Ensure visited state keeps color/shadow */
.profile-name:visited { color: var(--text-primary); }

.profile-name:hover { color: var(--link-hover); }

/* ============================================
   Profile Links
   ============================================ */
.profile-links {
  display: flex;
  flex-direction: column;
  gap: clamp(1.05rem, 3.2vw, 2.1rem);
  width: 100%;
  align-items: center;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.45rem, 0.9vw, 0.65rem);
  padding: 0.25rem 0.4rem;
  background: transparent;
  border: none;
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.5;
  transition: color 180ms ease, transform 180ms ease;
}

/* Better accessibility/tap targets on touch */
.profile-link {
  -webkit-tap-highlight-color: transparent;
}
.profile-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 4px;
  border-radius: 10px;
}

.profile-link::before {
  display: none;
}

.profile-link:hover {
  transform: translateX(2px);
  color: var(--link-hover);
}

.profile-link svg {
  width: clamp(17px, 2.6vw, 20px);
  height: clamp(17px, 2.6vw, 20px);
  flex-shrink: 0;
  color: currentColor;
}

/* ============================================
   Right Pane
   ============================================ */
.right-pane {
  flex: 1;
  margin-left: calc(var(--left-pane-width) + var(--gap-panes));
  max-width: min(900px, 62vw);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.right-pane > :first-child { margin-top: 0.25rem; }

/* ============================================
   Research-led Introduction
   ============================================ */
.research-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.25rem;
  padding: clamp(1.5rem, 5vh, 3rem) clamp(0.25rem, 1.5vw, 1rem) clamp(4.5rem, 8vh, 5.5rem);
  overflow: hidden;
  isolation: isolate;
  scroll-margin-top: 5.5rem;
}

.research-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(34rem, 80%);
  height: 16rem;
  top: 15%;
  left: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-blue), transparent 70%);
  filter: blur(35px);
  pointer-events: none;
}

.research-hero h1 {
  max-width: 13ch;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.research-hero h1 span {
  display: block;
  color: var(--text-tertiary);
}

.research-hero > p {
  max-width: 42rem;
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.7vw, 1.1rem);
  line-height: 1.7;
}

.research-molecule {
  position: absolute;
  right: clamp(0.5rem, 5vw, 3rem);
  bottom: clamp(0.75rem, 3vh, 1.5rem);
  width: clamp(5.5rem, 11vw, 7.25rem);
  aspect-ratio: 1;
  perspective: 500px;
  opacity: 0.78;
  pointer-events: none;
}

.research-molecule-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: moleculeTurn 11s linear infinite;
}

.research-molecule-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  transform: translate3d(-50%, -50%, 18px);
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow:
    0 0 0 0.35rem var(--accent-wash),
    0 0 1.5rem var(--accent-primary);
}

.research-molecule-ring {
  position: absolute;
  inset: 17%;
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  transform-style: preserve-3d;
}

.research-molecule-ring i {
  position: absolute;
  top: -0.28rem;
  left: calc(50% - 0.28rem);
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 50%;
  background: var(--accent-secondary);
  box-shadow: 0 0 0.8rem var(--accent-primary);
}

.research-molecule-ring--one { transform: rotateX(68deg) rotateZ(12deg); }
.research-molecule-ring--two { transform: rotateY(68deg) rotateZ(62deg); }
.research-molecule-ring--three { transform: rotateX(58deg) rotateY(55deg) rotateZ(-28deg); }

.research-molecule-ring--two i { background: var(--accent-purple); }
.research-molecule-ring--three i { background: var(--accent-cyan); }

@keyframes moleculeTurn {
  from { transform: rotateX(12deg) rotateY(0deg) rotateZ(0deg); }
  to { transform: rotateX(372deg) rotateY(360deg) rotateZ(180deg); }
}

@media (max-width: 520px) {
  .research-hero {
    padding: 1.25rem 0.15rem 4.75rem;
  }
  .research-hero h1 { font-size: clamp(2.4rem, 13vw, 3.4rem); }
  .research-molecule {
    right: 50%;
    transform: translateX(50%);
  }
}

@media (max-height: 720px) and (min-width: 769px) {
  .right-pane { gap: clamp(1.25rem, 3vh, 2rem); }
  .research-hero { padding-block: 1rem 4.5rem; }
}

/* ============================================
   Mobile Down Arrow
   ============================================ */
.mobile-down-nav {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), 0 0 12px var(--glow-blue);
  text-decoration: none;
  transition: background 160ms ease, transform 200ms ease, border-color 160ms ease, opacity 220ms ease;
  opacity: 0.96;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mobile-down-nav:hover { background: var(--accent-wash-strong); }
.mobile-down-nav:active { transform: scale(0.96); }

@media (max-width: 768px) {
  .mobile-down-nav {
    display: grid;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(clamp(12px, 3vw, 20px) + env(safe-area-inset-bottom));
    margin: 0;
    z-index: 1150;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

@media (max-width: 768px) {
  .mobile-down-nav.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
  }
}

/* ============================================
   Hero / Name Section
   ============================================ */
.hero { margin-top: clamp(0.5rem, 1.5vw, 1.25rem); }

.hero-intro {
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 1vw, 0.65rem);
}

.hero-line {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.4vw, 1rem);
}

.hero-word {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 0.95;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-secondary) 55%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px var(--glow-blue));
}

.hero-dot {
  width: clamp(10px, 1.6vw, 14px);
  height: clamp(10px, 1.6vw, 14px);
  border-radius: 50%;
  background: var(--accent-purple);
  box-shadow: 0 0 12px var(--accent-purple), 0 0 24px var(--glow-purple);
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-purple), 0 0 16px var(--glow-purple); }
  50%       { box-shadow: 0 0 20px var(--accent-purple), 0 0 36px var(--glow-purple); }
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-wash);
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 16px var(--glow-blue), inset 0 1px 0 var(--inset-highlight);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.role-article {
  font-size: clamp(0.9rem, 2.4vw, 1rem);
  color: var(--text-secondary);
  transition: transform 300ms ease, opacity 300ms ease;
  will-change: transform, opacity;
}

.role-text {
  font-weight: 700;
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  color: var(--accent-primary);
  transition: transform 300ms ease, opacity 300ms ease;
  will-change: transform, opacity;
  text-shadow: 0 0 12px var(--glow-blue);
}

.role-text.is-changing {
  transform: translateY(8px) scale(0.96);
  opacity: 0;
}
.role-article.is-changing {
  transform: translateY(8px) scale(0.96);
  opacity: 0.4;
}

/* Left-pane hero */
.hero-left {
  align-self: stretch;
  text-align: center;
  margin-top: clamp(0.75rem, 2vw, 1rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.left-pane .hero-intro { align-items: center; }
.left-pane .hero-line { width: 100%; justify-content: center; }

.hero-top {
  margin-top: clamp(0.25rem, 1vw, 0.5rem);
  margin-bottom: clamp(0.4rem, 1.2vw, 0.9rem);
}

.left-pane .hero-word {
  font-size: clamp(1.4rem, 5vw, 1.8rem);
}
.left-pane .role-article { font-size: clamp(0.85rem, 2.2vw, 0.95rem); }
.left-pane .role-text { font-size: clamp(0.9rem, 2.4vw, 1.05rem); }

/* ============================================
   Terminal Section — 3D Glass Card
   ============================================ */
.terminal-section {
  animation: fadeInUp3D 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  scroll-margin-top: 5.5rem;
}

@keyframes fadeInUp3D {
  from {
    opacity: 0;
    transform: translateY(30px) translateZ(-60px) rotateX(4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0) rotateX(0);
  }
}

.terminal-window {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  resize: vertical;
  min-height: var(--terminal-min-h);
  height: var(--terminal-init-h);
  max-height: var(--terminal-max-h);
  max-width: var(--terminal-max-w);
  width: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  /* 3D card layering */
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease;
  will-change: transform;
  /* Enhanced glow for terminal */
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px var(--glass-border),
    var(--shadow-glow),
    inset 0 1px 0 var(--inset-highlight);
}

.terminal-window:hover {
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px var(--accent-border),
    0 0 70px var(--glow-blue),
    inset 0 1px 0 var(--inset-highlight);
}

.terminal-window::after {
  content: '';
  position: absolute;
  z-index: 4;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 0 0 999px 999px;
  background: var(--accent-primary);
  box-shadow: 0 0 14px var(--accent-primary);
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 160ms ease, transform 180ms ease;
  pointer-events: none;
}

.terminal-window.is-input-active {
  border-color: var(--accent-border);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px var(--accent-primary),
    0 0 70px var(--glow-blue),
    inset 0 1px 0 var(--inset-highlight);
}

.terminal-window.is-input-active::after {
  opacity: 1;
  transform: scaleX(1);
}

@media (pointer: coarse) {
  .terminal-window { resize: none; }
}

.terminal-header {
  background: var(--terminal-header-bg);
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

/* Scanline shimmer in header */
.terminal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-wash), transparent);
  animation: headerShimmer 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes headerShimmer {
  0%   { left: -60%; }
  100% { left: 160%; }
}

.terminal-header-glow {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 200px;
  background: linear-gradient(90deg, transparent, var(--accent-wash));
  pointer-events: none;
}

.terminal-buttons { display: flex; gap: 0.5rem; }

.terminal-btn {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.terminal-btn:hover {
  transform: scale(1.25);
  filter: brightness(1.3);
}

.terminal-btn.close    { background: #ff5f56; box-shadow: 0 0 6px rgba(255, 95, 86, 0.5); }
.terminal-btn.minimize { background: #ffbd2e; box-shadow: 0 0 6px rgba(255, 189, 46, 0.5); }
.terminal-btn.maximize { background: #27c93f; box-shadow: 0 0 6px rgba(39, 201, 63, 0.5); }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-shadow: 0 0 8px var(--glow-blue);
}

.terminal-body {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  padding: 1rem;
  line-height: 1.25;
  user-select: text;
  -webkit-user-select: text;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  flex: 1;
  background: var(--terminal-body-bg);
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--accent-border) transparent;
}

.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb {
  background: var(--accent-border);
  border-radius: 4px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

.terminal-line {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0;
  user-select: text;
  -webkit-user-select: text;
  min-width: 0;
  max-width: 100%;
}

.terminal-prompt {
  color: var(--accent-green);
  font-weight: 600;
  flex-shrink: 0;
  text-shadow: 0 0 8px var(--success-bg);
}

.terminal-command {
  color: var(--accent-secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.terminal-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: inherit;
  line-height: 1.25;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
  caret-color: var(--accent-cyan);
}

.terminal-output {
  color: var(--text-secondary);
  margin-left: 0;
  margin-bottom: 1.5rem;
  user-select: text;
  -webkit-user-select: text;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.terminal-body pre, .terminal-body code {
  white-space: pre-wrap;
  word-break: break-word;
}

p, li, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

.terminal-output p { margin-bottom: 0; }

.terminal-muted { color: var(--text-tertiary); }

.terminal-output .terminal-list,
.terminal-list,
.terminal-list li {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.terminal-highlight {
  color: var(--accent-cyan);
  font-weight: 600;
  text-shadow: 0 0 8px var(--glow-cyan);
}

.terminal-cursor {
  color: var(--accent-cyan);
  animation: blink 1s infinite;
  text-shadow: 0 0 8px var(--accent-cyan);
}

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

/* Mobile terminal font */
@media (max-width: 768px) {
  .terminal-line { gap: 0.5rem; }
}

/* ============================================
   Content Sections
   ============================================ */
.about-section, .research-section {
  animation: fadeInUp3D 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-fill-mode: both;
}
.about-section { animation-delay: 0.2s; }
.research-section { animation-delay: 0.4s; }

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding-bottom: 0.75rem;
  filter: drop-shadow(0 0 16px var(--glow-blue));
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-purple), transparent);
  opacity: 0.4;
}

.content-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.content-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-purple), var(--accent-cyan));
  opacity: 0.7;
}

.content-card p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}
.content-card p:last-child { margin-bottom: 0; }
.content-card strong {
  color: var(--text-primary);
  font-weight: 600;
  text-shadow: 0 0 8px var(--glow-blue);
}

/* Research Topics */
.research-topics { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2rem; }

.topic-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--accent-wash);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.topic-item:hover {
  border-color: var(--accent-border);
  transform: translateX(6px) translateY(-2px);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--accent-border);
  background: var(--accent-wash-strong);
}

.topic-icon {
  font-size: 2rem;
  flex-shrink: 0;
  filter: grayscale(0.2) brightness(1.1);
  transition: filter 0.3s ease, transform 0.3s ease;
}
.topic-item:hover .topic-icon { filter: grayscale(0) brightness(1.3); transform: scale(1.1) rotate(-5deg); }

.topic-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.topic-content p { color: var(--text-tertiary); font-size: 0.9375rem; margin: 0; }

/* ============================================
   Tilt Card (3D hover effect)
   ============================================ */
.tilt-card {
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease;
  will-change: transform;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 3rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
}

/* ============================================
   Scroll Progress
   ============================================ */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-primary), var(--accent-secondary));
  z-index: 9999;
  transition: width 0.1s ease;
  box-shadow: 0 0 8px var(--glow-purple);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
  :root { --gap-panes: 2.5rem; }
}

@media (max-width: 680px) { html { font-size: 15px; } }
@media (max-width: 480px) { html { font-size: 14px; } }

@media (max-width: 768px) {
  .container-split {
    flex-direction: column;
    gap: 2.5rem;
    padding-left: calc(clamp(14px, 5vw, 22px) + env(safe-area-inset-left));
    padding-right: calc(clamp(14px, 5vw, 22px) + env(safe-area-inset-right));
  }

  .left-pane {
    position: relative;
    top: 0;
    left: auto;
    z-index: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: calc(100vh - clamp(28px, 10vw, 44px));
    min-height: calc(100svh - clamp(28px, 10vw, 44px));
    padding: 1.5rem;
    border-right: 0;
  }

  .left-pane::before { right: -50vw; }
  .left-pane::after { display: none; }

  .profile-section {
    width: min(100%, 500px);
    margin-inline: auto;
  }

  .right-pane {
    margin-left: 0;
    max-width: 100%;
  }

  .profile-link { padding: 0.5rem 0.75rem; border-radius: 12px; }

  /* Disable heavy 3D on mobile */
  .scene-3d { perspective: none; }
  .left-pane, .terminal-window, .tilt-card { transform: none !important; }
  .orb { filter: blur(60px); opacity: 0.6; }
}

@media (max-width: 768px) {
  .terminal-body {
    font-size: 1rem;
    line-height: 1.35;
    padding: 1rem;
  }
  .content-card { padding: 1.5rem; }
  .topic-item { flex-direction: column; gap: 1rem; }
}

@media (max-width: 768px) {
  input, textarea, select, .terminal-input { font-size: 16px; }
}

@media (max-width: 992px) {
  .profile-image-wrapper .role-badge.role-badge--by-photo {
    bottom: 0;
    left: 100%;
    right: auto;
    top: auto;
    transform: translateX(-80%);
    max-width: none;
  }
  .profile-image-wrapper { margin-bottom: clamp(2rem, 6vw, 3.25rem); }
}

@media (max-width: 480px) {
  .profile-image-wrapper {
    width: clamp(180px, 70vw, 240px);
    height: auto;
  }
  .profile-name { font-size: 28px; }
  .profile-image-wrapper .role-badge.role-badge--by-photo {
    bottom: 0;
    left: 100%;
    right: auto;
    top: auto;
    transform: translateX(-80%);
    padding: 0.2rem 0.5rem;
    white-space: nowrap;
    overflow: visible;
  }
  .profile-image-wrapper .role-badge.role-badge--by-photo .role-text { font-size: clamp(1.05rem, 5vw, 1.3rem); }
  .profile-image-wrapper .role-badge.role-badge--by-photo .role-article { font-size: clamp(0.85rem, 3.5vw, 1rem); }
  .profile-links { gap: 0.9rem; }
  .theme-toggle {
    right: calc(14px + env(safe-area-inset-right));
    top: calc(10px + env(safe-area-inset-top));
    width: 36px;
    height: 36px;
  }
  .theme-toggle .icon { font-size: 0.9rem; }
  .terminal-header { padding: 0.5rem 0.75rem; }
  .terminal-body { padding: 0.85rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .orb { animation: none; }
  .scene-3d { perspective: none; }
  .left-pane, .terminal-window, .tilt-card { transform: none !important; }
}

/* Utility */
img, video { max-width: 100%; height: auto; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ============================================
   Section Navigation
   ============================================ */
.section-nav {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
}

.section-nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.section-nav-links::-webkit-scrollbar { display: none; }

.section-nav-link,
.section-nav-action {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-tertiary);
  font: 600 0.76rem/1 var(--font-primary);
  letter-spacing: 0.01em;
  padding: 0.7rem 0.72rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.section-nav-link:hover,
.section-nav-link.is-active {
  color: var(--text-primary);
  background: var(--accent-wash);
}

.section-nav-link.is-active {
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.section-nav-link--featured { color: var(--accent-secondary); }

.section-nav-action {
  flex-shrink: 0;
  border-left: 1px solid var(--border-subtle);
  border-radius: 0 9px 9px 0;
  cursor: pointer;
}

.section-nav-action:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.section-nav-link:focus-visible,
.section-nav-action:focus-visible,
.section-toggle:focus-visible,
.news-archive summary:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ============================================
   Content Sections (shared)
   ============================================ */
.content-section {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  transition: border-color 250ms ease, background 250ms ease;
  animation: fadeInUp3D 0.55s ease both;
  scroll-margin-top: 5.5rem;
}

.content-section:hover {
  border-color: var(--border-medium);
  background: var(--surface-hover);
}

.content-section--featured {
  border-color: var(--accent-border);
  box-shadow: inset 0 1px 0 var(--inset-highlight), var(--shadow-glow);
}

.content-section.is-collapsed {
  gap: 0;
  padding-block: 1.1rem;
  background: var(--surface-raised);
}

.section-content { min-width: 0; }
.section-content[hidden] { display: none; }
.section-content:not([hidden]) { animation: sectionReveal 180ms ease-out both; }

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

/* Section headings */
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  margin: -0.45rem;
  padding: 0.45rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.section-toggle:hover { background: var(--accent-wash); }

.section-heading-main {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.section-chevron {
  position: relative;
  width: 1.65rem;
  height: 1.65rem;
  margin-left: auto;
  flex: 0 0 1.65rem;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: var(--surface-raised);
}

.section-chevron::before,
.section-chevron::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.48rem;
  height: 1px;
  background: currentColor;
  transition: transform 180ms ease;
}

.section-chevron::before { transform: translate(-80%, -50%) rotate(40deg); }
.section-chevron::after { transform: translate(-20%, -50%) rotate(-40deg); }
.section-toggle[aria-expanded="false"] .section-chevron::before { transform: translate(-80%, -50%) rotate(-40deg); }
.section-toggle[aria-expanded="false"] .section-chevron::after { transform: translate(-20%, -50%) rotate(40deg); }

.section-heading-icon {
  color: var(--accent-primary);
  font-style: normal;
  line-height: 1;
  font-size: 1em;
}

/* Inline text links */
.text-link {
  color: var(--accent-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}
.text-link:hover {
  color: var(--link-hover);
  border-color: var(--accent-secondary);
}

/* Make About Me links visibly highlighted by default */
.about-body .text-link {
  padding: 0 0.08em;
  border-bottom-color: currentColor;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(111, 189, 180, 0.45);
  background: linear-gradient(transparent 68%, var(--accent-wash-strong) 68%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.about-body .text-link:hover,
.about-body .text-link:focus-visible {
  color: var(--link-hover);
  text-decoration-color: var(--accent-primary);
  background: linear-gradient(transparent 62%, var(--accent-wash-strong) 62%);
}

/* ============================================
   About Section
   ============================================ */
.about-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-body p {
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  line-height: 1.75;
  color: var(--text-secondary);
}

.conversation-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1.1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--surface-inset);
}

.conversation-note-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  background: var(--accent-wash);
  font-size: 1rem;
}

.conversation-note > div {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.conversation-note h3 {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.92rem;
}

.conversation-note p {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  line-height: 1.6;
}

.conversation-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-block: 0.25rem;
  color: var(--accent-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.conversation-link:hover { color: var(--link-hover); }
.conversation-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 680px) {
  .conversation-note { grid-template-columns: auto minmax(0, 1fr); }
  .conversation-link { grid-column: 2; width: fit-content; }
}

/* ============================================
   Research Cards
   ============================================ */
.research-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.research-toolbar p {
  color: var(--text-tertiary);
  font-size: 0.82rem;
}

.scholar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--accent-border);
  border-radius: 9px;
  background: var(--accent-wash);
  color: var(--accent-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.scholar-link svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.scholar-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent-primary);
  background: var(--accent-wash-strong);
  color: var(--link-hover);
}

.scholar-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.research-card--extra:not([hidden]) {
  animation: sectionReveal 180ms ease-out both;
}

.research-more {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  margin: 1rem auto 0;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-secondary);
  font: 700 0.76rem/1 var(--font-primary);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.research-more[hidden] { display: none; }

.research-more:hover {
  transform: translateY(-1px);
  border-color: var(--accent-primary);
  background: var(--accent-wash-strong);
  color: var(--link-hover);
}

.research-more:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.research-more-icon {
  position: relative;
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.research-more-icon::before,
.research-more-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.45rem;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 160ms ease;
}

.research-more-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.research-more.is-expanded .research-more-icon::after { transform: translate(-50%, -50%) rotate(90deg) scaleX(0); }

@media (max-width: 560px) {
  .research-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .scholar-link { width: 100%; justify-content: center; }
}

/* Carousel wrapper */
.research-carousel {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Scroll container */
.research-list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.research-list::-webkit-scrollbar { display: none; }

/* Dot indicators */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-medium);
  transition: background 200ms ease, transform 200ms ease;
  cursor: pointer;
}
.carousel-dot.is-active {
  background: var(--accent-primary);
  transform: scale(1.35);
}

/* Nav buttons */
.carousel-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--surface-raised);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}
.carousel-btn:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-medium);
  color: var(--text-primary);
}
.carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Each card — vertical layout, 2 visible */
.research-card {
  flex: 0 0 calc(50% - 0.5rem);
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  padding: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.research-card[hidden] { display: none; }
.research-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

/* Tall image panel spanning full card width */
.research-card-img-wrap {
  flex-shrink: 0;
  width: 100%;
  height: 190px;
  border-radius: 0;
  overflow: hidden;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.research-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: scale(1.05);
}
@media (hover: hover) {
  .research-card-img {
    filter: grayscale(1);
    transition: filter 0.15s ease;
    will-change: filter;
  }
  .research-card:hover .research-card-img {
    filter: grayscale(0);
  }
}

.research-card-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}

.research-card-visual--mapk {
  background:
    radial-gradient(circle at 28% 30%, var(--accent-wash-strong) 0 12%, transparent 13%),
    radial-gradient(circle at 72% 70%, var(--glow-purple) 0 14%, transparent 15%),
    linear-gradient(145deg, var(--bg-tertiary), var(--surface-inset));
}

.research-card-visual--mapk::before,
.research-card-visual--mapk::after {
  content: '';
  position: absolute;
  width: 74%;
  height: 34%;
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  transform: rotate(32deg);
}

.research-card-visual--mapk::after { transform: rotate(-32deg); }

.research-card-visual--mapk span {
  position: relative;
  z-index: 1;
  color: var(--accent-secondary);
  font: 800 0.7rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px var(--glow-blue);
}

.research-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
  padding: 1rem 1.1rem 1.1rem;
}

.research-card-title {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.5vw, 0.97rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: break-word;
}

.research-card-authors {
  font-size: clamp(0.78rem, 1.3vw, 0.86rem);
  color: var(--text-tertiary);
  line-height: 1.5;
}

.author-self {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--text-secondary);
}

.research-card-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

/* Venue badges */
.research-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2em 0.65em;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-published {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.badge-workshop {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.badge-prep {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.research-links {
  display: flex;
  gap: 0.5rem;
}

.research-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
  padding: 0.15em 0.5em;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.research-link:hover {
  background: var(--accent-wash-strong);
  border-color: var(--accent-primary);
  color: var(--link-hover);
}

/* ============================================
   Consulting & Freelance
   ============================================ */
.content-section--consulting {
  border-color: var(--accent-border);
  background:
    linear-gradient(145deg, var(--surface-raised), transparent),
    var(--surface-raised);
}

.consulting-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
}

.consulting-intro > div {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 39rem;
}

.consulting-intro p {
  color: var(--text-secondary);
  font-size: clamp(0.88rem, 1.5vw, 0.98rem);
  line-height: 1.7;
}

.consulting-availability {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  color: var(--success-text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.consulting-availability i {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--success-text);
  box-shadow: 0 0 0 0.3rem var(--success-bg), 0 0 0.8rem var(--success-text);
  animation: consultingPulse 2.4s ease-in-out infinite;
}

@keyframes consultingPulse {
  0%, 100% { opacity: 0.65; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

.consulting-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-height: 2.7rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--accent-border);
  border-radius: 9px;
  background: var(--accent-wash);
  color: var(--accent-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.consulting-contact:hover {
  transform: translateY(-1px);
  border-color: var(--accent-primary);
  background: var(--accent-wash-strong);
  color: var(--link-hover);
}

.consulting-contact:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.consulting-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.consulting-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-raised);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.consulting-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  background: var(--surface-hover);
}

.consulting-card-icon {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 8px;
  background: var(--accent-wash);
  color: var(--accent-primary);
  font: 700 0.75rem/1 var(--font-mono);
}

.consulting-card h3 {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  line-height: 1.35;
}

.consulting-card p {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .consulting-intro { align-items: flex-start; flex-direction: column; }
  .consulting-contact { width: 100%; }
  .consulting-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .research-card { flex: 0 0 calc(100% - 0px); }
  .research-card-img-wrap { height: 160px; }
  .research-card-title { font-size: 0.85rem; }
  .research-card-authors { font-size: 0.75rem; }
  .research-badge { white-space: normal; }
  .research-card-footer { gap: 0.5rem; }
  .carousel-btn { display: flex; width: 28px; height: 28px; }
  .carousel-dots { margin-top: 0.6rem; }
}

/* ============================================
   Education Timeline
   ============================================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Vertical track line */
.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 28px;
  bottom: 28px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent-primary) 0%, transparent 100%);
  opacity: 0.25;
}

.timeline-item {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  transition: background 200ms ease;
  position: relative;
}

.timeline-item:hover {
  background: var(--accent-wash);
}

.timeline-logo-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: var(--logo-bg);
  border: 1px solid var(--logo-border, var(--border-subtle));
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.timeline-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.timeline-logo-wrap--dual {
  height: 72px;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
}

.timeline-logo-wrap--dual .timeline-logo {
  height: 50%;
  padding: 2px;
}

.timeline-logo-wrap--dual .timeline-logo:last-child {
  padding: 0;
  transform: scale(1.5);
  transform-origin: center;
}

.timeline-content {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 1.5vw, 1rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.timeline-period {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-role {
  font-size: clamp(0.82rem, 1.3vw, 0.9rem);
  color: var(--text-secondary);
  margin-top: 0.2rem;
  line-height: 1.5;
}

.timeline-grade {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--success-text);
  padding: 0.1em 0.45em;
  background: var(--success-bg);
  border-radius: 4px;
  margin-left: 0.3em;
}

.timeline-detail {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 0.2rem;
  font-style: italic;
  line-height: 1.4;
}

/* ============================================
   Experience Grid
   ============================================ */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.exp-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.exp-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}
.exp-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--logo-bg);
  padding: 4px;
  border: 1px solid var(--logo-border, var(--border-subtle));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.exp-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.exp-title {
  font-size: clamp(0.82rem, 1.4vw, 0.92rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.exp-role {
  font-size: clamp(0.75rem, 1.2vw, 0.82rem);
  color: var(--text-secondary);
  line-height: 1.4;
}

.exp-period {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  display: block;
  margin-top: 0.1rem;
}

/* ============================================
   News Feed
   ============================================ */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.news-intro p {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  text-align: right;
}

.news-eyebrow {
  color: var(--accent-primary);
  font: 700 0.72rem/1 var(--font-primary);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.news-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
}

.news-highlight-card {
  position: relative;
  min-width: 0;
  padding: 1rem;
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.news-highlight-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent-primary);
  opacity: 0.55;
}

.news-highlight-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  background: var(--surface-hover);
}

.news-highlight-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.news-highlight-meta time {
  color: var(--accent-secondary);
  font: 700 0.7rem/1 var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.news-kind {
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--text-tertiary);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.news-highlight-card > p {
  color: var(--text-secondary);
  font-size: clamp(0.8rem, 1.25vw, 0.88rem);
  line-height: 1.55;
}

.news-archive {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-inset);
}

.news-archive summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.news-archive summary::-webkit-details-marker { display: none; }

.news-archive summary::after {
  content: '+';
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  margin-left: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--accent-primary);
  font: 500 0.9rem/1 var(--font-primary);
}

.news-archive[open] summary::after { content: '−'; }

.news-archive-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--border-subtle);
}

.news-year-block {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.news-year-label {
  flex-shrink: 0;
  width: 56px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-primary);
  padding-top: 0.15rem;
  letter-spacing: 0.03em;
  text-align: right;
}

.news-items {
  flex: 1;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 1px solid var(--border-subtle);
  padding-left: 1rem;
  margin: 0;
}

.news-items li {
  font-size: clamp(0.82rem, 1.35vw, 0.9rem);
  color: var(--text-secondary);
  line-height: 1.55;
  position: relative;
  padding-left: 0.1rem;
}

.news-items li::before {
  content: '·';
  position: absolute;
  left: -0.85rem;
  color: var(--accent-primary);
  opacity: 0.5;
}

.news-month {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  min-width: 3.5em;
  margin-right: 0.35em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .section-nav {
    position: sticky;
    top: 0;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .section-nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .news-highlights { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .section-nav { gap: 0.15rem; padding: 0.3rem; }
  .section-nav-link,
  .section-nav-action { padding: 0.55rem 0.55rem; font-size: 0.7rem; }
  .news-intro { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .news-intro p { text-align: left; }
  .news-year-block { gap: 0.7rem; }
  .news-year-label { width: 48px; }
}

/* ============================================
   "Let's Work Together" trigger button
   ============================================ */
.contact-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-wash);
  color: var(--accent-primary);
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}

.contact-trigger:hover {
  background: var(--accent-wash-strong);
  border-color: var(--accent-primary);
  color: var(--accent-secondary);
  box-shadow: 0 0 0 3px var(--glow-blue);
}

/* ============================================
   Contact Modal Overlay
   ============================================ */
.contact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.contact-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(111,189,180,0.07);
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-border) transparent;
}

.contact-overlay.is-open .contact-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Header */
.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.contact-modal-profile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.contact-modal-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--accent-border);
  flex-shrink: 0;
}

.contact-modal-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.contact-modal-role {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin: 0.15rem 0 0;
}

.contact-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--surface-raised);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.contact-modal-close:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-border);
}

/* Body: two columns */
.contact-modal-body {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: 0;
}

/* Form side */
.contact-form-side {
  padding: 1.75rem 1.5rem 1.75rem 1.75rem;
  border-right: 1px solid var(--border-subtle);
}

.contact-side-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.3rem;
}

.contact-side-sub {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin: 0 0 1.25rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  resize: none;
  width: 100%;
  box-sizing: border-box;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--text-tertiary);
}

.contact-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%236fbdb4'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  cursor: pointer;
}

.contact-field select option {
  background: #111a20;
  color: var(--text-primary);
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--glow-blue);
}

.contact-submit {
  margin-top: 0.25rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #5b9bd4 0%, #7c6fcb 100%);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s, transform 0.12s;
  letter-spacing: 0.01em;
}

.contact-submit:hover {
  opacity: 0.92;
  box-shadow: 0 4px 20px rgba(92, 139, 212, 0.35);
  transform: translateY(-1px);
}

.contact-submit:active {
  transform: translateY(0);
}

/* Links side */
.contact-links-side {
  padding: 1.75rem 1.5rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-links-heading {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 0.6rem;
}

.contact-links-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-social-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  margin-bottom: 0.4rem;
}

.contact-social-row:last-child { margin-bottom: 0; }

.contact-social-row:hover {
  background: var(--surface-hover);
  border-color: var(--accent-border);
  color: var(--text-primary);
}

.contact-social-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-primary);
}

.contact-success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  text-align: center;
  color: var(--success-text);
  font-size: 1rem;
  font-weight: 500;
}

.contact-form-error {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #e07b7b;
}

.contact-field-hint {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #e07b7b;
}

.contact-input-error {
  border-color: #e07b7b !important;
  box-shadow: 0 0 0 3px rgba(224, 123, 123, 0.18) !important;
}

.contact-captcha-field label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

/* Mobile: stack columns */
@media (max-width: 640px) {
  .contact-modal-body {
    grid-template-columns: 1fr;
  }

  .contact-form-side {
    padding: 1.25rem;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .contact-links-side {
    padding: 1.25rem;
  }

  .contact-form-row {
    grid-template-columns: 1fr;
  }
}
