:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted-text: #475569;
  --surface: #f1f5f9;
  --border: #e2e8f0;
  --brand: #8b5cf6;
  --link: #2563eb;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
  --bg: #0b1020;
  --text: #e5e7eb;
  --muted-text: #94a3b8;
  --surface: #11172a;
  --border: #1f2937;
  --brand: #a78bfa;
  --link: #60a5fa;
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-user-theme]) {
    --bg: #0b1020;
    --text: #e5e7eb;
    --muted-text: #94a3b8;
    --surface: #11172a;
    --border: #1f2937;
    --brand: #a78bfa;
    --link: #60a5fa;
    --shadow: 0 2px 8px rgba(0,0,0,0.4);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(100% - 2rem, 1000px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}

.nav-links a[aria-current="page"] {
  background: var(--surface);
  border: 1px solid var(--border);
}

.theme-toggle {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  place-items: center;
  padding: 3rem 0 1rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin: 0;
  letter-spacing: 1px;
}

.typing::after {
  content: "|";
  margin-left: 4px;
  animation: caret 1s step-end infinite;
}

@keyframes caret {
  50% { opacity: 0; }
}

.about { padding: 2rem 0 3rem; }

.about-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
}

.avatar-wrapper { display: flex; align-items: flex-start; justify-content: center; }

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background-image: url('./photo.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.bio h1 { margin: 0 0 0.25rem; }
.lead { color: var(--muted-text); }

.socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.icon { width: 20px; height: 20px; fill: currentColor; }

.social:hover { outline: 2px solid var(--brand); }

.achievements { padding-bottom: 2rem; }
.achievements h2 { margin-top: 0; }
.badge {
  display: inline-block;
  background: color-mix(in srgb, var(--brand) 20%, transparent);
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin: 0.25rem 0 0.5rem;
}

.card-list {
  list-style: none;
  margin: 1rem 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: white;
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.qa { padding: 2rem 0 3rem; }
.qa h1 { margin-top: 0; }
.qa-block { margin-bottom: 1.5rem; }
.qa-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); margin: 0.75rem 0; }
.qa-item h2, .qa-item h3 { margin-top: 0; }
.qa-item.sources ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.qa-item ol { margin: 0.5rem 0 0; padding-left: 1.25rem; }

.reveal { opacity: 0; transform: translateY(12px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.show { opacity: 1; transform: none; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1rem 0;
  color: var(--muted-text);
}


