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

:root {
  --bg: #1a1a1a;
  --bg-surface: #242424;
  --bg-surface-hover: #2c2c2c;
  --text: #e8e0d8;
  --text-muted: #9a9490;
  --accent: #c4726c;
  --accent-hover: #d4827c;
  --border: #333;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

a:hover {
  color: var(--accent-hover);
}

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

/* ── Hero ── */

.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--border);
  margin-bottom: 1.5rem;
  transition: border-color 0.3s ease;
}

.hero__avatar:hover {
  border-color: var(--accent);
}

.hero__name {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.hero__title {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero__links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hero__link:hover {
  border-color: var(--accent);
  background: var(--bg-surface);
  color: var(--text);
}

.hero__link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Sections ── */

section {
  padding: 3rem 0;
}

.section__heading {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section__heading::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 0.75rem;
  vertical-align: text-bottom;
}

/* ── Project Cards ── */

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.project-card__name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.project-card__link {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.project-card__link:hover {
  color: var(--accent);
}

.project-card__link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.project-card__desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  flex: 1;
}

.project-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.project-card__tag-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.project-card__tag-dot--typescript { background: #3178c6; }
.project-card__tag-dot--javascript { background: #f1e05a; }
.project-card__tag-dot--python { background: #3572a5; }

/* ── Advent of Code (compact) ── */

.aoc__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.aoc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.aoc-item:hover {
  border-color: var(--accent);
  background: var(--bg-surface-hover);
}

.aoc-item__info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.aoc-item__year {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.aoc-item__name {
  font-size: 0.95rem;
  color: var(--text);
}

.aoc-item__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.aoc-item__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.aoc-item__link {
  color: var(--text-muted);
}

.aoc-item__link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ── About ── */

.about__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.about__text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 60ch;
}

.about__skills-heading {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.about__skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.about__skill {
  padding: 0.35rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.about__skill:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ── Footer ── */

.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer__text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__text a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer__text a:hover {
  color: var(--accent);
}

/* ── Fade-in animation ── */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .hero {
    padding: 4rem 0 3rem;
  }

  .hero__name {
    font-size: 2rem;
  }

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

  .aoc-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .aoc-item__meta {
    width: 100%;
    justify-content: space-between;
  }
}
