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

:root {
  --color-bg: #ffffff;
  --color-text: #0f0f0f;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;
  --color-border: #e5e7eb;
  --color-surface: #f9fafb;
  --color-accent: #0f172a;
  --color-accent-soft: #e0e7ff;
  --color-accent-alt: #67e8f9;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 960px;
  --radius: 16px;
}

html { scroll-behavior: smooth; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── NAV ────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  height: 58px;
  gap: 28px;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  color: var(--color-text);
  margin-right: auto;
  letter-spacing: -0.5px;
}

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

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

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

.btn-nav {
  background: var(--color-text);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1px;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.btn-nav:hover { opacity: 0.82; }

/* ── HERO ───────────────────────────────────────── */
#hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--color-border);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.2px;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
}

#hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 9vw, 80px);
  font-weight: 800;
  letter-spacing: -3.5px;
  line-height: 0.97;
  margin-bottom: 28px;
  color: var(--color-text);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.72;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.btn-primary {
  background: var(--color-text);
  color: #fff;
  padding: 14px 28px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: opacity 0.15s, transform 0.1s;
  display: inline-block;
  letter-spacing: 0.1px;
}

.btn-primary:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.btn-primary.btn-large {
  padding: 17px 36px;
  font-size: 17px;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  padding: 14px 28px;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid var(--color-border);
  transition: border-color 0.15s, background 0.15s;
  display: inline-block;
}

.btn-secondary:hover {
  border-color: #bbb;
  background: var(--color-surface);
}

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

.hero-badges span {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 5px 13px;
  border-radius: 100px;
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 500;
  letter-spacing: 0.1px;
}

/* ── SECTIONS ───────────────────────────────────── */
section {
  padding: 84px 0;
  border-bottom: 1px solid var(--color-border);
}

h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 44px;
  color: var(--color-text);
}

/* ── ABOUT ──────────────────────────────────────── */
.about-content {
  max-width: 660px;
  margin-bottom: 56px;
}

.about-content p {
  margin-bottom: 18px;
  color: #374151;
  line-height: 1.82;
  font-size: 16px;
}

.about-content strong { color: var(--color-text); }

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 24px;
  border-right: 1px solid var(--color-border);
}

.stat:last-child { border-right: none; }

.stat-number {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  color: var(--color-text);
}

.stat-label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 6px;
  line-height: 1.4;
}

/* ── PROJECTS ───────────────────────────────────── */
.projects-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  margin-top: 56px;
}

.projects-category:first-of-type { margin-top: 0; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.project-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.26s, border-color 0.26s, transform 0.2s;
  display: flex;
  flex-direction: column;
  background: linear-gradient(170deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-alt));
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.project-card::after {
  content: '';
  position: absolute;
  right: -90px;
  top: -90px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103, 232, 249, 0.22), transparent 70%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.project-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.1);
  transform: translateY(-4px);
}

.project-card:hover::before { opacity: 0.9; }

.project-card:hover::after { opacity: 1; }

.project-card > * {
  position: relative;
  z-index: 1;
}

/* Featured: subtle left accent */
.project-card.featured {
  border-color: #bfdbfe;
  background: linear-gradient(170deg, #ffffff 0%, #f5f9ff 100%);
}

/* Highlight: the single most important project */
.project-card.highlight {
  border-color: #a5b4fc;
  background: linear-gradient(165deg, #f8faff 0%, #eef2ff 100%);
}

.project-card.highlight:hover {
  box-shadow: 0 20px 44px rgba(49, 46, 129, 0.16);
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
  line-height: 1.2;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid #dbeafe;
  background: rgba(239, 246, 255, 0.8);
  font-size: 10px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.project-card p {
  font-size: 14px;
  color: #475569;
  line-height: 1.72;
  margin-bottom: 20px;
  flex: 1;
}

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

.project-stack span {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.1px;
}

@media (min-width: 920px) {
  .projects-grid .project-card.highlight { grid-column: span 2; }
}

/* ── SKILLS ─────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skill-group {
  padding: 24px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.skill-group:nth-child(4n) { border-right: none; }

.skill-group h3 {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--color-text);
}

.skill-group p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.72;
}

/* ── CONTACT ────────────────────────────────────── */
#contact { text-align: center; }

#contact h2 { margin-bottom: 14px; }

.contact-sub {
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.72;
}

.contact-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 24px;
}

.contact-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.15s;
}

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

/* ── FOOTER ─────────────────────────────────────── */
footer { padding: 32px 0; }

footer p {
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

footer a { color: var(--color-text-muted); text-decoration: none; }
footer a:hover { color: var(--color-text); }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 720px) {
  .nav-links { display: none; }
  #hero { padding: 60px 0; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) { border-right: 1px solid var(--color-border); }
  .about-stats .stat { border-bottom: 1px solid var(--color-border); }
  .about-stats .stat:nth-child(3),
  .about-stats .stat:nth-child(4) { border-bottom: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .skill-group:nth-child(2n) { border-right: none; }
  .skill-group:nth-child(4n) { border-right: 1px solid var(--color-border); }
}

@media (max-width: 420px) {
  .about-stats { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-group { border-right: none !important; }
}
