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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-alt: #1c2431;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-dim: #1f6feb;
  --success: #3fb950;
  --danger: #f85149;
  --radius: 12px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
}

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

/* ── Nav ──────────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }

#navbar ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

#navbar ul a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
#navbar ul a:hover { color: var(--text); text-decoration: none; }
#navbar ul a.active { color: var(--accent); }

/* ── Sections ─────────────────────────────────────────────────────────── */
section { min-height: 100vh; display: flex; align-items: center; }
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px;
  width: 100%;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 48px;
  position: relative;
  display: inline-block;
}
h2::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0;
  width: 40px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 max(24px, calc((100vw - 1100px) / 2));
  padding-top: var(--nav-h);
  position: relative;
}

.hero-greeting {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

#hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-role {
  color: var(--accent);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.hero-tagline {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin-bottom: 20px;
  max-width: 580px;
  line-height: 1.7;
}

.hero-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-spec {
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  background: var(--surface);
  letter-spacing: 0.01em;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.btn-primary:hover { background: #79b8ff; text-decoration: none; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}
.btn-outline:hover { background: rgba(88,166,255,0.08); text-decoration: none; transform: translateY(-1px); }

.btn-linkedin {
  background: #0a66c2;
  color: #fff;
  gap: 8px;
}
.btn-linkedin:hover { background: #0958a8; text-decoration: none; transform: translateY(-1px); }

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
  gap: 10px;
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0a66c2;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 8px;
}
.linkedin-link:hover { color: #0958a8; text-decoration: none; }

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 1.4rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ── About ────────────────────────────────────────────────────────────── */
#about { background: var(--surface); }

.about-intro {
  max-width: 740px;
  margin-bottom: 48px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
}
.about-text strong { color: var(--text); }

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

.skill-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

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

.skill-tag {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
}

/* ── Projects ─────────────────────────────────────────────────────────── */
.project-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.project-grid + .project-section-label {
  margin-top: 48px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.project-grid--featured {
  grid-template-columns: minmax(320px, 700px);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.card-icon { font-size: 1.5rem; }
.card-header h3 { font-size: 1.2rem; font-weight: 700; }

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.card p strong { color: var(--text); }

.card-highlights {
  list-style: none;
  margin: 12px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-highlights li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.card-highlights li strong { color: var(--text); }

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

.card-links {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}
.card-link:hover { color: var(--accent); text-decoration: none; }

.tag {
  background: rgba(88,166,255,0.1);
  color: var(--accent);
  border: 1px solid rgba(88,166,255,0.2);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ── Contact ──────────────────────────────────────────────────────────── */
#contact { background: var(--surface); }

.contact-sub {
  color: var(--text-muted);
  margin-top: -32px;
  margin-bottom: 40px;
}

#contact-form {
  max-width: 680px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; }

#submit-btn {
  background: var(--accent);
  color: #0d1117;
  border: none;
  border-radius: 8px;
  padding: 13px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}
#submit-btn:hover { background: #79b8ff; transform: translateY(-1px); }
#submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

#form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  min-height: 1.4em;
}
#form-status.success { color: var(--success); }
#form-status.error { color: var(--danger); }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .skills-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  #hero { align-items: center; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-stack { justify-content: center; }
  .hero-scroll { display: none; }
}
