
/* Palette: #041421 #042630 #4c7273 #86b9b0 #d0d6d6 */
:root {
  --bg:        #041421;
  --bg-alt:    #042630;
  --muted:     #4c7273;
  --accent:    #86b9b0;
  --text:      #d0d6d6;
  --max-width: 760px;
  --radius:    6px;
  --transition: 150ms ease;
  --header-h:  52px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Ubuntu', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Smooth scroll + offset for fixed header */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}
body { overflow-x: hidden; }

/* One-section-at-a-time: snap only when the home snap container is present */
html:has(.snap) {
  scroll-snap-type: y mandatory;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--text); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header / Nav */
.site-header {
  border-bottom: 1px solid var(--bg-alt);
  background: rgba(4, 20, 33, 0.85);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  height: var(--header-h);
  backdrop-filter: blur(6px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
}
.brand {
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.2px;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--accent); }

/* Snap sections: one viewport per section */
.snap-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 1.25rem) 1.25rem 1.5rem;
}
.section-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  animation: fadeUp 400ms ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .section-inner { animation: none; }
}

/* Hero */
.hero {
  text-align: center;
  align-items: center;
}
.hero > * { max-width: 600px; }
.avatar {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 1px solid var(--muted);
  background: var(--bg-alt);
  object-fit: cover;
  transition: transform 300ms ease;
  cursor: pointer;
}
.avatar:hover {
  transform: scale(1.2);
}
.hero-title {
  font-size: 1.65rem;
  font-weight: 500;
  margin: 0.25rem 0 0.15rem;
  color: var(--text);
  letter-spacing: 0.2px;
}
.hero-name {
  margin: 0;
  color: var(--accent);
  font-weight: 400;
  font-size: 1rem;
}
.hero-pitch {
  margin: 0.85rem auto 1.1rem;
  color: var(--text);
  opacity: 0.9;
  font-size: 0.98rem;
}
.hero-cta {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.btn:hover {
  background: var(--bg-alt);
  border-color: var(--accent);
  color: var(--accent);
}
.scroll-hint {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 1px;
  opacity: 0.7;
}

/* Standalone sections (list/single pages) need to clear the fixed header */
.section {
  padding: calc(var(--header-h) + 1.5rem) 0 2rem;
}

/* Section title */
.section-title {
  font-size: 1.05rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

.prose p { margin: 0 0 0.75rem; }
.prose p:last-child { margin-bottom: 0; }

/* CV list */
.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cv-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(76, 114, 115, 0.35);
  border-left: none;
  padding-left: 0;
  transition: all 200ms ease;
}
.cv-item:last-child { border-bottom: none; }
.cv-item.cv-continues {
  border-left: 2px solid var(--accent);
  border-bottom: none;
  padding-left: 0.85rem;
}
.cv-item.cv-group-end {
  border-bottom: 1px dashed rgba(76, 114, 115, 0.35);
}
.cv-meta {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.cv-role { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.cv-org  { color: var(--accent); font-size: 0.88rem; }
.cv-desc { color: var(--text); opacity: 0.85; font-size: 0.86rem; margin-top: 0.2rem; }

/* Blog */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { padding: 0.55rem 0; border-bottom: 1px dashed rgba(76, 114, 115, 0.35); }
.post-item:last-child { border-bottom: none; }
.post-link { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.post-title { color: var(--text); font-weight: 500; }
.post-link:hover .post-title { color: var(--accent); }
.post-date { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-excerpt { margin: 0.25rem 0 0; color: var(--text); opacity: 0.8; font-size: 0.9rem; }
.more-link { display: inline-block; margin-top: 0.5rem; font-size: 0.9rem; }

/* Contact */
.contact-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.contact-list a { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); }
.contact-list a:hover { color: var(--accent); }
.contact-list svg { color: var(--accent); flex-shrink: 0; }

/* Side dots indicator */
.dots {
  position: fixed;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 15;
}
.dots a {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--muted);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.dots a:hover { border-color: var(--accent); }
.dots a.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.25);
}

/* Footer (hidden on snap homepage to keep section-per-viewport) */
.site-footer {
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  border-top: 1px solid var(--bg-alt);
}
body.snap-mode .site-footer { display: none; }

/* Post / list pages: disable snap */
body.page-mode { /* normal scrolling */ }
body.page-mode .container { padding-top: calc(var(--header-h) + 1rem); }
.post header { margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 540px) {
  .cv-item { grid-template-columns: 1fr; gap: 0.15rem; }
  .cv-meta { font-size: 0.8rem; }
  .nav { padding: 0.5rem 1rem; }
  .nav-links { gap: 0.7rem; font-size: 0.85rem; }
  .hero-title { font-size: 1.3rem; }
  .post-link { flex-direction: column; gap: 0.1rem; }
  .dots { right: 0.5rem; }
}
