:root {
  --bg: #0f1115;
  --surface: #1a1d24;
  --border: #2a2e37;
  --text: #e8eaed;
  --muted: #9aa0aa;
  --accent: #4f8cff;
  --max-width: 880px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  position: relative;
}

.hero, main, footer {
  position: relative;
  z-index: 1;
}

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  text-align: center;
}

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

.hero h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
}

.tagline {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 1.25rem;
}

.about {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 560px;
  margin: 0 auto 1.75rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.btn {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--muted);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.skill {
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.projects-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 1.25rem;
  font-family: inherit;
  cursor: pointer;
}

.projects-toggle:hover {
  color: var(--text);
}

.projects-toggle .chevron {
  display: inline-block;
  transition: transform 0.25s ease;
}

.projects-toggle[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.projects-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.projects-panel.open {
  max-height: 1200px;
  opacity: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

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

.card h3 {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
}

.card p {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.card .lang {
  display: inline-block;
  font-size: 0.65rem;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--muted);
}
