/* ===========================================================
   Georges Somboro Korogone — Portfolio
   Premium Utilitarian Minimalism & Editorial UI
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Geist+Mono:wght@400;500&display=swap');

/* ---------- Tokens ---------- */
:root {
  --bone: #FBFBFA;
  --canvas: #F7F6F3;
  --surface: #FFFFFF;
  --ink: #171717;
  --ink-soft: #2F3437;
  --muted: #787774;
  --border: #EAEAEA;
  --border-strong: rgba(0, 0, 0, 0.10);

  --pastel-blue-bg: #E1F3FE;
  --pastel-blue-fg: #1F6C9F;
  --pastel-green-bg: #EDF3EC;
  --pastel-green-fg: #346538;
  --pastel-yellow-bg: #FBF3DB;
  --pastel-yellow-fg: #956400;
  --pastel-red-bg: #FDEBEC;
  --pastel-red-fg: #9F2F2D;

  --font-serif: 'Newsreader', 'Playfair Display', serif;
  --font-sans: -apple-system, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', ui-monospace, monospace;

  --max-content: 1120px;
  --max-text: 760px;

  --shadow-hover: 0 2px 10px rgba(0, 0, 0, 0.045);
  --radius: 12px;
  --radius-sm: 6px;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bone: #121212;
  --canvas: #161615;
  --surface: #1A1A19;
  --ink: #F2F1ED;
  --ink-soft: #E4E2DC;
  --muted: #8C8A84;
  --border: #2A2A28;
  --border-strong: rgba(255, 255, 255, 0.12);

  --pastel-blue-bg: #162932;
  --pastel-blue-fg: #7FC2EE;
  --pastel-green-bg: #1B2A1C;
  --pastel-green-fg: #8FC392;
  --pastel-yellow-bg: #2E2614;
  --pastel-yellow-fg: #E3B95B;
  --pastel-red-bg: #2E1A1A;
  --pastel-red-fg: #E08B89;

  --shadow-hover: 0 2px 14px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

html[data-theme="solarized-light"] {
  --bone: #FDF6E3;
  --canvas: #EEE8D5;
  --surface: #FDF6E3;
  --ink: #002B36;
  --ink-soft: #586E75;
  --muted: #839496;
  --border: #D3CBB7;
  --border-strong: rgba(0, 0, 0, 0.08);

  --pastel-blue-bg: #E1F3FE;
  --pastel-blue-fg: #268BD2;
  --pastel-green-bg: #EDF3EC;
  --pastel-green-fg: #859900;
  --pastel-yellow-bg: #FBF3DB;
  --pastel-yellow-fg: #B58900;
  --pastel-red-bg: #FDEBEC;
  --pastel-red-fg: #DC322F;

  --shadow-hover: 0 2px 10px rgba(0, 0, 0, 0.03);
  color-scheme: light;
}

html[data-theme="solarized-dark"] {
  --bone: #002B36;
  --canvas: #073642;
  --surface: #002B36;
  --ink: #FDF6E3;
  --ink-soft: #93A1A1;
  --muted: #657B83;
  --border: #0A4F5F;
  --border-strong: rgba(255, 255, 255, 0.1);

  --pastel-blue-bg: #162932;
  --pastel-blue-fg: #268BD2;
  --pastel-green-bg: #1B2A1C;
  --pastel-green-fg: #859900;
  --pastel-yellow-bg: #2E2614;
  --pastel-yellow-fg: #B58900;
  --pastel-red-bg: #2E1A1A;
  --pastel-red-fg: #DC322F;

  --shadow-hover: 0 2px 14px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width:680px) {
  .wrap {
    padding: 0 20px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Focus visibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--pastel-blue-fg);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Scroll progress rail ---------- */
.scroll-rail {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  z-index: 60;
  background: transparent;
}

.scroll-rail-fill {
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width .08s linear;
}

/* ===========================================================
   Mobile app-like bottom navigation
   =========================================================== */
.bottom-nav {
  display: none;
}

@media (max-width:680px) {
  body {
    padding-bottom: 64px;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 55;
    background: color-mix(in srgb, var(--bone) 92%, transparent);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-between;
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 2px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.01em;
    transition: color .2s ease;
  }

  .bottom-nav-item svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
  }

  .bottom-nav-item.is-active {
    color: var(--ink);
  }

  /* hide desktop header nav cta + nav links on small screens, header becomes minimal */
  .site-header .nav-cta {
    display: none;
  }
}

/* ===========================================================
   Header
   =========================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bone) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand-mark {
  font-weight: 500;
}

.brand-coords {
  color: var(--muted);
  font-size: 13px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a {
  font-size: 14px;
  color: var(--muted);
  position: relative;
  padding: 4px 0;
  transition: color .2s ease;
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width .25s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s ease, transform .15s ease;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
}

.theme-toggle:active {
  transform: scale(0.94);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  stroke: var(--ink);
  display: none;
}

html[data-theme="light"] .icon-sun {
  display: block;
}

html[data-theme="dark"] .icon-moon {
  display: block;
}

html[data-theme="solarized-light"] .icon-solar-light {
  display: block;
}

html[data-theme="solarized-dark"] .icon-solar-dark {
  display: block;
}

.nav-cta {
  font-size: 13px;
  font-family: var(--font-mono);
  background: var(--ink);
  color: var(--bone);
  padding: 9px 16px;
  border-radius: 6px;
  transition: background-color .2s ease, transform .15s ease;
}

.nav-cta:hover {
  background: var(--ink-soft);
}

.nav-cta:active {
  transform: scale(0.98);
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink);
}

@media (max-width:880px) {
  .main-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--bone);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
    gap: 24px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }

  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .main-nav a {
    font-size: 20px;
    font-family: var(--font-serif);
    color: var(--ink);
  }

  .nav-toggle {
    display: flex;
  }
}

/* ===========================================================
   Hero
   =========================================================== */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

@media (max-width:680px) {
  .hero {
    padding: 32px 0 40px;
  }
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

html[data-theme="dark"] .hero-grid-bg {
  opacity: 0.35;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  position: relative;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pastel-blue-fg);
  background: var(--pastel-blue-bg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(8px);
  animation: heroIn .6s cubic-bezier(.16, 1, .3, 1) .05s forwards;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pastel-blue-fg);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

@keyframes heroIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 18px;
  opacity: 0;
  transform: translateY(10px);
  animation: heroIn .65s cubic-bezier(.16, 1, .3, 1) .14s forwards;
}

.hero-title {
  font-size: 19px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 0 28px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(10px);
  animation: heroIn .65s cubic-bezier(.16, 1, .3, 1) .24s forwards;
}

.hero-title strong {
  color: var(--ink-soft);
  font-weight: 500;
}

.hero-coords {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(10px);
  animation: heroIn .65s cubic-bezier(.16, 1, .3, 1) .32s forwards;
}

.hero-coords .sep {
  color: var(--border-strong);
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(10px);
  animation: heroIn .65s cubic-bezier(.16, 1, .3, 1) .4s forwards;
}

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

.hero-stat-num {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-stat-num::after {
  content: attr(data-suffix);
}

.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(10px);
  animation: heroIn .65s cubic-bezier(.16, 1, .3, 1) .48s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  padding: 13px 22px;
  border-radius: 6px;
  transition: background-color .2s ease, transform .15s ease, border-color .2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--ink);
  color: var(--bone);
}

.btn-primary:hover {
  background: var(--ink-soft);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
}

/* Hero portrait */
.hero-portrait {
  position: relative;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  animation: heroIn .75s cubic-bezier(.16, 1, .3, 1) .22s forwards;
  z-index: 1;
}

.portrait-glow {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(31, 108, 159, 0.45) 0%, rgba(31, 108, 159, 0) 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

html[data-theme="dark"] .portrait-glow {
  background: radial-gradient(circle, rgba(127, 194, 238, 0.3) 0%, rgba(127, 194, 238, 0) 70%);
}

html[data-theme="solarized-light"] .portrait-glow {
  background: radial-gradient(circle, rgba(38, 139, 210, 0.4) 0%, rgba(38, 139, 210, 0) 70%);
}

html[data-theme="solarized-dark"] .portrait-glow {
  background: radial-gradient(circle, rgba(38, 139, 210, 0.3) 0%, rgba(38, 139, 210, 0) 70%);
}

.portrait-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: transparent;
  border: none;
  padding: 0;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
}

.portrait-frame:hover {
  transform: translateY(-4px) scale(1.02);
}

.portrait-frame img {
  width: 100%;
  border-radius: 0;
  object-fit: contain;
  aspect-ratio: 3/4;
  filter: grayscale(0.08) contrast(1.03);
}

.portrait-tag {
  position: absolute;
  bottom: -16px;
  left: -16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  box-shadow: var(--shadow-hover);
  line-height: 1.5;
  opacity: 0;
  animation: heroIn .6s cubic-bezier(.16, 1, .3, 1) .65s forwards;
  z-index: 5;
}

.portrait-tag b {
  color: var(--ink);
  font-weight: 500;
  display: block;
  font-size: 12.5px;
  margin-bottom: 1px;
}

@media (max-width:880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-portrait {
    order: -1;
  }

  .portrait-frame {
    max-width: 260px;
    margin: 0 auto;
  }
}

/* ===========================================================
   Section shells
   =========================================================== */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

@media (max-width:680px) {
  .section {
    padding: 48px 0;
  }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.4vw, 42px);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  max-width: 560px;
}

.section-intro {
  max-width: 340px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

/* ============ About section ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.about-copy p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.domains-list,
.tech-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-soft);
}

.about-side h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-soft);
}

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

/* ===========================================================
   Projects — Bento
   =========================================================== */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  grid-column: span 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow .35s cubic-bezier(.16, 1, .3, 1), border-color .35s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
  opacity: 0;
  transform: translateY(12px);
}

.project-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease, border-color .35s ease;
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.project-card.span-2 {
  grid-column: span 2;
}

/* Card image background (covers card top to title) */
.card-image-bg {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--canvas);
}

.project-card.span-2 .card-image-bg {
  height: 200px;
}

.card-image-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .5s cubic-bezier(.16,1,.3,1);
}

.project-card:hover .card-image-bg img,
.article-card:hover .card-image-bg img {
  transform: scale(1.04);
}

/* Gradient overlay from image to card content */
.card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 30%,
    rgba(0,0,0,0.55) 100%
  );
  pointer-events: none;
}

/* Card body below the image */
.card-body {
  padding: 22px 28px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 9999px;
  white-space: nowrap;
}

.status-deployed {
  background: var(--pastel-green-bg);
  color: var(--pastel-green-fg);
}

.status-progress {
  background: var(--pastel-yellow-bg);
  color: var(--pastel-yellow-fg);
}

.status-research {
  background: var(--pastel-blue-bg);
  color: var(--pastel-blue-fg);
}

.project-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  transition: color .3s ease;
}

.project-card:hover .project-index {
  color: var(--pastel-blue-fg);
}

.project-name {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 9px;
}

.project-desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 18px;
  flex-grow: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.stack-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  background: var(--canvas);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 5px;
  transition: border-color .2s ease, color .2s ease;
}

.project-card:hover .stack-tag {
  border-color: var(--border-strong);
}

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

  .project-card.span-2 {
    grid-column: span 1;
  }
}

/* ===========================================================
   Experience — Ledger / timeline
   =========================================================== */
.ledger {
  border-top: 1px solid var(--border);
}

.ledger-row {
  display: grid;
  grid-template-columns: 140px 1fr 200px;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  opacity: 0;
  transform: translateY(10px);
}

.ledger-row.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .55s cubic-bezier(.16, 1, .3, 1), transform .55s cubic-bezier(.16, 1, .3, 1);
}

.ledger-period {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 3px;
}

.ledger-role {
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--ink);
  margin: 0 0 6px;
}

.ledger-desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 560px;
}

.ledger-org {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

@media (max-width:680px) {
  .ledger-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ledger-org {
    text-align: left;
  }
}

/* ===========================================================
   Skills strip
   =========================================================== */
.skills-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.skill-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
}

.skill-block h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.skill-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.skill-block li {
  font-size: 14px;
  color: var(--ink-soft);
}

@media (max-width:880px) {
  .skills-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:520px) {
  .skills-strip {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   Events — vertical timeline with markers
   =========================================================== */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.event-row {
  position: relative;
  padding-bottom: 36px;
  opacity: 0;
  transform: translateY(10px);
}

.event-row.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .55s cubic-bezier(.16, 1, .3, 1), transform .55s cubic-bezier(.16, 1, .3, 1);
}

.event-row:last-child {
  padding-bottom: 0;
}

.event-marker {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--ink);
}

.event-row[data-kind="initiative"] .event-marker {
  border-color: var(--pastel-blue-fg);
}

.event-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  transition: box-shadow .3s cubic-bezier(.16, 1, .3, 1), border-color .3s ease, transform .3s cubic-bezier(.16, 1, .3, 1);
}

.event-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
  transform: translateX(3px);
}

.event-main {
  flex: 1;
  min-width: 0;
}

.event-date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: block;
}

.event-title {
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.event-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 480px;
}

.event-place {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

@media (max-width:680px) {
  .event-card {
    flex-direction: column;
    gap: 10px;
  }

  .event-place {
    text-align: left;
  }
}

/* ===========================================================
   Articles — editorial list
   =========================================================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}

.article-card {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
  border-radius: 0;
}

.article-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .55s cubic-bezier(.16, 1, .3, 1), transform .55s cubic-bezier(.16, 1, .3, 1);
}

.article-card:hover {
  transform: translateY(-2px);
}

.article-card:nth-child(3n) {
  border-right: none;
}

/* Article card image */
.article-card .card-image-bg {
  height: 140px;
}

/* Article card text content */
.article-card .card-body {
  padding: 22px 28px 24px;
}

.article-card:nth-child(3n) .card-body {
  padding-right: 0;
}

.article-card:first-child .card-body,
.article-card:nth-child(3n+2) .card-body,
.article-card:nth-child(3n+3) .card-body {
  padding-left: 28px;
}

.article-card:first-child .card-body {
  padding-left: 0;
}



.article-category {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pastel-blue-fg);
  margin-bottom: 14px;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 12px;
  flex-grow: 1;
}

.article-excerpt {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.article-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-status .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pastel-yellow-fg);
}

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

  .article-card {
    border-right: none !important;
    padding: 24px 0 !important;
  }
}

/* ===========================================================
   Contact
   =========================================================== */
.contact-section {
  border-top: 1px solid var(--border);
  padding: 100px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-lead {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 24px;
}

.contact-sub {
  color: var(--muted);
  font-size: 15px;
  max-width: 420px;
  line-height: 1.65;
  margin: 0 0 32px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-soft);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: gap .2s ease, color .2s ease;
}

.contact-link:hover {
  color: var(--ink);
  gap: 18px;
}

.contact-link svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  flex-shrink: 0;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  padding: 13px 14px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--ink);
  resize: vertical;
  transition: border-color .2s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--border-strong);
}

.field textarea {
  min-height: 120px;
}

.form-note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 14px;
}

@media (max-width:880px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ===========================================================
   Footer
   =========================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-back-top {
  color: var(--muted);
  transition: color .2s ease;
}

.footer-back-top:hover {
  color: var(--ink);
}

/* ===========================================================
   Scroll-reveal generic
   =========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================================
   Skeleton Loaders — shimmer animation while data loads
   =========================================================== */
@keyframes skeletonPulse {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(
    90deg,
    var(--canvas) 25%,
    var(--border) 50%,
    var(--canvas) 75%
  );
  background-size: 800px 100%;
  animation: skeletonPulse 1.4s ease-in-out infinite;
  display: block;
}

/* Skeleton card (project / article) */
.skeleton-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  opacity: 1 !important;
  transform: none !important;
}

.skeleton-card .skeleton-img {
  width: 100%;
  height: 160px;
}

.skeleton-card.span-2 .skeleton-img {
  height: 200px;
}

.skeleton-card .skeleton-body {
  padding: 22px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-card .sk-line {
  height: 12px;
  border-radius: 4px;
}

.skeleton-card .sk-title {
  height: 20px;
  border-radius: 4px;
  width: 70%;
}

.skeleton-card .sk-badge {
  height: 22px;
  border-radius: 9999px;
  width: 72px;
}

/* Skeleton timeline row */
.skeleton-event {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px 28px;
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
}

.skeleton-event .sk-marker {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.skeleton-event .sk-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Skeleton ledger row */
.skeleton-ledger {
  display: grid;
  grid-template-columns: 140px 1fr 200px;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.skeleton-ledger .sk-line {
  height: 13px;
  border-radius: 4px;
}

/* Skeleton article card */
.skeleton-article {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.skeleton-article:nth-child(3n) {
  border-right: none;
}

.skeleton-article .skeleton-img {
  height: 140px;
}

.skeleton-article .skeleton-body {
  padding: 22px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===========================================================
   Error Toast Notification
   =========================================================== */
.error-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 9999;
  background: var(--pastel-red-bg);
  color: var(--pastel-red-fg);
  border: 1px solid var(--pastel-red-fg);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  opacity: 0;
  transition: transform .4s cubic-bezier(.16,1,.3,1), opacity .4s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
}

.error-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.error-toast svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  stroke: var(--pastel-red-fg);
}

.error-toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pastel-red-fg);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 0 0 0 8px;
  line-height: 1;
  opacity: 0.7;
}

.error-toast-close:hover { opacity: 1; }

/* ===========================================================
   Loading state — section-level
   =========================================================== */
.section-loading {
  pointer-events: none;
}

/* ===========================================================
   Admin trigger link in footer (minimal — links to admin.html)
   =========================================================== */
.admin-trigger-footer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--canvas);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.admin-trigger-footer:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

/* ===========================================================
   Admin page specific (only used in admin.html)
   =========================================================== */
/* intentionally empty — admin.html has its own styles */
/* ===========================================================
   Admin-mode compat shims (keep project-card padding when no image)
   =========================================================== */
.project-card.no-image,
.article-card.no-image {
  /* cards without images fall back to direct padding */
}
.project-card.no-image .card-body,
.article-card.no-image .card-body {
  /* normal padding already set */
}
/* Legacy admin-mode placeholders — for backward compat */
body.admin-mode [contenteditable="true"] {
  outline: 1px dashed var(--pastel-blue-fg);
  outline-offset: 4px;
  background: color-mix(in srgb, var(--pastel-blue-bg) 30%, transparent);
  cursor: text;
}
body.admin-mode [contenteditable="true"]:hover {
  background: color-mix(in srgb, var(--pastel-blue-bg) 60%, transparent);
}
body.admin-mode [contenteditable="true"]:focus {
  outline: 2px solid var(--pastel-blue-fg);
  background: var(--surface);
}

/* Admin floating toolbar */
.admin-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(150px);
  z-index: 1000;
  width: calc(100% - 32px);
  max-width: 760px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s, border-color 0.3s;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.admin-bar.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.admin-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}
.admin-dots {
  display: flex;
  gap: 6px;
}
.admin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.5;
}
.admin-dot:nth-child(1) { background: #FF5F56; opacity: 1; }
.admin-dot:nth-child(2) { background: #FFBD2E; opacity: 1; }
.admin-dot:nth-child(3) { background: #27C93F; opacity: 1; }

.admin-bar-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.admin-body {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.admin-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.admin-status-dot.active {
  background: var(--pastel-green-fg);
  box-shadow: 0 0 8px var(--pastel-green-fg);
}
.admin-actions {
  display: flex;
  gap: 10px;
}
.admin-btn {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  background: var(--canvas);
  color: var(--ink-soft);
}
.admin-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}
.admin-btn-primary {
  background: var(--ink);
  color: var(--bone);
  border-color: var(--ink);
}
.admin-btn-primary:hover {
  background: var(--ink-soft);
  color: var(--bone);
}

/* Card control overlays */
body.admin-mode .project-card,
body.admin-mode .ledger-row,
body.admin-mode .event-row,
body.admin-mode .article-card {
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}
body.admin-mode .project-card:hover,
body.admin-mode .ledger-row:hover,
body.admin-mode .event-row:hover,
body.admin-mode .article-card:hover {
  border-color: var(--pastel-blue-fg);
  box-shadow: var(--shadow-hover);
}

.item-admin-controls {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
  z-index: 10;
  box-shadow: var(--shadow-hover);
  gap: 2px;
}
body.admin-mode .project-card:hover .item-admin-controls,
body.admin-mode .ledger-row:hover .item-admin-controls,
body.admin-mode .event-row:hover .item-admin-controls,
body.admin-mode .article-card:hover .item-admin-controls {
  display: flex;
}
.item-admin-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  color: var(--muted);
  transition: background-color 0.2s, color 0.2s;
}
.item-admin-btn:hover {
  background: var(--canvas);
  color: var(--ink);
}
.item-admin-btn-delete:hover {
  background: var(--pastel-red-bg);
  color: var(--pastel-red-fg);
}

/* Add buttons */
.admin-add-btn {
  display: none;
  width: 100%;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  transition: all 0.2s ease;
}
body.admin-mode .admin-add-btn {
  display: flex;
}
.admin-add-btn:hover {
  border-color: var(--pastel-blue-fg);
  color: var(--pastel-blue-fg);
  background: var(--pastel-blue-bg);
}

/* Modal style */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  padding: 20px;
}
.admin-modal.is-active {
  display: flex;
}
.admin-modal-content {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.admin-modal-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}
.admin-modal-body {
  padding: 20px;
}
.admin-modal-body .field {
  margin-bottom: 14px;
}
.admin-modal-body .field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: var(--muted);
}
.admin-modal-body .field input,
.admin-modal-body .field textarea,
.admin-modal-body .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--canvas);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
}
.admin-modal-body .field input:focus,
.admin-modal-body .field textarea:focus,
.admin-modal-body .field select:focus {
  border-color: var(--pastel-blue-fg);
}
.admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Edit indicator button in page footer */
.admin-trigger-footer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--canvas);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}
.admin-trigger-footer:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

/* ===========================================================
   Services grid
   =========================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  background: var(--surface);
  transition: box-shadow .35s cubic-bezier(.16, 1, .3, 1), border-color .35s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
  opacity: 0;
  transform: translateY(12px);
}

.service-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease, border-color .35s ease;
}

.service-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.service-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 12px;
  transition: color .3s ease;
}

.service-card:hover .service-index {
  color: var(--pastel-blue-fg);
}

.service-title {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 10px;
}

.service-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

@media (max-width:880px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ===========================================================
   Project filters
   =========================================================== */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bone);
}