:root {
  --bg: #0f1115;
  --bg-card: #171a21;
  --text: #eaeaea;
  --muted: #9aa1ac;
  --accent: #5eead4;
  --border: #262b35;
  --radius: 10px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

:root[data-theme="light"] {
  --bg: #f7f8fa;
  --bg-card: #ffffff;
  --text: #1c2027;
  --muted: #5b6270;
  --accent: #0f9d8f;
  --border: #e2e5ea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
}

.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

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

.hero {
  text-align: center;
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 2px solid var(--accent);
}

.hero h1 {
  font-size: 2.4rem;
  margin: 0 0 4px;
}

.subtitle {
  color: var(--accent);
  font-size: 1.1rem;
  margin: 0 0 12px;
  font-weight: 600;
}

.tagline {
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 20px;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-links a {
  color: var(--text);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.9rem;
  transition: 0.2s;
}

.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  padding: 48px 0;
}

section {
  margin-bottom: 48px;
}

h2 {
  font-size: 1.4rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 4px;
  margin-bottom: 24px;
}

#about-text {
  color: var(--muted);
}

.timeline-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.timeline-item .row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}

.timeline-item h3 {
  margin: 0;
  font-size: 1.1rem;
}

.timeline-item .org {
  color: var(--accent);
  font-weight: 500;
}

.timeline-item .dates {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.timeline-item ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.timeline-item ul li {
  margin-bottom: 4px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 10px;
}

.project-card a {
  color: var(--accent);
  font-size: 0.88rem;
  text-decoration: none;
}

.project-card a:hover {
  text-decoration: underline;
}

.empty-state {
  color: var(--muted);
  font-style: italic;
}

footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 500px) {
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 1.9rem; }
}
