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

:root {
  --bg: #0d0f14;
  --bg-alt: #111318;
  --surface: #181b23;
  --surface-hover: #1f2330;
  --border: #262b38;
  --accent: #4f8ef7;
  --accent-glow: rgba(79,142,247,0.15);
  --accent2: #a855f7;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .02em;
  color: var(--text);
}

nav ul { display: flex; gap: 1.75rem; list-style: none; }

nav ul a {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s, background-color .2s, box-shadow .2s;
  border-radius: 999px;
  padding: .25rem .6rem;
}
nav ul a:hover { color: var(--text); text-decoration: none; }
nav ul a.active {
  color: var(--accent);
  background: var(--accent-glow);
  box-shadow: inset 0 0 0 1px rgba(79,142,247,0.35);
  text-decoration: none;
}
nav ul a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  color: var(--text);
  text-decoration: none;
}

/* ── Hero ── */
header#about {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 100px 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header#about::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(79,142,247,.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(168,85,247,.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner { max-width: 760px; position: relative; z-index: 1; }

.hero-badge {
  display: inline-block;
  background: var(--accent-glow);
  border: 1px solid rgba(79,142,247,.35);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

header h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #e2e8f0 30%, #4f8ef7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .75rem;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: .4rem;
}

.hero-location {
  font-size: .9rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.hero-summary {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, opacity .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79,142,247,.35);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(79,142,247,.5); }
.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Shared layout ── */
.container { max-width: 1060px; margin: 0 auto; padding: 0 2rem; }

section { padding: 6rem 0; }
.alt-bg { background: var(--bg-alt); }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: .5rem;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
  font-size: 1rem;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s, background .2s, transform .2s;
}
.skill-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-3px);
}
.skill-card.highlight {
  border-color: rgba(168,85,247,.4);
  background: linear-gradient(135deg, var(--surface) 60%, rgba(168,85,247,.08));
}
.skill-card.highlight:hover { border-color: var(--accent2); }

.skill-icon { font-size: 1.6rem; margin-bottom: .75rem; }
.skill-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; color: var(--text); }
.skill-card ul { list-style: none; }
.skill-card li {
  font-size: .875rem;
  color: var(--text-muted);
  padding: .2rem 0;
  border-bottom: 1px solid var(--border);
}
.skill-card li:last-child { border-bottom: none; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2));
  border-radius: 2px;
  opacity: .35;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: .4rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,142,247,.25);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  transition: border-color .2s;
}
.timeline-content:hover { border-color: rgba(79,142,247,.4); }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.job-header h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .2rem; }
.company { font-size: .875rem; color: var(--accent); font-weight: 500; }
.period { font-size: .8rem; color: var(--text-dim); white-space: nowrap; }

.timeline-content ul {
  list-style: none;
  margin-bottom: 1rem;
}
.timeline-content li {
  font-size: .9rem;
  color: var(--text-muted);
  padding: .25rem 0 .25rem 1rem;
  position: relative;
}
.timeline-content li::before {
  content: '›';
  position: absolute; left: 0;
  color: var(--accent);
  font-weight: 700;
}

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; }

@keyframes diamond-glint {
  0%   { left: -80%; }
  100% { left: 160%; }
}

.tag-list span {
  display: inline-block;
  font-size: .75rem;
  background: var(--accent-glow);
  border: 1px solid rgba(79,142,247,.35);
  color: var(--accent);
  padding: .2rem .65rem;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
}

.tag-list span::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 70%
  );
  transform: skewX(-15deg);
  animation: diamond-glint 4s ease-in-out infinite;
}

.tag-list span:nth-child(2)::after  { animation-delay: .2s; }
.tag-list span:nth-child(3)::after  { animation-delay: .4s; }
.tag-list span:nth-child(4)::after  { animation-delay: .6s; }
.tag-list span:nth-child(5)::after  { animation-delay: .8s; }
.tag-list span:nth-child(6)::after  { animation-delay: 1.0s; }
.tag-list span:nth-child(7)::after  { animation-delay: 1.2s; }
.tag-list span:nth-child(8)::after  { animation-delay: 1.4s; }
.tag-list span:nth-child(9)::after  { animation-delay: 1.6s; }

@media (prefers-reduced-motion: reduce) {
  .tag-list span::after { animation: none; }
}

/* ── Education ── */
#education .container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.edu-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 1.5rem !important;
  margin-top: 2rem !important;
  width: auto !important;
}

.edu-card {
  width: 280px !important;
  flex-shrink: 0 !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: border-color .2s, transform .2s;
}
.edu-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.edu-icon { font-size: 2rem; margin-bottom: 1rem; }
.edu-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.edu-school { font-size: .875rem; color: var(--text-muted); margin-bottom: .25rem; }
.edu-year { font-size: .8rem; color: var(--text-dim); }

/* ── Contact ── */
.contact-container { text-align: center; }
.contact-links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1rem; }

.contact-card {
  display: flex; align-items: center; gap: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--text);
  font-size: .95rem;
  transition: border-color .2s, transform .2s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.contact-card--linkedin:hover { border-color: #0A66C2; }
.contact-icon {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0;
}
.contact-icon svg { display: block; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: .85rem;
  border-top: 1px solid var(--border);
}

/* ── Scroll animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  nav ul { gap: 1rem; }
  nav ul a { font-size: .8rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .timeline { padding-left: 1.5rem; }
  .timeline-dot { left: -1.9rem; }
  .job-header { flex-direction: column; }
}
