/* ============================================
   ANIMATED PORTFOLIO  - Dark Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a28;
  --text: #f0f0f5;
  --text-muted: #b8b8c9;
  --accent: #ff5722;
  --accent-glow: rgba(255, 87, 34, 0.3);
  --accent2: #6138bd;
  --accent2-glow: rgba(97, 56, 189, 0.3);
  --gradient: linear-gradient(135deg, #ff5722, #ff9800, #ff5722);
  --radius: 16px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --border-subtle: rgba(255,255,255,0.05);
  --border-light: rgba(255,255,255,0.1);
  --border-medium: rgba(255,255,255,0.15);
  --border-accent: rgba(255,87,34,0.2);
  --border-accent-subtle: rgba(255,87,34,0.15);
  --glass-bg: rgba(255,255,255,0.02);
  --glass-bg-hover: rgba(255,255,255,0.05);
  --nav-bg: rgba(10, 10, 15, 0.96);
  --nav-mobile-bg: rgba(10, 10, 15, 0.98);
  --overlay-bg: rgba(10, 10, 15, 0.6);
  --shine: rgba(255,255,255,0.2);
  --divider: rgba(255,255,255,0.1);
  --hero-text-alpha: rgba(255,255,255,0.65);
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f2;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --accent-glow: rgba(255, 87, 34, 0.15);
  --accent2-glow: rgba(97, 56, 189, 0.15);
  --border-subtle: rgba(0,0,0,0.06);
  --border-light: rgba(0,0,0,0.1);
  --border-medium: rgba(0,0,0,0.15);
  --border-accent: rgba(255,87,34,0.15);
  --border-accent-subtle: rgba(255,87,34,0.1);
  --glass-bg: rgba(0,0,0,0.02);
  --glass-bg-hover: rgba(0,0,0,0.04);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-mobile-bg: rgba(250, 250, 250, 0.98);
  --overlay-bg: rgba(250, 250, 250, 0.6);
  --shine: rgba(0,0,0,0.08);
  --divider: rgba(0,0,0,0.1);
  --hero-text-alpha: rgba(0,0,0,0.65);
}

[data-theme="light"] .glow-orb { opacity: 0; }

/* ---- Light Theme 3D Clouds ---- */
.hero-clouds {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
[data-theme="light"] .hero-clouds { display: block; }

.cloud-group {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.cloud-base {
  position: absolute;
}
.cloud-puff {
  position: absolute;
  width: 728px; height: 256px;
  margin-left: -364px; margin-top: -128px;
  background: url('../images/cloud.png') no-repeat center / contain;
  filter: brightness(1.5);
  opacity: 0;
  transition: opacity 0.6s ease-out;
}
.cloud-puff.loaded { opacity: 0.35; }

@media (max-width: 768px) {
  .hero-clouds { display: none !important; }
}

/* ---- Flying Birds (light theme) ---- */
.hero-birds {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}
[data-theme="light"] .hero-birds { display: block; }

.bird {
  background-image: url('../images/bird-cells.svg');
  background-size: auto 100%;
  width: 62px;
  height: 88px;
  will-change: background-position;
  animation-name: fly-cycle;
  animation-timing-function: steps(10);
  animation-iteration-count: infinite;
}
.bird--one   { animation-duration: 1s;    animation-delay: -0.5s; }
.bird--two   { animation-duration: 0.9s;  animation-delay: -0.75s; }
.bird--three { animation-duration: 1.25s; animation-delay: -0.25s; }
.bird--four  { animation-duration: 1.1s;  animation-delay: -0.5s; }

.bird-container {
  position: absolute;
  top: 20%;
  left: -10%;
  transform: translateX(-10vw) scale(0.4);
  will-change: transform;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.bird-container--one   { animation-name: fly-right-one; animation-duration: 15s; animation-delay: 0s; top: 15%; }
.bird-container--two   { animation-name: fly-right-two; animation-duration: 16s; animation-delay: 1s; top: 25%; }
.bird-container--three { animation-name: fly-right-one; animation-duration: 14.6s; animation-delay: 5s; top: 10%; }
.bird-container--four  { animation-name: fly-right-two; animation-duration: 16s; animation-delay: 7s; top: 30%; }

@keyframes fly-cycle {
  100% { background-position: -634px 0; }
}

@keyframes fly-right-one {
  0%   { transform: translateX(-10vw) translateY(0vh) scale(0.4); }
  15%  { transform: translateX(15vw)  translateY(2vh) scale(0.45); }
  30%  { transform: translateX(35vw)  translateY(0vh) scale(0.5); }
  45%  { transform: translateX(55vw)  translateY(4vh) scale(0.55); }
  60%  { transform: translateX(75vw)  translateY(2vh) scale(0.5); }
  80%  { transform: translateX(95vw)  translateY(0vh) scale(0.45); }
  100% { transform: translateX(115vw) translateY(1vh) scale(0.4); }
}

@keyframes fly-right-two {
  0%   { transform: translateX(-10vw) translateY(0vh) scale(0.35); }
  15%  { transform: translateX(15vw)  translateY(-2vh) scale(0.4); }
  30%  { transform: translateX(35vw)  translateY(3vh) scale(0.5); }
  45%  { transform: translateX(55vw)  translateY(0vh) scale(0.45); }
  60%  { transform: translateX(75vw)  translateY(-1vh) scale(0.5); }
  80%  { transform: translateX(95vw)  translateY(2vh) scale(0.45); }
  100% { transform: translateX(115vw) translateY(0vh) scale(0.4); }
}

@media (max-width: 768px) {
  .hero-birds { display: none !important; }
}

[data-theme="light"] .tags-strip {
  background: #ffffff;
  max-width: none;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: 48px;
  padding-right: 48px;
}
[data-theme="light"] .project-overlay { background: rgba(0,0,0,0.55); }
[data-theme="light"] .project-overlay span { color: #fff; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }


/* ---- Smooth Scroll Progress ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient);
  z-index: 9999;
  transition: none;
  box-shadow: 0 0 10px var(--accent-glow), 0 0 30px var(--accent-glow);
}

/* ---- Hero Liquid Gradient Canvas ---- */
#heroGradientCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---- Page Wrapper ---- */
.page-wrapper {
  position: relative;
  z-index: 2;
}

/* ---- Navigation ---- */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: var(--transition);
  backdrop-filter: blur(0px);
}

.nav-bar.scrolled {
  padding: 16px 48px;
  backdrop-filter: blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: var(--transition);
}

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

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s;
}

.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 { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ---- Hero Section ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 48px 80px;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.hero-tag {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.1rem, 5.6vw, 4.9rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-name .line {
  display: block;
}

.hero-name .name-highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title strong {
  font-weight: 600;
  color: var(--text);
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--shine), transparent);
  transition: left 0.6s;
}

.btn-primary:hover::before { left: 100%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border-medium);
  border-radius: 50px;
  transition: var(--transition);
}

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

/* ---- Hero Stats ---- */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 60px;
  padding: 32px 48px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.stat {
  text-align: center;
  padding: 0 36px;
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

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

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

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

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

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

/* ---- Tags Strip (infinite marquee) ---- */
.tags-strip {
  padding: 24px 48px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  max-width: 1296px;
  margin: 0 auto;
  overflow: hidden;
}

.tags-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 35s linear infinite;
}

.tags-loop {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-right: 24px;
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tags-strip:hover .tags-track {
  animation-play-state: paused;
}

.tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.tag-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

@keyframes tagScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Section Styles ---- */
.section {
  padding: 120px 48px;
  position: relative;
}

.section-header {
  max-width: 1200px;
  margin: 0 auto 60px;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ---- Project Cards ---- */
.projects-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: transform 0.4s ease, border-color 0.4s ease;
}

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

.project-image-wrapper {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg);
  display: block;
}

.project-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s;
}

.project-overlay span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  padding: 12px 24px;
  border: 1px solid var(--border-medium);
  border-radius: 50px;
  transition: var(--transition);
}

.project-card:hover .project-overlay { opacity: 1; }
.project-card:hover .project-overlay span {
  border-color: var(--accent);
  background: var(--accent);
}

.project-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

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

.project-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 12px;
  border: 1px solid var(--border-accent);
  border-radius: 50px;
}

.project-year {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.project-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  transition: color 0.3s;
}

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

.project-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  padding-top: 8px;
  transition: gap 0.3s;
}

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

.project-link .arrow {
  display: inline-block;
  transition: transform 0.3s;
}

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

/* ---- Archive Section ---- */
.archive-section {
  text-align: center;
}

.archive-image {
  max-width: 1200px;
  margin: 0 auto;
}

.archive-image img {
  border-radius: var(--radius);
  margin: 0 auto;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.archive-image:hover img { opacity: 1; }

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

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

.timeline-item {
  position: relative;
  padding-bottom: 60px;
}

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

.timeline-marker {
  position: absolute;
  left: -36px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent), 0 0 20px var(--accent-glow);
}

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

.timeline-content:hover {
  border-color: var(--border-accent-subtle);
}

.timeline-period {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.timeline-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.timeline-company {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-company span {
  color: var(--text-muted);
  font-weight: 400;
}

.timeline-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

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

.timeline-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

.timeline-highlights li strong {
  color: var(--text);
  font-weight: 600;
}

/* ---- Skills Grid ---- */
.skills-grid {
  max-width: 1200px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-card {
  padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  transition: transform 0.3s, border-color 0.3s;
}

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

.skill-icon {
  color: var(--accent);
  margin-bottom: 20px;
}

.skill-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.skill-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ---- Tools Row ---- */
.tools-row {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.tool-pill {
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  transition: var(--transition);
}

.tool-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Education ---- */
.education-section {
  text-align: center;
}

.education-card {
  max-width: 500px;
  margin: 0 auto;
  padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
}

.education-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.education-card span {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ---- Contact Section ---- */
.contact-section {
  text-align: center;
  padding: 120px 48px 80px;
  position: relative;
}

.contact-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 40px;
}

.contact-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

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

.contact-item-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.contact-item-value {
  font-size: 1rem;
  color: var(--text);
}

.contact-item-value a {
  color: var(--text);
  transition: color 0.3s;
}

.contact-item-value a:hover { color: var(--accent); }

/* ---- Social Links ---- */
.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-link {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  color: var(--text-muted);
  transition: var(--transition);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

/* ---- Footer ---- */
.footer {
  padding: 40px 48px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

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

/* ---- Magnetic Button ---- */
.magnetic { transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

/* ---- Horizontal Divider ---- */
.divider {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--divider), transparent);
}

/* ---- Mobile Nav Toggle ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 101;
  padding: 8px;
}

.nav-toggle span {
  width: 28px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
  transform-origin: center;
}

.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); }

/* ---- Loading Screen ---- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: baseline;
}

.loader-symbol {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 6px;
  position: relative;
  vertical-align: baseline;
  font-size: 0.35em;
  margin-bottom: 0.15em;
}

/* Four SVG shapes stacked, visibility toggled by animation */
.loader-symbol .sym-circle,
.loader-symbol .sym-triangle,
.loader-symbol .sym-plus,
.loader-symbol .sym-cross {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-symbol .sym-circle {
  animation: showFrame1 0.75s step-end infinite;
}
.loader-symbol .sym-triangle {
  animation: showFrame2 0.75s step-end infinite;
}
.loader-symbol .sym-plus {
  animation: showFrame3 0.75s step-end infinite;
}
.loader-symbol .sym-cross {
  animation: showFrame4 0.75s step-end infinite;
}

.loader-symbol svg {
  width: 100%;
  height: 100%;
}

@keyframes showFrame1 {
  0%   { opacity: 1; }
  25%  { opacity: 0; }
  50%  { opacity: 0; }
  75%  { opacity: 0; }
}
@keyframes showFrame2 {
  0%   { opacity: 0; }
  25%  { opacity: 1; }
  50%  { opacity: 0; }
  75%  { opacity: 0; }
}
@keyframes showFrame3 {
  0%   { opacity: 0; }
  25%  { opacity: 0; }
  50%  { opacity: 1; }
  75%  { opacity: 0; }
}
@keyframes showFrame4 {
  0%   { opacity: 0; }
  25%  { opacity: 0; }
  50%  { opacity: 0; }
  75%  { opacity: 1; }
}

.loader.done {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ---- Glow orbs behind hero ---- */
.glow-orb {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.glow-orb-1 {
  background: var(--accent);
  top: 10%;
  left: -10%;
}

.glow-orb-2 {
  background: var(--accent2);
  bottom: 10%;
  right: -10%;
}

/* ---- Responsive ---- */

/* iPad landscape / small desktop */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 80px 24px; }
  .hero { padding: 100px 24px 60px; }
  .nav-bar { padding: 16px 24px; }
  .hero-stats { padding: 24px 20px; gap: 0; }
  .stat { padding: 0 20px; }
  .section-title { font-size: clamp(1.8rem, 3.5vw, 3rem); }
  .hero-title { font-size: clamp(1rem, 1.8vw, 1.35rem); }
  .tags-strip { padding: 20px 24px; }
}

/* iPad portrait / tablets */
@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--nav-mobile-bg);
    backdrop-filter: blur(20px);
    transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 32px;
    z-index: 100;
  }

  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.5rem; }

  .projects-grid { grid-template-columns: 1fr; gap: 20px; }
  .skills-grid { grid-template-columns: 1fr; }

  .hero-name { font-size: clamp(2rem, 8vw, 3.5rem); }
  .hero-title { font-size: clamp(1rem, 2.5vw, 1.2rem); max-width: 100%; line-height: 1.7; color: var(--hero-text-alpha); }
  .hero-tag { font-size: 0.75rem; }

  .hero-cta { flex-direction: column; gap: 12px; align-items: center; padding: 0 24px; }
  .hero-cta .btn-primary,
  .hero-cta .btn-outline { width: 240px; max-width: none; text-align: center; padding: 16px 48px; justify-content: center; }

  .hero-title { font-size: 1.1rem; line-height: 1.8; color: var(--hero-text-alpha); }

  .hero-stats {
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px;
  }

  .stat-divider { display: none; }

  .stat {
    flex: 1 1 40%;
    padding: 12px 0;
  }

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

  .section-header { margin-bottom: 40px; }
  .section-title { font-size: clamp(1.6rem, 5vw, 2.4rem); }
  .section-label { font-size: 0.7rem; }

  .contact-info { flex-direction: column; gap: 24px; }
  .contact-title { font-size: clamp(2rem, 6vw, 3rem); }
  .section { padding: 60px 20px; }
  .hero { padding: 80px 20px 40px; }
  .nav-bar { padding: 16px 20px; }
  .footer { padding: 30px 20px; }

  .project-info { padding: 20px; }
  .project-name { font-size: 1.3rem; }
  .project-desc { font-size: 0.9rem; }
  .project-tag { font-size: 0.65rem; }

  .tags-strip { padding: 16px 20px; }
  .tag-item { font-size: 0.8rem; padding: 8px 16px; }

  .social-links { gap: 12px; }
  .social-link { width: 40px; height: 40px; }

  .archive-image img { border-radius: 12px; }

  .timeline { padding-left: 30px; }
  .timeline-marker { left: -26px; }
  .timeline-content { padding: 20px; }
}

/* Mobile phones */
@media (max-width: 480px) {
  .hero { padding: 70px 16px 32px; }
  .section { padding: 48px 16px; }

  .hero-name { font-size: 2.3rem; margin-bottom: 20px; }
  .hero-title { font-size: 1.05rem; line-height: 1.8; color: var(--hero-text-alpha); margin-bottom: 32px; padding: 0 8px; }
  .hero-tag { font-size: 0.7rem; margin-bottom: 16px; }

  .hero-cta { padding: 0 20px; }
  .hero-cta .btn-primary,
  .hero-cta .btn-outline { padding: 16px 40px; font-size: 0.9rem; width: 220px; max-width: none; justify-content: center; }

  .hero-stats { padding: 16px; gap: 12px; border-radius: 12px; }
  .stat { flex: 1 1 45%; }
  .stat-number { font-size: 1.6rem; }
  .stat-label { font-size: 0.65rem; }

  .section-header { margin-bottom: 32px; }
  .section-title { font-size: 1.6rem; }
  .section-label { font-size: 0.65rem; }
  .section-label::before { width: 24px; }

  .project-info { padding: 16px; }
  .project-name { font-size: 1.1rem; }
  .project-desc { font-size: 0.85rem; }
  .project-link { font-size: 0.8rem; }

  .contact-title { font-size: 2rem; }
  .contact-item-label { font-size: 0.7rem; }
  .contact-item-value { font-size: 0.95rem; }

  .tags-strip { padding: 12px 16px; }
  .tag-item { font-size: 0.7rem; padding: 6px 12px; }

  .nav-bar { padding: 14px 16px; }
  .nav-logo { font-size: 1.2rem; }
  .footer { padding: 24px 16px; }
  .footer p { font-size: 0.8rem; }

  .timeline-role { font-size: 1.2rem; }
  .timeline-content { padding: 16px; }
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  margin-left: 24px;
  flex-shrink: 0;
}

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

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { transition: opacity 0.3s, transform 0.3s; }

.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---- Theme Transitions ---- */
body,
.nav-bar,
.project-card,
.timeline-content,
.skill-card,
.education-card,
.hero-stats,
.social-link,
.tool-pill,
.btn-outline,
.loader,
.footer {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

@media (max-width: 768px) {
  .theme-toggle { width: 36px; height: 36px; margin-left: 16px; }
}
