/* --- Variables (dark default) --- */
:root {
  --bg: #0c0d0e;
  --bg-elevated: #141618;
  --text: #e6e8eb;
  --text-muted: #8b9199;
  --accent: #3b9b7a;
  --accent-hover: #4db892;
  --accent-tint-15: color-mix(in srgb, var(--accent) 15%, transparent);
  --accent-tint-6: color-mix(in srgb, var(--accent) 6%, transparent);
  --accent-tint-25: color-mix(in srgb, var(--accent) 25%, transparent);
  --accent-tint-30: color-mix(in srgb, var(--accent) 30%, transparent);
  --border: rgba(255, 255, 255, 0.06);
  --radius: 8px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --header-h: 72px;
  --container: min(92vw, 960px);
}

/* --- Light theme --- */
html.theme-light {
  color-scheme: light;
  --bg: #f5f6f7;
  --bg-elevated: #ffffff;
  --text: #1a1c1e;
  --text-muted: #5c6269;
  --accent: #2d7a5f;
  --accent-hover: #3b9b7a;
  --border: rgba(0, 0, 0, 0.08);
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }
.skip-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html.nav-open {
  overflow: hidden;
  touch-action: none;
}
html.nav-open body {
  overflow: hidden;
  touch-action: none;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
address { font-style: normal; }

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  transform: translateY(16px);
}
.animate-in.visible {
  animation: fadeUp 0.6s ease forwards;
}

/* Stagger children */
.about-grid .about-content,
.about-grid .about-meta { opacity: 0; }
.about-grid.visible .about-content,
.about-grid.visible .about-meta { animation: fadeUp 0.6s ease 0.1s forwards; }
.project-grid .project-card.visible { animation: fadeUp 0.5s ease forwards; }
.project-grid .project-card.visible:nth-child(1) { animation-delay: 0s; }
.project-grid .project-card.visible:nth-child(2) { animation-delay: 0.06s; }
.project-grid .project-card.visible:nth-child(3) { animation-delay: 0.12s; }
.project-grid .project-card.visible:nth-child(4) { animation-delay: 0.18s; }
.project-grid .project-card.visible:nth-child(5) { animation-delay: 0.24s; }
.project-grid .project-card.visible:nth-child(6) { animation-delay: 0.3s; }
.project-grid .project-card.visible:nth-child(7) { animation-delay: 0.36s; }
.project-grid .project-card.visible:nth-child(8) { animation-delay: 0.42s; }
.project-grid .project-card.visible:nth-child(9) { animation-delay: 0.48s; }
.project-grid .project-card.visible:nth-child(10) { animation-delay: 0.54s; }
.project-grid .project-card.visible:nth-child(11) { animation-delay: 0.6s; }
.project-grid .project-card.visible:nth-child(12) { animation-delay: 0.66s; }
.project-grid .project-card.visible:nth-child(13) { animation-delay: 0.72s; }
.project-grid .project-card.visible:nth-child(14) { animation-delay: 0.78s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.scroll-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  margin-left: 4px;
  animation: float 2s ease-in-out infinite;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
.reduce-motion .animate-in.visible {
  animation: none;
  opacity: 1;
  transform: translateY(0);
}
.reduce-motion .scroll-icon { animation: none; }
.reduce-motion .hero-bg { animation: none; }

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg-elevated);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}
html:not(.theme-light) .header {
  background: rgba(12, 13, 14, 0.85);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { color: var(--accent); text-decoration: none; }
.logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.nav-current { color: var(--accent); font-weight: 600; }
.nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.lang-switcher {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang-btn {
  padding: 0.35rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-btn:hover { color: var(--text); background: var(--bg-elevated); }
.lang-btn.active {
  background: var(--accent);
  color: var(--bg);
}
.lang-btn.active:hover { background: var(--accent-hover); color: var(--bg); }
.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.menu-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* --- Accent color picker --- */
.accent-picker-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  background: var(--bg-elevated);
}
.accent-picker-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  transition: background 0.2s;
}
.accent-picker-label:hover {
  background: rgba(255, 255, 255, 0.03);
}
html.theme-light .accent-picker-label:hover {
  background: rgba(0, 0, 0, 0.04);
}
.accent-picker-label:focus-within,
.accent-picker-label:focus-visible {
  outline: none;
}
.accent-picker-swatch {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.15s;
}
.accent-picker-label:hover .accent-picker-swatch {
  border-color: var(--accent-tint-25);
}
.accent-picker-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  appearance: none;
}
.accent-picker-input:focus {
  outline: none;
}
.accent-picker-wrap:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.accent-reset {
  width: 36px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  font-family: var(--font-mono);
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.accent-reset:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.03);
}
html.theme-light .accent-reset:hover {
  background: rgba(0, 0, 0, 0.04);
}
.accent-reset:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Custom color picker popover */
.accent-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  width: 220px;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.theme-light .accent-picker-popover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.accent-picker-popover[hidden] {
  display: none !important;
}
.accent-picker-sl {
  width: 100%;
  height: 120px;
  border-radius: 6px;
  cursor: crosshair;
  position: relative;
  background: linear-gradient(to bottom, transparent, black), linear-gradient(to right, white, var(--accent-picker-hue-color, #3b9b7a));
}
.accent-picker-sl-cursor {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transform: translate(-50%, -50%);
  top: 30%;
  left: 50%;
}
.accent-picker-hue-wrap {
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(to right, #ff0000, #ff8800, #ffff00, #88ff00, #00ff00, #00ff88, #00ffff, #0088ff, #0000ff, #8800ff, #ff0088, #ff0000);
  position: relative;
}
.accent-picker-hue-thumb {
  position: absolute;
  left: 44%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.accent-picker-hue {
  position: absolute;
  inset: -4px 0;
  width: 100%;
  height: 18px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.accent-cycle-btn {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.accent-cycle-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: var(--accent);
}
.accent-cycle-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-contrast, #fff);
  border-color: var(--accent);
}
.accent-cycle-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.accent-picker-hex-wrap {
  display: flex;
  align-items: center;
}
.accent-picker-hex {
  width: 100%;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.accent-picker-hex:focus {
  outline: none;
  border-color: var(--accent);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.theme-toggle:hover {
  color: var(--text);
  background: var(--bg-elevated);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle .theme-toggle-icon {
  display: block;
  line-height: 0;
}
.theme-toggle .theme-icon-moon,
html.theme-light .theme-toggle .theme-icon-sun {
  display: none;
}
html.theme-light .theme-toggle .theme-icon-moon {
  display: block;
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100vw;
    min-width: 100vw;
    height: calc(100vh - var(--header-h));
    min-height: calc(100vh - var(--header-h));
    z-index: 40;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 2rem 1.5rem 3rem;
    gap: 0.75rem;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav.show { transform: translateX(0); }
  .nav a {
    font-size: 1.125rem;
    padding: 0.75rem 0;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  .nav a:first-of-type { margin-top: 0.5rem; }
  .nav a:hover { color: var(--accent); text-decoration: none; }
  .nav .lang-switcher {
    margin-top: auto;
    padding: 1rem 1.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    align-self: center;
    width: auto;
    min-width: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0;
  }
  .nav .lang-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    flex-shrink: 0;
  }
  .nav .accent-picker-wrap {
    align-self: center;
  }
  .nav .theme-toggle {
    align-self: center;
    margin-bottom: 0.25rem;
  }
  .menu-btn {
    display: flex;
    position: relative;
    z-index: 60;
  }
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--header-h) 1.5rem 4rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-tint-15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, var(--accent-tint-6), transparent);
  pointer-events: none;
}
html.theme-light .hero-bg {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-tint-15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, var(--accent-tint-6), transparent);
}
@keyframes heroBgShift {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.92; transform: scale(1.02); }
}
.hero-bg {
  animation: heroBgShift 12s ease-in-out infinite;
}
.reduce-motion .hero-bg { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
}
.hero-inner {
  position: relative;
  text-align: center;
  z-index: 1;
}
.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 500;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--accent);
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.hero-tagline {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0 0 2rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}
.btn-primary:hover { background: var(--accent-hover); color: var(--bg); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-decoration: none;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); text-decoration: none; }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Sections --- */
.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 2rem;
  letter-spacing: -0.02em;
  position: sticky;
  top: var(--header-h);
  z-index: 1;
  background: var(--bg);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

/* --- About --- */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-bottom: 0;
}
.lead {
  font-size: 1.1rem;
  color: var(--text);
  margin: 0 0 1rem;
}
.about-content p:last-child { margin: 0; color: var(--text-muted); }

.meta-cards {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 640px) {
  .meta-cards { grid-template-columns: repeat(3, 1fr); }
}
.meta-card {
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.meta-card:hover {
  border-color: var(--accent-tint-25);
}
.meta-card-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.meta-card-value {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.bullet-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
/* --- Highlights (skills) --- */
.section.highlights .highlights-intro {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 540px;
}
.highlights-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .highlights-grid { grid-template-columns: repeat(2, 1fr); }
}
.highlights-grid li {
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.2s;
}
.highlights-grid li { opacity: 0; }
.highlights-grid.visible li { animation: fadeUp 0.5s ease forwards; }
.highlights-grid.visible li:nth-child(1) { animation-delay: 0.05s; }
.highlights-grid.visible li:nth-child(2) { animation-delay: 0.1s; }
.highlights-grid.visible li:nth-child(3) { animation-delay: 0.15s; }
.highlights-grid.visible li:nth-child(4) { animation-delay: 0.2s; }
.highlights-grid.visible li:nth-child(5) { animation-delay: 0.25s; }
.highlights-grid.visible li:nth-child(6) { animation-delay: 0.3s; }
.highlights-grid.visible li:nth-child(7) { animation-delay: 0.35s; }
.highlights-grid.visible li:nth-child(8) { animation-delay: 0.4s; }
.highlights-grid.visible li:nth-child(9) { animation-delay: 0.45s; }
.highlights-grid.visible li:nth-child(10) { animation-delay: 0.5s; }
.highlights-grid li:hover { border-color: var(--accent-tint-25); }
.highlight-label {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}
.highlight-detail {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.projects-intro {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

/* --- Experience --- */
.job {
  margin-bottom: 2.5rem;
}
.job-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}
.job-company {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}
.job-role {
  color: var(--accent);
  font-size: 0.95rem;
}
.job-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: auto;
}
.job-desc {
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.job-list { margin: 0; }
.education p { margin: 0 0 0.5rem; color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }

/* --- Projects --- */
.project-grid {
  display: grid;
  gap: 1.25rem;
  grid-auto-rows: 1fr;
}
@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .project-grid { grid-template-columns: repeat(3, 1fr); }
}
.project-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.project-card:hover {
  border-color: var(--accent-tint-30);
  transform: translateY(-2px);
}
.project-name {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  color: var(--text);
  flex-shrink: 0;
}
.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  flex: 1;
  min-height: 0;
}

/* --- Contact --- */
.contact-inner { text-align: center; max-width: 420px; margin: 0 auto; }
.contact-text { color: var(--text-muted); margin: 0 0 1.5rem; }
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.contact-details a {
  color: var(--accent);
  font-weight: 500;
}
.contact-details span { color: var(--text-muted); font-size: 0.95rem; }

/* --- Back to top --- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: color 0.2s, background 0.2s, transform 0.2s, border-color 0.2s;
}
.back-to-top:hover {
  color: var(--accent);
  border-color: var(--accent-tint-30);
}
.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.back-to-top[hidden] {
  display: none;
}

/* --- Footer --- */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

/* --- Print --- */
@media print {
  :root {
    --bg: #ffffff;
    --bg-elevated: #f5f6f7;
    --text: #1a1c1e;
    --text-muted: #5c6269;
    --accent: #2d7a5f;
    --border: rgba(0, 0, 0, 0.1);
  }
  .header {
    position: static;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
  }
  .theme-toggle,
  .accent-picker-wrap,
  .menu-btn,
  .back-to-top,
  .hero-scroll {
    display: none !important;
  }
  .section {
    break-inside: avoid;
  }
  .section-title {
    position: static;
    background: transparent;
  }
  .hero-bg { display: none; }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: var(--text-muted);
  }
  .nav { display: flex; }
}
