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

:root {
  --bg:           #0d1117;
  --bg-alt:       #161b22;
  --surface:      #1c2128;
  --border:       #30363d;
  --text:         #e6edf3;
  --muted:        #7d8590;
  --accent:       #58a6ff;
  --accent-dim:   rgba(88, 166, 255, 0.12);
  --accent-hover: #79b8ff;
  --font:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'JetBrains Mono', 'Fira Code', monospace;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent-hover); }

/* ── Layout ───────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.section      { padding: 96px 0; }
.section-alt  { background: var(--bg-alt); }

.section-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 56px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 44px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Navbar ───────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
  background: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(12px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--border);
}

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

.nav-logo {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.nav-logo:hover { color: var(--accent-hover); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.07;
}
.blob-1 {
  width: 580px; height: 580px;
  background: var(--accent);
  top: -120px; right: -80px;
  animation: float1 9s ease-in-out infinite;
}
.blob-2 {
  width: 380px; height: 380px;
  background: #3fb950;
  bottom: 0; left: -60px;
  animation: float2 11s ease-in-out infinite;
}
@keyframes float1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%       { transform: translate(-24px, 36px) scale(1.04); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%       { transform: translate(32px, -24px) scale(1.06); }
}

.hero-content {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 14px;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.2s forwards;
}

.hero-name {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.08;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.4s forwards;
}

.hero-role {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--muted);
  margin-bottom: 22px;
  min-height: 1.8em;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.6s forwards;
}
#roleText { color: var(--accent); font-weight: 500; }
.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-desc {
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.8s forwards;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 44px;
  opacity: 0;
  animation: fadeUp 0.5s ease 1s forwards;
}

.hero-socials {
  display: flex;
  gap: 20px;
  opacity: 0;
  animation: fadeUp 0.5s ease 1.2s forwards;
}
.hero-socials a {
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}
.hero-socials a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%       { transform: translateY(10px); opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #0d1117;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88,166,255,0.25);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── About ────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}
.about-text p {
  color: var(--muted);
  margin-bottom: 16px;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.about-tags span {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(88,166,255,0.25);
  padding: 4px 12px;
  border-radius: 20px;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover {
  border-color: rgba(88,166,255,0.5);
  transform: translateY(-3px);
}
.stat-num {
  display: block;
  font-family: var(--mono);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Skills ───────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
}
.skill-group h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 14px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 13px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
  cursor: default;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Timeline ─────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 36px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 44px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -30px;
  top: 10px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transition: background 0.2s;
}
.timeline-item:hover .timeline-dot { background: var(--accent); }

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.2s;
}
.timeline-item:hover .timeline-content {
  border-color: rgba(88,166,255,0.35);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.timeline-header h3 { font-size: 1rem; font-weight: 600; }

.timeline-company {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0;
}
.timeline-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.timeline-content > p:last-child {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 10px;
}

/* ── Projects ─────────────────────────────────── */
.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: 26px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.project-card:hover {
  border-color: rgba(88,166,255,0.45);
  transform: translateY(-4px);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.project-icon { color: var(--accent); }

.project-link-icon {
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}
.project-link-icon:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.project-card > p {
  color: var(--muted);
  font-size: 0.875rem;
  flex: 1;
  margin-bottom: 20px;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tech span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 9px;
  border-radius: 4px;
}

/* ── Education ────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.edu-card:hover {
  border-color: rgba(88,166,255,0.45);
  transform: translateY(-3px);
}
.edu-year {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 500;
}
.edu-card h3 {
  font-size: 0.97rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.edu-institution {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 10px;
}
.edu-card p:last-child {
  color: var(--muted);
  font-size: 0.84rem;
}

/* ── Contact ──────────────────────────────────── */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-info > p {
  color: var(--muted);
  margin-bottom: 32px;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.875rem;
  transition: color 0.2s;
}
.contact-link:hover { color: var(--accent); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 15px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
}
.form-note {
  font-size: 0.82rem;
  color: var(--muted);
  min-height: 1.2em;
}

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

/* ── Scroll Reveal ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(13,17,23,0.97);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 14px;
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .about-grid,
  .contact-wrapper { grid-template-columns: 1fr; gap: 36px; }

  .section        { padding: 68px 0; }
  .section-title  { font-size: 1.55rem; }

  .projects-grid  { grid-template-columns: 1fr; }

  .hero-actions { flex-direction: column; align-items: flex-start; }
}
