/* ===== Design Tokens ===== */
:root {
  --bg-primary: #05080f;
  --bg-secondary: #0a101c;
  --bg-card: rgba(20, 28, 45, 0.7);
  --bg-card-solid: #121a2a;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #22d3ee;
  --accent-2: #818cf8;
  --accent-3: #34d399;
  --accent-hover: #06b6d4;
  --accent-dim: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.4);
  --border: rgba(148, 163, 184, 0.1);
  --border-strong: rgba(34, 211, 238, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(5, 8, 15, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  background: rgba(5, 8, 15, 0.9);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}
.nav-container { display: flex; align-items: center; height: 72px; gap: 8px; }
.logo {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 20%, var(--accent) 80%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo span { -webkit-text-fill-color: var(--accent); }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-size: 0.88rem; font-weight: 500; color: var(--text-secondary);
  transition: color var(--transition); position: relative;
}
.nav-links a:not(.btn-nav)::after {
  content: ''; position: absolute; bottom: -4px; left: 50%; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px; transition: all var(--transition); transform: translateX(-50%);
}
.nav-links a:not(.btn-nav):hover { color: var(--accent); }
.nav-links a:not(.btn-nav):hover::after { width: 100%; }
.btn-nav {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05080f !important; padding: 9px 20px; border-radius: 999px;
  font-weight: 700 !important; box-shadow: 0 4px 20px rgba(34, 211, 238, 0.3);
  transition: transform var(--transition), box-shadow var(--transition) !important;
  position: relative; overflow: hidden; background-size: 200% auto;
}
.btn-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(34, 211, 238, 0.45);
  color: #05080f !important;
}
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); transition: var(--transition); border-radius: 2px; }

.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-card-solid);
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition); margin-right: 4px; flex-shrink: 0;
  position: relative; overflow: hidden;
}
.theme-toggle:hover {
  color: var(--accent); border-color: var(--accent);
  background: var(--accent-dim); transform: translateY(-2px);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="dark"] .theme-toggle .icon-sun { display: block; opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; opacity: 0; transform: rotate(-90deg) scale(0.5); pointer-events: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .theme-toggle .icon-sun { display: block; opacity: 0; transform: rotate(90deg) scale(0.5); pointer-events: none; }

.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 130px 0 90px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% -15%, rgba(34, 211, 238, 0.22), transparent 55%),
    radial-gradient(ellipse 45% 40% at 85% 60%, rgba(129, 140, 248, 0.14), transparent),
    radial-gradient(ellipse 35% 30% at 10% 75%, rgba(52, 211, 153, 0.1), transparent);
}
.hero-bg::before {
  content: ''; position: absolute;
  width: 480px; height: 480px; border-radius: 50%;
  top: 10%; right: 5%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 70%);
  filter: blur(50px); animation: float 10s ease-in-out infinite;
}
.hero-bg::after {
  content: ''; position: absolute;
  width: 360px; height: 360px; border-radius: 50%;
  bottom: 5%; left: 8%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.16), transparent 70%);
  filter: blur(45px); animation: float-alt 14s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 25px) scale(1.08); }
  66% { transform: translate(20px, -15px) scale(0.95); }
}
@keyframes float-alt {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -30px) scale(1.12); }
}
.hero-content { position: relative; z-index: 1; }
.hero-greeting {
  font-family: var(--mono); font-size: 0.92rem; color: var(--accent);
  margin-bottom: 16px; letter-spacing: 0.1em; font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.hero-greeting::before {
  content: ''; width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.hero-name {
  font-size: clamp(2.8rem, 7.5vw, 4.5rem); font-weight: 800;
  line-height: 1.08; letter-spacing: -2.5px; margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 25%, #a5f3fc 60%, var(--accent-2) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: gradient-shift 8s ease infinite;
}
.hero-title {
  font-size: clamp(1.25rem, 3vw, 1.65rem); font-weight: 500;
  color: var(--text-secondary); margin-bottom: 28px; min-height: 1.6em;
}
.typed-text { color: var(--accent); font-weight: 650; }
.cursor { animation: blink 1s step-end infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc {
  max-width: 540px; color: var(--text-secondary);
  font-size: 1.08rem; margin-bottom: 36px; line-height: 1.75;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 650;
  font-size: 0.95rem; transition: all var(--transition);
  border: 2px solid transparent; cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05080f; box-shadow: 0 4px 24px rgba(34, 211, 238, 0.35);
  position: relative; overflow: hidden; background-size: 200% auto;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(34, 211, 238, 0.5);
}
.btn-outline {
  border-color: var(--border); color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(8px);
}
.btn-outline:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-dim); transform: translateY(-3px);
}
.btn-resume {
  background: transparent; border: 2px solid var(--accent); color: var(--accent);
}
.btn-resume:hover {
  background: var(--accent); color: #05080f;
  transform: translateY(-3px); box-shadow: 0 8px 24px rgba(34, 211, 238, 0.3);
}
.hero-links { display: flex; gap: 12px; }
.hero-links a {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); transition: all var(--transition);
  backdrop-filter: blur(8px);
}
.hero-links a:hover {
  color: var(--accent); border-color: var(--accent);
  background: var(--accent-dim); transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(34, 211, 238, 0.2);
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 52px; padding-top: 36px;
  border-top: 1px solid var(--border);
}
.stat-item {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 110px; padding: 16px 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); backdrop-filter: blur(12px);
  transition: all var(--transition);
}
.stat-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.1);
}
.stat-num {
  font-size: 1.55rem; font-weight: 800; color: var(--accent);
  letter-spacing: -0.5px; line-height: 1.2;
}
.stat-label {
  font-size: 0.72rem; color: var(--text-muted); font-weight: 550;
  text-transform: uppercase; letter-spacing: 0.06em;
}

.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-secondary); }
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 800;
  margin-bottom: 52px; letter-spacing: -1px;
  position: relative; display: inline-block;
}
.section-title::before {
  content: ''; position: absolute; left: -16px; top: 50%;
  transform: translateY(-50%); width: 4px; height: 70%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 4px;
}
.section-title::after {
  content: ''; position: absolute; bottom: -12px; left: 0;
  width: 64px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
  border-radius: 4px;
}

.about-grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 48px; align-items: start;
}
.about-text p {
  color: var(--text-secondary); margin-bottom: 18px;
  font-size: 1.05rem; line-height: 1.8;
}
.about-text strong { color: var(--text-primary); font-weight: 650; }
.about-meta {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 28px; padding: 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); backdrop-filter: blur(12px);
}
.meta-item { display: flex; gap: 16px; font-size: 0.95rem; align-items: center; }
.meta-label {
  color: var(--text-muted); min-width: 80px; font-weight: 550;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.meta-value { color: var(--text-primary); font-weight: 500; }
.about-social { display: flex; gap: 12px; margin-top: 24px; }
.about-social a {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); transition: all var(--transition);
  backdrop-filter: blur(8px);
}
.about-social a:hover {
  color: var(--accent); border-color: var(--accent);
  background: var(--accent-dim); transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.25);
}
.about-cards { display: flex; flex-direction: column; gap: 14px; }
.info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: all var(--transition); position: relative; overflow: hidden;
  backdrop-filter: blur(12px);
}
.info-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0; transition: opacity var(--transition);
}
.info-card:hover {
  border-color: var(--border-strong); transform: translateX(6px);
  box-shadow: var(--shadow);
}
.info-card:hover::before { opacity: 1; }
.info-icon { font-size: 1.8rem; margin-bottom: 12px; }
.info-card h3 { font-size: 1.08rem; margin-bottom: 6px; font-weight: 700; }
.info-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.skill-category {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: all var(--transition); backdrop-filter: blur(12px);
}
.skill-category:hover {
  border-color: var(--border-strong);
  box-shadow: 0 12px 36px rgba(34, 211, 238, 0.1);
  transform: translateY(-3px);
}
.skill-category h3 {
  font-size: 0.92rem; margin-bottom: 16px; color: var(--accent);
  font-weight: 700; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 8px;
}
.skill-category h3::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  background: var(--accent-dim); color: var(--accent);
  font-size: 0.8rem; font-weight: 550; padding: 7px 14px;
  border-radius: 999px; border: 1px solid rgba(34, 211, 238, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.skill-tag:hover {
  background: rgba(34, 211, 238, 0.22);
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(34, 211, 238, 0.25);
}

.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 12px; bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
  border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-marker {
  position: absolute; left: -40px; top: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 3px solid var(--bg-primary);
  animation: pulse-ring 2.4s ease-out infinite;
}
.timeline-content {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  transition: all var(--transition); backdrop-filter: blur(12px);
}
.timeline-content:hover {
  border-color: var(--border-strong); box-shadow: var(--shadow);
}
.timeline-header { margin-bottom: 20px; }
.timeline-header h3 { font-size: 1.3rem; margin-bottom: 6px; font-weight: 700; }
.timeline-company {
  display: block; color: var(--accent); font-weight: 650;
  font-size: 1rem; margin-bottom: 6px;
}
.timeline-date {
  display: inline-block; color: var(--text-muted);
  font-size: 0.8rem; font-family: var(--mono);
  background: var(--accent-dim); padding: 4px 12px;
  border-radius: 8px; margin-top: 4px; border: 1px solid rgba(34, 211, 238, 0.15);
}
.timeline-list { display: flex; flex-direction: column; gap: 11px; }
.timeline-list li {
  position: relative; padding-left: 22px;
  color: var(--text-secondary); font-size: 0.95rem; line-height: 1.65;
}
.timeline-list li::before {
  content: '▹'; position: absolute; left: 0;
  color: var(--accent); font-weight: bold; font-size: 1.15rem;
}

.projects-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px;
  transition: all var(--transition); position: relative; overflow: hidden;
  backdrop-filter: blur(12px);
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover {
  border-color: var(--border-strong); transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.project-card:hover::before { opacity: 1; }
.project-header { margin-bottom: 14px; }
.project-header h3 { font-size: 1.35rem; margin-bottom: 12px; font-weight: 700; }
.project-tech {
  font-family: var(--mono); font-size: 0.76rem; color: var(--accent);
  letter-spacing: 0.03em; background: var(--accent-dim);
  padding: 6px 14px; border-radius: 8px; display: inline-block;
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.project-desc {
  color: var(--text-secondary); margin-bottom: 18px;
  font-size: 0.98rem; line-height: 1.65;
}
.project-points { display: flex; flex-direction: column; gap: 9px; }
.project-points li {
  position: relative; padding-left: 20px;
  color: var(--text-secondary); font-size: 0.92rem; line-height: 1.6;
}
.project-points li::before {
  content: '▹'; position: absolute; left: 0; color: var(--accent);
}
.project-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.project-actions .btn-cert { margin-top: 0; }
.btn-github { display: inline-flex; align-items: center; }

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.cert-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 18px; text-align: center;
  transition: all var(--transition); display: flex; flex-direction: column;
  align-items: center; backdrop-filter: blur(12px);
}
.cert-card:hover {
  border-color: var(--border-strong); transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.12);
}
.cert-icon {
  font-size: 2.3rem; margin-bottom: 14px;
  filter: drop-shadow(0 4px 12px rgba(34, 211, 238, 0.3));
  transition: transform 0.4s ease;
}
.cert-card:hover .cert-icon { transform: scale(1.15) rotate(-6deg); }
.cert-card h3 {
  font-size: 0.92rem; margin-bottom: 8px; line-height: 1.4; font-weight: 700;
}
.cert-card p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }
.btn-cert {
  display: inline-flex; align-items: center; gap: 6px; margin-top: auto;
  padding: 9px 18px; font-size: 0.8rem; font-weight: 650;
  color: var(--accent); border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px; background: var(--accent-dim);
  transition: all var(--transition);
}
.btn-cert:hover {
  background: var(--accent); color: #05080f; border-color: var(--accent);
  box-shadow: 0 4px 18px rgba(34, 211, 238, 0.4); transform: translateY(-1px);
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.edu-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: all var(--transition); position: relative; overflow: hidden;
  backdrop-filter: blur(12px);
}
.edu-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0; transition: opacity var(--transition);
}
.edu-card:hover {
  border-color: var(--border-strong); transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.edu-card:hover::before { opacity: 1; }
.edu-year {
  font-family: var(--mono); font-size: 0.76rem; color: var(--accent);
  display: inline-block; margin-bottom: 12px; background: var(--accent-dim);
  padding: 4px 12px; border-radius: 8px; font-weight: 550;
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.edu-card h3 { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.4; font-weight: 700; }
.edu-school { color: var(--text-secondary); font-size: 0.9rem; }

.contact-section {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
.contact-intro {
  max-width: 540px; color: var(--text-secondary);
  margin-bottom: 44px; font-size: 1.08rem; line-height: 1.7;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.contact-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 22px; text-align: center;
  transition: all var(--transition); backdrop-filter: blur(12px);
}
.contact-card:hover {
  border-color: var(--accent); transform: translateY(-6px);
  box-shadow: 0 16px 44px rgba(34, 211, 238, 0.18);
}
.contact-icon {
  font-size: 2rem; margin-bottom: 14px;
  transition: transform 0.4s ease;
}
.contact-card:hover .contact-icon { transform: scale(1.2); }
.contact-card h3 { font-size: 1.02rem; margin-bottom: 8px; font-weight: 700; }
.contact-card p { font-size: 0.85rem; color: var(--text-secondary); word-break: break-all; }

.footer {
  padding: 40px 0; border-top: 1px solid var(--border);
  text-align: center; background: var(--bg-secondary);
}
.footer p { color: var(--text-secondary); font-size: 0.9rem; }
.footer-sub { margin-top: 8px; font-size: 0.8rem !important; color: var(--text-muted) !important; }

body, .navbar, .section, .section-alt, .footer,
.info-card, .skill-category, .project-card, .cert-card, .edu-card,
.contact-card, .timeline-content, .skill-tag, .btn-cert, .btn-outline,
.btn-resume, .hero-links a, .about-social a, .theme-toggle,
.meta-value, .meta-label, .stat-num, .stat-label, .project-tech,
.edu-year, .timeline-date, .hamburger span, .stat-item, .about-meta {
  transition:
    background-color 0.45s ease, background 0.45s ease, color 0.45s ease,
    border-color 0.45s ease, box-shadow 0.45s ease;
}
.hero-bg, .hero-bg::after, .hero-bg::before { transition: opacity 0.5s ease, background 0.5s ease; }
.hero-name, .logo { transition: background 0.45s ease, color 0.45s ease, -webkit-text-fill-color 0.45s ease; }
html.theme-changing * { transition-duration: 0.45s !important; }

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-solid: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #0891b2;
  --accent-2: #6366f1;
  --accent-3: #059669;
  --accent-hover: #0e7490;
  --accent-dim: rgba(8, 145, 178, 0.1);
  --accent-glow: rgba(8, 145, 178, 0.3);
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(8, 145, 178, 0.35);
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
}
[data-theme="light"] .navbar { background: rgba(248, 250, 252, 0.8); }
[data-theme="light"] .navbar.scrolled {
  background: rgba(248, 250, 252, 0.95);
  box-shadow: 0 4px 30px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .logo {
  background: linear-gradient(135deg, #0f172a 20%, var(--accent) 80%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
[data-theme="light"] .logo span { -webkit-text-fill-color: var(--accent); }
[data-theme="light"] .hero-name {
  background: linear-gradient(135deg, #0f172a 25%, #0e7490 70%, var(--accent-2) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
[data-theme="light"] .hero-bg {
  background:
    radial-gradient(ellipse 80% 55% at 50% -15%, rgba(8, 145, 178, 0.12), transparent 55%),
    radial-gradient(ellipse 45% 40% at 85% 60%, rgba(99, 102, 241, 0.08), transparent),
    radial-gradient(ellipse 35% 30% at 10% 75%, rgba(5, 150, 105, 0.06), transparent);
}
[data-theme="light"] .btn-primary { color: #fff; }
[data-theme="light"] .btn-nav { color: #fff !important; }
[data-theme="light"] .btn-cert:hover { color: #fff; }
[data-theme="light"] .btn-resume:hover { color: #fff; }
[data-theme="light"] .timeline-marker {
  border-color: var(--bg-primary);
  animation: none;
  box-shadow: 0 0 0 4px var(--accent-dim), 0 0 16px var(--accent-glow);
}
[data-theme="light"] .nav-links { background: rgba(241, 245, 249, 0.98); }
[data-theme="light"] .timeline-date { background: var(--accent-dim); }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-cards { flex-direction: row; flex-wrap: wrap; }
  .info-card { flex: 1; min-width: 200px; }
}
@media (max-width: 768px) {
  .theme-toggle { margin-left: auto; }
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0;
    background: rgba(10, 16, 28, 0.98); backdrop-filter: blur(20px);
    flex-direction: column; padding: 28px; gap: 18px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-130%); opacity: 0; pointer-events: none;
    transition: all 0.35s ease; margin-left: 0;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .hero { padding: 110px 0 70px; min-height: auto; }
  .section { padding: 75px 0; }
  .timeline { padding-left: 28px; }
  .timeline-marker { left: -28px; width: 14px; height: 14px; }
  .section-title::before { display: none; }
}
@media (max-width: 480px) {
  .hero-cta { flex-direction: column; }
  .btn { justify-content: center; }
  .about-cards { flex-direction: column; }
  .hero-name { letter-spacing: -1px; }
  .hero-stats { gap: 10px; }
  .stat-item { min-width: calc(50% - 6px); padding: 14px 16px; }
  .stat-num { font-size: 1.3rem; }
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

body > *:not(#particles) {
  position: relative;
  z-index: 1;
}

.navbar { z-index: 1000; }

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

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.45), 0 0 0 4px rgba(34, 211, 238, 0.12); }
  70% { box-shadow: 0 0 0 12px rgba(34, 211, 238, 0), 0 0 0 4px rgba(34, 211, 238, 0.08); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0), 0 0 0 4px rgba(34, 211, 238, 0.12); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

.btn-primary::after, .btn-nav::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

.stat-item:nth-child(1) { animation: float-card 5s ease-in-out infinite; }
.stat-item:nth-child(2) { animation: float-card 5s ease-in-out 0.4s infinite; }
.stat-item:nth-child(3) { animation: float-card 5s ease-in-out 0.8s infinite; }
.stat-item:nth-child(4) { animation: float-card 5s ease-in-out 1.2s infinite; }
