/* ═══════════════════════════════════════════════════
   DESIGN SYSTEM — Dark Terminal Aesthetic
   ═══════════════════════════════════════════════════ */

:root {
  /* Colors */
  --bg-primary: #07070d;
  --bg-secondary: #0c0c14;
  --bg-surface: #11111b;
  --bg-card: #151520;
  --bg-card-hover: #1a1a28;

  --border: #1e1e30;
  --border-hover: #2a2a40;

  --accent: #00ffc8;
  --accent-dim: rgba(0, 255, 200, 0.15);
  --accent-glow: rgba(0, 255, 200, 0.4);
  --accent-secondary: #a855f7;
  --accent-secondary-dim: rgba(168, 85, 247, 0.15);

  --text-primary: #e4e4e7;
  --text-secondary: #8888a0;
  --text-muted: #55556a;

  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --section-pad: 120px;
  --container-max: 1100px;
  --card-radius: 14px;
  --tag-radius: 6px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}


/* ═══════════════ RESET & BASE ═══════════════ */

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) var(--bg-primary);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

strong {
  color: var(--accent);
  font-weight: 600;
}

::selection {
  background: var(--accent-dim);
  color: var(--accent);
}


/* ═══════════════ LAYOUT ═══════════════ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

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

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

.section-header {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 56px;
}

.section-header .accent {
  color: var(--accent);
  margin-right: 6px;
}


/* ═══════════════ NAVIGATION ═══════════════ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s var(--ease);
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s;
}

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

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

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s var(--ease);
  position: relative;
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-cta {
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
}

.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--bg-primary) !important;
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

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


/* ═══════════════ HERO ═══════════════ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

/* Dot grid background */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 100%);
}

/* Ambient glow orbs */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.hero-glow--1 {
  width: 500px;
  height: 500px;
  background: var(--accent-glow);
  opacity: 0.08;
  top: 10%;
  left: -10%;
  animation: float 8s ease-in-out infinite;
}

.hero-glow--2 {
  width: 400px;
  height: 400px;
  background: var(--accent-secondary);
  opacity: 0.06;
  bottom: 10%;
  right: -10%;
  animation: float 10s ease-in-out infinite reverse;
}

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

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 750px;
}

.hero-prefix {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 0.6s var(--ease-out) 0.2s forwards;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
  min-height: 1.2em;
  color: var(--text-primary);
}

.hero-name .cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

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

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 0.6s var(--ease-out) 2.4s forwards;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.8;
  opacity: 0;
  animation: fadeInUp 0.6s var(--ease-out) 2.7s forwards;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.6s var(--ease-out) 3s forwards;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeInUp 0.6s var(--ease-out) 3.3s forwards;
}

.hero-scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.6); }
}

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


/* ═══════════════ BUTTONS ═══════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.35s var(--ease);
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 30px var(--accent-dim);
}

.btn-icon {
  font-size: 1.1rem;
  transition: transform 0.3s var(--ease);
}

.btn--primary:hover .btn-icon {
  transform: translateX(4px);
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn--ghost svg {
  flex-shrink: 0;
}


/* ═══════════════ ABOUT ═══════════════ */

.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 56px;
}

.about-photo-wrapper {
  position: relative;
}

.photo-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
  transition: border-color 0.4s var(--ease);
}

.photo-placeholder:hover {
  border-color: var(--accent);
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-initials {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-muted);
  user-select: none;
}

.photo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.06;
  filter: blur(40px);
  z-index: 0;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.02rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 32px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

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


/* ═══════════════ SKILLS ═══════════════ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-category {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  transition: all 0.4s var(--ease);
}

.skill-category:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.skill-category-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-icon {
  font-size: 1.1rem;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 5px 12px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--tag-radius);
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.tag:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
}


/* ═══════════════ PROJECTS ═══════════════ */

.featured-projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}


.other-projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.4s var(--ease), background 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

/* Subtle top-edge glow on hover */
.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.project-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 80px var(--accent-dim);
}

.project-card:hover::before {
  opacity: 1;
  animation: glowSlide 1.5s ease-in-out infinite;
}

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

.project-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.project-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.project-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 4px;
}

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

.project-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

.tag--project {
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent-secondary);
}

.tag--project:hover {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 12px var(--accent-secondary-dim);
}

.project-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s var(--ease);
  align-self: flex-start;
}

.project-link:hover {
  gap: 12px;
}

.project-link .arrow {
  transition: transform 0.3s var(--ease);
}

.project-link:hover .arrow {
  transform: translateX(4px);
}


/* ═══════════════ EXPERIENCE TIMELINE ═══════════════ */

.timeline {
  position: relative;
  padding-left: 40px;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

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

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

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
  z-index: 1;
}

.timeline-content {
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  transition: all 0.4s var(--ease);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  transform: translateX(6px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.timeline-role {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-company {
  font-size: 0.92rem;
  color: var(--accent);
  margin-top: 2px;
}

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

.timeline-details {
  list-style: none;
}

.timeline-details li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding-left: 20px;
  margin-bottom: 10px;
  position: relative;
}

.timeline-details li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.6;
}

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


/* ═══════════════ EDUCATION ═══════════════ */

.education-card {
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  margin-bottom: 24px;
}

.education-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.education-degree h3 {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.education-school {
  color: var(--accent);
  font-size: 0.95rem;
}

.education-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

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

.education-grade {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.education-curricula {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Thesis card */
.thesis-card {
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--card-radius);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px var(--accent-dim);
}

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

.thesis-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.thesis-title {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.thesis-lab {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.thesis-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Languages */
.languages-card {
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
}

.languages-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.languages-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.language-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 16px;
  align-items: center;
}

.language-name {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}

.language-level {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

.language-bar {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.language-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: 2px;
  transition: width 1.2s var(--ease-out);
}

/* Animate language bars when visible */
.language-fill {
  width: 0 !important;
}

.language-item.animated .language-fill {
  width: var(--target-width) !important;
}


/* ═══════════════ CONTACT ═══════════════ */

.contact-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: center;
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  transition: all 0.4s var(--ease);
  text-align: center;
}

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

.contact-card svg {
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}

.contact-card:hover svg {
  transform: scale(1.15);
}

.contact-card-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contact-card-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-primary);
}


/* ═══════════════ FOOTER ═══════════════ */

.footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

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


/* ═══════════════ SCROLL REVEAL ANIMATIONS ═══════════════ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
  transition-delay: calc(var(--reveal-delay, 0) * 1s);
}

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

/* Directional variants */
.reveal--left {
  transform: translateX(-50px);
}

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

.reveal--scale {
  transform: scale(0.9);
}

/* Stagger children automatically */
.reveal:nth-child(1) { --reveal-delay: 0; }
.reveal:nth-child(2) { --reveal-delay: 0.08; }
.reveal:nth-child(3) { --reveal-delay: 0.16; }
.reveal:nth-child(4) { --reveal-delay: 0.24; }
.reveal:nth-child(5) { --reveal-delay: 0.32; }
.reveal:nth-child(6) { --reveal-delay: 0.40; }

/* Section headers get a slide-in from left */
.section-header {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.section-header.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Project icon bounce on card hover */
.project-card:hover .project-icon {
  animation: iconBounce 0.5s var(--ease-out);
}

@keyframes iconBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.25) rotate(-5deg); }
  70% { transform: scale(0.95) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Tags stagger in on reveal */
.reveal.visible .tag {
  animation: tagFadeIn 0.4s var(--ease-out) both;
}

.reveal.visible .tag:nth-child(1) { animation-delay: 0.05s; }
.reveal.visible .tag:nth-child(2) { animation-delay: 0.1s; }
.reveal.visible .tag:nth-child(3) { animation-delay: 0.15s; }
.reveal.visible .tag:nth-child(4) { animation-delay: 0.2s; }
.reveal.visible .tag:nth-child(5) { animation-delay: 0.25s; }
.reveal.visible .tag:nth-child(6) { animation-delay: 0.3s; }

@keyframes tagFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Skill card glow pulse on hover */
.skill-category::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  opacity: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-dim), transparent 70%);
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.skill-category {
  position: relative;
}

.skill-category:hover::after {
  opacity: 1;
}

/* Timeline items slide in from left */
.timeline-item .timeline-content {
  transition: transform 0.4s var(--ease-out), border-color 0.3s var(--ease), box-shadow 0.4s var(--ease-out);
}

/* Smooth stat counter appearance */
.about-stats .stat {
  transition: transform 0.3s var(--ease-out);
}

.about-stats .stat:hover {
  transform: scale(1.08);
}

.about-stats .stat:hover .stat-value {
  text-shadow: 0 0 20px var(--accent-glow);
}

.stat-value {
  transition: text-shadow 0.3s var(--ease);
}

/* Photo placeholder pulse ring */
.photo-placeholder {
  position: relative;
}

.about-photo-wrapper:hover .photo-glow {
  opacity: 0.15;
  animation: pulseRing 2s ease-in-out infinite;
}

@keyframes pulseRing {
  0%, 100% { transform: scale(1); opacity: 0.1; }
  50% { transform: scale(1.1); opacity: 0.18; }
}

/* Contact card icon spin on hover */
.contact-card:hover svg {
  transform: scale(1.15) rotate(5deg);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 900px) {
  :root {
    --section-pad: 80px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .about-photo-wrapper {
    justify-self: center;
  }

  .photo-placeholder {
    width: 160px;
    height: 160px;
  }

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

  .stat-divider {
    display: none;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .education-main {
    flex-direction: column;
  }

  .education-meta {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --section-pad: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 4px;
    transition: right 0.4s var(--ease-out);
  }

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

  .nav-links a {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }

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

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

  .about-stats {
    flex-direction: column;
    gap: 20px;
  }

  .timeline {
    padding-left: 28px;
  }

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

  .timeline-dot {
    left: -28px;
    width: 11px;
    height: 11px;
  }

  .timeline-content {
    padding: 20px;
  }

  .timeline-header {
    flex-direction: column;
    gap: 4px;
  }

  .project-card {
    padding: 24px;
  }

  .section-header {
    margin-bottom: 40px;
  }
}
