:root {
  --bg: #0f1115;
  --bg-alt: #151821;
  --surface: #1b1f2a;
  --border: #2a2f3d;
  --text: #e8eaf0;
  --text-muted: #9aa1b2;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.12);
  --max-width: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

.container.narrow { max-width: 820px; }

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

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

.main-nav {
  display: flex;
  gap: 28px;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.main-nav a:hover { color: var(--text); text-decoration: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.lang-switch button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
}

.lang-switch button.active {
  background: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 0 9px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 110px 0 90px;
  border-bottom: 1px solid var(--border);
}

.hero-kicker {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 760px;
  margin-bottom: 22px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.12rem;
  max-width: 640px;
  margin-bottom: 34px;
}

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

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #3d7bf0; }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-meta {
  list-style: none;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Sections */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  position: relative;
  padding-left: 18px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.section-intro {
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 40px;
}

.about-text p { margin-bottom: 18px; color: var(--text); }
.about-text p:last-child { margin-bottom: 0; }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 40px; }

.timeline-item {
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 28px;
}

.timeline-period {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding-top: 3px;
  white-space: nowrap;
}

.timeline-body h3 { font-size: 1.08rem; margin-bottom: 12px; letter-spacing: -0.01em; }

.timeline-body ul { list-style: none; }

.timeline-body li {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
}

.timeline-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

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

.project-tags span {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.project-card h3 { font-size: 1.05rem; letter-spacing: -0.01em; }

.project-card p { color: var(--text-muted); font-size: 0.93rem; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 56px;
}

.skill-group h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 12px;
}

.skill-group ul { list-style: none; }

.skill-group li {
  color: var(--text-muted);
  font-size: 0.93rem;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.skill-group li:last-child { border-bottom: none; }

.education h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 14px;
}

.edu-item {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-child { border-bottom: none; }
.edu-item span { color: var(--text-muted); font-size: 0.92rem; }

/* Contact */
.contact { text-align: center; }
.contact .section-title { padding-left: 0; display: inline-block; }
.contact .section-title::before { display: none; }

.contact p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 28px;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.2rem, 3.5vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

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

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }

  .main-nav.open { display: flex; }

  .main-nav a { padding: 12px 24px; }

  .nav-toggle { display: flex; }

  .hero { padding: 70px 0 60px; }

  .section { padding: 60px 0; }

  .timeline-item { grid-template-columns: 1fr; gap: 8px; }

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