:root{
  --bg: #f7f5ef;
  --bg-raised: #fbfaf6;
  --ink: #17140f;
  --ink-soft: #4a463d;
  --muted: #97917f;
  --line: #e3ddcf;
  --accent: #b5442e;
}

html[data-theme="dark"]{
  --bg: #14120e;
  --bg-raised: #1b1815;
  --ink: #f4f1e9;
  --ink-soft: #cdc7b8;
  --muted: #8c8779;
  --line: #322d25;
  --accent: #e0693f;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}

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

/* ---------- NAV ---------- */
header.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 26px 48px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top:0;
  z-index: 30;
}

.nav .brand{
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.nav .links{
  display:flex;
  gap: 34px;
}

.nav .links a{
  font-size: 12.5px;
  letter-spacing: 1.6px;
  color: var(--ink-soft);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

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

.nav .links a.active{
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

.nav .tools{
  display:flex;
  align-items:center;
  gap: 12px;
}

.icon-btn{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--bg-raised);
  color: var(--ink-soft);
  cursor:pointer;
}
.icon-btn:hover{ border-color: var(--ink-soft); }
.icon-btn svg{ width:15px; height:15px; }

.menu-toggle{
  display:none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--ink-soft);
  cursor:pointer;
  align-items:center;
  justify-content:center;
}
.menu-toggle svg{ width:16px; height:16px; }

@media (max-width: 860px){
  .nav .links{
    display:none;
    position: absolute;
    top: 100%;
    left:0;
    right:0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 18px 22px;
    gap: 18px;
  }
  .nav .links.open{ display:flex; }
  .menu-toggle{ display:flex; }
  header.nav{ padding: 20px 22px; }
}

/* ---------- HERO BANNER ---------- */
.hero-banner{
  margin: 40px 48px 0;
  height: 300px;
  border-radius: 2px;
  position: relative;
  overflow:hidden;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--ink);
}

.hero-banner svg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}

.hero-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
}

@media (max-width: 860px){
  .hero-banner{ margin: 28px 22px 0; height: 200px; }
}

/* ---------- PROFILE ROW ---------- */
.profile{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  padding: 26px 48px 0;
  flex-wrap: wrap;
  gap: 20px;
}

.profile .who{
  display:flex;
  align-items:center;
  gap: 20px;
}

.avatar{
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family: Georgia, serif;
  font-size: 26px;
  letter-spacing: 1px;
  flex-shrink:0;
  border: 1px solid var(--line);
  overflow: hidden;
}
.avatar-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.who h1{
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
  margin: 0 0 6px;
  letter-spacing: 0.2px;
}

.who .role{
  font-size: 13px;
  letter-spacing: 1.4px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.who .loc{
  font-size: 12.5px;
  color: var(--muted);
  display:flex;
  align-items:center;
  gap:6px;
}

.kbd-search{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--muted);
  font-size: 12.5px;
  background: var(--bg-raised);
  cursor:pointer;
  font-family: inherit;
}
.kbd-search svg{ width:14px; height:14px; }
.kbd-search kbd{
  border:1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  background: var(--bg);
}

@media (max-width: 860px){
  .profile{ padding: 22px 22px 0; }
  .who h1{ font-size: 26px; }
  .kbd-search span{ display:none; }
}

/* ---------- MAIN LAYOUT ---------- */
.layout{
  display:grid;
  grid-template-columns: 1fr 190px;
  gap: 60px;
  padding: 56px 48px 40px;
  max-width: 1180px;
}

@media (max-width: 860px){
  .layout{
    grid-template-columns: 1fr;
    padding: 40px 22px 40px;
    gap: 36px;
  }
  .index-rail{ display:none; }
}

.section{
  margin-bottom: 64px;
  scroll-margin-top: 90px;
}

.section h2{
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 30px;
  margin: 0 0 26px;
}

.bullets{
  padding: 0;
  margin: 0;
  list-style: none;
  max-width: 640px;
}

.bullets li{
  position: relative;
  padding-left: 22px;
  margin-bottom: 22px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.bullets li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.bullets li b{
  color: var(--ink);
  font-weight: 600;
}

/* ---------- PROJECTS ---------- */
.project-tabs{
  display:flex;
  gap:6px;
  margin-bottom: 26px;
}
.project-tab{
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.project-tab:hover{
  background: var(--line);
  color: var(--ink);
}
.project-tab.active{
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.project-panels{
  display:flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
}
.project-panel{ display: none; }
.project-panel.visible{ display: flex; flex-direction: column; gap: 24px; }
.project-card{
  border: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 22px;
  border-radius: 2px;
}
.project-card h3{
  margin: 0 0 10px;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
}
.project-card p{
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- PROFESSIONAL WORK: bento feature grid ---------- */
.project-panel.feature-grid.visible{
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  max-width: 900px;
}
.feature-card{
  grid-column: 2;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-raised);
}
.feature-card--large{
  grid-column: 1;
  grid-row: 1 / span 2;
}
.feature-media{
  position: relative;
  min-height: 200px;
  flex: 1;
  color: #fff;
  overflow: hidden;
}
.feature-card--large .feature-media{ min-height: 420px; }
.feature-media--a{ background: linear-gradient(155deg, #1c2b24, #0d1512); }
.feature-media--b{ background: linear-gradient(155deg, #1a1f2e, #0c0f16); }
.feature-media--c{ background: linear-gradient(155deg, #241a12, #120d08); }

.feature-pattern{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: #fff;
}

.feature-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* For images with baked-in text (e.g. a full graphic/banner) — show the
   whole image without cropping instead of cover-cropping the edges. */
.feature-img--contain{
  object-fit: contain;
  background: #05070a;
}

.feature-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.35) 55%, transparent 85%);
}
/* For cards where the image already has title/tagline baked in —
   only darken a thin strip at the bottom for the controls. */
.feature-overlay--minimal{
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 30%);
}
.feature-meta{
  font-size: 11px;
  letter-spacing: 1.6px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
}
.feature-title{
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  color: #fff;
  margin: 0 0 8px;
}
.feature-card--small .feature-title{ font-size: 20px; }
.feature-tagline{
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
  margin: 0 0 14px;
  max-width: 420px;
}
.feature-bottom{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.feature-toggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: #fff;
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: 1.2px;
  padding: 0;
  cursor: pointer;
}
.feature-toggle .arrow{
  display: inline-block;
  transition: transform 0.25s ease;
}
.feature-toggle.open .arrow{ transform: rotate(90deg); }
.feature-domain{
  font-size: 11px;
  letter-spacing: 0.4px;
  color: rgba(255,255,255,0.55);
}

.feature-details{
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding: 0 22px;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}
.feature-details:not(.collapsed){
  max-height: 600px;
  opacity: 1;
  padding: 20px 22px;
}
.feature-details p{
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (max-width: 860px){
  .project-panel.feature-grid.visible{ grid-template-columns: 1fr; }
  .feature-card, .feature-card--large{ grid-column: 1; grid-row: auto; }
  .feature-card--large .feature-media{ min-height: 260px; }
}
.project-panel[data-tab="self"].visible{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 900px;
}
@media (max-width: 900px){
  .project-panel[data-tab="self"].visible{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .project-panel[data-tab="self"].visible{ grid-template-columns: 1fr; }
}

.project-panel[data-tab="self"] .project-card{
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 8px;
}

.project-panel[data-tab="self"] .project-card-head,
.project-panel[data-tab="live"] .project-card-head{
  order: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-panel[data-tab="self"] .project-card h3,
.project-panel[data-tab="live"] .project-card h3{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--accent);
  margin: 0;
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--accent);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.project-card-link:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

.project-card-link-icon {
  font-size: 16px;
  line-height: 1;
}

.project-panel[data-tab="self"] .project-desc{
  order: 2;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-panel[data-tab="self"] .project-desc:not(.collapsed){
  -webkit-line-clamp: unset;
  overflow: visible;
}

.project-panel[data-tab="self"] .read-more-trigger{
  order: 3;
  font-size: 12.5px;
  margin: 8px 0 0;
}

.project-panel[data-tab="self"] .project-tags,
.project-panel[data-tab="live"] .project-tags{
  order: 4;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.project-panel[data-tab="self"] .project-tags span,
.project-panel[data-tab="live"] .project-tags span{
  font-size: 10.5px;
  padding: 3px 8px;
}

.project-panel[data-tab="live"] .project-panel.visible {
  display: grid;
}

.project-panel[data-tab="live"].visible {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 900px;
}

.live-card {
  max-width: 420px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.9px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.project-card-actions {
  order: 3;
  margin-top: 12px;
}

.project-live-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.project-live-link:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.project-live-link-icon {
  font-size: 14px;
}
.project-tags{ display:flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.project-tags span{
  font-size: 11.5px;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}
.tags{ display:flex; flex-wrap: wrap; gap: 8px; }
.tags span{
  font-size: 11.5px;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* ---------- EXPERIENCE TIMELINE ---------- */
.timeline{
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 700px;
  border-left: 1px solid var(--line);
}
.timeline-item{
  display:flex;
  gap: 24px;
  padding: 0 0 32px 24px;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideIn 0.6s ease forwards;
  animation-play-state: paused;
}
.timeline-item:nth-child(1){ animation-delay: 0.2s; }
.timeline-item:nth-child(2){ animation-delay: 0.5s; }
.timeline-item::before{
  content:"";
  position:absolute;
  left: -5px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.t-year{
  font-size: 13px;
  color: var(--muted);
  min-width: 42px;
  flex-shrink:0;
}
.t-head{
  display:flex;
  align-items:baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.t-role{
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.t-subheading{
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}
.t-time{
  font-size: 12.5px;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}
.read-more-trigger{
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  margin: 6px 0 0;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
  display: inline-block;
  background: none;
  font-family: inherit;
}
.read-more-trigger:hover{
  border-bottom-color: var(--accent);
}
.read-more-trigger.open{
  color: var(--ink-soft);
  border-bottom-color: var(--ink-soft);
}
.t-desc{
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}
.t-desc:not(.collapsed){
  max-height: 2000px;
  opacity: 1;
  margin-top: 10px;
}
.t-desc .bullets{
  padding: 0;
  margin: 0;
  list-style: none;
}
.t-desc .bullets li{
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  /* show 2 lines when collapsed */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.t-desc:not(.collapsed) .bullets li{
  -webkit-line-clamp: unset;
  overflow: visible;
}
.t-desc .bullets li b{
  color: var(--ink);
  font-weight: 600;
}
.t-desc .bullets li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes fadeSlideIn{
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- SKILLS TAB BAR ---------- */
.skills-tabs{
  display:flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  max-width: 900px;
  margin-bottom: 26px;
}

.skill-tab{
  display:flex;
  align-items:center;
  gap: 7px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.skill-tab svg{ width: 14px; height: 14px; flex-shrink:0; }

.skill-tab:hover{
  background: var(--line);
  color: var(--ink);
}

.skill-tab.active{
  background: var(--ink);
  color: var(--bg);
}

@media (max-width: 640px){
  .skills-tabs{ padding: 8px; }
  .skill-tab{ font-size: 12.5px; padding: 8px 10px; }
}

/* ---------- SKILL PANELS ---------- */
.skills-panels{
  display:flex;
  flex-direction: column;
  gap: 26px;
  max-width: 900px;
}

.skill-panel{ display: none; }
.skill-panel.visible{ display: block; }

.skill-panel-title{
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* hide the repeated title when only a single category is being shown */
.skills-panels.single-view .skill-panel-title{ display: none; }

/* ---------- WRITING ---------- */
.writing-list{
  list-style: none;
  margin:0;
  padding:0;
  max-width: 640px;
}
.writing-list li{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.writing-list a{
  font-size: 15px;
  color: var(--ink);
}
.writing-list a:hover{ color: var(--accent); }
.w-date{ font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.section-desc{
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 640px;
}

/* ---------- LEARNING LOG ---------- */
.learning-log-tabs{
  display:flex;
  gap:6px;
  margin-bottom: 26px;
}
.learning-log-tab{
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.learning-log-tab:hover{
  background: var(--line);
  color: var(--ink);
}
.learning-log-tab.active{
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.learning-log-panels{
  display:flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
}
.learning-log-panel{ display: none; }
.learning-log-panel.visible{ display: block; }

.book-item{
  border: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 22px;
  border-radius: 2px;
}
.book-item h3{
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
}
.book-item p{
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.skill-item{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-item .tag{
  font-size: 11.5px;
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* ---------- EDUCATION ---------- */
.edu-item{
  border: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 22px;
  border-radius: 2px;
  margin-bottom: 16px;
}
.edu-item h3{
  margin: 0 0 6px;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
}
.edu-sub{
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- CERTIFICATIONS ---------- */
.cert-list{
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 640px;
}
.cert-list li{
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
}
.cert-list li:last-child{
  border-bottom: none;
}




.contact-bar{
  display:flex;
  flex-wrap: wrap;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  max-width: 900px;
}

.contact-pill{
  display:flex;
  align-items:center;
  gap: 9px;
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
  border-right: 1px solid var(--line);
  transition: background .15s ease, color .15s ease;
  flex: 1 1 auto;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}
.contact-pill:hover{
  background: var(--line);
  color: var(--ink);
  text-decoration: underline;
}

.cp-label{ font-weight: 500; }

.cp-arrow{
  font-size: 12px;
  color: var(--accent);
}

.cp-number{
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 640px){
  .contact-pill{
    flex: 1 1 45%;
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
  }
}

/* ---------- INDEX RAIL ---------- */
.index-rail .label{
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 16px;
}
.index-rail ul{ list-style:none; margin:0; padding:0; }
.index-rail li{ margin-bottom: 14px; }
.index-rail a{
  font-size: 13.5px;
  color: var(--muted);
  display:flex;
  align-items:center;
  gap: 10px;
}
.index-rail a.current{ color: var(--ink); font-weight: 600; }
.index-rail a.current::before{ content:""; width: 14px; height: 1px; background: var(--ink); }
.index-rail a:not(.current)::before{ content:""; width: 14px; height: 1px; background: transparent; }
.index-rail{ position: sticky; top: 100px; align-self: start; }

/* ---------- FOOTER ---------- */
.site-footer{
  display:flex;
  justify-content: center;
  padding: 24px 48px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  max-width: 1180px;
  margin: 0 auto;
}
@media (max-width: 860px){
  .site-footer{ padding: 20px 22px 32px; }
}

/* ---------- SEARCH MODAL ---------- */
.search-overlay{
  display:none;
  position: fixed;
  inset:0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.search-overlay.open{ display:flex; }

.search-modal{
  background: var(--bg-raised);
  border: 1px solid var(--line);
  width: min(560px, 90vw);
  border-radius: 4px;
  overflow: hidden;
}

.search-input-row{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.search-input-row svg{ width:16px; height:16px; flex-shrink:0; }
.search-input-row input{
  flex:1;
  border:none;
  outline:none;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
}
.search-input-row kbd{
  border:1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
}

.search-results{
  list-style:none;
  margin:0;
  padding: 8px;
  max-height: 320px;
  overflow-y:auto;
}
.search-results li a{
  display:block;
  padding: 10px 12px;
  font-size: 14.5px;
  border-radius: 3px;
  color: var(--ink-soft);
}
.search-results li a:hover,
.search-results li a.selected{
  background: var(--line);
  color: var(--ink);
}
.search-results .no-results{
  padding: 14px 12px;
  color: var(--muted);
  font-size: 13.5px;
}