:root {
  --bg: #08090c;
  --surface: #111319;
  --surface-2: #161923;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #f3f4f7;
  --text-muted: #9aa0ae;
  --text-dim: #666c7a;
  --accent: #4f8cff;
  --accent-strong: #79a6ff;
  --accent-tint: rgba(79,140,255,0.12);
  --accent-border: rgba(79,140,255,0.35);
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max-w: 980px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(79,140,255,0.16), transparent 60%),
    radial-gradient(ellipse 50% 35% at 100% 20%, rgba(177,108,255,0.10), transparent 60%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(8,9,12,0.72);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand-dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--text); }

.nav-cta { font-size: 13px; padding: 9px 16px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #06070a;
  box-shadow: 0 0 0 1px rgba(79,140,255,0.25), 0 12px 24px -8px rgba(79,140,255,0.45);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(79,140,255,0.35), 0 16px 30px -8px rgba(79,140,255,0.55) !important; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover { border-color: var(--accent-border); background: var(--accent-tint) !important; }

.btn-lg { padding: 15px 30px; font-size: 15px; }

/* ---------- Layout ---------- */

main { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; border-top: 1px solid var(--border); }

.section-eyebrow, .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
  margin: 0 0 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 40px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 140px 0 96px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.6vw, 58px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
}

.accent { color: var(--accent-strong); }

.hero-sub {
  max-width: 560px;
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 52ch;
}

.about-facts {
  display: grid;
  gap: 20px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.fact-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.fact-label {
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- Projects ---------- */

.projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project:hover { border-color: var(--border-strong); transform: translateY(-3px); }

.project-media {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, color-mix(in srgb, var(--pmark) 18%, transparent), transparent 70%),
    var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.project-mark { width: 56px; height: 56px; }

.project-mark-img {
  width: auto;
  height: 84px;
  object-fit: contain;
}

.project-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 14px; flex: 1; }

.project-head { display: flex; align-items: center; justify-content: space-between; }

.project-head h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: #4ade80;
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.3);
  padding: 4px 10px;
  border-radius: 20px;
}

.project-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 8px;
}

.project-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-strong);
  transition: color 0.15s ease;
}

.project-links a:hover { color: var(--text); }

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.skill-group h4 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Contact ---------- */

.contact-section { text-align: center; padding-bottom: 120px; }

.contact-section .section-eyebrow { display: block; }

.contact-sub {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 46ch;
  margin: 0 auto 36px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: revUp 0.6s ease forwards;
}

@keyframes revUp {
  to { opacity: 1; transform: translateY(0); }
}

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

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .projects { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero { padding: 110px 0 72px; }
  .section { padding: 72px 0; }
}
