:root,
html[data-theme="rice-paper"] {
  --bg: #f2ead8;
  --bg-card: #fffaf0;
  --bg-card-hover: #fffdf7;
  --border: #cdbfa6;
  --text: #28211b;
  --text-dim: #6f6358;
  --accent: #bd3f2b;
  --accent-dim: rgba(189, 63, 43, .12);
  --blue: #365c6f;
  --glow-a: rgba(189, 63, 43, .09);
  --glow-b: rgba(54, 92, 111, .08);
  --radius: 5px;
  --shadow: 0 14px 35px rgba(64, 46, 30, .10);
  --font: Georgia, 'Times New Roman', serif;
}

html[data-theme="cosmic-workshop"] {
  --bg: #080b1a;
  --bg-card: #12172b;
  --bg-card-hover: #181f39;
  --border: #2b3558;
  --text: #f5f3ff;
  --text-dim: #aab3d1;
  --accent: #ffb84c;
  --accent-dim: rgba(255, 184, 76, .13);
  --blue: #52d9ff;
  --glow-a: rgba(255, 184, 76, .14);
  --glow-b: rgba(82, 217, 255, .13);
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .42);
  --font: Inter, ui-sans-serif, system-ui, sans-serif;
}

html[data-theme="blueprint-lab"] {
  --bg: #063b77;
  --bg-card: #0b4a8f;
  --bg-card-hover: #1058a4;
  --border: rgba(230, 247, 255, .48);
  --text: #f5fbff;
  --text-dim: #c8e1f2;
  --accent: #fff26b;
  --accent-dim: rgba(255, 242, 107, .13);
  --blue: #9fe8ff;
  --glow-a: rgba(255, 242, 107, .08);
  --glow-b: rgba(159, 232, 255, .11);
  --radius: 0;
  --shadow: 6px 6px 0 rgba(3, 28, 57, .55);
  --font: 'Courier New', ui-monospace, monospace;
}

html[data-theme="vapor-orchard"] {
  --bg: #fff1eb;
  --bg-card: rgba(255, 255, 255, .75);
  --bg-card-hover: rgba(255, 255, 255, .94);
  --border: #d7c8ed;
  --text: #392d4a;
  --text-dim: #766a85;
  --accent: #b64b9a;
  --accent-dim: rgba(182, 75, 154, .11);
  --blue: #3b9e91;
  --glow-a: rgba(255, 143, 163, .23);
  --glow-b: rgba(116, 208, 187, .22);
  --radius: 28px;
  --shadow: 0 20px 45px rgba(108, 79, 130, .14);
  --font: Inter, ui-rounded, system-ui, sans-serif;
}

html[data-theme="kinetic-editorial"] {
  --bg: #f5f0df;
  --bg-card: #fffdf4;
  --bg-card-hover: #fff7d9;
  --border: #111;
  --text: #111;
  --text-dim: #454545;
  --accent: #ed3d24;
  --accent-dim: rgba(237, 61, 36, .12);
  --blue: #1649d8;
  --glow-a: rgba(237, 61, 36, .08);
  --glow-b: rgba(22, 73, 216, .09);
  --radius: 0;
  --shadow: 8px 8px 0 #1649d8;
  --font: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(900px 500px at 85% -10%, var(--glow-a), transparent 60%), radial-gradient(700px 400px at -10% 10%, var(--glow-b), transparent 60%), var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  transition: color .25s ease, background .25s ease;
}

a { color: inherit; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

.theme-control { position: fixed; z-index: 20; top: 18px; right: 18px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--bg-card) 88%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.theme-control label { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.theme-control select { max-width: 175px; padding: 7px 28px 7px 9px; color: var(--text); border: 1px solid var(--border); border-radius: max(0px, calc(var(--radius) * .55)); background: var(--bg-card); font: 600 12px var(--font); }

header.hero { padding: 100px 0 60px; border-bottom: 1px solid var(--border); }
.hero-inner { display: flex; align-items: center; gap: 44px; }
.hero-photo { flex: none; width: 148px; height: 148px; border-radius: 50%; padding: 4px; background: linear-gradient(135deg, var(--accent), var(--blue)); box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; border: 3px solid var(--bg); }
.hero-text { min-width: 0; }
.eyebrow, .section-label { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font: 700 12px var(--font); margin: 0 0 14px; }
.hero h1, .project-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0 0 14px; font-weight: 800; letter-spacing: -.03em; }
.lede { color: var(--text-dim); font-size: 1.1rem; max-width: 620px; margin: 0 0 20px; }
.social-row, .action-row { display: flex; flex-wrap: wrap; gap: 14px; }
.social-row a, .button, .back-link { display: inline-flex; align-items: center; gap: 8px; font: 600 .88rem var(--font); text-decoration: none; padding: 9px 15px; border: 1px solid var(--border); border-radius: 999px; transition: .15s ease; }
.social-row a, .back-link { color: var(--text-dim); background: var(--bg-card); }
.social-row a:hover, .back-link:hover { color: var(--text); border-color: var(--accent); }
.button { color: #fff; border-color: var(--accent); background: var(--accent); }
.button.secondary { color: var(--text); border-color: var(--border); background: transparent; }
.button:hover { filter: brightness(1.08); }
.button.secondary:hover { border-color: var(--accent); }

main { padding: 64px 0 96px; }
section h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); margin: 0 0 28px; font-weight: 700; }
.projects, .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card, .feature { position: relative; display: block; color: var(--text); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; text-decoration: none; overflow: hidden; box-shadow: var(--shadow); }
.card { transition: border-color .18s ease, transform .18s ease, background .18s ease, box-shadow .18s ease; }
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--blue)); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.card:hover { border-color: var(--accent); background: var(--bg-card-hover); transform: translateY(-4px); }
.card:hover::before { transform: scaleX(1); }
.tag, .status-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.status-badge { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-dim); }
.card h3, .feature h3 { margin: 0 0 10px; font-size: 1.3rem; font-weight: 800; }
.card p, .feature p, .project-copy p, .project-copy li { color: var(--text-dim); }
.card p, .feature p { margin: 0; }
.arrow { display: inline-block; margin-top: 18px; font-size: .85rem; color: var(--text-dim); }
.project-header { padding: 32px 0; border-bottom: 1px solid var(--border); }
.project-hero { padding: 72px 0 44px; }
.project-copy { max-width: 700px; margin-top: 52px; }
.project-copy h2 { margin-top: 40px; margin-bottom: 14px; color: var(--text); font-size: 1.35rem; letter-spacing: normal; text-transform: none; }
.project-copy ul { padding-left: 22px; }
.project-copy li { margin: 8px 0; }
.notice { margin-top: 36px; padding: 20px 22px; border-left: 3px solid var(--blue); border-radius: 0 12px 12px 0; background: color-mix(in srgb, var(--blue) 10%, transparent); color: var(--text-dim); }
footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--text-dim); font-size: .85rem; }

html[data-theme="rice-paper"] body { background-image: linear-gradient(rgba(80, 60, 35, .025) 1px, transparent 1px); background-size: 4px 4px; }
html[data-theme="rice-paper"] .hero-photo { border-radius: 3px; transform: rotate(-1.5deg); }
html[data-theme="rice-paper"] .hero-photo img { border-radius: 1px; }
html[data-theme="blueprint-lab"] body { background-image: linear-gradient(rgba(255,255,255,.075) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.075) 1px, transparent 1px); background-size: 24px 24px; }
html[data-theme="blueprint-lab"] .hero h1 { text-transform: uppercase; }
html[data-theme="vapor-orchard"] body { background-image: radial-gradient(circle at 15% 20%, var(--glow-a), transparent 30%), radial-gradient(circle at 85% 75%, var(--glow-b), transparent 35%); background-attachment: fixed; }
html[data-theme="vapor-orchard"] .card { backdrop-filter: blur(18px); }
html[data-theme="kinetic-editorial"] .hero h1, html[data-theme="kinetic-editorial"] .card h3 { text-transform: uppercase; }
html[data-theme="kinetic-editorial"] .card { border-width: 3px; }

@media (max-width: 720px) {
  .theme-control { position: static; justify-content: space-between; margin: 12px; }
  header.hero { padding-top: 48px; }
}

@media (max-width: 620px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-photo { width: 112px; height: 112px; }
  .project-hero { padding-top: 52px; }
}
