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

:root {
  --bg: #0f1115;
  --bg-elev: #171a21;
  --bg-card: #1c2029;
  --text: #e8eaf0;
  --text-muted: #9aa3b2;
  --accent: #6c8cff;
  --accent-2: #9d7bff;
  --border: #262b36;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 1100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 21, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--bg-elev); }
.nav-links a.active { color: var(--text); background: var(--bg-card); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); }

/* ===== Hero ===== */
.hero {
  padding: 90px 0 70px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-elev); }

.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
}
.section-head p { color: var(--text-muted); margin-top: 8px; }

/* ===== Cards / Grid ===== */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }

.card .icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(108, 140, 255, 0.12);
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

.card .tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ===== About layout ===== */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: center;
}
.about-avatar {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 4rem;
  color: #fff;
  box-shadow: var(--shadow);
}
.about-body p { color: var(--text-muted); margin-bottom: 14px; }
.about-body h2 { font-size: 1.9rem; margin-bottom: 12px; letter-spacing: -0.02em; }

.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

ul.stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.stats .num { font-size: 1.8rem; font-weight: 700; color: var(--text); }
.stats .lbl { color: var(--text-muted); font-size: 0.85rem; }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-item::before {
  content: ""; position: absolute; left: -28px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.timeline-item h4 { font-size: 1.1rem; }
.timeline-item .when { color: var(--accent); font-size: 0.85rem; font-weight: 600; }
.timeline-item p { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.contact-info p { color: var(--text-muted); margin-bottom: 18px; }
.contact-info ul { list-style: none; }
.contact-info li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.contact-info li strong { color: var(--text); }

form { display: grid; gap: 14px; }
label { font-size: 0.9rem; color: var(--text-muted); }
input, textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--text-muted); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  color: var(--text-muted); font-size: 0.9rem;
}
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: var(--text); }

/* ===== Page banner ===== */
.page-banner { padding: 70px 0 40px; text-align: center; }
.page-banner h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
.page-banner p { color: var(--text-muted); margin-top: 10px; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 4px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  ul.stats { grid-template-columns: 1fr; }
}
