:root {
  --accent: #b794f6;
  --accent-alt: #f687b3;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-alt));
  --gradient-horizontal: linear-gradient(90deg, var(--accent), var(--accent-alt));
  --text: #e2e8f0;
  --muted: #94a3b8;
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --max-width: 960px;
}

[data-theme="light"] {
  --accent: #7c3aed;
  --accent-alt: #db2777;
  --text: #1e293b;
  --muted: #64748b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 8px 32px rgba(15, 23, 42, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  gap: 1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

.site-logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.theme-toggle,
.nav-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover,
.nav-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

:root .theme-toggle .icon-sun {
  display: inline;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: inline;
}

.nav-toggle {
  display: none;
  font-size: 1.25rem;
}

.site-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 768px) {
  .site-header .container {
    position: relative;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Hero */

.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .subtitle {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.hero .tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 36ch;
  margin-inline: auto;
}

/* Sections */

.section {
  padding: 2.5rem 0;
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.section-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: 0.5rem;
  border-radius: 2px;
  background: var(--gradient-horizontal);
}

/* Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.role-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.role-card .company {
  color: var(--accent);
  font-weight: 600;
}

.role-card p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.role-history {
  display: grid;
  gap: 1rem;
}

.role-card--current {
  position: relative;
  border-color: var(--accent);
}

.role-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: white;
  background: var(--gradient);
  border-radius: 999px;
}

.role-card--previous {
  opacity: 0.92;
}

.role-period {
  margin: 0 0 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-card--previous h3 {
  margin-top: 0;
}

.role-card--previous p:not(.role-period) {
  margin-top: 0.5rem;
}

.volunteer-card.role-card--current {
  border-color: var(--accent-alt);
}

.role-badge--volunteer {
  background: linear-gradient(135deg, var(--accent-alt), var(--accent));
}

/* Certifications */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .cert-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin-inline: auto;
  }
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.cert-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.cert-card img {
  width: 140px;
  margin-inline: auto;
}

.cert-card h3 {
  margin: 1rem 0 0.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.cert-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Technologies */

.section-intro {
  margin: -0.5rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 60ch;
}

.section-intro code {
  font-size: 0.8125rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.tech-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.tech-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tech-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.tech-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.tech-level {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.tech-meter {
  display: flex;
  gap: 0.25rem;
}

.tech-meter span {
  display: block;
  width: 1.125rem;
  height: 0.375rem;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s ease;
}

.tech-item[data-level="beginner"] .tech-meter span:nth-child(-n+1) {
  background: var(--muted);
}

.tech-item[data-level="intermediate"] .tech-meter span:nth-child(-n+2) {
  background: color-mix(in srgb, var(--accent) 50%, var(--border));
}

.tech-item[data-level="advanced"] .tech-meter span:nth-child(-n+3) {
  background: var(--accent);
}

.tech-item[data-level="specialist"] .tech-meter span:nth-child(-n+3) {
  background: var(--accent);
}

.tech-item[data-level="specialist"] .tech-meter span:nth-child(4) {
  background: var(--accent-alt);
}

.tech-item[data-level="expert"] .tech-meter span {
  background: var(--gradient-horizontal);
}

.tech-level-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 5.75rem;
  text-align: right;
}

.tech-item[data-level="expert"] .tech-level-label {
  color: var(--accent-alt);
}

.tech-item[data-level="specialist"] .tech-level-label {
  color: color-mix(in srgb, var(--accent) 55%, var(--accent-alt));
}

.tech-item[data-level="advanced"] .tech-level-label {
  color: var(--accent);
}

.tech-item[data-level="intermediate"] .tech-level-label {
  color: color-mix(in srgb, var(--accent) 65%, var(--muted));
}

.tech-item[data-level="beginner"] .tech-level-label {
  color: var(--muted);
}

@media (max-width: 480px) {
  .tech-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .tech-level {
    width: 100%;
    justify-content: space-between;
  }

  .tech-level-label {
    text-align: left;
  }
}

/* Link cards */

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 480px) {
  .link-grid {
    grid-template-columns: 1fr;
  }
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.link-card .icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--gradient);
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
}

.link-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.link-card p {
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* About page */

.about-content {
  max-width: 65ch;
}

.about-content p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.about-content h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.about-content h2:first-of-type {
  margin-top: 0;
}

.about-placeholder {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-style: italic;
}

/* Footer */

.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}
