﻿:root {
  --bg: #f7f4ef;
  --ink: #1c1b1a;
  --muted: #5c5752;
  --accent: #caa877;
  --card: #ffffffcc;
  --stroke: #ded7cf;
  --shadow: 0 14px 40px rgba(20, 18, 16, 0.08);
  --radius: 18px;
}

body.theme-dark {
  --bg: #0f1012;
  --ink: #f1eee8;
  --muted: #b5b0a8;
  --accent: #d3b27b;
  --card: #1a1b1fdd;
  --stroke: #2b2d33;
  --shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  transition: background-color 0.35s ease, color 0.35s ease;
}

html {
  scroll-behavior: smooth;
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 400px at 10% 10%, rgba(246, 231, 208, 0.8) 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 15%, rgba(232, 240, 244, 0.8) 0%, transparent 60%),
    radial-gradient(700px 500px at 50% 100%, rgba(243, 239, 231, 0.9) 0%, transparent 55%);
  z-index: -1;
  transition: background 0.5s ease;
}

body.theme-dark .bg {
  background:
    radial-gradient(800px 400px at 10% 10%, rgba(118, 66, 70, 0.55) 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 15%, rgba(44, 52, 72, 0.6) 0%, transparent 60%),
    radial-gradient(700px 500px at 50% 100%, rgba(64, 46, 50, 0.7) 0%, transparent 55%);
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-family: "Source Serif 4", serif;
  font-size: 1.2rem;
}

.brand-sub {
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 12px;
}

.tab {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.tab.active,
.tab:hover {
  color: var(--ink);
  border-color: var(--stroke);
  background: var(--card);
}

.theme-toggle {
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}

.theme-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-icon svg {
  width: 20px;
  height: 20px;
}

.theme-icon-dark {
  display: none;
}

body.theme-dark .theme-icon-dark {
  display: inline-flex;
}

body.theme-dark .theme-icon-light {
  display: none;
}

.badge {
  padding: 6px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

body.theme-dark .badge {
  background: #17181c;
}

h1 {
  font-family: "Source Serif 4", serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin: 16px 0 8px;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 16px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 0.95rem;
  color: var(--muted);
}

.section {
  margin-top: 56px;
  scroll-margin-top: 120px;
}

.section h2 {
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 18px;
}

.cards {
  display: grid;
  gap: 18px;
}

.card {
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: #ffffffdd;
  box-shadow: var(--shadow);
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

body.theme-dark .card,
body.theme-dark .tab.active,
body.theme-dark .tab:hover,
body.theme-dark .theme-toggle {
  background: #17181c;
}

.card-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.card-sub {
  color: var(--muted);
  margin-top: 4px;
}

.card-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 0 10px;
}

.card ul {
  padding-left: 18px;
  margin: 10px 0 0;
}

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

.chips span {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  font-size: 0.9rem;
}

.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}

.about-photo {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.photo-frame {
  width: min(280px, 80vw);
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  background: #fff;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-caption {
  font-size: 0.85rem;
  color: var(--muted);
}

.mini-card {
  width: min(320px, 90vw);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--card);
  font-size: 0.9rem;
  color: var(--muted);
  display: grid;
  gap: 6px;
  text-align: center;
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.mini-title {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--muted);
}

.mini-links {
  display: grid;
  gap: 6px;
}

.mini-links a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: #fff;
  font-size: 0.85rem;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

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

.mini-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

body.theme-dark .mini-links a {
  background: #17181c;
}

.icon-link {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.icon .ci {
  width: 20px;
  height: 20px;
}

.icon .icon-dark {
  display: none;
}

body.theme-dark .icon .icon-dark {
  display: inline-block;
}

body.theme-dark .icon .icon-light {
  display: none;
}

.vitae-actions {
  display: flex;
  gap: 12px;
  margin: 12px 0 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.button.ghost {
  background: transparent;
  color: var(--ink);
}

.pdf-frame {
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .tabs {
    flex-wrap: wrap;
  }

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

  .meta {
    flex-direction: column;
  }
}
