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

:root {
  --bg:         #f9fafb;
  --surface:    #ffffff;
  --surface-2:  #f3f4f6;
  --border:     #e5e7eb;
  --text:       #111827;
  --text-muted: #6b7280;
  --text-dim:   #d1d5db;

  --green:      #059669;
  --cyan:       #0284c7;
  --purple:     #7c3aed;
  --yellow:     #d97706;
  --pink:       #db2777;
  --orange:     #ea580c;
  --red:        #dc2626;

  --accent:     var(--cyan);
  --accent-dim: rgba(2, 132, 199, 0.08);

  --font-sans:  'Inter', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', monospace;
  --radius:     8px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body.dark {
  --bg:         #0d1117;
  --surface:    #161b22;
  --surface-2:  #1c2128;
  --border:     #2d333b;
  --text:       #cdd9e5;
  --text-muted: #768390;
  --text-dim:   #444c56;
  --accent:     var(--cyan);
  --accent-dim: rgba(2, 132, 199, 0.15);
}

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

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

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

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ───────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(249, 250, 251, 0.88);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

#navbar.scrolled {
  border-bottom-color: var(--border);
}

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

.nav-logo {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

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

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

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

#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  transition: all var(--transition);
}

#theme-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

#theme-toggle .icon-moon { display: none; }
#theme-toggle .icon-sun  { display: block; }

body.dark #theme-toggle .icon-moon { display: block; }
body.dark #theme-toggle .icon-sun  { display: none; }

/* ── Hero ─────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 24px 0;
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 16px;
  font-weight: 500;
  color: var(--cyan);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.hero-name {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(18px, 3vw, 30px);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 40px;
}

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

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--cyan);
  color: #fff;
}

.btn-primary:hover {
  background: #0369a1;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.3);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--green);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.15);
  transform: translateY(-2px);
}

/* ── Orbs ─────────────────────────────────────────────────── */
.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.18;
}

.orb-1 {
  width: 600px; height: 600px;
  background: var(--cyan);
  top: -200px; right: -100px;
}

.orb-2 {
  width: 400px; height: 400px;
  background: var(--purple);
  bottom: -100px; left: -100px;
}

/* ── Sections ─────────────────────────────────────────────── */
section { padding: 100px 0; }

.section-title {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  margin-bottom: 52px;
  color: var(--text);
}

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

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

.about-photo img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.about-text p {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  max-width: 560px;
}

.about-text p + p { margin-top: 14px; }

/* ── Projects ─────────────────────────────────────────────── */
#projects { background: var(--bg); }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 52px;
}

.section-header .section-title {
  margin-bottom: 0;
}

.github-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  transition: all var(--transition);
}

.github-profile-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

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

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

.project-icon { font-size: 26px; line-height: 1; }

.project-links {
  display: flex;
  gap: 12px;
}

.project-links a {
  color: var(--text-dim);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

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

.project-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.project-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.75;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 3px 10px;
}

.tag:nth-child(1) { color: var(--cyan);   background: rgba(121,192,255,0.1); }
.tag:nth-child(2) { color: var(--green);  background: rgba(63,185,80,0.1);   }
.tag:nth-child(3) { color: var(--purple); background: rgba(210,168,255,0.1); }
.tag:nth-child(4) { color: var(--yellow); background: rgba(227,179,65,0.1);  }
.tag:nth-child(5) { color: var(--pink);   background: rgba(247,120,186,0.1); }

.private-note {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── Skills ───────────────────────────────────────────────── */
#skills { background: var(--surface); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

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

.skill-group:nth-child(1) { border-top: 2px solid var(--cyan);   }
.skill-group:nth-child(2) { border-top: 2px solid var(--green);  }
.skill-group:nth-child(3) { border-top: 2px solid var(--purple); }
.skill-group:nth-child(4) { border-top: 2px solid var(--yellow); }

.skill-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.skill-group:nth-child(1) .skill-group-title { color: var(--cyan);   }
.skill-group:nth-child(2) .skill-group-title { color: var(--green);  }
.skill-group:nth-child(3) .skill-group-title { color: var(--purple); }
.skill-group:nth-child(4) .skill-group-title { color: var(--yellow); }

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.skill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skill-group:nth-child(1) .skill-dot { background: var(--cyan);   }
.skill-group:nth-child(2) .skill-dot { background: var(--green);  }
.skill-group:nth-child(3) .skill-dot { background: var(--purple); }
.skill-group:nth-child(4) .skill-dot { background: var(--yellow); }

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

.contact-content { max-width: 520px; }

.contact-text {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.about-contact {
  margin-top: 24px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}

.contact-link:first-child:hover {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 4px 12px rgba(5,150,105,0.1);
  transform: translateY(-2px);
}

.contact-link:nth-child(2):hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 4px 12px rgba(2,132,199,0.1);
  transform: translateY(-2px);
}

.contact-link:nth-child(3):hover {
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: 0 4px 12px rgba(124,58,237,0.1);
  transform: translateY(-2px);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
}

footer .accent { color: var(--green); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { display: flex; justify-content: center; }
  .nav-links { gap: 20px; }
}

@media (max-width: 480px) {
  .nav-links { display: none; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
}

/* ── Fade-in ──────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
