/* ==========================================================================
   MERBEBNA — Michael Araya Etbarekh: Professional Biography & Living Archive
   Design system: premium editorial + museum archive + executive portfolio.
   Warm off-white ground, dark green accent, large editorial serif display
   type, generous whitespace, subtle motion. No animation libraries — all
   scroll-reveal / parallax is native IntersectionObserver + CSS transforms
   (see js/main.js).
   ========================================================================== */

:root {
  /* Warm neutral / off-white ground */
  --bg: #f7f4ec;
  --bg-alt: #efe9db;
  --bg-card: #fffdf8;
  --line: #ddd5c0;
  --line-soft: #e8e2d2;

  /* Ink */
  --ink: #211f18;
  --ink-soft: #55503f;
  --ink-faint: #85806c;

  /* Dark green accent */
  --green: #1e3a2b;
  --green-deep: #12261b;
  --green-tint: #e2e8de;
  --green-tint-2: #d3ddcb;

  /* Archive / parchment accent (documents, evidence tags) */
  --parchment: #efe6cf;
  --parchment-line: #cdbd8f;
  --sepia: #7a6a3f;

  /* Signal (used sparingly) */
  --rust: #8a4a30;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1180px;
  --radius: 4px;
  --radius-lg: 6px;

  --shadow-card: 0 1px 2px rgba(18, 38, 27, 0.04), 0 10px 24px -14px rgba(18, 38, 27, 0.18);
  --shadow-card-hover: 0 4px 10px rgba(18, 38, 27, 0.08), 0 24px 48px -20px rgba(18, 38, 27, 0.26);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------- Reset ---------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }

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

/* ---------------------------------- Layout ---------------------------------- */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
section { position: relative; }
.section-pad { padding: 120px 0; }
@media (max-width: 900px) {
  .section-pad { padding: 84px 0; }
  .wrap { padding: 0 22px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--green);
  display: inline-block;
}

h2.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.12;
  color: var(--ink);
  margin-top: 14px;
  max-width: 16ch;
}
.section-lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin-top: 22px;
  line-height: 1.75;
}
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .section-title,
.section-head.center .section-lede { margin-left: auto; margin-right: auto; }

/* -------------------------------- Reveal-on-scroll -------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.09s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.23s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.30s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.37s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.44s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.51s; }

/* ---------------------------------- Top nav ---------------------------------- */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(247, 244, 236, 0.82);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.topnav.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(18,38,27,0.35); }
.topnav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--serif);
  font-size: 1.28rem;
  letter-spacing: 0.02em;
  color: var(--green-deep);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand small {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--green);
  transition: right 0.3s var(--ease);
}
.nav-links a:hover { color: var(--green-deep); }
.nav-links a:hover::after { right: 0; }
.nav-links a.is-active { color: var(--green-deep); }
.nav-links a.is-active::after { right: 0; }
.nav-toggle { display: none; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
  }
  .nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); display: block; }

  .mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 300;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 32px;
    transform: translateY(-100%);
    transition: transform 0.45s var(--ease);
  }
  .mobile-menu.is-open { transform: translateY(0); }
  .mobile-menu a {
    font-family: var(--serif);
    font-size: 1.7rem;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }
  .mobile-menu-close {
    position: absolute;
    top: 24px; right: 24px;
    font-size: 26px;
    color: var(--ink);
  }
}

/* ---------------------------------- Buttons ---------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--green);
  color: #f6f4ea;
  border: 1px solid var(--green);
}
.btn-primary:hover { background: var(--green-deep); transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(18,38,27,0.5); }
.btn-outline {
  background: transparent;
  color: var(--green-deep);
  border: 1px solid var(--ink);
}
.btn-outline:hover { border-color: var(--green); color: var(--green-deep); background: var(--green-tint); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 12px; }
.btn svg { width: 14px; height: 14px; }

/* ---------------------------------- Hero ---------------------------------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 96px;
  padding-bottom: 64px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 82% -10%, var(--green-tint) 0%, transparent 60%),
    var(--bg);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 22px;
  display: block;
}
.hero-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hero-positioning {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.hero-headline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  color: var(--green-deep);
  margin-top: 26px;
  line-height: 1.3;
}
.hero-copy {
  margin-top: 24px;
  font-size: 1.04rem;
  color: var(--ink-soft);
  max-width: 52ch;
  line-height: 1.75;
}
.hero-ctas {
  margin-top: 38px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-portrait-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(155deg, var(--green) 0%, var(--green-deep) 100%);
  box-shadow: var(--shadow-card-hover);
}
.hero-portrait-wrap::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(246, 244, 234, 0.22);
  pointer-events: none;
}
.hero-portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.portrait-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #f2efe2;
  gap: 14px;
  text-align: center;
  padding: 32px;
}
.portrait-placeholder .initials {
  font-family: var(--serif);
  font-size: 4.2rem;
  letter-spacing: 0.04em;
  border: 1px solid rgba(246,244,234,0.35);
  border-radius: 50%;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portrait-placeholder .hint {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.68;
  max-width: 26ch;
  line-height: 1.6;
}
.hero-caption {
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-portrait-wrap { max-width: 340px; margin: 0 auto; }
}

/* Central connecting question band */
.thesis {
  background: var(--green-deep);
  color: var(--parchment);
  padding: 88px 0;
}
.thesis-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.thesis blockquote {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.5;
  color: #f7f4ec;
}
.thesis blockquote span.q { color: #c9b980; }
.thesis-sub {
  margin-top: 22px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9fb09f;
}

/* ---------------------------------- My Story ---------------------------------- */
.story-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: start;
}
.story-copy p { color: var(--ink-soft); font-size: 1.04rem; line-height: 1.85; margin-bottom: 22px; }
.story-copy p:last-child { margin-bottom: 0; }
.theme-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.theme-item {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--green-deep);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.theme-item::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.theme-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: var(--green-tint-2); }
.theme-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
  display: block;
}
@media (max-width: 900px) {
  .story-layout { grid-template-columns: 1fr; gap: 40px; }
  .theme-list { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------- Biography ---------------------------------- */
.bio-block {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding: 44px 0;
  border-top: 1px solid var(--line);
}
.bio-block:last-child { border-bottom: 1px solid var(--line); }
.bio-meta { display: flex; flex-direction: column; gap: 6px; }
.bio-chapter-no {
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--green-tint-2);
  line-height: 1;
}
.bio-chapter-name {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}
.bio-chapter-dates {
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 4px;
}
.bio-content h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 14px;
}
.bio-content p { color: var(--ink-soft); line-height: 1.8; margin-bottom: 14px; }
.bio-content p:last-of-type { margin-bottom: 18px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--green-tint);
  color: var(--green-deep);
  border: 1px solid var(--green-tint-2);
}
@media (max-width: 760px) {
  .bio-block { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------------------------------- Accomplishments ---------------------------------- */
.accomplishments-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.accomplishment-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.accomplishment-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); border-color: var(--green-tint-2); }
.accomplishment-no {
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--green-tint-2);
  margin-bottom: 18px;
}
.accomplishment-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.3;
}
.accomplishment-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; flex: 1; }
.accomplishment-card .evidence-tag { margin-top: 16px; }
@media (max-width: 1080px) { .accomplishments-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .accomplishments-grid { grid-template-columns: 1fr; } }

.evidence-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 3px;
  width: fit-content;
}
.evidence-tag.authored { background: #e4ecdf; color: #2c4a30; }
.evidence-tag.edited { background: #eae3d3; color: #6a5424; }
.evidence-tag.distributed { background: #ece5da; color: #7a5a3a; }
.evidence-tag.record { background: #e6e2d6; color: #565244; }

/* ---------------------------------- Resume ---------------------------------- */
.resume-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 56px;
  box-shadow: var(--shadow-card);
}
.resume-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
  margin-bottom: 36px;
}
.resume-name { font-family: var(--serif); font-size: 1.9rem; color: var(--ink); }
.resume-title { color: var(--ink-soft); font-size: 14px; margin-top: 6px; }
.resume-contact { font-size: 12.5px; color: var(--ink-faint); margin-top: 10px; }
.resume-stats { display: flex; gap: 34px; }
.resume-stat { text-align: center; }
.resume-stat .n { font-family: var(--serif); font-size: 1.7rem; color: var(--green-deep); }
.resume-stat .l { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin-top: 4px; max-width: 9ch; }

.resume-section { margin-bottom: 34px; }
.resume-section:last-child { margin-bottom: 0; }
.resume-section h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.resume-section p { color: var(--ink-soft); line-height: 1.8; }

.competency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.competency-grid li { font-size: 13.5px; color: var(--ink-soft); padding: 5px 0; position: relative; padding-left: 16px; }
.competency-grid li::before { content: "—"; position: absolute; left: 0; color: var(--green-tint-2); }

.xp-item { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.xp-item:last-child { border-bottom: none; }
.xp-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.xp-role { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.xp-org { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.xp-dates { font-size: 12.5px; color: var(--green); font-weight: 600; white-space: nowrap; }
.xp-desc { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; line-height: 1.75; }

.resume-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.lang-item { display: flex; justify-content: space-between; font-size: 13.5px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.lang-item span:last-child { color: var(--ink-faint); }

.resume-cta-row { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .resume-card { padding: 30px 22px; }
  .resume-cols { grid-template-columns: 1fr; gap: 8px; }
  .competency-grid { grid-template-columns: 1fr; }
  .resume-stats { gap: 20px; }
}

/* ---------------------------------- Career Journey (timeline) ---------------------------------- */
.timeline { position: relative; padding-left: 8px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 130px;
  top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}
.timeline-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 40px;
  padding: 28px 0;
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 126px;
  top: 34px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--green);
}
.timeline-item.is-current::before { background: var(--green); }
.timeline-date { font-size: 13px; font-weight: 700; color: var(--green-deep); padding-top: 2px; text-align: right; padding-right: 30px; }
.timeline-body { padding-left: 30px; }
.timeline-role { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.timeline-org { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }
.timeline-loc { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.timeline-current-badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--green-tint);
  padding: 4px 10px;
  border-radius: 3px;
}
@media (max-width: 680px) {
  .timeline::before { left: 6px; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .timeline-item::before { left: 2px; top: 6px; }
  .timeline-date { text-align: left; padding-right: 0; padding-left: 26px; }
  .timeline-body { padding-left: 26px; }
}

/* ---------------------------------- United Nations section ---------------------------------- */
.un-section { background: var(--green-deep); color: #eee9d8; }
.un-section .eyebrow { color: #c9d6c2; }
.un-section .eyebrow::before { background: #c9d6c2; }
.un-section .section-title { color: #f7f4ec; }
.un-section .section-lede { color: #cdd6c6; }
.un-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: start; }
.un-copy p { color: #d8ddcf; line-height: 1.85; margin-bottom: 20px; font-size: 1.02rem; }
.un-facts { display: flex; flex-direction: column; gap: 0; border-top: 1px solid rgba(255,255,255,0.14); }
.un-fact { display: flex; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.14); gap: 16px; }
.un-fact .k { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: #9fb09a; }
.un-fact .v { font-size: 13.5px; color: #eee9d8; text-align: right; max-width: 22ch; }
.un-missions { margin-top: 28px; }
.un-missions h4 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #9fb09a; margin-bottom: 14px; }
.mission-chip-row { display: flex; flex-wrap: wrap; gap: 9px; }
.mission-chip {
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.22);
  color: #eee9d8;
}
@media (max-width: 900px) { .un-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------------------------------- Professional Archive ---------------------------------- */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.archive-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}
.archive-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }
.archive-preview {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--parchment);
  border-bottom: 1px solid var(--parchment-line);
}
.archive-preview img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 0.6s var(--ease);
  filter: sepia(0.12) contrast(1.02);
}
.archive-card:hover .archive-preview img { transform: scale(1.045); }
.archive-preview .corner-fold {
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 26px 26px 0;
  border-color: transparent var(--bg) transparent transparent;
  opacity: 0.9;
}
.archive-body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.archive-date { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sepia); }
.archive-title { font-family: var(--serif); font-size: 1.14rem; color: var(--ink); line-height: 1.3; }
.archive-context { font-size: 13px; color: var(--ink-soft); line-height: 1.7; flex: 1; }
.archive-role { font-size: 12.5px; color: var(--ink-faint); font-style: italic; }
.archive-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.archive-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--green-deep);
  border-bottom: 1px solid var(--green-tint-2);
  padding-bottom: 2px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.archive-link:hover { border-color: var(--green); color: var(--green); }

/* Placeholder cards */
.archive-card.is-placeholder { background: transparent; border-style: dashed; box-shadow: none; }
.archive-card.is-placeholder:hover { transform: none; box-shadow: none; }
.archive-card.is-placeholder .archive-preview {
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px dashed var(--line);
}
.archive-card.is-placeholder .archive-preview .ph-icon { color: var(--ink-faint); opacity: 0.55; width: 34px; height: 34px; }
.archive-card.is-placeholder .archive-title { color: var(--ink-faint); }
.archive-card.is-placeholder .archive-context { color: var(--ink-faint); }

.archive-note {
  margin-top: 46px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.75;
}
.archive-note strong { color: var(--ink); }

.archive-more-label {
  margin-top: 64px;
  margin-bottom: 26px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 14px;
}
.archive-more-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.archive-more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.archive-more-tile {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 12.5px;
  line-height: 1.5;
}
.archive-more-tile .ph-icon { width: 22px; height: 22px; margin: 0 auto 10px; opacity: 0.5; }

@media (max-width: 1080px) { .archive-grid { grid-template-columns: 1fr 1fr; } .archive-more-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .archive-grid { grid-template-columns: 1fr; } .archive-more-grid { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------- Finance ---------------------------------- */
.finance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.finance-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.finance-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.finance-org { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); margin-bottom: 4px; }
.finance-role { font-size: 13px; color: var(--green); font-weight: 600; margin-bottom: 4px; }
.finance-dates { font-size: 12px; color: var(--ink-faint); margin-bottom: 18px; }
.finance-list li { font-size: 13px; color: var(--ink-soft); padding: 6px 0; border-top: 1px solid var(--line-soft); }
.finance-list li:first-child { border-top: none; }
@media (max-width: 980px) { .finance-grid { grid-template-columns: 1fr; } }

/* ---------------------------------- Public Service ---------------------------------- */
.ps-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.ps-copy p { color: var(--ink-soft); line-height: 1.85; margin-bottom: 18px; }
.ps-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ps-pillar {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}
.ps-pillar .n { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--green-tint-2); margin-bottom: 8px; }
@media (max-width: 900px) { .ps-layout { grid-template-columns: 1fr; gap: 36px; } }

/* ---------------------------------- WEGN Ecosystem ---------------------------------- */
.wegn-tier { margin-top: 56px; }
.wegn-tier:first-of-type { margin-top: 0; }
.wegn-tier-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
}
.wegn-tier-head h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  white-space: nowrap;
}
.wegn-tier-head .rule { flex: 1; height: 1px; background: var(--line); }
.wegn-tier-note { font-size: 12.5px; color: var(--ink-faint); margin-top: -12px; margin-bottom: 22px; max-width: 68ch; }

.wegn-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.wegn-card {
  border: 1px solid var(--line-soft);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wegn-card.is-live:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); border-color: var(--green-tint-2); }
.wegn-card-brand-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.wegn-logo { width: 80px; height: auto; object-fit: contain; opacity: 0.92; }
@media (max-width: 640px) { .wegn-logo { width: 66px; } }
.wegn-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wegn-card-name { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); line-height: 1.25; }
.wegn-card-category {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sepia);
  margin-top: -2px;
}
.wegn-status {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 3px;
  white-space: nowrap;
}
.wegn-status.live { background: #e4ecdf; color: #2c4a30; }
.wegn-status.internal { background: #ece5da; color: #7a5a3a; }
.wegn-status.paused { background: #e6e2d6; color: #565244; }
.wegn-card-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin-top: 4px; }
.wegn-card-meta { font-size: 12px; color: var(--ink-faint); line-height: 1.6; }
.wegn-card-meta strong { color: var(--ink-soft); font-weight: 600; }
.wegn-card-link {
  margin-top: auto;
  padding-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-deep);
  border-bottom: 1px solid var(--green-tint-2);
  padding-bottom: 2px;
  width: fit-content;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.wegn-card-link:hover { border-color: var(--green); color: var(--green); }
.wegn-card.is-internal { background: var(--bg-alt); }

/* Infrastructure layer — compact panel, understated vs. full application cards */
.wegn-card.is-infra { gap: 4px; }
.wegn-infra-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.wegn-infra-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.wegn-infra-row:first-of-type { border-top: none; }
.wegn-infra-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.wegn-infra-desc { font-size: 11.5px; color: var(--ink-faint); text-align: right; }

@media (max-width: 1080px) { .wegn-card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .wegn-card-grid { grid-template-columns: 1fr; } }

/* Ecosystem relationship diagram */
.ecosystem-map {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}
.ecosystem-map-label { text-align: center; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 32px; }
.ecosystem-layer { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 6px; }
.ecosystem-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.ecosystem-chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  background: var(--bg-card);
  color: var(--ink);
}
.ecosystem-chip.top { background: var(--green-deep); color: #f4f1e4; border-color: var(--green-deep); font-family: var(--serif); font-size: 1rem; padding: 10px 26px; }
.ecosystem-chip.dim { color: var(--ink-faint); background: transparent; }
.ecosystem-connector { width: 1px; height: 26px; background: var(--line); }
.ecosystem-caption { text-align: center; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 14px 0; }

/* ---------------------------------- Education ---------------------------------- */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.edu-item { padding: 24px 0; border-top: 1px solid var(--line); }
.edu-item:first-child { border-top: none; padding-top: 0; }
.edu-degree { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.edu-school { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }
.edu-meta { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.capability-group { margin-bottom: 28px; }
.capability-group:last-child { margin-bottom: 0; }
.capability-group h4 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin-bottom: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12.5px; padding: 7px 13px; border-radius: 20px; background: var(--bg-card); border: 1px solid var(--line-soft); color: var(--ink-soft); }
@media (max-width: 900px) { .edu-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------------------------------- What's Next / Contact ---------------------------------- */
.next-section { background: var(--bg-alt); }
.next-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: start; }
.next-copy p { color: var(--ink-soft); line-height: 1.85; margin-bottom: 18px; }
.growth-list li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-soft); padding: 9px 0; border-bottom: 1px dashed var(--line); }
.growth-list li::before { content: "+"; color: var(--green); font-weight: 700; }
.contact-card {
  background: var(--green-deep);
  color: #f4f1e4;
  border-radius: var(--radius-lg);
  padding: 40px 34px;
}
.contact-card h3 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 10px; }
.contact-card p { color: #cdd6c6; font-size: 13.5px; line-height: 1.7; margin-bottom: 26px; }
.contact-line { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.16); font-size: 13px; }
.contact-line span:first-child { color: #9fb09a; }
.contact-line a { color: #f4f1e4; font-weight: 500; transition: color 0.25s var(--ease); border-bottom: 1px solid transparent; }
.contact-line a:hover { color: #fff; border-bottom-color: rgba(244,241,228,0.5); }
.contact-card .btn-primary { margin-top: 24px; width: 100%; justify-content: center; background: #f4f1e4; color: var(--green-deep); border-color: #f4f1e4; }
.contact-card .btn-primary:hover { background: #fff; }

/* ---------------------------------- Footer ---------------------------------- */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-faint);
}
footer .brand { font-size: 1rem; }

/* ---------------------------------- Misc ---------------------------------- */
.alt-bg { background: var(--bg-alt); }
.icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }
