:root {
  --bg: #0a0c10;
  --bg-soft: #11141b;
  --surface: #151922;
  --border: #232936;
  --text: #e6e9ef;
  --muted: #8b94a7;
  --accent: #5eead4;
  --accent-strong: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.12);
  --radius: 14px;
  --max: 980px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
.accent { color: var(--accent); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 5vw, 3rem);
  background: rgba(10, 12, 16, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__brand { font-family: var(--mono); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.5px; }
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 4px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ---------- Layout ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1rem, 5vw, 2rem); }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section__head { display: flex; align-items: baseline; gap: 0.9rem; margin-bottom: 2.2rem; }
.section__num { font-family: var(--mono); color: var(--accent); font-size: 0.95rem; }
.section__title { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; letter-spacing: -0.5px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 6rem clamp(1rem, 5vw, 2rem) 4rem;
}
.hero__inner { position: relative; z-index: 2; max-width: 720px; }
.hero__eyebrow { font-family: var(--mono); color: var(--muted); margin-bottom: 1rem; font-size: 0.95rem; }
.hero__title {
  font-size: clamp(2.8rem, 10vw, 5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 1.2rem;
  background: linear-gradient(120deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__lead { font-size: clamp(1.05rem, 2.5vw, 1.3rem); color: var(--muted); max-width: 580px; margin-bottom: 2.2rem; }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero__social { display: flex; gap: 1.5rem; list-style: none; flex-wrap: wrap; }
.hero__social a {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
  transition: color 0.2s;
}
.hero__social a::after {
  content: "↗"; font-size: 0.75rem; margin-left: 3px; opacity: 0.6;
}
.hero__social a:hover { color: var(--accent); }

.hero__glow {
  position: absolute;
  top: 15%; right: -10%;
  width: 50vw; height: 50vw;
  max-width: 600px; max-height: 600px;
  background: radial-gradient(circle, var(--accent-dim), transparent 65%);
  filter: blur(40px);
  z-index: 1;
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent-strong); color: #05201c; }
.btn--primary:hover { background: var(--accent); }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { padding: 0.95rem 2rem; font-size: 1.05rem; font-family: var(--mono); }

/* ---------- About ---------- */
.about { max-width: 720px; font-size: 1.08rem; color: var(--muted); }
.about p + p { margin-top: 1rem; }
.about strong { color: var(--text); font-weight: 600; }
.about__edu { font-family: var(--mono); font-size: 0.92rem; margin-top: 1.5rem; color: var(--text); }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover { border-color: var(--accent-strong); transform: translateY(-4px); }
.card__title { font-size: 1.05rem; margin-bottom: 1rem; font-weight: 600; }
.card__title .accent { font-family: var(--mono); margin-right: 0.4rem; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.32rem 0.7rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
}
.tags--sm li { font-size: 0.72rem; padding: 0.25rem 0.6rem; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s;
}
.project:hover { border-color: var(--accent-strong); transform: translateY(-4px); }
.project__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.project__name { font-size: 1.2rem; font-weight: 700; }
.project__icon { font-size: 1.4rem; }
.project__desc { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.2rem; flex: 1; }
.projects__more { margin-top: 2rem; text-align: center; }

/* ---------- Contact ---------- */
.section--contact { text-align: center; padding-bottom: 7rem; }
.section--contact .section__num { display: block; margin-bottom: 0.5rem; }
.contact__lead { color: var(--muted); max-width: 460px; margin: 0.8rem auto 2rem; font-size: 1.05rem; }
.contact__list { list-style: none; display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.contact__list a { font-family: var(--mono); font-size: 0.9rem; color: var(--muted); transition: color 0.2s; }
.contact__list a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 2rem 1rem; text-align: center; }
.footer p { color: var(--muted); font-size: 0.85rem; font-family: var(--mono); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .nav__links {
    position: fixed;
    top: 60px; right: 0;
    flex-direction: column;
    gap: 1.2rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 0 0 0 var(--radius);
    padding: 1.5rem 2rem;
    transform: translateX(110%);
    transition: transform 0.3s ease;
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__toggle { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
