/* ================================================
   HERO
================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Animated gradient mesh background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Gradient overlay for readability */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(6, 182, 212, 0.06) 0%, transparent 55%),
    linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--cyan);
}
.hero-name {
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.35s forwards;
}
.hero-name .line-2 {
  display: block;
  background: linear-gradient(135deg, var(--indigo-light) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.5s forwards;
}
.hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.65s forwards;
}
.hero-bio strong { color: var(--text); font-weight: 500; }
.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.8s forwards;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--indigo);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 10px;
  cursor: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
}
.btn-primary:hover {
  background: var(--indigo-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 13px 28px;
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  cursor: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-ghost:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--indigo);
  transform: translateY(-2px);
}

/* Hero — more vivid mesh on light (indigo-tinted bg makes this pop) */
[data-theme="light"] .hero-bg::after {
  background:
    radial-gradient(ellipse 75% 60% at 12% 42%, rgba(99,102,241,0.18) 0%, transparent 58%),
    radial-gradient(ellipse 55% 50% at 82% 60%, rgba(2,132,199,0.14) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 52% 8%,  rgba(99,102,241,0.1)  0%, transparent 60%),
    linear-gradient(to bottom, transparent 50%, var(--bg) 100%);
}

/* ================================================
   ABOUT
================================================ */
#about {
  background: linear-gradient(to bottom, var(--bg), var(--bg-2));
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-text p {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 20px;
}
.about-text p:last-of-type { margin-bottom: 32px; }
.about-text strong { color: var(--text); font-weight: 500; }
.about-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--indigo-light);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 6px 16px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pill:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.5);
  color: #fff;
}
.about-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  overflow: hidden;
}
.about-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
  pointer-events: none;
}
.about-card::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08), transparent 70%);
  pointer-events: none;
}
.about-facts {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}
.about-fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.about-fact:first-child { padding-top: 0; }
.about-fact:last-child { border-bottom: none; }
.fact-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.fact-value {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
}
.about-award {
  margin-top: 28px;
  padding: 16px 20px;
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.about-award-icon { font-size: 1rem; flex-shrink: 0; }

/* About — light mode */
[data-theme="light"] .about-card {
  background: linear-gradient(145deg, #ffffff, #f5f3ef);
  border-color: rgba(99,102,241,0.18);
}
[data-theme="light"] .about-card::before {
  background: radial-gradient(circle, rgba(99,102,241,0.14), transparent 70%);
}
[data-theme="light"] .about-card::after {
  background: radial-gradient(circle, rgba(2,132,199,0.1), transparent 70%);
}
[data-theme="light"] .about-fact { border-color: rgba(99,102,241,0.1); }
[data-theme="light"] .fact-label { color: var(--indigo-light); }
[data-theme="light"] #about {
  background: linear-gradient(to bottom, var(--bg), var(--bg-2));
}
[data-theme="light"] .pill:hover { color: var(--indigo); }
[data-theme="light"] .about-award {
  background: rgba(2,132,199,0.08);
  border-color: rgba(2,132,199,0.25);
}

/* ================================================
   SKILLS
================================================ */
#skills {
  background: var(--bg-2);
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.skill-group:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.08);
}
.skill-group-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--indigo-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.skill-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 5px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
  cursor: default;
}
.tag:hover {
  color: var(--indigo-light);
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}
.tag.accent { color: var(--cyan); background: rgba(6, 182, 212, 0.08); border-color: rgba(6, 182, 212, 0.2); }
.tag.accent:hover { background: rgba(6, 182, 212, 0.15); border-color: rgba(6, 182, 212, 0.45); }

/* Skills — light mode */
[data-theme="light"] #skills { background: var(--bg-2); }
[data-theme="light"] .skill-group {
  background: linear-gradient(145deg, #ffffff, #f5f3ef);
  border-color: rgba(99,102,241,0.14);
}
[data-theme="light"] .skill-group-label { color: var(--indigo-light); }
[data-theme="light"] .tag { color: #374151; }
[data-theme="light"] .tag.accent { color: var(--cyan); }

/* ================================================
   EXPERIENCE
================================================ */
#experience {
  background: linear-gradient(to bottom, var(--bg-2), var(--bg));
}
.experience-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.experience-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--indigo), var(--cyan));
}
.experience-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 40px rgba(99, 102, 241, 0.1);
}
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.exp-role {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.exp-company {
  font-size: 0.95rem;
  color: var(--indigo-light);
  font-weight: 500;
}
.exp-company span { color: var(--text-dim); font-weight: 400; }
.exp-meta {
  text-align: right;
}
.exp-dates {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.exp-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.06em;
}
.exp-bullets {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.exp-bullet {
  position: relative;
  padding-left: 20px;
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.exp-bullet::before {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--indigo);
  top: 10px;
}
.exp-bullet strong { color: var(--text); font-weight: 500; }

/* Experience — light mode */
[data-theme="light"] #experience {
  background: linear-gradient(to bottom, var(--bg-2), var(--bg));
}
[data-theme="light"] .experience-card {
  background: linear-gradient(145deg, #ffffff, #f5f3ef);
  border-color: rgba(99,102,241,0.14);
}
[data-theme="light"] .experience-card::before {
  background: linear-gradient(to bottom, var(--indigo), var(--cyan));
}
[data-theme="light"] .exp-badge { color: #fff; }
[data-theme="light"] .exp-company { color: var(--indigo-light); }
[data-theme="light"] .exp-dates { color: var(--text-dim); }

/* ================================================
   PROJECTS
================================================ */
#projects {
  background: var(--bg);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: none;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(99, 102, 241, 0.12);
}
.project-card:hover::after { opacity: 1; }
.project-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.project-card.featured .project-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  background: var(--project-tag-bg);
  border: 1px solid var(--project-tag-bd);
  padding: 3px 10px;
  border-radius: 5px;
}
.project-links {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: auto;
}
.project-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--indigo-light);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s, gap 0.2s;
  cursor: none;
}
.project-link:hover { color: var(--cyan); gap: 8px; }
.project-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.project-visual {
  position: relative;
  height: 280px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Projects — light mode */
[data-theme="light"] .project-card {
  background: linear-gradient(145deg, #ffffff, #f5f3ef);
  border-color: rgba(99,102,241,0.13);
}
[data-theme="light"] .project-visual {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(2,132,199,0.06));
  border-color: rgba(99,102,241,0.12);
}
[data-theme="light"] .project-type { color: var(--indigo-light); }
[data-theme="light"] .project-tag {
  color: var(--indigo-light);
  background: rgba(99,102,241,0.06);
  border-color: rgba(99,102,241,0.16);
}

/* ================================================
   EDUCATION + ACHIEVEMENTS
================================================ */
#education {
  background: var(--bg-2);
}
.edu-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.edu-card:hover { border-color: var(--border-hover); }
.edu-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--cyan), transparent);
}
.edu-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--indigo-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.edu-degree {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.edu-school {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.edu-detail {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 12px;
}
.edu-detail .highlight {
  color: var(--cyan);
}

.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.achievement-card:hover { border-color: var(--border-hover); }
.achievement-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--indigo), transparent);
}
.achievement-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 14px;
}
.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.achievement-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.achievement-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.achievement-text strong { color: var(--text); font-weight: 500; }

/* Education — light mode */
[data-theme="light"] #education { background: var(--bg-2); }
[data-theme="light"] .edu-card,
[data-theme="light"] .achievement-card {
  background: linear-gradient(145deg, #ffffff, #f5f3ef);
  border-color: rgba(99,102,241,0.14);
}
[data-theme="light"] .edu-type { color: var(--indigo-light); }

/* ================================================
   CONTACT
================================================ */
#contact {
  background: linear-gradient(to bottom, var(--bg-2), var(--bg));
  text-align: center;
}
.contact-headline {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.contact-headline span {
  background: linear-gradient(135deg, var(--indigo-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.contact-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 440px;
  margin: 0 auto 52px;
  line-height: 1.75;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 13px 24px;
  border-radius: 10px;
  cursor: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.contact-link:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-2px);
}
.contact-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.contact-link.email:hover { color: var(--cyan); border-color: rgba(6, 182, 212, 0.4); }
.contact-link.linkedin:hover { color: #60a5fa; border-color: rgba(96, 165, 250, 0.4); }
.contact-link.github:hover { color: var(--indigo-light); border-color: rgba(99, 102, 241, 0.4); }

/* ================================================
   FOOTER
================================================ */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-inner {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ================================================
   CARDS + BUTTONS — light mode
================================================ */
[data-theme="light"] .about-card,
[data-theme="light"] .skill-group,
[data-theme="light"] .project-card,
[data-theme="light"] .edu-card,
[data-theme="light"] .achievement-card,
[data-theme="light"] .experience-card {
  box-shadow: var(--card-shadow);
}
[data-theme="light"] .skill-group:hover,
[data-theme="light"] .project-card:hover,
[data-theme="light"] .edu-card:hover,
[data-theme="light"] .achievement-card:hover,
[data-theme="light"] .experience-card:hover {
  box-shadow: var(--card-shadow-hover);
}
[data-theme="light"] .contact-link {
  background: #ffffff;
  border-color: rgba(99,102,241,0.18);
  box-shadow: 0 1px 8px rgba(99,102,241,0.07);
}
[data-theme="light"] .contact-link:hover {
  background: #f0ede8;
  border-color: rgba(99,102,241,0.45);
}
[data-theme="light"] .btn-ghost {
  border-color: rgba(99,102,241,0.25);
}
[data-theme="light"] .btn-ghost:hover {
  background: rgba(99,102,241,0.08);
  border-color: var(--indigo);
}
[data-theme="light"] #contact {
  background: linear-gradient(to bottom, var(--bg-2), var(--bg));
}
