/* ========================================
   CSS Variables & Reset
======================================== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #a855f7;
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --gradient-2: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --glow: 0 0 20px rgba(99, 102, 241, 0.5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========================================
   Animated Background
======================================== */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.stars,
.stars2,
.stars3 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.stars {
  background-image:
    radial-gradient(2px 2px at 20px 30px, #6366f1, transparent),
    radial-gradient(2px 2px at 40px 70px, #8b5cf6, transparent),
    radial-gradient(1px 1px at 90px 40px, #a855f7, transparent),
    radial-gradient(2px 2px at 160px 120px, #6366f1, transparent),
    radial-gradient(1px 1px at 230px 80px, #8b5cf6, transparent),
    radial-gradient(2px 2px at 300px 150px, #a855f7, transparent),
    radial-gradient(1px 1px at 370px 50px, #6366f1, transparent),
    radial-gradient(2px 2px at 440px 130px, #8b5cf6, transparent);
  background-size: 500px 200px;
  animation: animateStars 100s linear infinite;
  opacity: 0.5;
}

.stars2 {
  background-image:
    radial-gradient(1px 1px at 50px 80px, #6366f1, transparent),
    radial-gradient(2px 2px at 120px 40px, #8b5cf6, transparent),
    radial-gradient(1px 1px at 200px 100px, #a855f7, transparent),
    radial-gradient(2px 2px at 280px 60px, #6366f1, transparent),
    radial-gradient(1px 1px at 360px 140px, #8b5cf6, transparent);
  background-size: 400px 180px;
  animation: animateStars 80s linear infinite;
  opacity: 0.3;
}

.stars3 {
  background-image:
    radial-gradient(2px 2px at 80px 60px, #6366f1, transparent),
    radial-gradient(1px 1px at 180px 120px, #8b5cf6, transparent),
    radial-gradient(2px 2px at 300px 40px, #a855f7, transparent),
    radial-gradient(1px 1px at 420px 100px, #6366f1, transparent);
  background-size: 600px 250px;
  animation: animateStars 120s linear infinite;
  opacity: 0.4;
}

@keyframes animateStars {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100%);
  }
}

/* ========================================
   Navigation
======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 0.75rem 5%;
  background: rgba(10, 10, 15, 0.95);
  box-shadow: var(--shadow-lg);
}

.nav-brand .logo-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: var(--transition);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.25rem;
  z-index: 1001;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}

/* Mobile menu overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 998;
}

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

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* ========================================
   Hero Section
======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 5% 4rem;
  position: relative;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Profile Photo */
.profile-photo {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
  position: relative;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent-primary);
  box-shadow: var(--glow);
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 3px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent-primary);
  box-shadow: var(--glow);
}

.profile-photo img + .profile-placeholder {
  display: none;
}

.greeting {
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.glitch {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  animation: fadeInUp 0.6s ease 0.1s forwards;
  opacity: 0;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch::before {
  animation: glitch-1 2s infinite linear alternate-reverse;
  color: #ff00ff;
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 3s infinite linear alternate-reverse;
  color: #00ffff;
  z-index: -2;
}

@keyframes glitch-1 {
  0%,
  100% {
    clip-path: inset(0 0 95% 0);
    transform: translate(-2px, 2px);
  }
  20% {
    clip-path: inset(30% 0 50% 0);
    transform: translate(2px, -2px);
  }
  40% {
    clip-path: inset(60% 0 20% 0);
    transform: translate(-2px, 2px);
  }
  60% {
    clip-path: inset(10% 0 70% 0);
    transform: translate(2px, -2px);
  }
  80% {
    clip-path: inset(80% 0 5% 0);
    transform: translate(-2px, 2px);
  }
}

@keyframes glitch-2 {
  0%,
  100% {
    clip-path: inset(95% 0 0 0);
    transform: translate(2px, -2px);
  }
  20% {
    clip-path: inset(50% 0 30% 0);
    transform: translate(-2px, 2px);
  }
  40% {
    clip-path: inset(20% 0 60% 0);
    transform: translate(2px, -2px);
  }
  60% {
    clip-path: inset(70% 0 10% 0);
    transform: translate(-2px, 2px);
  }
  80% {
    clip-path: inset(5% 0 80% 0);
    transform: translate(2px, -2px);
  }
}

.typing-container {
  display: flex;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

.static-text {
  color: var(--text-secondary);
}

.typed-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.cursor {
  color: var(--accent-primary);
  animation: blink 0.7s infinite;
}

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

.hero-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease 0.3s forwards;
  opacity: 0;
}

.highlight {
  color: var(--accent-primary);
  font-weight: 600;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease 0.4s forwards;
  opacity: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: var(--glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.7);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.btn-tertiary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-tertiary:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  gap: 1rem;
  animation: fadeInUp 0.6s ease 0.5s forwards;
  opacity: 0;
}

.social-link {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: var(--transition);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.social-link:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--glow);
}

/* Hero Visual - Code Window */
.hero-visual {
  animation: fadeInRight 0.8s ease 0.5s forwards;
  opacity: 0;
}

.code-window {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.window-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #ef4444;
}
.dot.yellow {
  background: #f59e0b;
}
.dot.green {
  background: #10b981;
}

.window-title {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
}

.code-content {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  overflow-x: auto;
}

.code-content .keyword {
  color: #c678dd;
}
.code-content .class-name {
  color: #e5c07b;
}
.code-content .function {
  color: #61afef;
}
.code-content .param {
  color: #e06c75;
}
.code-content .string {
  color: #98c379;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: bounce 2s infinite;
}

.mouse {
  width: 25px;
  height: 40px;
  border: 2px solid var(--text-secondary);
  border-radius: 15px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    top: 8px;
  }
  100% {
    opacity: 0;
    top: 20px;
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.scroll-indicator span {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========================================
   Container & Section Styles
======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

section {
  padding: 6rem 0;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.title-number {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-primary);
  font-size: 1.2rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.5), transparent);
  margin-left: 1rem;
}

/* ========================================
   About Section
======================================== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

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

.skills-container h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.skills-grid {
  display: grid;
  gap: 1.5rem;
}

.skill-category h4 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: var(--transition);
}

.skill-tag:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

/* ========================================
   Experience Timeline
======================================== */
.experience {
  background: var(--bg-secondary);
}

.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--accent-primary),
    var(--accent-tertiary)
  );
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

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

.timeline-marker {
  position: absolute;
  left: -3rem;
  top: 0;
  width: 75px;
  height: 75px;
  min-width: 75px;
  min-height: 75px;
  background: var(--bg-primary);
  border: 3px solid var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  transform: translateX(-50%);
  z-index: 1;
  overflow: hidden;
}

.timeline-marker.company-logo {
  background: #fff;
  padding: 0;
  border: 4px solid var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.timeline-marker.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-content {
  background: var(--bg-tertiary);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.timeline-header-left {
  flex: 1;
}

.timeline-header-right {
  text-align: right;
  flex-shrink: 0;
}

.timeline-header h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.timeline-header .job-title {
  color: var(--text-secondary);
  font-size: 1.05rem;
  display: block;
}

.timeline-header .company {
  color: var(--accent-primary);
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

.timeline-header-right .location {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.25rem;
}

.timeline-header-right .date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
}

.timeline-header .date,
.timeline-header .location {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.timeline-description {
  color: var(--text-secondary);
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.timeline-details {
  list-style: none;
  margin-top: 1rem;
}

.timeline-details li {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.timeline-details i {
  color: var(--accent-primary);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.timeline-details strong {
  color: var(--success);
}

/* ========================================
   Projects Section
======================================== */
.projects-grid {
  display: grid;
  gap: 2rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: var(--transition);
}

.project-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  background: var(--bg-tertiary);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.chess-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.chess-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.piece {
  width: 60px;
  height: 60px;
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: float 3s ease-in-out infinite;
}

.piece:nth-child(2) {
  animation-delay: 0.5s;
}
.piece:nth-child(3) {
  animation-delay: 1s;
}
.piece:nth-child(4) {
  animation-delay: 1.5s;
}

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

.neural-network {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 150px;
}

.node {
  width: 20px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.node:nth-child(2) {
  animation-delay: 0.3s;
  background: var(--accent-secondary);
}
.node:nth-child(3) {
  animation-delay: 0.6s;
  background: var(--accent-tertiary);
}
.node:nth-child(4) {
  animation-delay: 0.9s;
}
.node:nth-child(5) {
  animation-delay: 1.2s;
  background: var(--accent-secondary);
}
.node:nth-child(6) {
  animation-delay: 1.5s;
  background: var(--accent-tertiary);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

/* Last Ethics Zombie Visual */
.zombie-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.zombie-scene {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.zombie {
  font-size: 3rem;
  animation: zombieWalk 1s ease-in-out infinite;
}

.zombie.runner {
  animation: zombieRun 0.5s ease-in-out infinite;
}

.zombie.brute {
  font-size: 4rem;
  animation: zombieWalk 1.5s ease-in-out infinite;
}

@keyframes zombieWalk {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-5px) rotate(5deg);
  }
}

@keyframes zombieRun {
  0%,
  100% {
    transform: translateY(0) translateX(-3px);
  }
  50% {
    transform: translateY(-8px) translateX(3px);
  }
}

.crosshair {
  position: absolute;
  width: 40px;
  height: 40px;
}

.crosshair-line {
  position: absolute;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
}

.crosshair-line:nth-child(1) {
  width: 15px;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.crosshair-line:nth-child(2) {
  width: 15px;
  height: 2px;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.crosshair-line:nth-child(3) {
  width: 2px;
  height: 15px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.crosshair-line:nth-child(4) {
  width: 2px;
  height: 15px;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.project-label.live {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.project-content {
  padding: 2rem;
}

.project-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-content h3 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.project-subtitle {
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.project-highlights {
  margin-bottom: 1.5rem;
}

.project-highlights .highlight {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.project-highlights .highlight i {
  color: var(--success);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tech span {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

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

/* ========================================
   Education Section
======================================== */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.edu-subtitle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.edu-subtitle i {
  color: var(--accent-primary);
}

.edu-card {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.1);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.edu-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.edu-logo {
  width: 60px;
  height: 60px;
  background: var(--gradient-1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.edu-logo.tsinghua {
  background: linear-gradient(135deg, #7b2d8e, #4a1259);
}

.edu-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.edu-school {
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.edu-date,
.edu-location {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.edu-highlights {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
}

.cert-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.1);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.cert-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.cert-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cert-icon.kubernetes {
  background: linear-gradient(135deg, #326ce5, #1e4d9c);
  color: white;
}

.cert-icon.nlp {
  background: linear-gradient(135deg, #c41230, #8b0d22);
  color: white;
}

.cert-info {
  flex: 1;
}

.cert-info h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cert-issuer {
  color: var(--accent-primary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.cert-date,
.cert-location {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.cert-badge {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

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

.contact-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-text {
  margin-bottom: 3rem;
}

.contact-text h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-text p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: var(--transition);
}

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

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-info {
  text-align: left;
}

.contact-info h4 {
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========================================
   Footer
======================================== */
.footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-sub {
  margin-top: 0.5rem;
  font-size: 0.85rem !important;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-buttons,
  .social-links {
    justify-content: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

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

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-image {
    min-height: 200px;
  }

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

  section {
    padding: 4rem 0;
  }
}

@media (max-width: 768px) {
  /* Navigation */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: var(--transition);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Hero Section */
  .hero {
    padding: 6rem 5% 3rem;
    min-height: auto;
  }

  .hero-content {
    gap: 2rem;
  }

  .hero-description {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .code-window {
    font-size: 0.75rem;
  }

  .code-content {
    padding: 1rem;
    overflow-x: auto;
  }

  /* Timeline */
  .timeline {
    padding-left: 2rem;
  }

  .timeline-marker {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    left: -2rem;
    font-size: 0.7rem;
  }

  .timeline-content {
    padding: 1.25rem;
  }

  .timeline-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .timeline-header-right {
    text-align: left;
  }

  .timeline-header h3 {
    font-size: 1.1rem;
  }

  /* Projects */
  .project-content {
    padding: 1.5rem;
  }

  .project-content h3 {
    font-size: 1.4rem;
  }

  .project-image {
    min-height: 180px;
    padding: 1.5rem;
  }

  .chess-board {
    gap: 0.25rem;
  }

  .piece {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }

  /* Contact */
  .contact-methods {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-card {
    padding: 1.25rem;
  }

  .contact-text h3 {
    font-size: 1.5rem;
  }

  /* Section Titles */
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  /* Scroll Indicator - hide on mobile */
  .scroll-indicator {
    display: none;
  }

  /* Footer */
  .footer {
    padding: 1.5rem 0;
  }
}

@media (max-width: 480px) {
  /* General */
  body {
    font-size: 14px;
  }

  section {
    padding: 3rem 0;
  }

  .container {
    padding: 0 4%;
  }

  /* Hero */
  .hero {
    padding: 5rem 4% 2rem;
  }

  .glitch {
    font-size: 1.8rem;
  }

  .greeting {
    font-size: 0.95rem;
  }

  .typing-container {
    font-size: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-description {
    font-size: 0.95rem;
    padding: 0;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .social-links {
    gap: 0.75rem;
  }

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

  /* Code Window */
  .code-window {
    font-size: 0.65rem;
  }

  .code-content {
    padding: 0.75rem;
    line-height: 1.6;
  }

  .window-header {
    padding: 0.5rem 0.75rem;
  }

  .dot {
    width: 8px;
    height: 8px;
  }

  /* About */
  .about-text p {
    font-size: 0.95rem;
  }

  .skill-tags {
    justify-content: center;
  }

  .skill-tag {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }

  /* Timeline */
  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-marker {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    left: -1.5rem;
    font-size: 0.6rem;
  }

  .timeline-content {
    padding: 1rem;
  }

  .timeline-header h3 {
    font-size: 1rem;
  }

  .timeline-header .job-title {
    font-size: 0.9rem;
  }

  .timeline-details li {
    font-size: 0.85rem;
  }

  /* Projects */
  .project-content {
    padding: 1.25rem;
  }

  .project-content h3 {
    font-size: 1.2rem;
  }

  .project-description {
    font-size: 0.9rem;
  }

  .project-highlights .highlight {
    font-size: 0.85rem;
  }

  .project-tech span {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  .project-image {
    min-height: 150px;
    padding: 1rem;
  }

  .piece {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }

  .node {
    width: 15px;
    height: 15px;
  }

  .zombie {
    font-size: 2rem;
  }

  .zombie.brute {
    font-size: 2.5rem;
  }

  /* Education */
  .edu-card,
  .cert-card {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
    gap: 1rem;
  }

  .edu-logo,
  .cert-icon {
    margin: 0 auto;
  }

  .edu-info,
  .cert-info {
    text-align: center;
  }

  .edu-highlights {
    justify-content: center;
  }

  .cert-badge {
    margin-top: 0.5rem;
  }

  /* Contact */
  .contact-card {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .contact-info {
    text-align: center;
  }

  .contact-text h3 {
    font-size: 1.3rem;
  }

  .contact-text p {
    font-size: 0.95rem;
  }

  /* Navigation */
  .navbar {
    padding: 0.75rem 4%;
  }

  .nav-brand .logo-text {
    font-size: 1.2rem;
  }

  .nav-links {
    width: 80%;
  }

  /* Profile Photo */
  .profile-photo {
    width: 100px;
    height: 100px;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .glitch {
    font-size: 1.5rem;
  }

  .typing-container {
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
  }

  .timeline-marker {
    width: 35px;
    height: 35px;
    min-width: 35px;
    min-height: 35px;
    font-size: 0.5rem;
  }

  .code-window {
    font-size: 0.6rem;
  }

  .project-content h3 {
    font-size: 1.1rem;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .social-link:hover,
  .project-card:hover,
  .timeline-content:hover,
  .edu-card:hover,
  .cert-card:hover,
  .contact-card:hover,
  .skill-tag:hover {
    transform: none;
  }

  .btn:active,
  .social-link:active {
    transform: scale(0.98);
  }

  /* Larger tap targets */
  .nav-links a {
    padding: 0.5rem 1rem;
  }

  .hamburger {
    padding: 0.5rem;
  }

  .hamburger span {
    width: 28px;
    height: 3px;
  }
}

/* ========================================
   Animations on Scroll
======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
