:root{
  --bg: #213555;
  --surface: #294165;
  --surface-raised: #314d7b;
  --hairline: rgba(240,240,240,0.14);
  --hairline-soft: rgba(240,240,240,0.08);
  --text: #F0F0F0;
  --text-dim: rgba(240,240,240,0.82);
  --text-faint: rgba(240,240,240,0.58);
  --accent: #E5D283;
  --accent-dim: #4F709C;
  --accent-glow: rgba(229,210,131,0.18);
  --radius: 3px;
  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --maxw: 1180px;
}

*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--body);
  font-size:16px;
  line-height:1.6;
  overflow-x:hidden;
  cursor:none;
}
::selection{ background:var(--accent); color:var(--bg); }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

@media (hover:none){
  body{ cursor:auto; }
}

/* ---------- noise texture ---------- */
.grain{
  position:fixed; inset:0; pointer-events:none; z-index:2;
  opacity:0.03; mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- custom cursor ---------- */
#cursor-dot, #cursor-ring{
  position:fixed; top:0; left:0; pointer-events:none; z-index:9999;
  border-radius:50%; transform:translate(-50%,-50%);
}
#cursor-dot{ width:6px; height:6px; background:var(--accent); transition:transform .15s ease; }
#cursor-ring{
  width:34px; height:34px; border:1px solid var(--hairline);
  transition:transform .18s cubic-bezier(.2,.8,.2,1), width .25s ease, height .25s ease, border-color .25s ease, background .25s ease;
}
#cursor-ring.active{ width:64px; height:64px; border-color:var(--accent); background:var(--accent-glow); }
#cursor-label{
  position:fixed; top:0; left:0; pointer-events:none; z-index:9999;
  font-family:var(--mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--accent); transform:translate(-50%,-50%); opacity:0; transition:opacity .2s ease;
  white-space:nowrap;
}
#cursor-label.active{ opacity:1; }

/* ---------- layout helpers ---------- */
.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 32px; }
section{ position:relative; }
.eyebrow{
  font-family:var(--mono); font-size:11px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--text-faint); display:flex; align-items:center; gap:10px; margin-bottom:22px;
}
.eyebrow::before{ content:''; width:16px; height:1px; background:var(--accent-dim); }

/* ---------- nav ---------- */
header{
  position:fixed; top:0; left:0; right:0; z-index:100;
  background:transparent;
  padding:16px 0;
}
nav.wrap{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px;
  background:rgba(33,53,85,.55);
  border:1px solid rgba(240,240,240,.16);
  border-radius:999px;
  box-shadow:0 16px 40px rgba(0,0,0,.16);
  backdrop-filter:blur(16px) saturate(140%);
  -webkit-backdrop-filter:blur(16px) saturate(140%);
}
.brand{ display:flex; align-items:center; gap:9px; font-family:var(--display); font-weight:600; font-size:17px; letter-spacing:.02em; }
.dot{
  width:7px; height:7px; border-radius:50%; background:var(--accent);
  box-shadow:0 0 0 3px var(--accent-glow);
  animation:pulse 2.6s ease-in-out infinite;
}
@keyframes pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.45; } }
.navlinks{ display:flex; gap:36px; font-family:var(--mono); font-size:12px; letter-spacing:.06em; text-transform:uppercase; }
.navlinks a{ color:var(--text-dim); position:relative; padding-bottom:3px; }
.navlinks a:hover{ color:var(--text); }
.navlinks a.active{ color:var(--text); }
.navlinks a::after{
  content:''; position:absolute; left:0; bottom:0; width:0; height:1px; background:var(--accent);
  transition:width .25s ease;
}
.navlinks a:hover::after{ width:100%; }
.navlinks a.active::after{ width:100%; }
.theme-toggle{
  appearance:none;
  border:1px solid var(--hairline);
  background:rgba(255,255,255,0.02);
  color:var(--text-dim);
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.06em;
  text-transform:uppercase;
  padding:6px 9px;
  border-radius:var(--radius);
  cursor:pointer;
  line-height:1;
  transition:border-color .25s ease, color .25s ease, background .25s ease, opacity .25s ease;
}
.theme-toggle:hover{
  border-color:var(--accent-dim);
  color:var(--accent);
}
.theme-switcher{
  position:fixed;
  top:16px;
  right:16px;
  z-index:120;
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px;
  border:1px solid var(--hairline);
  border-radius:999px;
  background:rgba(255,255,255,0.02);
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  backdrop-filter:blur(10px) saturate(130%);
  -webkit-backdrop-filter:blur(10px) saturate(130%);
}
.theme-switcher{
  top:92px;
}
.theme-switcher .theme-toggle{
  border-color:transparent;
  background:transparent;
  opacity:.72;
  min-width:78px;
}
.theme-switcher .theme-toggle:hover{
  opacity:1;
}
.theme-switcher .theme-toggle.active{
  opacity:1;
  border-color:var(--accent-dim);
  background:var(--accent-glow);
  color:var(--text);
}
.menu-toggle{
  display:none;
  width:44px;
  height:44px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
  background:rgba(255,255,255,0.03);
  border:1px solid var(--hairline);
  border-radius:50%;
  cursor:pointer;
}
.menu-toggle span{
  display:block;
  width:16px;
  height:1.5px;
  background:var(--text);
  transition:transform .25s ease, opacity .25s ease;
}
.menu-toggle.open span:nth-child(1){ transform:translateY(5.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2){ opacity:0; }
.menu-toggle.open span:nth-child(3){ transform:translateY(-5.5px) rotate(-45deg); }
.mobile-menu{
  display:none;
  margin-top:10px;
  padding:14px 20px 18px;
  background:rgba(33,53,85,.78);
  border:1px solid rgba(240,240,240,.16);
  border-radius:24px;
  box-shadow:0 16px 40px rgba(0,0,0,.16);
  backdrop-filter:blur(16px) saturate(140%);
  -webkit-backdrop-filter:blur(16px) saturate(140%);
}
.mobile-menu a{
  display:block;
  padding:12px 4px;
  font-family:var(--mono);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--text-dim);
  border-bottom:1px solid rgba(240,240,240,.10);
}
.mobile-menu a:last-child{ border-bottom:none; }
.mobile-menu a.active{ color:var(--accent); }
.mobile-menu.open{ display:block; }
@media (max-width:760px){
  .navlinks{ display:none; }
  .desktop-cta{ display:none; }
  .menu-toggle{ display:flex; }
}

/* ---------- hero ---------- */
.hero{
  min-height:100svh; display:flex; align-items:center; padding-top:110px; padding-bottom:60px;
  position:relative;
}
.page-hero{
  min-height:auto;
  padding-top:140px;
  padding-bottom:20px;
}
.page-hero .panel{
  padding:44px clamp(24px,5vw,56px);
}
.panel{
  position:relative; border:1px solid var(--hairline); border-radius:var(--radius);
  padding:56px clamp(24px,5vw,64px);
  background:
    radial-gradient(circle at 12% 6%, rgba(229,210,131,.14), transparent 34%),
    linear-gradient(135deg, rgba(79,112,156,.18), rgba(240,240,240,.03));
  box-shadow:0 22px 60px rgba(0,0,0,.16);
}
.corner{
  position:absolute; width:14px; height:14px; border-color:var(--accent-dim); opacity:.8;
}
.corner.tl{ top:-1px; left:-1px; border-top:1px solid; border-left:1px solid; }
.corner.tr{ top:-1px; right:-1px; border-top:1px solid; border-right:1px solid; }
.corner.bl{ bottom:-1px; left:-1px; border-bottom:1px solid; border-left:1px solid; }
.corner.br{ bottom:-1px; right:-1px; border-bottom:1px solid; border-right:1px solid; }

.status-line{
  display:flex; align-items:center; gap:10px; font-family:var(--mono); font-size:12px;
  color:var(--text-dim); margin-bottom:28px; letter-spacing:.05em;
}
.status-line .dot{ animation:pulse 2.6s ease-in-out infinite; }

h1.hero-title{
  font-family:var(--display); font-weight:600; letter-spacing:-.02em;
  font-size:clamp(38px, 6.4vw, 78px); line-height:1.04; max-width:16ch;
}
h1.hero-title .accentline{ color:var(--accent); }
.hero-copy{
  margin-top:18px;
  max-width:52ch;
  color:var(--text-dim);
  font-size:15px;
}
.role-rotator{
  font-family:var(--mono); font-size:clamp(13px,1.6vw,16px); color:var(--text-dim);
  margin-top:22px; height:22px; overflow:hidden; position:relative;
}
.role-rotator span{
  display:block; position:absolute; top:0; left:0; opacity:0; transform:translateY(8px);
  transition:opacity .5s ease, transform .5s ease;
}
.role-rotator span.show{ opacity:1; transform:translateY(0); }

.hero-cta{ display:flex; gap:16px; margin-top:38px; flex-wrap:wrap; }
.btn{
  font-family:var(--mono); font-size:12px; letter-spacing:.08em; text-transform:uppercase;
  padding:14px 26px; border-radius:var(--radius); border:1px solid var(--hairline);
  display:inline-flex; align-items:center; gap:8px; transition:border-color .25s ease, background .25s ease, transform .2s ease;
  background:rgba(255,255,255,0.02);
}
.btn:hover{ transform:translateY(-2px); }
.btn.primary{ background:var(--accent); color:var(--bg); border-color:var(--accent); }
.btn.primary:hover{ background:#f2e6ab; }
.btn.ghost:hover{ border-color:var(--accent-dim); color:var(--accent); }

.focus-row{
  display:flex; gap:12px; margin-top:52px; flex-wrap:wrap;
}
.page-links{
  display:flex;
  gap:12px;
  margin-top:32px;
  flex-wrap:wrap;
}
.page-meta{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:26px;
}
.focus-chip{
  font-family:var(--mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-dim); border:1px solid var(--hairline); border-radius:2px; padding:8px 16px;
  transition:all .25s ease;
  background:rgba(255,255,255,0.02);
}
.focus-chip:hover{ border-color:var(--accent-dim); color:var(--accent); background:var(--accent-glow); }

/* ---------- homepage interactive ---------- */
.home-switcher{
  display:grid;
  grid-template-columns:220px 1fr 240px;
  gap:18px;
  align-items:stretch;
}
@media (max-width:920px){ .home-switcher{ grid-template-columns:1fr; } }
.home-switcher-tabs,
.home-switcher-panel,
.home-switcher-aside{
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  background:var(--surface);
}
.home-switcher-tabs{
  display:flex;
  flex-direction:column;
  padding:12px;
  gap:10px;
}
@media (max-width:920px){ .home-switcher-tabs{ flex-direction:row; } }
.switch-tab{
  width:100%;
  border:1px solid var(--hairline);
  border-radius:2px;
  padding:14px 16px;
  background:transparent;
  color:var(--text-dim);
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  cursor:pointer;
  text-align:left;
}
@media (max-width:920px){ .switch-tab{ text-align:center; } }
.switch-tab.active{
  background:var(--accent);
  color:var(--bg);
  border-color:var(--accent);
}
.home-switcher-panel{
  padding:28px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:240px;
}
.home-switcher-kicker{
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--accent);
  margin-bottom:12px;
}
.home-switcher-panel h3{
  font-family:var(--display);
  font-size:clamp(22px, 3vw, 30px);
  line-height:1.1;
  margin-bottom:14px;
}
.home-switcher-panel p{
  color:var(--text-dim);
  max-width:42ch;
}
.home-switcher-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:20px;
}
.home-switcher-tags span{
  font-family:var(--mono);
  font-size:10.5px;
  color:var(--bg);
  background:var(--accent);
  border:1px solid var(--accent);
  border-radius:2px;
  padding:4px 9px;
}
.home-switcher-aside{
  padding:28px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:18px;
}
.home-switcher-aside p{
  color:var(--text-dim);
}
.quick-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:1px;
  background:var(--hairline-soft);
  border:1px solid var(--hairline-soft);
}
@media (max-width:900px){ .quick-grid{ grid-template-columns:1fr; } }
.quick-card{
  padding:28px;
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border:1px solid transparent;
  transition:background .3s ease, border-color .3s ease, transform .2s ease;
}
.quick-card:hover{
  background:var(--surface);
  border-color:var(--accent-dim);
  transform:translateY(-2px);
}
.quick-card h3{
  font-family:var(--display);
  font-size:20px;
  margin:16px 0 8px;
}
.quick-card p{
  color:var(--text-dim);
  max-width:24ch;
}

/* ---------- section title ---------- */
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:52px; flex-wrap:wrap; gap:20px; }
h2.section-title{ font-family:var(--display); font-weight:600; font-size:clamp(28px,4vw,42px); letter-spacing:-.01em; max-width:14ch; }
.section-sub{ color:var(--text-dim); max-width:34ch; font-size:14.5px; }

section.block{ padding:120px 0; border-top:1px solid var(--hairline-soft); }

/* ---------- about ---------- */
.about-grid{ display:grid; grid-template-columns:1fr 1fr; gap:64px; align-items:start; }
@media (max-width:820px){ .about-grid{ grid-template-columns:1fr; } }
.about-copy p{ color:var(--text-dim); margin-bottom:18px; max-width:52ch; }
.stack-list{ display:flex; flex-wrap:wrap; gap:10px; margin-top:28px; }
.stack-chip{
  font-family:var(--mono); font-size:11.5px; letter-spacing:.04em; padding:8px 14px;
  border:1px solid var(--hairline); border-radius:2px; color:var(--text-dim);
  transition:all .25s ease;
}
.stack-chip:hover{ border-color:var(--accent-dim); color:var(--accent); background:var(--accent-glow); }

.approach-list{ display:flex; flex-direction:column; gap:0; }
.approach-item{
  padding:24px 0; border-bottom:1px solid var(--hairline-soft); display:grid; grid-template-columns:50px 1fr; gap:18px;
}
.approach-item:first-child{ padding-top:0; }
.approach-num{ font-family:var(--mono); color:var(--accent-dim); font-size:13px; }
.approach-item h3{ font-family:var(--display); font-weight:600; font-size:17px; margin-bottom:6px; }
.approach-item p{ color:var(--text-dim); font-size:14px; max-width:48ch; }

/* ---------- projects ---------- */
.project-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; background:transparent; border:none; }
@media (max-width:900px){ .project-grid{ grid-template-columns:1fr; } }
.project-card{
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); padding:0; position:relative; overflow:hidden;
  transition:background .3s ease;
  border:1px solid var(--hairline-soft);
}
.project-card:hover{ background:var(--surface); }
.project-card::after{
  content:''; position:absolute; inset:0; border:1px solid transparent; transition:border-color .3s ease; pointer-events:none;
}
.project-card:hover::after{ border-color:var(--accent-dim); }
.project-preview{
  aspect-ratio:16 / 9;
  overflow:hidden;
  border-bottom:1px solid var(--hairline);
  background:var(--surface);
}
.project-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .35s ease;
  filter:saturate(1.05) contrast(1.02);
}
.project-card:hover .project-preview img{ transform:scale(1.03); }
.project-card.preview-missing .project-preview{
  position:relative;
  background:
    radial-gradient(circle at 18% 22%, rgba(229,210,131,.22), transparent 26%),
    linear-gradient(135deg, rgba(79,112,156,.40), rgba(33,53,85,.65));
}
.project-card.preview-missing .project-preview img{ opacity:0; }
.project-card.preview-missing .project-preview::after{
  content:'Add local preview image';
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--mono);
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--text);
  background:linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.16));
}
.project-card > :not(.project-preview){
  padding-left:30px;
  padding-right:30px;
}
.project-card > .project-num{
  padding-top:24px;
}
.project-card > .project-open{
  padding-bottom:30px;
}
.project-num{ font-family:var(--mono); font-size:11px; color:var(--text-faint); letter-spacing:.08em; }
.project-card h3{ font-family:var(--display); font-size:21px; font-weight:600; margin:18px 0 10px; }
.project-card .tagline{ color:var(--text-dim); font-size:13.5px; margin-bottom:20px; min-height:40px; }
.project-tags{ display:flex; flex-wrap:wrap; gap:8px; }
.project-tags span{ font-family:var(--mono); font-size:10.5px; color:var(--bg); border:1px solid var(--accent); background:var(--accent); padding:4px 9px; border-radius:2px; }
.project-open{
  margin-top:22px; font-family:var(--mono); font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--text-faint); display:flex; align-items:center; gap:6px;
}
.project-card:hover .project-open{ color:var(--accent); }

/* ---------- skills ---------- */
.skills-grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:1px; background:var(--hairline-soft); border:1px solid var(--hairline-soft); }
@media (max-width:900px){ .skills-grid{ grid-template-columns:repeat(2,1fr); } }
.skill-cell{ background:var(--bg); padding:32px 26px; transition:background .3s ease; }
.skill-cell:hover{ background:var(--surface); }
.skill-cell .project-num{ display:block; margin-bottom:16px; }
.skill-cell h3{ font-family:var(--display); font-size:16px; font-weight:600; margin-bottom:10px; }
.skill-cell p{ font-size:13px; color:var(--text-dim); }

/* ---------- contact ---------- */
.contact-panel{ display:grid; grid-template-columns:1fr 1fr; gap:0; border:1px solid var(--hairline); border-radius:var(--radius); overflow:hidden; }
@media (max-width:820px){ .contact-panel{ grid-template-columns:1fr; } }
.contact-left{ padding:52px; border-right:1px solid var(--hairline); background:var(--surface); }
@media (max-width:820px){ .contact-left{ border-right:none; border-bottom:1px solid var(--hairline); } }
.contact-right{ padding:52px; }
.contact-left h3{ font-family:var(--display); font-size:26px; font-weight:600; margin-bottom:16px; max-width:14ch; }
.contact-left p{ color:var(--text-dim); margin-bottom:30px; max-width:36ch; font-size:14.5px; }
.contact-links{ display:flex; flex-direction:column; gap:14px; }
.contact-links a{ display:flex; align-items:center; gap:10px; font-family:var(--mono); font-size:13px; color:var(--text-dim); transition:color .2s ease; }
.contact-links a:hover{ color:var(--accent); }
.contact-links a .arrow{ transition:transform .2s ease; }
.contact-links a:hover .arrow{ transform:translateX(4px); }

.field{ margin-bottom:20px; }
.field label{ display:block; font-family:var(--mono); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-faint); margin-bottom:8px; }
.field input, .field select, .field textarea{
  width:100%; background:transparent; border:none; border-bottom:1px solid var(--hairline);
  color:var(--text); font-family:var(--body); font-size:14.5px; padding:8px 0; outline:none;
  transition:border-color .25s ease;
}
.field select option{ background:var(--bg); color:var(--text); }
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--accent); }
.field textarea{ resize:vertical; min-height:70px; }
.submit-btn{
  margin-top:12px; width:100%; justify-content:center; background:var(--accent); color:var(--bg); border-color:var(--accent);
  font-family:var(--mono); font-size:12px; letter-spacing:.08em; text-transform:uppercase; padding:15px; border-radius:var(--radius);
  border:1px solid var(--accent); cursor:pointer; transition:background .2s ease;
}
.submit-btn:hover{ background:#f2e6ab; }

footer{ padding:40px 0; border-top:1px solid var(--hairline-soft); display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; }
footer .brand{ font-size:14px; }
footer .foot-links{ display:flex; gap:24px; font-family:var(--mono); font-size:11px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.06em; }
footer .foot-links a:hover{ color:var(--accent); }

/* ---------- reveal on scroll ---------- */
.reveal{ opacity:0; transform:translateY(24px); transition:opacity .7s ease, transform .7s ease; }
.reveal.in{ opacity:1; transform:translateY(0); }

/* ---------- modal ---------- */
.modal-overlay{
  position:fixed; inset:0; background:rgba(16,17,20,.84); backdrop-filter:blur(6px);
  z-index:200; display:flex; align-items:center; justify-content:center; padding:24px;
  opacity:0; pointer-events:none; transition:opacity .35s ease;
}
.modal-overlay.open{ opacity:1; pointer-events:auto; }
.modal-card{
  background:var(--surface-raised); border:1px solid var(--hairline); border-radius:var(--radius);
  max-width:640px; width:100%; padding:48px; position:relative; max-height:84vh; overflow-y:auto;
  transform:translateY(18px) scale(.98); transition:transform .35s cubic-bezier(.2,.8,.2,1);
  box-shadow:0 24px 70px rgba(0,0,0,.3);
}
.modal-overlay.open .modal-card{ transform:translateY(0) scale(1); }
.modal-close{
  position:absolute; top:24px; right:24px; width:34px; height:34px; border:1px solid var(--hairline);
  border-radius:50%; display:flex; align-items:center; justify-content:center; font-family:var(--mono);
  color:var(--text-dim); transition:all .2s ease;
}
.modal-close:hover{ border-color:var(--accent); color:var(--accent); }
.modal-card .project-num{ display:block; margin-bottom:14px; }
.modal-card h3{ font-family:var(--display); font-size:28px; font-weight:600; margin-bottom:6px; max-width:16ch; }
.modal-card .modal-tagline{ color:var(--accent); font-family:var(--mono); font-size:12px; letter-spacing:.05em; margin-bottom:24px; }
.modal-card .modal-body p{ color:var(--text-dim); font-size:14.5px; margin-bottom:16px; }
.modal-tags{ display:flex; flex-wrap:wrap; gap:8px; margin:24px 0; }
.modal-tags span{ font-family:var(--mono); font-size:10.5px; color:var(--accent); border:1px solid var(--accent-dim); padding:4px 9px; border-radius:2px; }
.modal-actions{ display:flex; gap:14px; margin-top:28px; flex-wrap:wrap; }

/* ---------- editorial theme ---------- */
html[data-theme="editorial"]{
  --bg:#f3eddf;
  --surface:#ece5d3;
  --surface-raised:#ece5d3;
  --hairline:#d9cfb8;
  --hairline-soft:#e5dcc8;
  --text:#2b2620;
  --text-dim:#5c5548;
  --text-faint:#948b76;
  --accent:#2b2620;
  --accent-dim:#5c5548;
  --accent-glow:transparent;
  --radius:0px;
  --display: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --body: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --mono: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --maxw:760px;
}
html[data-theme="editorial"] body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--body);
  cursor:auto;
  padding-top:48px;
}
html[data-theme="editorial"] a,
html[data-theme="editorial"] button,
html[data-theme="editorial"] input,
html[data-theme="editorial"] select,
html[data-theme="editorial"] textarea{
  cursor:auto;
}
html[data-theme="editorial"] .grain,
html[data-theme="editorial"] #cursor-dot,
html[data-theme="editorial"] #cursor-ring,
html[data-theme="editorial"] #cursor-label{
  display:none !important;
}
html[data-theme="editorial"] header{
  display:none;
}
html[data-theme="editorial"] footer{
  display:none;
}
html[data-theme="editorial"] nav.wrap{
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  padding:0 24px;
  gap:18px;
}
html[data-theme="editorial"] .brand,
html[data-theme="editorial"] .navlinks,
html[data-theme="editorial"] .foot-links{
  font-family:var(--body);
}
html[data-theme="editorial"] .dot{
  display:none;
}
html[data-theme="editorial"] .navlinks{
  gap:18px;
  font-size:13px;
  letter-spacing:0;
  text-transform:none;
}
html[data-theme="editorial"] .navlinks a{
  color:var(--text-dim);
  padding-bottom:0;
  text-decoration:underline;
  text-underline-offset:.18em;
  text-decoration-thickness:1px;
}
html[data-theme="editorial"] .navlinks a::after{
  display:none;
}
html[data-theme="editorial"] .theme-toggle{
  border:0;
  background:transparent;
  padding:0;
  color:var(--text);
  font-family:var(--body);
  font-size:13px;
  letter-spacing:0;
  text-transform:none;
  border-radius:0;
  text-decoration:underline;
  text-underline-offset:.18em;
  text-decoration-thickness:1px;
}
html[data-theme="editorial"] .theme-switcher{
  top:16px;
  right:16px;
  z-index:200;
}
html[data-theme="dashboard"] .theme-switcher{
  top:92px;
}
html[data-theme="editorial"] .theme-switcher .theme-toggle{
  min-width:68px;
  opacity:.75;
}
html[data-theme="editorial"] .theme-switcher .theme-toggle.active{
  opacity:1;
}
html[data-theme="editorial"] .menu-toggle{
  width:auto;
  height:auto;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
html[data-theme="editorial"] .menu-toggle span{
  background:var(--text);
}
html[data-theme="editorial"] .mobile-menu{
  display:none;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  padding:12px 24px 0;
}
html[data-theme="editorial"] .mobile-menu.open{
  display:block;
}
html[data-theme="editorial"] .mobile-menu a{
  border-bottom:1px solid var(--hairline);
  color:var(--text-dim);
  text-transform:none;
  font-size:13px;
  letter-spacing:0;
  padding:10px 0;
  text-decoration:none;
}
html[data-theme="editorial"] .hero{
  min-height:auto;
  padding-top:48px;
  padding-bottom:24px;
}
html[data-theme="editorial"] .panel{
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
html[data-theme="editorial"] .corner,
html[data-theme="editorial"] .status-line .dot,
html[data-theme="editorial"] .role-rotator{
  display:none;
}
html[data-theme="editorial"] h1.hero-title,
html[data-theme="editorial"] h2.section-title,
html[data-theme="editorial"] .home-switcher-panel h3,
html[data-theme="editorial"] .quick-card h3,
html[data-theme="editorial"] .project-card h3,
html[data-theme="editorial"] .contact-left h3,
html[data-theme="editorial"] .skill-cell h3,
html[data-theme="editorial"] .approach-item h3,
html[data-theme="editorial"] .modal-card h3{
  font-family:var(--display);
  font-weight:400;
  letter-spacing:0;
}
html[data-theme="editorial"] h1.hero-title{
  max-width:100%;
  font-size:clamp(34px, 5vw, 58px);
  line-height:1.12;
}
html[data-theme="editorial"] .hero-copy,
html[data-theme="editorial"] .section-sub,
html[data-theme="editorial"] .home-switcher-panel p,
html[data-theme="editorial"] .home-switcher-aside p,
html[data-theme="editorial"] .quick-card p,
html[data-theme="editorial"] .about-copy p,
html[data-theme="editorial"] .approach-item p,
html[data-theme="editorial"] .project-card .tagline,
html[data-theme="editorial"] .contact-left p,
html[data-theme="editorial"] .skill-cell p,
html[data-theme="editorial"] .modal-card .modal-body p{
  color:var(--text-dim);
  font-size:15px;
}
html[data-theme="editorial"] .home-switcher,
html[data-theme="editorial"] .quick-grid,
html[data-theme="editorial"] .dashboard-only,
html[data-theme="editorial"] .page-links,
html[data-theme="editorial"] .page-meta,
html[data-theme="editorial"] .focus-row,
html[data-theme="editorial"] .hero-cta,
html[data-theme="editorial"] .mobile-menu,
html[data-theme="editorial"] .desktop-cta,
html[data-theme="editorial"] .menu-toggle{
  display:none !important;
}
html[data-theme="dashboard"] .editorial-resume{
  display:none;
}
html[data-theme="editorial"] .hero-cta,
html[data-theme="editorial"] .page-links,
html[data-theme="editorial"] .page-meta,
html[data-theme="editorial"] .focus-row,
html[data-theme="editorial"] .stack-list,
html[data-theme="editorial"] .project-tags,
html[data-theme="editorial"] .home-switcher-tags,
html[data-theme="editorial"] .modal-tags{
  display:block;
  margin-top:14px;
}
html[data-theme="editorial"] .btn,
html[data-theme="editorial"] .focus-chip,
html[data-theme="editorial"] .stack-chip,
html[data-theme="editorial"] .project-tags span,
html[data-theme="editorial"] .home-switcher-tags span,
html[data-theme="editorial"] .modal-tags span,
html[data-theme="editorial"] .switch-tab,
html[data-theme="editorial"] .submit-btn,
html[data-theme="editorial"] .contact-links a,
html[data-theme="editorial"] .project-open,
html[data-theme="editorial"] .foot-links a{
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  color:var(--text);
  padding:0;
  text-transform:none;
  letter-spacing:0;
  font-family:var(--body);
  text-decoration:underline;
  text-underline-offset:.18em;
  text-decoration-thickness:1px;
}
html[data-theme="editorial"] .btn,
html[data-theme="editorial"] .submit-btn,
html[data-theme="editorial"] .theme-toggle,
html[data-theme="editorial"] .switch-tab,
html[data-theme="editorial"] .project-open,
html[data-theme="editorial"] .foot-links a{
  display:inline;
  width:auto;
}
html[data-theme="editorial"] .btn:hover,
html[data-theme="editorial"] .focus-chip:hover,
html[data-theme="editorial"] .stack-chip:hover,
html[data-theme="editorial"] .project-tags span:hover,
html[data-theme="editorial"] .home-switcher-tags span:hover,
html[data-theme="editorial"] .submit-btn:hover{
  transform:none;
  background:transparent;
  color:var(--text);
}
html[data-theme="editorial"] .btn.primary,
html[data-theme="editorial"] .btn.ghost,
html[data-theme="editorial"] .submit-btn{
  color:var(--text);
}
html[data-theme="editorial"] .editorial-resume{
  display:block;
  padding-top:24px;
}
html[data-theme="editorial"] .resume-intro{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  max-width:52ch;
  margin-bottom:28px;
}
html[data-theme="editorial"] .resume-group{
  padding-top:18px;
  border-top:1px solid var(--hairline);
  margin-top:18px;
}
html[data-theme="editorial"] .resume-group h3{
  font-family:var(--display);
  font-size:20px;
  font-weight:400;
  margin-bottom:12px;
}
html[data-theme="editorial"] .resume-list{
  display:block;
}
html[data-theme="editorial"] .resume-item{
  padding:12px 0;
  border-bottom:1px solid var(--hairline);
}
html[data-theme="editorial"] .resume-item:last-child{
  border-bottom:0;
}
html[data-theme="editorial"] .resume-label{
  color:var(--text);
  font-size:16px;
  margin-bottom:4px;
}
html[data-theme="editorial"] .resume-item p{
  color:var(--text-dim);
  margin-bottom:6px;
  max-width:62ch;
}
html[data-theme="editorial"] .resume-item a{
  color:var(--text);
  text-decoration:underline;
  text-underline-offset:.18em;
  text-decoration-thickness:1px;
}
html[data-theme="editorial"] .focus-chip:not(:last-child)::after,
html[data-theme="editorial"] .stack-chip:not(:last-child)::after,
html[data-theme="editorial"] .project-tags span:not(:last-child)::after,
html[data-theme="editorial"] .home-switcher-tags span:not(:last-child)::after,
html[data-theme="editorial"] .modal-tags span:not(:last-child)::after{
  content:", ";
}
html[data-theme="editorial"] .home-switcher{
  display:none;
}
html[data-theme="editorial"] .home-switcher-tabs,
html[data-theme="editorial"] .home-switcher-panel,
html[data-theme="editorial"] .home-switcher-aside{
  display:block;
  padding:0;
  border:0;
  background:transparent;
  border-radius:0;
}
html[data-theme="editorial"] .home-switcher-tabs{
  margin-bottom:16px;
}
html[data-theme="editorial"] .switch-tab{
  display:inline;
  width:auto;
  text-align:left;
  margin-right:16px;
}
html[data-theme="editorial"] .switch-tab.active{
  color:var(--text);
  font-weight:700;
}
html[data-theme="editorial"] .home-switcher-panel{
  min-height:auto;
  margin-bottom:18px;
}
html[data-theme="editorial"] .home-switcher-aside{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--hairline);
}
html[data-theme="editorial"] .quick-grid,
html[data-theme="editorial"] .project-grid,
html[data-theme="editorial"] .skills-grid{
  display:block;
  gap:0;
  background:transparent;
  border:0;
}
html[data-theme="editorial"] .quick-card,
html[data-theme="editorial"] .project-card,
html[data-theme="editorial"] .skill-cell,
html[data-theme="editorial"] .approach-item{
  display:block;
  padding:18px 0;
  border:0;
  border-bottom:1px solid var(--hairline);
  background:transparent;
  transform:none;
}
html[data-theme="editorial"] .quick-card:hover,
html[data-theme="editorial"] .project-card:hover,
html[data-theme="editorial"] .skill-cell:hover{
  background:transparent;
  border-color:var(--hairline);
  transform:none;
}
html[data-theme="editorial"] .quick-card:last-child,
html[data-theme="editorial"] .project-card:last-child,
html[data-theme="editorial"] .skill-cell:last-child,
html[data-theme="editorial"] .approach-item:last-child{
  border-bottom:0;
}
html[data-theme="editorial"] .quick-card p,
html[data-theme="editorial"] .project-card .tagline,
html[data-theme="editorial"] .skill-cell p,
html[data-theme="editorial"] .approach-item p{
  max-width:none;
}
html[data-theme="editorial"] .project-preview,
html[data-theme="editorial"] .project-card::after{
  display:none;
}
html[data-theme="editorial"] .project-card > :not(.project-preview){
  padding-left:0;
  padding-right:0;
}
html[data-theme="editorial"] .project-open{
  margin-top:10px;
  display:inline;
}
html[data-theme="editorial"] .about-grid{
  display:block;
}
html[data-theme="editorial"] .about-copy{
  margin-bottom:24px;
}
html[data-theme="editorial"] .approach-item{
  grid-template-columns:1fr;
  gap:6px;
}
html[data-theme="editorial"] .approach-num,
html[data-theme="editorial"] .project-num,
html[data-theme="editorial"] .home-switcher-kicker,
html[data-theme="editorial"] .modal-card .modal-tagline,
html[data-theme="editorial"] .field label{
  color:var(--text-faint);
  text-transform:none;
  letter-spacing:0;
}
html[data-theme="editorial"] .contact-panel{
  display:block;
  border:0;
  border-radius:0;
  overflow:visible;
}
html[data-theme="editorial"] .contact-left,
html[data-theme="editorial"] .contact-right{
  padding:0;
  background:transparent;
}
html[data-theme="editorial"] .contact-left{
  padding-bottom:18px;
  border-right:0;
  border-bottom:1px solid var(--hairline);
  margin-bottom:18px;
}
html[data-theme="editorial"] .field input,
html[data-theme="editorial"] .field select,
html[data-theme="editorial"] .field textarea{
  border-bottom:1px solid var(--hairline);
  color:var(--text);
}
html[data-theme="editorial"] .field select option{
  background:var(--bg);
  color:var(--text);
}
html[data-theme="editorial"] footer{
  display:none;
}
html[data-theme="editorial"] .modal-overlay{
  background:rgba(243,237,223,.96);
  backdrop-filter:none;
  padding:96px 0 24px;
  align-items:flex-start;
}
html[data-theme="editorial"] .modal-card{
  max-width:var(--maxw);
  padding:0 24px;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}
html[data-theme="editorial"] .modal-close{
  position:static;
  width:auto;
  height:auto;
  margin-bottom:16px;
  border:0;
  border-radius:0;
  padding:0;
  text-decoration:underline;
  text-underline-offset:.18em;
}
html[data-theme="editorial"] .modal-actions{
  margin-top:20px;
}

/* ---------- landing choice modal ---------- */
.landing-choice-overlay{
  z-index:220;
}
.landing-choice-modal{
  max-width:760px;
}
.landing-choice-eyebrow{
  margin-bottom:14px;
}
.landing-choice-title{
  font-family:var(--display);
  font-weight:600;
  letter-spacing:-.02em;
  line-height:1.08;
  font-size:clamp(30px, 4.1vw, 48px);
  max-width:12ch;
}
.landing-choice-copy{
  margin-top:14px;
  max-width:42ch;
  color:var(--text-dim);
  font-size:15px;
}
.landing-choice-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:28px;
}
.landing-choice-option{
  appearance:none;
  width:100%;
  padding:22px;
  text-align:left;
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  background:var(--surface);
  color:var(--text);
  display:flex;
  flex-direction:column;
  gap:10px;
  cursor:pointer;
  transition:transform .2s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.landing-choice-option:hover,
.landing-choice-option:focus-visible{
  transform:translateY(-2px);
  border-color:var(--accent-dim);
  background:var(--surface-raised);
  box-shadow:0 12px 26px rgba(0,0,0,.12);
}
.landing-choice-option:focus-visible,
.landing-choice-dismiss:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.landing-choice-option-title{
  font-family:var(--display);
  font-weight:600;
  font-size:22px;
  line-height:1.1;
}
.landing-choice-option-copy{
  color:var(--text-dim);
  font-size:14px;
}
.landing-choice-dismiss{
  margin-top:20px;
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  color:var(--text-dim);
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  text-decoration:underline;
  text-underline-offset:.18em;
  cursor:pointer;
}
.landing-choice-dismiss:hover{
  color:var(--accent);
}
@media (max-width:680px){
  .landing-choice-grid{
    grid-template-columns:1fr;
  }
  .landing-choice-modal{
    padding:28px 22px;
  }
}
html[data-theme="dashboard"] .landing-choice-overlay{
  background:rgba(16,17,20,.84);
  backdrop-filter:blur(6px);
  align-items:center;
  padding:24px;
}
html[data-theme="editorial"] .landing-choice-overlay{
  background:rgba(243,237,223,.96);
  backdrop-filter:none;
  align-items:center;
  padding:24px;
}
html[data-theme="dashboard"] .landing-choice-modal,
html[data-theme="editorial"] .landing-choice-modal{
  padding:40px;
  background:var(--surface-raised);
  border:1px solid var(--hairline);
  border-radius:var(--radius);
  box-shadow:0 24px 70px rgba(0,0,0,.3);
}
html[data-theme="editorial"] .landing-choice-title{
  font-weight:400;
  letter-spacing:0;
}
html[data-theme="editorial"] .landing-choice-option{
  background:var(--bg);
  border-color:var(--hairline);
  box-shadow:none;
}
html[data-theme="editorial"] .landing-choice-option:hover,
html[data-theme="editorial"] .landing-choice-option:focus-visible{
  background:var(--surface);
  border-color:var(--accent-dim);
  box-shadow:none;
}
html[data-theme="editorial"] .landing-choice-option-title{
  font-weight:400;
  letter-spacing:0;
}
html[data-theme="editorial"] .landing-choice-dismiss{
  color:var(--text);
  font-family:var(--body);
  font-size:13px;
  letter-spacing:0;
  text-transform:none;
}
html[data-theme="editorial"] .landing-choice-dismiss:hover{
  color:var(--text);
}

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