/* ===== CSS Variables ===== */
:root {
  --accent: #6c63ff;
  --accent-light: #8b83ff;
  --accent-glow: rgba(108, 99, 255, 0.3);
  --gradient: linear-gradient(135deg, #6c63ff, #e94560);
  --gradient-text: linear-gradient(135deg, #6c63ff, #e94560, #f5a623);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', -apple-system, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-handwriting: 'Dancing Script', cursive;
  --sidebar-width: 280px;

  /* Dark mode (default) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --text-primary: #e8e8f0;
  --text-secondary: #8888a0;
  --border: rgba(255, 255, 255, 0.06);
  --particle-color: 108, 99, 255;
  --intro-stroke: url(#introGradient);
  --intro-fill: #e8e8f0;
  --hamburger-bg: rgba(10, 10, 15, 0.8);
  --overlay-bg: rgba(0, 0, 0, 0.6);
}

/* Light mode — system preference */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-primary: #f5f5f8;
    --bg-secondary: #eaeaef;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a7a;
    --border: rgba(0, 0, 0, 0.08);
    --particle-color: 108, 99, 255;
    --intro-stroke: url(#introGradient);
    --intro-fill: #1a1a2e;
    --hamburger-bg: rgba(255, 255, 255, 0.85);
    --overlay-bg: rgba(0, 0, 0, 0.3);
  }
}

/* Light mode — manual toggle */
:root[data-theme="light"] {
  --bg-primary: #f5f5f8;
  --bg-secondary: #eaeaef;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #5a5a7a;
  --border: rgba(0, 0, 0, 0.08);
  --particle-color: 108, 99, 255;
  --intro-stroke: url(#introGradient);
  --intro-fill: #1a1a2e;
  --hamburger-bg: rgba(255, 255, 255, 0.85);
  --overlay-bg: rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

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

body.intro-active {
  overflow: hidden;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--text-primary);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== INTRO SPLASH ===== */
.intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.intro.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-content {
  width: 100%;
  max-width: 600px;
  padding: 0 24px;
}

.intro-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.intro-line {
  font-family: var(--font-handwriting);
  font-size: 64px;
  font-weight: 700;
  text-anchor: middle;
  fill: none;
  stroke: url(#introGradient);
  stroke-width: 1.5;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  opacity: 0;
}

.intro-line.animate {
  opacity: 1;
  animation: handwrite 0.8s ease forwards;
}

.intro-line.fill-in {
  stroke-dashoffset: 0;
  animation: fillText 0.4s ease forwards;
}

@keyframes handwrite {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fillText {
  to {
    fill: var(--intro-fill);
    stroke-width: 0;
  }
}

/* ===== HAMBURGER BUTTON ===== */
.hamburger {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1100;
  width: 48px;
  height: 48px;
  background: var(--hamburger-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
}

.hamburger.visible {
  opacity: 1;
  pointer-events: all;
}

.hamburger:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== SIDEBAR ===== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

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

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  z-index: 1050;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding-bottom: 32px;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  padding: 32px 24px 24px;
  display: flex;
  justify-content: center;
}

.sidebar-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  background: var(--bg-card);
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--accent);
}

.sidebar-menu {
  list-style: none;
  padding: 0 12px;
}

.sidebar-menu > li {
  margin-bottom: 2px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-main);
}

.menu-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.menu-item.active {
  color: var(--text-primary);
  background: rgba(108, 99, 255, 0.1);
}

.menu-color {
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  margin-right: 12px;
  flex-shrink: 0;
}

.color-home { background: #e94560; }
.color-about { background: #f5a623; }
.color-cv { background: #6c63ff; }
.color-research { background: #00c9a7; }
.color-skills { background: #ff6b6b; }
.color-exp { background: #4ecdc4; }
.color-contact { background: #f7d794; }
.color-award { background: #a29bfe; }
.color-conf { background: #fd79a8; }
.color-legal { background: #636e72; }

.submenu-toggle {
  justify-content: space-between;
}

.submenu-toggle i {
  font-size: 0.7rem;
  transition: transform var(--transition);
  color: var(--text-secondary);
}

.submenu-toggle.active i {
  transform: rotate(180deg);
}

.submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.submenu.active {
  max-height: 600px;
}

.submenu li a {
  display: block;
  padding: 8px 16px 8px 44px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: var(--transition);
}

.submenu li a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  overflow: hidden;
  z-index: 1;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.4;
}

#particleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent-light);
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--gradient-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

.hero-tagline {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.hero-identity {
  font-size: 1.05rem;
  color: var(--accent-light);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 20px;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

.hero-keywords {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.hero-keyword {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hero-keyword-sep {
  color: var(--accent);
  font-weight: 300;
  font-size: 1rem;
  opacity: 0.5;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 48px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-plus {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 4px;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
  color: white;
}

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

.btn-outline:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

.btn-large {
  padding: 18px 48px;
  font-size: 1.1rem;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--text-secondary);
  border-radius: 13px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.wheel {
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ===== Animations ===== */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1.0s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.reveal-left {
  transform: translateX(-40px);
}

.reveal.reveal-right {
  transform: translateX(40px);
}

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

/* ===== Sections ===== */
.section {
  padding: 120px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 64px;
}

.section-number {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

/* ===== About Section ===== */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  margin-bottom: 64px;
}

.image-frame {
  position: relative;
  margin-bottom: 24px;
}

.profile-photo {
  width: 220px;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  display: block;
}

.image-decoration {
  display: none;
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.about-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--transition);
}

.about-link:hover {
  background: var(--bg-card);
  color: var(--accent-light);
}

.about-link i {
  width: 16px;
  text-align: center;
  color: var(--accent);
}

.about-intro {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

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

.about-story {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.story-block {
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  transition: var(--transition);
}

.story-block:hover {
  transform: translateX(4px);
}

.story-block h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-block h3 i {
  font-size: 0.85rem;
  color: var(--accent);
}

.story-block p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.story-block p strong {
  color: var(--text-primary);
}

.area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.tag {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--accent-light);
  transition: var(--transition);
  cursor: default;
}

.tag-hash {
  color: var(--accent);
  margin-right: 1px;
  font-weight: 700;
}

.tag:hover {
  background: rgba(108, 99, 255, 0.1);
  transform: translateY(-2px);
}

.strengths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.strength-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  transition: var(--transition);
}

.strength-item:hover {
  background: var(--bg-card);
}

.strength-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(108, 99, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.strength-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.strength-item p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Quote */
.quote {
  text-align: center;
  padding: 48px 32px;
  border-left: none;
  position: relative;
}

.quote::before {
  content: '\201C';
  font-size: 6rem;
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: Georgia, serif;
  line-height: 1;
}

.quote p {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 12px;
}

.quote cite {
  font-size: 0.9rem;
  color: var(--accent-light);
  font-style: normal;
}

/* ===== Research Cards ===== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary);
  display: block;
  cursor: pointer;
}

.research-card:hover {
  transform: translateY(-8px);
  border-color: rgba(108, 99, 255, 0.3);
  box-shadow: 0 20px 60px rgba(108, 99, 255, 0.1);
  color: var(--text-primary);
}

.card-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(108, 99, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 1.8rem;
  color: var(--accent);
  transition: var(--transition);
}

.research-card:hover .card-icon {
  background: var(--gradient);
  color: white;
  transform: scale(1.1);
}

.research-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.research-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-hover-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.research-card:hover .card-hover-line {
  transform: scaleX(1);
}

/* ===== Skills Section ===== */
.skills {
  background: var(--bg-secondary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.skill-category h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-category h3 i {
  color: var(--accent);
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-item {
  padding: 10px 20px;
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.15);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: all var(--transition);
  cursor: default;
}

.skill-item:hover {
  background: rgba(108, 99, 255, 0.2);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ===== News / Timeline ===== */
.timeline {
  max-width: 800px;
  margin: 0 auto;
}

.timeline-year {
  margin-bottom: 8px;
}

.year-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.year-toggle:hover {
  border-color: rgba(108, 99, 255, 0.3);
}

.year-toggle i {
  font-size: 0.9rem;
  color: var(--accent);
  transition: transform var(--transition);
}

.year-toggle.active i {
  transform: rotate(180deg);
}

.year-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.year-content.active {
  max-height: 2000px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  padding: 20px 24px;
  position: relative;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
  position: relative;
}

.timeline-dot::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: calc(100% + 20px);
  background: var(--border);
}

.timeline-item:last-child .timeline-dot::after {
  display: none;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--accent-light);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.timeline-text p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 4px;
}

/* ===== Contact Section ===== */
.contact {
  text-align: center;
  background: var(--bg-secondary);
}

.contact-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 12px;
  line-height: 1.8;
}

.contact-lab {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  opacity: 0.7;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 48px;
}

.social-links a {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===== Light Mode Adjustments (shared rules) ===== */
.light-adjust .research-card { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); }
.light-adjust .research-card:hover { box-shadow: 0 12px 40px rgba(108, 99, 255, 0.15); }
.light-adjust .skill-category { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); }
.light-adjust .hamburger { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.light-adjust .sidebar { box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1); }
.light-adjust .btn-primary { box-shadow: 0 4px 24px rgba(108, 99, 255, 0.25); }
.light-adjust .social-links a:hover { box-shadow: 0 8px 24px rgba(108, 99, 255, 0.2); }
.light-adjust .year-toggle { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); }

/* ===== Theme Toggle Button ===== */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  width: 48px;
  height: 48px;
  background: var(--hamburger-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
}

.theme-toggle.visible {
  opacity: 1;
  pointer-events: all;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* When light mode is active */
[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* ===== Responsive ===== */
/* ===== Tablet (768px) ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 48px;
  }

  /* Hero */
  .hero-tagline {
    font-size: 1.1rem;
    margin-bottom: 36px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 24px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .hero-cta {
    gap: 12px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .btn-large {
    padding: 14px 36px;
    font-size: 1rem;
  }

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

  .about-image {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .about-links {
    align-items: center;
  }

  .strengths {
    grid-template-columns: 1fr;
  }

  .about-intro {
    font-size: 1rem;
  }

  .quote p {
    font-size: 1rem;
  }

  /* Research */
  .research-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .research-card {
    padding: 28px 20px;
  }

  /* Skills */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Timeline */
  .timeline-text p {
    font-size: 0.85rem;
  }

  /* Contact */
  .contact-text {
    font-size: 1rem;
  }

  .social-links {
    gap: 14px;
  }

  .social-links a {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  /* Sidebar */
  .sidebar {
    width: 260px;
  }

  /* Hamburger & Theme toggle */
  .hamburger {
    width: 42px;
    height: 42px;
    top: 16px;
    left: 16px;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
    top: 16px;
    right: 16px;
  }

  /* Intro */
  .intro-line {
    font-size: 48px;
  }

  /* Scroll indicator - hide on small heights */
  .scroll-indicator {
    bottom: 24px;
    font-size: 0.65rem;
  }

  .mouse {
    width: 22px;
    height: 34px;
  }
}

/* ===== Mobile (480px) ===== */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 36px;
  }

  .section-number {
    font-size: 0.85rem;
  }

  /* Hero */
  .hero-content {
    padding: 0 16px;
  }

  .hero-greeting {
    font-size: 0.9rem;
    letter-spacing: 1px;
  }

  .hero-name {
    font-size: 2.2rem;
    margin-bottom: 12px;
  }

  .hero-tagline {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  .hero-identity {
    font-size: 0.85rem;
    margin-bottom: 14px;
  }

  .hero-keywords {
    gap: 8px;
    margin-bottom: 28px;
  }

  .hero-keyword {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }

  .hero-stats {
    gap: 12px;
    margin-bottom: 32px;
  }

  .stat {
    min-width: 70px;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .stat-plus {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.65rem;
    letter-spacing: 1px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .btn {
    padding: 12px 28px;
    font-size: 0.85rem;
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  /* About */
  .profile-photo {
    width: 180px;
    height: auto;
  }

  .about-intro {
    font-size: 0.95rem;
  }

  .about-link {
    font-size: 0.82rem;
    padding: 6px 8px;
  }

  .area-tags {
    gap: 8px;
  }

  .tag {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  .strength-item {
    padding: 12px;
    gap: 12px;
  }

  .strength-icon {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }

  .strength-item h4 {
    font-size: 0.88rem;
  }

  .strength-item p {
    font-size: 0.75rem;
  }

  .quote::before {
    font-size: 4rem;
  }

  .quote p {
    font-size: 0.95rem;
  }

  /* Research */
  .research-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .research-card {
    padding: 24px 20px;
  }

  .card-icon {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
    margin-bottom: 16px;
  }

  .research-card h3 {
    font-size: 1.05rem;
  }

  .research-card p {
    font-size: 0.83rem;
  }

  /* Timeline */
  .year-toggle {
    padding: 16px 18px;
    font-size: 1.2rem;
  }

  .timeline-item {
    padding: 16px 18px;
    gap: 14px;
  }

  .timeline-date {
    font-size: 0.75rem;
  }

  .timeline-text p {
    font-size: 0.82rem;
  }

  /* Contact */
  .contact-text {
    font-size: 0.95rem;
  }

  .social-links {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .social-links a {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* Intro */
  .intro-line {
    font-size: 32px;
  }

  .intro-svg {
    max-width: 320px;
  }

  /* Footer */
  .footer {
    padding: 24px 16px;
    font-size: 0.8rem;
  }
}

/* ===== Small Mobile (360px) ===== */
@media (max-width: 360px) {
  .hero-name {
    font-size: 1.9rem;
  }

  .hero-greeting {
    font-size: 0.8rem;
  }

  .hero-tagline {
    font-size: 0.85rem;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .intro-line {
    font-size: 26px;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .sidebar {
    width: 240px;
  }
}

/* ===== Short viewport height ===== */
@media (max-height: 700px) {
  .scroll-indicator {
    display: none;
  }

  .hero-stats {
    margin-bottom: 32px;
  }

  .hero-tagline {
    margin-bottom: 24px;
  }
}
