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

:root {
  --bg: #0f1117;
  --bg-alt: #161b27;
  --surface: #1e2536;
  --border: #2a3248;
  --accent: #4f8ef7;
  --accent-dim: #3a6fd8;
  --text: #e2e8f0;
  --text-muted: #8899b4;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: #7db0ff; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 2rem;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-weight: 600; font-size: 1.05rem; color: var(--text); }
.nav nav { display: flex; gap: 2rem; }
.nav nav a { color: var(--text-muted); font-size: .9rem; font-weight: 500; transition: color .2s; }
.nav nav a:hover { color: var(--text); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: calc(var(--nav-h) + 3rem) 2rem 4rem;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(79,142,247,.12) 0%, transparent 70%);
}
.hero-content {
  display: flex; align-items: center; gap: 3.5rem;
  max-width: 900px; width: 100%;
}
.avatar {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover; object-position: center 20%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 32px rgba(79,142,247,.3);
  flex-shrink: 0;
  background: var(--surface);
}
.avatar-wrap {
  position: relative; flex-shrink: 0;
  width: 140px; height: 140px;
}
.avatar-fallback {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 32px rgba(79,142,247,.3);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 700; color: var(--accent);
  letter-spacing: -.02em;
  z-index: 0;
}
.avatar { position: relative; z-index: 1; }
.hero-label { font-size: .85rem; color: var(--accent); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.hero-text h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1.15; margin: .25rem 0 .5rem; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-muted); font-weight: 400; margin-bottom: .8rem; }
.hero-desc { color: var(--text-muted); max-width: 520px; font-size: .95rem; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: .65rem 1.5rem;
  border-radius: 8px; font-size: .9rem; font-weight: 600;
  transition: all .2s; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dim); color: #fff; transform: translateY(-1px); }
.btn-outline { border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.hero-badges {
  display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center;
  margin-top: 3rem;
}
.badge {
  padding: .3rem .85rem; border-radius: 99px;
  border: 1px solid var(--border);
  font-size: .8rem; color: var(--text-muted);
  font-family: var(--mono);
}

/* ── SECTIONS ── */
.section { padding: 5rem 2rem; }
.section-alt { background: var(--bg-alt); }
.container { max-width: 1000px; margin: 0 auto; }
.section-title {
  font-size: 1.7rem; font-weight: 700;
  margin-bottom: 2.5rem;
  position: relative; display: inline-block;
}
.section-title::after {
  content: ''; position: absolute; bottom: -8px; left: 0;
  width: 40px; height: 3px; background: var(--accent); border-radius: 2px;
}

/* ── ABOUT ── */
.about-grid { display: grid; grid-template-columns: 1fr 260px; gap: 3rem; align-items: start; }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; }
.about-text strong { color: var(--text); }
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.stat-num { font-size: 1.8rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: .4rem; }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-dot {
  position: absolute; left: -2rem; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-alt);
  box-shadow: 0 0 10px rgba(79,142,247,.4);
}
.timeline-body {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.timeline-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: .25rem; }
.timeline-role { font-weight: 600; font-size: 1rem; }
.timeline-period { font-size: .8rem; color: var(--accent); font-family: var(--mono); }
.timeline-org { display: block; font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }
.timeline-body p { font-size: .9rem; color: var(--text-muted); }

/* ── 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, transform .2s;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill-icon { font-size: 1.2rem; color: var(--accent); margin-bottom: .75rem; }
.skill-card h3 { font-size: .95rem; font-weight: 600; margin-bottom: .75rem; }
.skill-card ul { list-style: none; }
.skill-card ul li {
  font-size: .85rem; color: var(--text-muted);
  padding: .2rem 0;
  border-bottom: 1px solid var(--border);
}
.skill-card ul li:last-child { border-bottom: none; }

/* ── PROJECTS ── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  display: flex; flex-direction: column; gap: .75rem;
  transition: border-color .2s, transform .2s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.project-tag { font-size: .75rem; color: var(--accent); font-family: var(--mono); font-weight: 500; }
.project-card h3 { font-size: 1rem; font-weight: 600; }
.project-card p { font-size: .875rem; color: var(--text-muted); flex: 1; }
.project-stack { display: flex; gap: .5rem; flex-wrap: wrap; }
.project-stack span {
  font-size: .7rem; font-family: var(--mono);
  padding: .2rem .6rem; border-radius: 4px;
  background: rgba(79,142,247,.1); color: var(--accent);
  border: 1px solid rgba(79,142,247,.2);
}

/* ── CONTACT ── */
.contact-container { text-align: center; }
.contact-intro { color: var(--text-muted); margin-bottom: 2rem; max-width: 500px; margin-inline: auto; margin-bottom: 2rem; }
.contact-links { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.contact-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .9rem 2rem; border-radius: var(--radius);
  border: 1px solid var(--border); color: var(--text);
  font-weight: 500; font-size: .95rem;
  transition: all .2s;
}
.contact-item:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.contact-item svg { width: 18px; height: 18px; flex-shrink: 0; }

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

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .hero-content { flex-direction: column; text-align: center; gap: 1.5rem; }
  .hero-desc { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .nav nav { display: none; }
}
