/* ─────────────────────────────────────────────────
   CSS CUSTOM PROPERTIES
───────────────────────────────────────────────── */
:root {
  --bg-primary:    #05050f;
  --bg-secondary:  #0a0a1a;
  --bg-card:       rgba(12, 12, 28, 0.85);
  --bg-card-hover: rgba(18, 18, 38, 0.95);

  --accent-cyan:   #64ffda;
  --accent-purple: #9d4edd;
  --accent-blue:   #4895ef;
  --accent-gold:   #ffd60a;

  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #484f58;

  --border:        rgba(100, 255, 218, 0.12);
  --border-hover:  rgba(100, 255, 218, 0.35);
  --grid-line:     rgba(100, 255, 218, 0.04);

  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --shadow-glow: 0 0 40px rgba(100, 255, 218, 0.08);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

  --nav-height: 70px;
  --section-padding: 100px;
  --container-width: 1140px;
}

/* ─────────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; }

/* ─────────────────────────────────────────────────
   THREE.JS BACKGROUND CANVAS
───────────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────
   GRID OVERLAY
───────────────────────────────────────────────── */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ─────────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────────── */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section {
  position: relative;
  padding: var(--section-padding) 0;
  overflow: hidden;
}

.section-alt {
  background: var(--bg-secondary);
}

/* ─────────────────────────────────────────────────
   SECTION HEADER
───────────────────────────────────────────────── */
.section-header {
  margin-bottom: 60px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 2px;
}

/* ─────────────────────────────────────────────────
   NAVBAR
───────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-bottom 0.3s ease;
}

.navbar.scrolled {
  background: rgba(5, 5, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-logo:hover { color: var(--accent-cyan); }

.logo-bracket {
  color: var(--accent-cyan);
}

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

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.05em;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-cyan);
  background: rgba(100, 255, 218, 0.06);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ─────────────────────────────────────────────────
   HERO SECTION
───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) 0 60px;
  overflow: hidden;
}

/* ambient glow blobs */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.glow-left {
  width: 700px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(100, 255, 218, 0.07) 0%, transparent 68%);
  top: -10%;
  left: -18%;
}

.glow-right {
  width: 700px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(157, 78, 221, 0.07) 0%, transparent 68%);
  top: 5%;
  right: -18%;
}

/* two-column layout */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: var(--container-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.hero-left  { min-width: 0; }
.hero-right { min-width: 0; }

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-cyan);
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

.hero-name {
  font-size: clamp(2rem, 3.8vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-roles {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.6vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 18px;
  height: 2em;
  display: flex;
  align-items: center;
  gap: 2px;
}

.role-prefix {
  color: var(--accent-cyan);
  font-weight: 700;
}

.typed-text { color: var(--text-primary); }

.cursor {
  color: var(--accent-cyan);
  animation: blink 1s step-end infinite;
  margin-left: 1px;
}

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

.hero-tagline {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 12px;
  width: 100%;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 14px;
}

/* ─────────────────────────────────────────────────
   TERMINAL WIDGET
───────────────────────────────────────────────── */
.terminal {
  background: rgba(6, 6, 18, 0.96);
  border: 1px solid rgba(100, 255, 218, 0.14);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 24px 70px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(100, 255, 218, 0.03);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
  animation: termFloat 5.5s ease-in-out infinite;
  user-select: none;
}

.terminal:hover {
  border-color: rgba(100, 255, 218, 0.32);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 24px 70px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(100, 255, 218, 0.09);
}

@keyframes termFloat {
  0%, 100% { transform: translateY(0px)   rotate(0deg); }
  33%       { transform: translateY(-8px)  rotate(0.3deg); }
  66%       { transform: translateY(-4px)  rotate(-0.2deg); }
}

.terminal-chrome {
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tc-dots { display: flex; gap: 7px; align-items: center; }

.tc {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tc--red    { background: #ff5f57; box-shadow: 0 0 6px rgba(255,95,87,0.5); }
.tc--yellow { background: #ffbd2e; box-shadow: 0 0 6px rgba(255,189,46,0.4); }
.tc--green  { background: #28ca41; box-shadow: 0 0 6px rgba(40,202,65,0.4); }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
  letter-spacing: 0.04em;
}

.terminal-body {
  padding: 18px 22px 20px;
  min-height: 310px;
  max-height: 380px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.8;
}

.terminal-hint {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  text-align: center;
  padding: 7px;
  border-top: 1px solid rgba(255,255,255,0.04);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* terminal line types */
.tl     { display: block; }
.tl-gap { min-height: 0.6em; display: block; }
.tl-cmd { color: var(--text-primary); }
.tl-out { color: var(--text-secondary); padding-left: 0; }

/* syntax colors */
.t-ps    { color: var(--accent-cyan); }
.t-key   { color: var(--accent-cyan); }
.t-str   { color: #a8ff78; }
.t-num   { color: #c084fc; }
.t-brace { color: #e2e8f0; }
.t-hash  { color: var(--text-muted); font-size: 0.7em; }
.t-msg   { color: var(--text-secondary); }
.t-cyan  { color: var(--accent-cyan); }
.t-green { color: #4ade80; }
.t-dim   { color: var(--text-muted); }

.t-cursor-blink {
  color: var(--accent-cyan);
  animation: blink 1s step-end infinite;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  opacity: 0.5;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent-cyan), transparent);
  animation: scrollDrop 2s ease-in-out infinite;
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-cyan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

@keyframes scrollDrop {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-weight: 700;
}

.btn-primary:hover {
  background: #4de8c2;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(100, 255, 218, 0.25);
}

.btn-outline {
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(100, 255, 218, 0.07);
  transform: translateY(-2px);
}

.btn-book {
  border: 1px solid var(--accent-purple);
  color: var(--accent-purple);
  background: rgba(157, 78, 221, 0.06);
}

.btn-book:hover {
  background: rgba(157, 78, 221, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(157, 78, 221, 0.2);
}

/* ─────────────────────────────────────────────────
   ABOUT SECTION
───────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  align-items: start;
}

.avatar-frame {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent-cyan);
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
  box-shadow: 0 0 40px rgba(100, 255, 218, 0.15), 0 0 0 4px rgba(100, 255, 218, 0.06);
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.08), rgba(157, 78, 221, 0.08));
  flex-shrink: 0;
}

.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}

.avatar-frame:hover .avatar-photo {
  transform: scale(1.04);
}

.about-links {
  display: flex;
  gap: 12px;
}

.icon-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.icon-link svg { width: 16px; height: 16px; }

.icon-link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(100, 255, 218, 0.06);
}

.about-bio {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 16px;
  line-height: 1.85;
}

.about-bio strong { color: var(--text-primary); }

.about-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.info-value {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.research-interests { margin-top: 28px; }

.interest-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-tag {
  font-size: 0.8rem;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: rgba(100, 255, 218, 0.03);
  transition: all 0.2s;
}

.interest-tag:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ─────────────────────────────────────────────────
   SKILLS
───────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.skill-category:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.skill-cat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(100, 255, 218, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.skill-cat-icon svg { width: 18px; height: 18px; }

.skill-cat-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
  transition: all 0.2s;
}

.skill-tag.primary {
  border-color: rgba(100, 255, 218, 0.3);
  color: var(--accent-cyan);
  background: rgba(100, 255, 218, 0.05);
}

.skill-tag:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ─────────────────────────────────────────────────
   TIMELINE (EXPERIENCE)
───────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -38px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  background: var(--bg-primary);
  box-shadow: 0 0 12px rgba(100, 255, 218, 0.4);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.timeline-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-type {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-cyan);
  border: 1px solid rgba(100, 255, 218, 0.3);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.timeline-company {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-stack {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  margin-top: 4px;
}

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

.timeline-bullets li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-size: 0.75rem;
  top: 1px;
}

/* ─────────────────────────────────────────────────
   PUBLICATIONS
───────────────────────────────────────────────── */
.pub-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.pub-filter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}

.pub-filter:hover,
.pub-filter.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(100, 255, 218, 0.06);
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.pub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pub-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.pub-card.hidden { display: none; }

.pub-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pub-badge.best-paper {
  background: linear-gradient(90deg, #ffd60a, #ff9f1c);
  color: #0a0a0a;
}

.pub-badge.under-review {
  background: rgba(157, 78, 221, 0.2);
  color: var(--accent-purple);
  border: 1px solid rgba(157, 78, 221, 0.3);
}

.pub-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pub-role {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 10px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.pub-role.first-author {
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(100, 255, 218, 0.2);
}

.pub-role.second-author {
  background: rgba(157, 78, 221, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(157, 78, 221, 0.2);
}

.pub-venue {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.pub-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

.pub-conference {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: auto;
}

/* ─────────────────────────────────────────────────
   PROJECTS
───────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.project-card:hover::before { transform: scaleX(1); }

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  transform: translateY(-5px);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(100, 255, 218, 0.08);
  border: 1px solid rgba(100, 255, 218, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

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

.project-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.project-status.production {
  background: rgba(100, 255, 218, 0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(100, 255, 218, 0.2);
}

.project-status.personal {
  background: rgba(157, 78, 221, 0.08);
  color: var(--accent-purple);
  border: 1px solid rgba(157, 78, 221, 0.2);
}

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.project-desc strong { color: var(--accent-cyan); }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: rgba(100, 255, 218, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────
   AWARDS
───────────────────────────────────────────────── */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.award-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 16px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.award-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.award-card.champion { border-left: 3px solid var(--accent-cyan); }
.award-card.champion:hover { border-color: var(--accent-cyan); box-shadow: 0 8px 32px rgba(100, 255, 218, 0.1); }

.award-card.runner { border-left: 3px solid var(--accent-purple); }
.award-card.runner:hover { border-color: var(--accent-purple); box-shadow: 0 8px 32px rgba(157, 78, 221, 0.12); }

.award-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 60px;
}

.award-card.champion .award-rank svg { width: 28px; height: 28px; fill: var(--accent-cyan); }
.award-card.runner  .award-rank svg { width: 28px; height: 28px; fill: var(--accent-purple); }

.award-rank span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

.award-card.champion .award-rank span { color: var(--accent-cyan); }
.award-card.runner  .award-rank span { color: var(--accent-purple); }

.award-body { flex: 1; }

.award-body h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.award-body p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.award-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.award-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.award-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────
   LEADERSHIP
───────────────────────────────────────────────── */
.leadership-section { border-top: 1px solid var(--border); padding-top: 48px; }

.leadership-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 28px;
}

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

.leadership-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.leadership-item:hover {
  background: var(--bg-card);
  border-color: var(--border);
}

.l-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(100, 255, 218, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.l-icon svg { width: 16px; height: 16px; }

.l-content {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.l-content strong { color: var(--text-primary); }

.l-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────
   CONTACT
───────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: center;
}

.contact-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 32px;
}

.contact-text p strong { color: var(--accent-cyan); }

.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.25s;
}

.contact-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.contact-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(100, 255, 218, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

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

.contact-card-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.contact-card-value {
  display: block;
  font-size: 0.82rem;
  color: var(--text-primary);
  word-break: break-all;
}

.cta-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(100, 255, 218, 0.08), transparent 70%);
  pointer-events: none;
}

.cta-box h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cta-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ─────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────────────
   BACK TO TOP
───────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.3s;
  z-index: 99;
  backdrop-filter: blur(10px);
}

.back-to-top svg { width: 18px; height: 18px; }

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

.back-to-top:hover {
  background: rgba(100, 255, 218, 0.1);
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
}

/* ─────────────────────────────────────────────────
   CODE SCRAMBLE REVEAL
───────────────────────────────────────────────── */
.scramble-target {
  display: inline-block;
}

.scramble-target .char-wrap {
  display: inline-block;
  overflow: hidden;
}

/* Section tag — typed-line style */
.section-tag {
  position: relative;
  overflow: hidden;
}

.section-tag::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-cyan);
  opacity: 0;
  animation: none;
}

.section-tag.typing::after {
  opacity: 1;
  animation: blink 0.7s step-end infinite;
}

/* ─────────────────────────────────────────────────
   SCROLL REVEAL ANIMATIONS
───────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* Stagger children in grids */
.skills-grid    .reveal:nth-child(2) { transition-delay: 0.08s; }
.skills-grid    .reveal:nth-child(3) { transition-delay: 0.16s; }
.skills-grid    .reveal:nth-child(4) { transition-delay: 0.24s; }
.skills-grid    .reveal:nth-child(5) { transition-delay: 0.32s; }
.projects-grid  .reveal:nth-child(2) { transition-delay: 0.1s; }
.projects-grid  .reveal:nth-child(3) { transition-delay: 0.2s; }
.pub-grid       .reveal:nth-child(2) { transition-delay: 0.06s; }
.pub-grid       .reveal:nth-child(3) { transition-delay: 0.12s; }
.pub-grid       .reveal:nth-child(4) { transition-delay: 0.18s; }
.pub-grid       .reveal:nth-child(5) { transition-delay: 0.24s; }
.pub-grid       .reveal:nth-child(6) { transition-delay: 0.30s; }
.awards-grid    .reveal:nth-child(2) { transition-delay: 0.08s; }
.awards-grid    .reveal:nth-child(3) { transition-delay: 0.16s; }
.awards-grid    .reveal:nth-child(4) { transition-delay: 0.08s; }
.awards-grid    .reveal:nth-child(5) { transition-delay: 0.16s; }

/* ─────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────── */
/* ─────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────── */

/* Hero goes single-column at 960px */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
    text-align: center;
  }

  .hero-actions { justify-content: center; }

  .hero-roles { justify-content: center; }

  .hero-stats { margin: 0 auto; }

  .terminal-body {
    min-height: 240px;
    max-height: 280px;
    font-size: 0.74rem;
  }

  @keyframes termFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-6px); }
  }
}

@media (max-width: 1024px) {
  :root { --section-padding: 80px; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-box { max-width: 480px; }
}

@media (max-width: 768px) {
  :root { --section-padding: 64px; }

  /* mobile nav */
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(5, 5, 15, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

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

  .nav-link { padding: 12px 16px; font-size: 0.9rem; text-align: center; }
  .nav-toggle { display: flex; }

  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* about */
  .about-grid { grid-template-columns: 1fr; }

  .about-avatar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }

  .avatar-frame { width: 120px; height: 120px; margin-bottom: 0; }
  .about-info-grid { grid-template-columns: 1fr; }

  /* hero stats */
  .hero-stats {
    padding: 16px 10px;
  }

  .stat { padding: 0 8px; }
  .stat-number { font-size: 1.3rem; }
  .stat-label  { font-size: 0.58rem; }

  /* other sections */
  .contact-cards { grid-template-columns: 1fr; }
  .timeline { padding-left: 24px; }
  .timeline-dot { left: -30px; }
  .pub-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .awards-grid  { grid-template-columns: 1fr; }
  .skills-grid  { grid-template-columns: 1fr; }
  .projects-grid{ grid-template-columns: 1fr; }
  .back-to-top  { bottom: 20px; right: 20px; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* 2×2 grid for stats */
  .hero-stats {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    row-gap: 18px;
    padding: 18px 12px;
  }
  .stat-divider:nth-child(4) { display: none; }
  .stat-divider:nth-child(6) { grid-row: 2; }
  .stat:nth-child(5) { grid-row: 2; }
  .stat:nth-child(7) { grid-row: 2; }
}
