/* ---------- Theme tokens ---------- */
:root {
  /* Palette borrowed from Lismova (Charcoal & Orange) */
  --bg: #fdf8f3; /* cream */
  --bg-soft: #f2ebe1; /* sand */
  --surface: #ffffff;
  --border: #e8e0d5; /* stone */
  --text: #1c1917; /* ink */
  --text-soft: #6f6457;
  --text-faint: #9a8f80;
  --accent: #ea6c0a; /* orange */
  --accent-soft: #fcefe1;
  --radius: 14px;
  --maxw: 760px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] {
  --bg: #1c1917; /* charcoal */
  --bg-soft: #2c2825; /* ash */
  --surface: #3d3730; /* ember (elevated) */
  --border: #3d3730;
  --text: #f0ede6; /* parchment */
  --text-soft: #b8ae9f;
  --text-faint: #847c72;
  --accent: #f97316; /* orange (lighter in dark for contrast) */
  --accent-soft: #2c1800;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav__brand {
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
  font-size: 18px;
}
.nav__links {
  margin-left: auto;
  display: flex;
  gap: 22px;
}
.nav__links a {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
}
.nav__links a:hover {
  color: var(--text);
  text-decoration: none;
}
.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.theme-toggle:hover {
  border-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
.hero__eyebrow {
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 8px;
}
.hero__title {
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.hero__lead {
  color: var(--text-soft);
  font-size: 18px;
  margin: 0 0 26px;
  max-width: 48ch;
}
.hero__photo img {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}
.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.hero__meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 14px;
  color: var(--text-soft);
}
.hero__meta li span {
  display: block;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
html[data-theme="dark"] .btn--primary {
  color: #1c1917;
}
.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent);
}

/* ---------- Sections ---------- */
.section {
  padding: 44px 0;
  border-top: 1px solid var(--border);
}
.section__title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  font-weight: 700;
  margin: 0 0 24px;
}
.prose p {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 17px;
}
.prose strong {
  color: var(--text);
}

/* ---------- Experience timeline ---------- */
.entry {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.entry:first-child {
  border-top: none;
}
.entry__date {
  font-size: 13px;
  color: var(--text-faint);
  font-weight: 600;
  padding-top: 3px;
}
.entry__role {
  font-weight: 700;
  font-size: 18px;
  margin: 0;
}
.entry__org {
  color: var(--accent);
  font-weight: 600;
}
.entry__desc {
  color: var(--text-soft);
  margin: 8px 0 10px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------- Side projects ---------- */
.project {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.project:first-child {
  border-top: none;
}
.project__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.project__name {
  font-weight: 700;
  font-size: 18px;
  margin: 0;
}
.project__type {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}
.project__desc {
  color: var(--text-soft);
  margin: 6px 0 10px;
}
.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
}
.project__links a::after {
  content: " ↗";
  font-weight: 400;
  color: var(--text-faint);
}

/* ---------- Featured project (Lismova) ---------- */
.feature__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.feature__icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px;
  flex-shrink: 0;
  image-rendering: pixelated; /* keep the pixel-art fox crisp */
}
.feature__name {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  letter-spacing: -0.01em;
}
.feature__tagline {
  margin: 0;
  color: var(--text-soft);
  font-weight: 500;
}
.badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 3px 9px;
  border-radius: 999px;
}
.shots {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  margin: 18px 0 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots img {
  height: 420px;
  width: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ---------- Contact ---------- */
.contact__list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.contact__list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}
.contact__list a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}
.footer a {
  color: var(--text-soft);
}

/* ---------- Legal / privacy pages ---------- */
.legal {
  padding: 56px 0 24px;
}
.legal h1 {
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.legal .updated {
  color: var(--text-faint);
  font-size: 14px;
  margin: 0 0 32px;
}
.legal h2 {
  font-size: 19px;
  margin: 30px 0 10px;
}
.legal p,
.legal li {
  color: var(--text-soft);
  font-size: 16px;
}
.legal a.back {
  display: inline-block;
  margin-bottom: 24px;
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 48px;
  }
  .hero__photo {
    order: -1;
    display: flex;
    justify-content: center;
  }
  .hero__lead {
    margin-inline: auto;
  }
  .hero__actions,
  .hero__meta {
    justify-content: center;
  }
  .nav__links {
    display: none;
  }
  .entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
