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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a2e;
  --text: #e0e0e0;
  --text-muted: #8888a0;
  --accent: #ff9900;
  --accent-glow: rgba(255, 153, 0, 0.15);
  --accent2: #00d4ff;
  --border: #1e1e2e;
  --radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Fira Code', 'Courier New', monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background: var(--bg);
}

body {
  font-family: var(--font);
  background: none;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Animated Background ===== */
.bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.bg-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -10%;
  right: -5%;
  animation-duration: 22s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--accent2);
  bottom: 10%;
  left: -8%;
  animation-duration: 26s;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: #7b2ff7;
  top: 40%;
  right: 20%;
  animation-duration: 30s;
  animation-delay: -10s;
  opacity: 0.08;
}

.orb-4 {
  width: 350px;
  height: 350px;
  background: var(--accent);
  bottom: -5%;
  right: 40%;
  animation-duration: 24s;
  animation-delay: -8s;
  opacity: 0.06;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(60px, -40px) scale(1.1); }
  50% { transform: translate(-30px, 50px) scale(0.95); }
  75% { transform: translate(40px, 20px) scale(1.05); }
}

/* Content sits above background */
.nav {
  z-index: 1000;
}

.hero, .section, .footer {
  position: relative;
  z-index: 2;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

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

.nav-logo {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
  position: relative;
}

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

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

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

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

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

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

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

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

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 120px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
  font-family: var(--mono);
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, var(--accent2) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}

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

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

@keyframes blink {
  50% { opacity: 0; }
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: var(--accent2);
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

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

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: btnShimmer 3s ease-in-out infinite;
}

@keyframes btnShimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.btn-primary:hover {
  background: #e68a00;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-outline {
  border: 2px solid var(--border);
  color: var(--text);
}

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

/* Terminal */
.hero-terminal {
  flex: 1;
  max-width: 500px;
  animation: terminalFloat 5s ease-in-out infinite;
}

@keyframes terminalFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-10px) rotate(0.5deg); }
  66% { transform: translateY(-5px) rotate(-0.3deg); }
}

.terminal-bar {
  background: #1e1e2e;
  padding: 12px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-body {
  background: #0d0d14;
  padding: 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.8;
  border: 1px solid var(--border);
  border-top: none;
  min-height: 180px;
  overflow-x: hidden;
  word-break: break-word;
}

.terminal-body .prompt {
  color: var(--accent);
  margin-right: 8px;
}

.terminal-body .typing {
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

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

/* ===== Sections ===== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 48px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 40px;
}

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

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

.timeline-marker {
  position: absolute;
  left: -33px;
  top: 24px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: markerPulse 3s ease-in-out infinite;
}

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50% { box-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent-glow); }
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(255,153,0,0.1), transparent 60%);
}

[data-glow]:hover .card-glow {
  opacity: 1;
}

.timeline-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateX(4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px var(--accent-glow);
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.company-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.co-logo {
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  font-family: var(--font);
  flex-shrink: 0;
}

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

.timeline-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-family: var(--mono);
}

.timeline-details {
  padding-left: 20px;
  list-style: disc;
}

.timeline-details li {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  list-style: disc;
}

/* ===== Skills Badges ===== */
.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.skill-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 90px;
  padding: 20px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.skill-badge img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.skill-badge .skill-emoji {
  font-size: 2rem;
  line-height: 1;
  height: 40px;
  display: flex;
  align-items: center;
  transition: transform 0.35s ease;
}

.skill-badge span:last-child {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  transition: color 0.3s;
}

.skill-badge:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 15px var(--accent-glow);
}

.skill-badge:hover img,
.skill-badge:hover .skill-emoji {
  transform: scale(1.15);
}

.skill-badge:hover span:last-child {
  color: var(--accent);
}

/* Skill Modal */
.skill-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.skill-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.skill-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 440px;
  width: 90%;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.skill-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.skill-modal-close:hover {
  color: var(--accent);
}

.skill-modal h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--mono);
}

.skill-modal p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== Certifications ===== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: all 0.3s;
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.cert-badge {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 16px;
}

.cert-badge-placeholder {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: rgba(255, 153, 0, 0.1);
  border-radius: 50%;
}

.cert-dual-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.cert-dual-badges .cert-badge {
  width: 55px;
  height: 55px;
}

.cert-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.cert-year {
  font-size: 0.8rem;
  color: var(--accent);
  font-family: var(--mono);
}

/* ===== Projects (3D Tilt Cards) ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 1200px;
}

.tilt-card {
  perspective: 800px;
  display: flex;
}

.tilt-card-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tilt-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(0,212,255,0.12), transparent 60%);
}

.tilt-card:hover .tilt-glow {
  opacity: 1;
}

.tilt-card:hover .tilt-card-inner {
  border-color: var(--accent2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 212, 255, 0.08);
}

.project-number {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255, 153, 0, 0.06);
  font-family: var(--mono);
  line-height: 1;
}

.project-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.tilt-card-inner h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.tilt-card-inner p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
  flex: 1;
}

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

.project-tags .tag {
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: all 0.3s;
}

.project-tags .tag:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--accent2);
}

.project-status {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 153, 0, 0.15);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

.project-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent2);
  text-decoration: none;
  font-family: var(--mono);
  transition: color 0.3s;
}

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

/* ===== Publications ===== */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.pub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
}

.pub-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.pub-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.pub-card h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: var(--accent2);
}

.pub-list {
  list-style: none;
  padding: 0;
}

.pub-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.pub-list li:last-child {
  border-bottom: none;
}

.pub-list a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}

.pub-list a:hover {
  color: var(--accent2);
  text-decoration: underline;
}

/* ===== Education ===== */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: all 0.3s;
}

.edu-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.edu-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.edu-card h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.edu-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.edu-detail {
  font-size: 0.85rem;
  color: var(--accent);
  font-family: var(--mono);
}

/* ===== Contact ===== */
.contact-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1.05rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: all 0.3s;
  display: block;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.contact-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.contact-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.github-icon {
  filter: invert(1);
}

.contact-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 40px 24px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
}

.easter-egg {
  position: absolute;
  bottom: 8px;
  right: 16px;
  font-size: 0.55rem;
  color: rgba(136, 136, 160, 0.3);
  font-family: var(--mono);
}

.secrets-counter {
  position: absolute;
  bottom: 8px;
  left: 16px;
  font-size: 0.55rem;
  color: rgba(136, 136, 160, 0.3);
  font-family: var(--mono);
  cursor: pointer;
  transition: color 0.3s;
}

.secrets-counter:hover {
  color: var(--accent);
}

.secrets-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.secrets-popup.open {
  display: flex;
}

.secrets-popup-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 520px;
  width: 90%;
  position: relative;
  transform: translateY(20px);
  animation: popIn 0.3s ease forwards;
}

@keyframes popIn {
  to { transform: translateY(0); }
}

.secrets-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.secrets-close:hover {
  color: var(--accent);
}

.secrets-popup-inner h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--accent);
}

.secrets-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.secrets-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.secrets-list li:last-child {
  border-bottom: none;
}

.secret-check {
  margin-right: 8px;
  font-size: 0.9rem;
}

.secret-check.found {
  color: #28c840;
}

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

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

/* Floating animation for cards */
@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.timeline-card,
.cert-card,
.edu-card,
.contact-card {
  animation: subtleFloat 6s ease-in-out infinite;
  animation-play-state: paused;
}

.timeline-card:hover,
.cert-card:hover,
.edu-card:hover,
.contact-card:hover {
  animation-play-state: running;
}

/* Glow pulse on section titles */
.section-title::after {
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); opacity: 1; }
  50% { box-shadow: 0 0 20px var(--accent); opacity: 0.8; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 100px;
    gap: 40px;
  }

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

  .hero-terminal {
    max-width: 100%;
    animation: none;
  }

  .terminal-body {
    font-size: 0.75rem;
    padding: 14px;
    min-height: 150px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    max-height: 400px;
    padding: 16px 0;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 12px 24px;
    font-size: 1rem;
  }

  .nav-links a::after {
    display: none;
  }

  .timeline {
    padding-left: 30px;
  }

  .timeline::before {
    left: 10px;
  }

  .timeline-marker {
    left: -27px;
    width: 12px;
    height: 12px;
  }

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

  .certs-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .section {
    padding: 60px 16px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2rem;
  }

  .projects-grid,
  .education-grid {
    grid-template-columns: 1fr;
  }

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

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== Selection ===== */
::selection {
  background: var(--accent);
  color: #000;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  order: 2;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}

/* Light mode overrides */
html.light {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f2;
  --text: #1a1a2e;
  --text-muted: #555570;
  --border: #ddd;
}

html.light .bg-canvas {
  opacity: 0.3;
}

html.light .bg-orbs .orb {
  opacity: 0.05;
}

html.light .company-logo {
  filter: none;
}

html.light .github-icon {
  filter: none;
}

html.light .terminal-body {
  background: #1a1a2e;
}

html.light .nav {
  background: rgba(245, 245, 247, 0.9);
}

html.light .co-logo {
  color: #fff;
}

/* ===== Scroll to Top ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 999;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* ===== Performance Badge & Modal ===== */
.perf-badge {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  cursor: pointer;
  z-index: 998;
  transition: all 0.3s;
}

.perf-badge:hover {
  border-color: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.perf-score {
  font-weight: 700;
}

.perf-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.perf-modal-overlay.open {
  display: flex;
}

.perf-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  animation: popIn 0.3s ease forwards;
}

.perf-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.perf-modal-close:hover {
  color: var(--accent);
}

.perf-modal h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--accent);
}

.perf-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.perf-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.perf-section h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text);
}

.perf-section p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.bw-tag {
  background: rgba(255, 153, 0, 0.1);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(255, 153, 0, 0.2);
}

.gh-chart {
  width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

.perf-footer-note p {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent2);
  text-align: center;
}
