/* ========== Tokens ========== */
:root {
  --bg: #0b0d12;
  --bg-elevated: #12151c;
  --bg-soft: #161a24;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --text-muted: #9aa3b5;
  --accent: #6ee7ff;
  --accent-2: #a78bfa;
  --accent-glow: rgba(110, 231, 255, 0.18);
  --fact-bg: #0f1420;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  /* Shared portfolio mega-box (same geometry as dungeon gold panel) */
  --portfolio-box-radius: 24px;
  --portfolio-box-width: 70%;
  --portfolio-box-side: 15%;
  --portfolio-box-pad: clamp(1.15rem, 2.4vw, 1.65rem);
  --portfolio-section-pad-y: clamp(1.75rem, 4vw, 2.75rem);
  --header-h: 64px;
  --container: 1120px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== Reset / base ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* Room for fixed header so content is not covered */
  padding-top: var(--header-h);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

/* ========== Header band (fixed so it stays visible while scrolling) ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(11, 13, 18, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.logo-text {
  font-size: 0.95rem;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a,
.mobile-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.nav a:hover,
.mobile-nav a:hover,
.nav a:focus-visible,
.mobile-nav a:focus-visible {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.mobile-nav a {
  padding: 0.65rem 0.5rem;
}

.mobile-nav.is-open {
  display: flex;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s,
    box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #5ad8f0, #8b7cf6);
  color: #0b0d12;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(110, 231, 255, 0.28);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

/* ========== Hero (+ expertise below the fold, one continuous band) ========== */
.hero {
  position: relative;
  min-height: 0;
  padding: 0 0 clamp(2.5rem, 5vw, 3.5rem);
  overflow: hidden;
  /* Same section divider as Project 01 */
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(2.5rem, 6vw, 4rem);
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 70% 0%, rgba(167, 139, 250, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 45% at 15% 30%, rgba(110, 231, 255, 0.12), transparent 50%),
    var(--bg);
  pointer-events: none;
}

/* First screen only: intro fills the viewport; expertise sits below the fold */
.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  width: var(--portfolio-box-width);
  margin-inline: var(--portfolio-box-side);
  box-sizing: border-box;
  flex: 0 0 auto;
  min-height: calc(100vh - var(--header-h));
  padding-block: clamp(2rem, 4vw, 3rem);
}

.hero-copy {
  position: relative;
  max-width: none;
  width: 100%;
  min-width: 0;
  padding-bottom: 0;
}

.hero-portrait {
  min-width: 0;
  width: 100%;
}

.hero-portrait-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  /* Soft fade into page background at the bottom */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 58%,
    rgba(0, 0, 0, 0.65) 78%,
    rgba(0, 0, 0, 0.25) 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 58%,
    rgba(0, 0, 0, 0.65) 78%,
    rgba(0, 0, 0, 0.25) 90%,
    transparent 100%
  );
}

/* Expertise + education share one hero flex slot so spacing is exact */
.hero-below {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Expertise: same hero band, only visible after scrolling past the first screen */
.hero-expertise {
  position: relative;
  z-index: 1;
  width: var(--portfolio-box-width);
  margin-inline: var(--portfolio-box-side);
  box-sizing: border-box;
  padding-bottom: clamp(0.5rem, 2vw, 1rem);
}

.hero-expertise-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.hero-expertise-lead {
  margin-bottom: 1.5rem;
  max-width: 40rem;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Outside project labels — same size/format: "Project 0X · Name" */
.project-section-label {
  width: var(--portfolio-box-width);
  margin: 0 var(--portfolio-box-side) 0.85rem;
  box-sizing: border-box;
  text-align: left;
  font-family: var(--mono);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
}

/* Project 02 — wizard / dungeon theme */
.wizard-project-label {
  font-family: "Cinzel", "Times New Roman", serif;
  letter-spacing: 0.12em;
  color: #d4a84b;
  text-shadow: 0 0 24px rgba(212, 168, 75, 0.25);
}

/* Project 05 — Bavaria / research theme */
.bavaria-project-label {
  color: #1a5a9c;
  letter-spacing: 0.06em;
}

/* Education band (sits where Fact 04 was) */
.education-band .fact-inner,
.education-band-inner {
  max-width: min(48rem, 100%);
}

.education-band .eyebrow {
  margin-bottom: 0.75rem;
}

.education-current-block {
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.hero-education-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.education-card {
  padding: clamp(1.65rem, 3vw, 2.1rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.education-card-lg {
  width: 100%;
}

.education-card:hover {
  border-color: rgba(110, 231, 255, 0.28);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(110, 231, 255, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.education-label {
  margin: 0 0 0.7rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.education-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.education-meta {
  margin: 0 0 0.9rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-2);
}

.education-desc {
  margin: 0 0 1.1rem;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.education-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.education-points li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.education-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* Site map slider below expertise */
.site-map {
  position: relative;
  z-index: 1;
  width: var(--portfolio-box-width);
  margin: 75px var(--portfolio-box-side) 0;
  box-sizing: border-box;
  padding-bottom: clamp(0.5rem, 2vw, 1rem);
}

.site-map-header {
  max-width: 40rem;
  margin-bottom: 1rem;
}

.site-map-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.site-map-lead {
  margin-bottom: 0.5rem;
}

.site-map-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.site-map-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.site-map-btn:hover,
.site-map-btn:focus-visible {
  border-color: rgba(110, 231, 255, 0.4);
  background: rgba(110, 231, 255, 0.08);
  outline: none;
}

.site-map-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0.15rem 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 231, 255, 0.35) transparent;
}

.site-map-track:focus-visible {
  outline: 2px solid rgba(110, 231, 255, 0.45);
  outline-offset: 4px;
  border-radius: 12px;
}

.site-map-card {
  flex: 0 0 min(280px, 78vw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.site-map-card:hover,
.site-map-card:focus-visible {
  border-color: rgba(110, 231, 255, 0.35);
  transform: translateY(-3px);
  outline: none;
}

.site-map-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--bg-soft);
}

/* Text-only solid cards (contact, availability, live demo) */
.site-map-card-text {
  justify-content: center;
  min-height: 140px;
  background:
    radial-gradient(ellipse 80% 70% at 20% 0%, rgba(110, 231, 255, 0.1), transparent 55%),
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(167, 139, 250, 0.1), transparent 50%),
    var(--bg-elevated);
}

.site-map-card-text .site-map-card-body {
  padding: 1.15rem 1.15rem 1.25rem;
  flex: 1;
  justify-content: center;
}

.site-map-card-body {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-map-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-map-card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.site-map-card-body p:last-child {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Project prev / next cards — outside the mega panel, same width band */
.project-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  width: var(--portfolio-box-width);
  margin: clamp(0.85rem, 2vw, 1.15rem) var(--portfolio-box-side) 0;
  box-sizing: border-box;
}

.project-nav-spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.project-nav-card {
  flex: 0 1 auto;
  max-width: min(100%, 16.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.project-nav-card:hover,
.project-nav-card:focus-visible {
  border-color: rgba(110, 231, 255, 0.4);
  background: rgba(110, 231, 255, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.project-nav-prev {
  text-align: left;
  margin-right: auto;
}

.project-nav-next {
  text-align: right;
  margin-left: auto;
}

.project-nav-dir {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-nav-name {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

@media (max-width: 900px) {
  .project-nav {
    width: 90%;
    margin-inline: 5%;
  }
}

@media (max-width: 560px) {
  .project-nav {
    flex-direction: column;
  }

  .project-nav-card {
    max-width: none;
    width: 100%;
    text-align: left;
  }

  .project-nav-next {
    text-align: left;
    margin-left: 0;
  }

  .project-nav-prev {
    margin-right: 0;
  }

  .project-nav-spacer {
    display: none;
  }
}

/* Shared info sections (process, optimize — replaced fact bands) */
.info-section {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  border-bottom: 1px solid var(--border);
  background: var(--fact-bg);
  position: relative;
}

.info-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0.85;
}

.info-section-inner {
  max-width: 52rem;
}

.info-section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.info-section-lead {
  margin: 0 0 clamp(1.75rem, 4vw, 2.25rem);
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* How I build — process steps */
.process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.15rem);
  counter-reset: none;
}

.process-step {
  padding: clamp(1.1rem, 2vw, 1.35rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.process-step:hover {
  border-color: rgba(110, 231, 255, 0.28);
  transform: translateY(-2px);
}

.process-step-num {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.process-step-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.process-step-body {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* What I optimize for */
.optimize-section {
  background:
    radial-gradient(ellipse 50% 45% at 90% 10%, rgba(167, 139, 250, 0.1), transparent 55%),
    var(--fact-bg);
}

.optimize-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.15rem);
}

.optimize-card {
  padding: clamp(1.1rem, 2vw, 1.35rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.optimize-card:hover {
  border-color: rgba(167, 139, 250, 0.35);
  transform: translateY(-2px);
}

.optimize-label {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.optimize-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.05rem, 1.6vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.optimize-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .process-steps {
    grid-template-columns: 1fr;
  }

  .optimize-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .optimize-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Skills section between Project 01 and 02 */
.skills-section {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 55% 50% at 80% 0%, rgba(110, 231, 255, 0.08), transparent 55%),
    radial-gradient(ellipse 45% 40% at 10% 80%, rgba(167, 139, 250, 0.08), transparent 50%),
    var(--fact-bg);
  position: relative;
}

.skills-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0.85;
}

.skills-inner {
  max-width: 52rem;
}

.skills-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.skills-lead {
  margin: 0 0 clamp(1.75rem, 4vw, 2.25rem);
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.skills-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.skills-group {
  padding: clamp(1.15rem, 2.2vw, 1.45rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.skills-group-title {
  margin: 0 0 1.15rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.skills-bars {
  gap: 0.95rem;
}

.skills-section .skill-bar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.5rem 0.75rem;
  align-items: baseline;
}

.skill-level {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
}

@media (max-width: 860px) {
  .skills-groups {
    grid-template-columns: 1fr;
  }

  .skills-section .skill-bar-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .skills-section .skill-level {
    grid-column: 1;
    grid-row: 2;
  }

  .skills-section .skill-pct {
    grid-column: 2;
    grid-row: 1;
  }
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}

.hero-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-meta strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 0.35rem;
}

@media (max-width: 900px) {
  .hero {
    min-height: 0;
    padding-bottom: clamp(2.5rem, 6vw, 3.5rem);
    justify-content: flex-start;
  }

  .hero-shell {
    grid-template-columns: 1fr;
    width: 90%;
    margin-inline: 5%;
    min-height: calc(100vh - var(--header-h));
  }

  .hero-expertise {
    width: 90%;
    margin-inline: 5%;
  }

  .site-map {
    width: 90%;
    margin-inline: 5%;
  }

  .project-section-label {
    width: 90%;
    margin-inline: 5%;
  }

  .hero-portrait {
    max-width: 360px;
    margin-inline: auto;
  }

  .logo-text {
    font-size: 0.82rem;
  }
}

/* ========== Shared section bits ========== */
.section-label {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}



/* ========== Portfolio blocks (mega curved box = site shell) ========== */
.portfolio-block,
.lumen-section,
.wizard-section,
.bavaria-section {
  /* Outer band stays on site theme : only the panel is the themed box */
  padding: var(--portfolio-section-pad-y) 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow: visible;
}

/* One curved mega container per project (dungeon gold-box geometry) */
.portfolio-panel,
.lumen-panel,
.wizard-panel,
.bavaria-panel {
  position: relative;
  z-index: 1;
  width: var(--portfolio-box-width);
  margin-inline: var(--portfolio-box-side);
  box-sizing: border-box;
  padding: var(--portfolio-box-pad);
  border-radius: var(--portfolio-box-radius);
  overflow: hidden;
  transform: scale(1);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease),
    filter 0.35s var(--ease);
}

/* Even highlight on hover : no tilt / bottom-lift */
@media (prefers-reduced-motion: no-preference) {
  .portfolio-panel:hover,
  .lumen-panel:hover,
  .wizard-panel:hover,
  .bavaria-panel:hover {
    transform: scale(1.012);
    z-index: 3;
  }
}

/* Default site-theme box (projects 3-4) */
.portfolio-panel {
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(110, 231, 255, 0.06), transparent 55%),
    var(--bg-elevated);
  box-shadow: var(--shadow);
}

.portfolio-panel:hover {
  border-color: rgba(110, 231, 255, 0.32);
  box-shadow:
    0 0 0 1px rgba(110, 231, 255, 0.18),
    0 0 36px rgba(110, 231, 255, 0.14),
    0 0 56px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  filter: brightness(1.04);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.portfolio-block.flip .portfolio-grid {
  direction: rtl;
}

.portfolio-block.flip .portfolio-grid > * {
  direction: ltr;
}

.portfolio-copy h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.tagline {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.portfolio-copy > p:not(.section-label):not(.tagline) {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.stack-tags {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-tags li {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--text-muted);
}

.portfolio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.media-frame {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(110, 231, 255, 0.06), rgba(167, 139, 250, 0.08)),
    var(--bg-elevated);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.media-frame.placeholder {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: var(--mono);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== Lumen section: Project 1 (light theme lives inside mega box) ========== */
.lumen-section {
  /* Lumen light tokens (from Chatbot styles.css [data-theme="light"]) */
  --lumen-bg: #f7f7f7;
  --lumen-elevated: #ffffff;
  --lumen-bubble: #e4e4e4;
  --lumen-input: #ececec;
  --lumen-border: #1a1a1a;
  --lumen-border-soft: #c8c8c8;
  --lumen-text: #111111;
  --lumen-muted: #555555;
  --lumen-accent: #222222;
  --lumen-send-bg: #000000;
  --lumen-send-text: #ffffff;
  --lumen-radius-sm: 14px;
  --lumen-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --lumen-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  --lumen-panel-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  position: relative;
  color: var(--lumen-text);
  font-family: var(--lumen-font);
}

/* Mega curved box : Lumen fill, site shell geometry */
.lumen-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--lumen-elevated);
  box-shadow:
    var(--lumen-panel-shadow),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  color: var(--lumen-text);
}

.lumen-panel:hover {
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 0 36px rgba(0, 0, 0, 0.14),
    0 0 48px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  filter: brightness(1.02);
}

/* Intro block : full width at top of the taller Lumen card */
.lumen-intro {
  width: 100%;
  max-width: 52rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
  padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  border-bottom: 1px solid var(--lumen-border-soft);
}

.lumen-copy {
  min-width: 0;
}

.lumen-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--lumen-text);
}

.lumen-tagline {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--lumen-muted);
}

.lumen-body {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--lumen-muted);
}

.lumen-body strong {
  color: var(--lumen-text);
  font-weight: 600;
}

.lumen-tags {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lumen-tags li {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--lumen-border-soft);
  background: var(--lumen-bubble);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--lumen-text);
}

.lumen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.lumen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s,
    box-shadow 0.2s;
}

.lumen-btn:hover {
  transform: translateY(-1px);
}

/* Black primary : Lumen Send button */
.lumen-btn-primary {
  background: var(--lumen-send-bg);
  color: var(--lumen-send-text);
  border: 1px solid var(--lumen-send-bg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.lumen-btn-primary:hover {
  background: #222;
  border-color: #222;
}

/* Outlined ghost : Lumen light chrome */
.lumen-btn-ghost {
  background: var(--lumen-elevated);
  color: var(--lumen-text);
  border: 1px solid var(--lumen-border);
}

.lumen-btn-ghost:hover {
  background: var(--lumen-bubble);
}

/* Hidden SVG filter host (sharpen kernel) */
.lumen-svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Stacked feature rows : photo 40% / copy 60% of the centre portfolio box */
.lumen-features {
  display: flex;
  flex-direction: column;
  gap: clamp(0.9rem, 1.8vw, 1.25rem);
  width: 100%;
}

.lumen-feature {
  display: grid;
  /* Photo = 40% of centre card row, description = 60% (gap shared via fr) */
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
  column-gap: clamp(0.85rem, 1.8vw, 1.35rem);
  align-items: start;
  padding: clamp(0.55rem, 1.2vw, 0.8rem);
  border-radius: calc(var(--lumen-radius-sm) + 4px);
  border: 1px solid var(--lumen-border-soft);
  background: var(--lumen-bg);
}

/* Odd rows: photo left · Even rows: photo right */
.lumen-feature-reverse {
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 0.4fr);
}

.lumen-feature-reverse .lumen-feature-media {
  order: 2;
}

.lumen-feature-reverse .lumen-feature-copy {
  order: 1;
}

.lumen-feature-media {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* Feature photos only : keep generic .lumen-frame for any other use */
.lumen-feature .lumen-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  border: 1px solid var(--lumen-border-soft);
  background: #f0f0f0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  isolation: isolate;
  cursor: default;
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}

/* Secondary hover highlight (photos only : not the whole feature row) */
.lumen-feature .lumen-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 0 transparent,
    0 0 0 0 transparent;
  transition: box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  background: transparent;
  z-index: 1;
}

.lumen-feature .lumen-frame:hover {
  border-color: #111111;
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 2px rgba(17, 17, 17, 0.12),
    0 14px 32px rgba(0, 0, 0, 0.16),
    0 0 28px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.lumen-feature .lumen-frame:hover::after {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.14) 0%,
    transparent 42%,
    transparent 58%,
    rgba(0, 0, 0, 0.04) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.lumen-feature .lumen-frame:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.lumen-frame.placeholder {
  display: grid;
  place-items: center;
  color: var(--lumen-muted);
  font-size: 0.88rem;
}

.lumen-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fafafa;
}

/* Resharpen scaled screenshots (mild unsharp + contrast) */
.lumen-feature .lumen-frame img {
  filter: url("#lumen-sharpen") contrast(1.06) saturate(1.03) brightness(1.01);
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: filter 0.25s var(--ease), transform 0.25s var(--ease);
}

.lumen-feature .lumen-frame:hover img {
  filter: url("#lumen-sharpen") contrast(1.1) saturate(1.05) brightness(1.03);
  transform: translateZ(0) scale(1.015);
}

.lumen-feature-copy {
  min-width: 0;
  padding: 0.15rem 0.25rem;
}

.lumen-feature-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--lumen-muted);
}

.lumen-feature-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--lumen-text);
}

.lumen-feature-body {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--lumen-muted);
}

.lumen-feature-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lumen-feature-points li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--lumen-text);
}

.lumen-feature-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--lumen-text);
}

@media (max-width: 560px) {
  .lumen-actions {
    flex-direction: column;
  }

  .lumen-btn {
    width: 100%;
  }

  /* Stack feature rows on phones (same idea as showcase; desktop layout unchanged) */
  .lumen-feature,
  .lumen-feature-reverse {
    grid-template-columns: 1fr;
    padding: 0.55rem;
    column-gap: 0.65rem;
  }

  .lumen-feature-reverse .lumen-feature-media,
  .lumen-feature-reverse .lumen-feature-copy {
    order: initial;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lumen-feature .lumen-frame,
  .lumen-feature .lumen-frame img,
  .lumen-feature .lumen-frame::after {
    transition: none;
  }

  .lumen-feature .lumen-frame:hover {
    transform: none;
  }

  .lumen-feature .lumen-frame:hover img {
    transform: none;
  }
}

/* ========== Shared project showcase (Project 1-style layout for P2–P5) ========== */
.showcase-panel {
  --show-text: var(--text);
  --show-muted: var(--text-muted);
  --show-border: var(--border);
  --show-row-bg: var(--bg-soft);
  --show-frame-bg: #0e1118;
  --show-tag-bg: rgba(255, 255, 255, 0.06);
  --show-btn-bg: var(--accent);
  --show-btn-text: #0b0d12;
  --show-btn-border: var(--accent);
  --show-dot: var(--accent);
}

.showcase-intro {
  width: 100%;
  max-width: 52rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
  padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  border-bottom: 1px solid var(--show-border);
}

.showcase-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--show-text);
}

.showcase-tagline {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--show-muted);
}

.showcase-body {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--show-muted);
}

.showcase-body strong {
  color: var(--show-text);
  font-weight: 600;
}

.showcase-tags {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.showcase-tags li {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--show-border);
  background: var(--show-tag-bg);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--show-text);
}

.showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.showcase-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s,
    box-shadow 0.2s;
}

.showcase-btn:hover {
  transform: translateY(-1px);
}

.showcase-btn-primary {
  background: var(--show-btn-bg);
  color: var(--show-btn-text);
  border: 1px solid var(--show-btn-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.showcase-btn-ghost {
  background: transparent;
  color: var(--show-text);
  border: 1px solid var(--show-border);
}

.showcase-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.showcase-features {
  display: flex;
  flex-direction: column;
  gap: clamp(0.9rem, 1.8vw, 1.25rem);
  width: 100%;
}

.showcase-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
  column-gap: clamp(0.85rem, 1.8vw, 1.35rem);
  align-items: start;
  padding: clamp(0.55rem, 1.2vw, 0.8rem);
  border-radius: 14px;
  border: 1px solid var(--show-border);
  background: var(--show-row-bg);
}

/* Odd: photo left · Even (reverse): photo right */
.showcase-feature-reverse {
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 0.4fr);
}

.showcase-feature-reverse .showcase-feature-media {
  order: 2;
}

.showcase-feature-reverse .showcase-feature-copy {
  order: 1;
}

.showcase-feature-media {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.showcase-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  border: 1px solid var(--show-border);
  background: var(--show-frame-bg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  isolation: isolate;
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.showcase-frame:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(110, 231, 255, 0.2),
    0 14px 32px rgba(0, 0, 0, 0.28);
  z-index: 2;
}

.showcase-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: var(--show-frame-bg);
}

.showcase-feature-copy {
  min-width: 0;
  padding: 0.15rem 0.25rem;
}

.showcase-feature-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--show-muted);
}

.showcase-feature-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--show-text);
}

.showcase-feature-body {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--show-muted);
}

.showcase-feature-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.showcase-feature-points li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--show-text);
}

.showcase-feature-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--show-dot);
}

@media (max-width: 560px) {
  .showcase-actions {
    flex-direction: column;
  }

  .showcase-btn {
    width: 100%;
  }

  .showcase-feature,
  .showcase-feature-reverse {
    grid-template-columns: 1fr;
    padding: 0.55rem;
  }

  .showcase-feature-reverse .showcase-feature-media,
  .showcase-feature-reverse .showcase-feature-copy {
    order: initial;
  }
}

/* Wizard / dungeon theme tokens on showcase */
.wizard-panel.showcase-panel {
  --show-text: var(--wiz-parchment, #e8dcc4);
  --show-muted: var(--wiz-parchment-dim, #c4b49a);
  --show-border: var(--wiz-gold-dim, rgba(212, 168, 75, 0.45));
  --show-row-bg: rgba(10, 6, 18, 0.55);
  --show-frame-bg: #0a0612;
  --show-tag-bg: rgba(212, 168, 75, 0.12);
  --show-btn-bg: var(--wiz-gold, #d4a84b);
  --show-btn-text: #140a24;
  --show-btn-border: var(--wiz-gold, #d4a84b);
  --show-dot: var(--wiz-gold, #d4a84b);
}

.wizard-panel .showcase-title {
  font-family: var(--wiz-font-display, "Cinzel Decorative", serif);
}

.wizard-panel .showcase-feature-label {
  font-family: var(--wiz-font-title, "Cinzel", serif);
  letter-spacing: 0.12em;
  color: var(--wiz-gold, #d4a84b);
}

/* Finance / automation dark product panels */
.finance-panel.showcase-panel,
.automation-panel.showcase-panel {
  --show-text: var(--text);
  --show-muted: var(--text-muted);
  --show-border: var(--border);
  --show-row-bg: rgba(255, 255, 255, 0.03);
  --show-frame-bg: #0c0f16;
  --show-tag-bg: rgba(110, 231, 255, 0.08);
  --show-btn-bg: var(--accent);
  --show-btn-text: #0b0d12;
  --show-dot: var(--accent);
}

/* Bavaria / research agent theme */
.bavaria-panel.showcase-panel {
  --show-text: var(--bv-text, #0f172a);
  --show-muted: var(--bv-muted, #475569);
  --show-border: rgba(26, 90, 156, 0.22);
  --show-row-bg: var(--bv-blue-soft, #e8f1fa);
  --show-frame-bg: #ffffff;
  --show-tag-bg: rgba(26, 90, 156, 0.1);
  --show-btn-bg: var(--bv-blue, #1a5a9c);
  --show-btn-text: #ffffff;
  --show-btn-border: var(--bv-blue-deep, #0f3d6e);
  --show-dot: var(--bv-blue, #1a5a9c);
}

.bavaria-panel .showcase-feature-label {
  color: var(--bv-blue, #1a5a9c);
}

.bavaria-panel .showcase-btn-ghost {
  color: var(--bv-blue-deep, #0f3d6e);
  border-color: var(--bv-blue-mid, #4a7eb5);
  background: #fff;
}

.bavaria-panel .showcase-btn-ghost:hover {
  background: var(--bv-blue-soft, #e8f1fa);
}

/* ========== Wizard section: Project 2 (theme inside mega box) ========== */
.wizard-section {
  --wiz-gold: #d4a84b;
  --wiz-gold-bright: #f0d78c;
  --wiz-gold-dim: rgba(212, 168, 75, 0.5);
  --wiz-gold-soft: rgba(232, 201, 120, 0.2);
  --wiz-purple: #7c4dff;
  --wiz-purple-deep: #140a24;
  --wiz-violet: #a78bfa;
  --wiz-ink: #0a0612;
  --wiz-parchment: #e8dcc4;
  --wiz-parchment-dim: #c4b49a;
  --wiz-font-display: "Cinzel Decorative", "Cinzel", serif;
  --wiz-font-title: "Cinzel", "Times New Roman", serif;
  --wiz-font-body: "IM Fell English", "Times New Roman", serif;
  position: relative;
}

/* Veil sits inside the curved panel only */
.wizard-section-veil {
  display: none;
}

/* Mega curved gold/wizard box : same shell as other portfolios */
.wizard-panel {
  border: 1px solid var(--wiz-gold-dim);
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(124, 77, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(124, 77, 255, 0.22), transparent 55%),
    linear-gradient(165deg, #1a102e 0%, #0e0818 48%, #160f28 100%);
  box-shadow:
    0 0 0 1px rgba(124, 77, 255, 0.18),
    0 0 48px rgba(88, 40, 160, 0.35),
    0 24px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(240, 215, 140, 0.1);
  color: var(--wiz-parchment);
}

.wizard-panel:hover {
  border-color: rgba(240, 215, 140, 0.55);
  box-shadow:
    0 0 0 1px rgba(212, 168, 75, 0.35),
    0 0 40px rgba(124, 77, 255, 0.4),
    0 0 48px rgba(212, 168, 75, 0.12),
    0 0 56px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(240, 215, 140, 0.18);
  filter: brightness(1.05);
  animation: none; /* pause idle glow while hovering */
}

/* Soft star flecks only : no second inner container ring */
.wizard-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  background-image:
    radial-gradient(1px 1px at 8% 14%, rgba(240, 215, 140, 0.45), transparent),
    radial-gradient(1px 1px at 92% 18%, rgba(196, 168, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 18% 88%, rgba(240, 215, 140, 0.35), transparent),
    radial-gradient(1px 1px at 78% 82%, rgba(196, 168, 255, 0.35), transparent),
    radial-gradient(1px 1px at 48% 6%, rgba(255, 255, 255, 0.2), transparent);
}

/*
  Top: 50/50  [ stacked portrait photos | description ]
  Bottom: full-width sliding gallery (~2.5 slides visible)
*/
.wizard-layout {
  --wiz-gallery-gap: 0.9rem;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "photos copy"
    "gallery gallery";
  gap: clamp(1rem, 2.2vw, 1.5rem) clamp(1.25rem, 3vw, 2rem);
  /* Stretch row to tallest column so right side can center vertically */
  align-items: stretch;
  width: 100%;
  min-height: 0;
}

.wizard-photos {
  grid-area: photos;
  display: flex;
  flex-direction: column;
  align-items: stretch; /* fill left grid column width */
  justify-content: flex-start;
  gap: 0.75rem;
  min-width: 0;
  height: 100%;
}

.wizard-copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  /* Equal space above & below : center whole right-grid content */
  justify-content: center;
  gap: 1.35rem;
  min-width: 0;
  min-height: 100%;
  height: 100%;
  box-sizing: border-box;
}

.wizard-gallery {
  grid-area: gallery;
  min-width: 0;
}

/*
  Portrait photos fill the left 50% grid cell width.
  Was 3:4 height; vertical size reduced 20% → height is 80% of 3:4
  (aspect-ratio width/height = 3/3.2).
*/
.wizard-photo {
  margin: 0;
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(212, 168, 75, 0.35);
  background: #08040f;
  aspect-ratio: 3 / 3.2;
  height: auto;
}

.wizard-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  background: #0a0610;
}

.wizard-intro {
  margin: 0;
}

.wizard-chapter {
  margin: 0 0 0.55rem;
  font-family: var(--wiz-font-title);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wiz-gold);
}

.wizard-title {
  margin: 0 0 0.65rem;
  font-family: var(--wiz-font-display);
  font-size: clamp(1.65rem, 3.4vw, 2.45rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--wiz-gold-bright);
  text-shadow:
    0 0 28px rgba(124, 77, 255, 0.45),
    0 2px 0 rgba(0, 0, 0, 0.4);
}

.wizard-tagline {
  margin: 0;
  font-family: var(--wiz-font-body);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  font-style: italic;
  color: #c9b8e8;
  line-height: 1.45;
}

.wizard-lore {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wizard-lore > p {
  margin: 0 0 1rem;
  font-family: var(--wiz-font-body);
  font-size: clamp(1.02rem, 1.5vw, 1.1rem);
  line-height: 1.65;
  color: #d8cfc0;
}

.wizard-lore > p strong {
  color: var(--wiz-gold-bright);
  font-weight: 600;
}

/* Stack / pipeline / API blocks : fill the right column */
.wizard-meta {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin: 0.35rem 0 1.35rem;
  padding: 1.1rem 0 0.15rem;
  border-top: 1px solid rgba(212, 168, 75, 0.18);
}

.wizard-meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.wizard-meta-title {
  margin: 0;
  font-family: var(--wiz-font-title);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wiz-gold);
}

.wizard-meta-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-family: var(--wiz-font-body);
  font-size: 0.98rem;
  line-height: 1.55;
  color: #c9b8e8;
}

.wizard-meta-list li {
  margin-bottom: 0.3rem;
}

.wizard-meta-list li::marker {
  color: var(--wiz-gold);
}

.wizard-meta-note {
  margin: 0.15rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--text-muted);
  word-break: break-word;
}

.wizard-meta-note code {
  color: var(--wiz-violet);
  font-size: 0.95em;
}

/* Wax-seal style tags */
.wizard-seals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.45rem;
}

.wizard-seals li {
  font-family: var(--wiz-font-title);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wiz-parchment);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 168, 75, 0.45);
  background:
    radial-gradient(circle at 30% 25%, rgba(240, 215, 140, 0.12), transparent 55%),
    linear-gradient(160deg, #2a1848, #140a24);
  box-shadow: 0 0 12px rgba(124, 77, 255, 0.15);
}

/* Custom choice-style buttons */
.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 168, 75, 0.15);
}

.wizard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: min(100%, 12.5rem);
  padding: 0.8rem 1.2rem;
  font-family: var(--wiz-font-title);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    border-color 0.2s,
    background 0.2s;
}

/* Horizontal slideable gallery */
.wizard-gallery-label {
  margin: 0 0 0.65rem;
  font-family: var(--wiz-font-title);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wiz-gold);
}

.wizard-gallery-track {
  --wiz-gallery-gap: 0.9rem;
  display: flex;
  gap: var(--wiz-gallery-gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.4rem 0.1rem 0.85rem;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 168, 75, 0.45) rgba(20, 10, 36, 0.6);
}

.wizard-gallery-track:focus-visible {
  outline: 2px solid rgba(212, 168, 75, 0.55);
  outline-offset: 4px;
  border-radius: 8px;
}

.wizard-gallery-track::-webkit-scrollbar {
  height: 6px;
}

.wizard-gallery-track::-webkit-scrollbar-track {
  background: rgba(20, 10, 36, 0.6);
  border-radius: 999px;
}

.wizard-gallery-track::-webkit-scrollbar-thumb {
  background: rgba(212, 168, 75, 0.45);
  border-radius: 999px;
}

/* ~2.5 slides visible: each = (track - 2 gaps) / 2.5 */
.wizard-gallery-item {
  --wiz-gallery-visible: 2.5;
  margin: 0;
  flex: 0 0
    calc(
      (100% - (var(--wiz-gallery-visible) - 1) * var(--wiz-gallery-gap)) /
        var(--wiz-gallery-visible)
    );
  scroll-snap-align: start;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(212, 168, 75, 0.35);
  background: #08040f;
  box-shadow:
    0 0 0 1px rgba(124, 77, 255, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.35);
  aspect-ratio: 16 / 10;
  min-height: clamp(140px, 18vw, 200px);
}

.wizard-gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.wizard-btn-glyph {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.9;
}

.wizard-btn-primary {
  color: #1a0f08;
  background: linear-gradient(180deg, #f0d78c 0%, #c9962e 48%, #a67c1e 100%);
  border: 1px solid #f5e2a8;
  box-shadow:
    0 0 0 1px rgba(80, 40, 10, 0.35),
    0 8px 22px rgba(212, 168, 75, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.wizard-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(80, 40, 10, 0.35),
    0 12px 28px rgba(212, 168, 75, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.wizard-btn-ghost {
  color: var(--wiz-parchment);
  background: linear-gradient(180deg, rgba(80, 40, 140, 0.45), rgba(20, 10, 36, 0.9));
  border: 1px solid rgba(167, 139, 250, 0.55);
  box-shadow:
    0 0 18px rgba(124, 77, 255, 0.2),
    inset 0 0 20px rgba(124, 77, 255, 0.08);
}

.wizard-btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--wiz-violet);
  color: #fff;
  box-shadow:
    0 0 26px rgba(124, 77, 255, 0.4),
    inset 0 0 24px rgba(124, 77, 255, 0.12);
}

@keyframes wizard-panel-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(124, 77, 255, 0.18),
      0 0 48px rgba(88, 40, 160, 0.35),
      0 24px 60px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(240, 215, 140, 0.1);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(212, 168, 75, 0.28),
      0 0 56px rgba(124, 77, 255, 0.45),
      0 24px 60px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(240, 215, 140, 0.18);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .wizard-panel {
    animation: wizard-panel-glow 6s ease-in-out infinite;
  }
}

@media (max-width: 900px) {
  /* Gold container size left alone (still 70% / 15% 15%) */

  .wizard-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "photos"
      "copy"
      "gallery";
  }

  .wizard-photos {
    flex-direction: row;
    height: auto;
  }

  .wizard-copy {
    height: auto;
    min-height: 0;
    justify-content: flex-start;
  }

  .wizard-photo {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .wizard-gallery-item {
    --wiz-gallery-visible: 1.8;
  }
}

@media (max-width: 560px) {
  .wizard-photos {
    flex-direction: column;
  }

  .wizard-photo {
    width: 100%;
    flex: 0 0 auto;
  }

  .wizard-actions {
    flex-direction: column;
  }

  .wizard-btn {
    width: 100%;
    min-width: 0;
  }

  .wizard-gallery-item {
    --wiz-gallery-visible: 1.35;
  }
}

/* ========== Bavaria section: Project 5 (clinical theme inside mega box) ========== */
.bavaria-section {
  /* Clinical Bavarian: flag blue + white, lozenge field, hospital-simple chrome */
  --bv-blue: #1a5a9c;
  --bv-blue-deep: #0f3d6e;
  --bv-blue-soft: #e8f1fa;
  --bv-blue-mid: #4a7eb5;
  --bv-white: #ffffff;
  --bv-bg: #f0f5fb;
  --bv-text: #0f1a24;
  --bv-muted: #4a5d70;
  --bv-border: #b8cce0;
  --bv-radius-sm: 12px;
  --bv-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --bv-shadow: 0 12px 40px rgba(15, 61, 110, 0.18);
  position: relative;
  color: var(--bv-text);
  font-family: var(--bv-font);
}

/* Mega curved box : lozenge + white clinical fill */
.bavaria-panel {
  border: 1px solid rgba(184, 204, 224, 0.85);
  background-color: var(--bv-white);
  background-image:
    linear-gradient(45deg, rgba(26, 90, 156, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(26, 90, 156, 0.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(26, 90, 156, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(26, 90, 156, 0.05) 75%);
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  box-shadow: var(--bv-shadow);
  color: var(--bv-text);
}

.bavaria-panel:hover {
  border-color: rgba(26, 90, 156, 0.4);
  box-shadow:
    0 0 0 1px rgba(26, 90, 156, 0.2),
    0 0 36px rgba(26, 90, 156, 0.16),
    0 0 48px rgba(15, 61, 110, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  filter: brightness(1.02);
}

/* Thin clinical accent bar : Bavarian blue, not decorative clutter */
.bavaria-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--bv-blue-deep), var(--bv-blue), var(--bv-blue-mid));
  z-index: 2;
}

.bavaria-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: center;
  width: 100%;
}

.bavaria-copy {
  min-width: 0;
}

.bavaria-label {
  margin: 0 0 0.5rem;
  font-size: 1.17rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bv-blue);
}

.bavaria-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--bv-text);
}

.bavaria-tagline {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--bv-muted);
}

.bavaria-body {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--bv-muted);
}

.bavaria-body strong {
  color: var(--bv-blue-deep);
  font-weight: 600;
}

.bavaria-tags {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.bavaria-tags li {
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--bv-border);
  background: var(--bv-blue-soft);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--bv-blue-deep);
}

.bavaria-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.bavaria-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s,
    box-shadow 0.2s;
}

.bavaria-btn:hover {
  transform: translateY(-1px);
}

/* Solid Bavarian blue : clinical primary */
.bavaria-btn-primary {
  background: var(--bv-blue);
  color: #fff;
  border: 1px solid var(--bv-blue-deep);
  box-shadow: 0 4px 14px rgba(26, 90, 156, 0.25);
}

.bavaria-btn-primary:hover {
  background: var(--bv-blue-deep);
}

/* White outlined secondary */
.bavaria-btn-ghost {
  background: var(--bv-white);
  color: var(--bv-blue-deep);
  border: 1px solid var(--bv-border);
}

.bavaria-btn-ghost:hover {
  background: var(--bv-blue-soft);
  border-color: var(--bv-blue-mid);
}

.bavaria-media {
  min-width: 0;
}

.bavaria-frame {
  aspect-ratio: 16 / 10;
  border-radius: var(--bv-radius-sm);
  border: 1px solid var(--bv-border);
  background: var(--bv-blue-soft);
  box-shadow: var(--bv-shadow);
  overflow: hidden;
}

.bavaria-frame.placeholder {
  display: grid;
  place-items: center;
  color: var(--bv-muted);
  font-size: 0.88rem;
}

.bavaria-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 860px) {
  .bavaria-layout {
    grid-template-columns: 1fr;
  }

  .bavaria-media {
    order: -1;
  }
}

@media (max-width: 560px) {
  .bavaria-actions {
    flex-direction: column;
  }

  .bavaria-btn {
    width: 100%;
  }
}

/* ========== Fact bands ========== */
.fact-band {
  padding: clamp(2.25rem, 5vw, 3.25rem) 0;
  background: var(--fact-bg);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.fact-band::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0.85;
}

.fact-inner {
  max-width: 42rem;
}

.fact-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.fact-text {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.45;
  letter-spacing: -0.015em;
  font-weight: 500;
}

.fact-text em {
  font-style: normal;
  color: var(--accent);
}

.fact-availability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fact-availability-list li {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 255, 0.28);
  background: rgba(110, 231, 255, 0.08);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

/* Expertise: stacked vertically, ~50% larger cards */
.expertise-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.15rem, 2.5vw, 1.65rem);
}

.expertise-card {
  padding: clamp(1.65rem, 3vw, 2.15rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.expertise-card:hover {
  border-color: rgba(110, 231, 255, 0.28);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(110, 231, 255, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.expertise-label {
  margin: 0 0 0.7rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.expertise-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.expertise-desc {
  margin: 0 0 1.15rem;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.expertise-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.expertise-points li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.expertise-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* ========== Hire / availability ========== */
.hire-section {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  background:
    radial-gradient(ellipse 55% 50% at 20% 0%, rgba(167, 139, 250, 0.12), transparent 55%),
    radial-gradient(ellipse 45% 40% at 90% 30%, rgba(110, 231, 255, 0.1), transparent 50%),
    var(--fact-bg);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hire-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0.85;
}

.hire-inner {
  max-width: 48rem;
}

.hire-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hire-lead {
  margin: 0 0 1.15rem;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-muted);
}

.hire-modes {
  margin-bottom: 1.35rem;
}

.hire-modes li {
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
}

.hire-body {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.hire-skills-title {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hire-skills-lead {
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.skill-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.skill-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.skill-pct {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  flex-shrink: 0;
}

.skill-track {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  overflow: hidden;
}

.skill-fill {
  display: block;
  height: 100%;
  width: var(--level, 80%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ========== Research ========== */
.research-section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 55% 50% at 15% 0%, rgba(110, 231, 255, 0.08), transparent 55%),
    var(--bg);
}

.research-header {
  max-width: 40rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.research-section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  letter-spacing: -0.03em;
}

.research-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.research-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.75fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
  padding: clamp(1.4rem, 2.5vw, 1.85rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.research-label {
  margin: 0 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.research-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.research-tagline {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-2);
}

.research-body {
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.research-points {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.research-points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.research-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.research-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.research-card-aside {
  display: flex;
  align-items: stretch;
}

.research-doc-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(110, 231, 255, 0.35);
  background:
    linear-gradient(160deg, rgba(110, 231, 255, 0.08), rgba(167, 139, 250, 0.1)),
    var(--bg-soft);
  min-height: 10rem;
}

.research-doc-preview-photo {
  padding: 0;
  overflow: hidden;
  border-style: solid;
  border-color: var(--border);
  min-height: 0;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.research-doc-preview-photo:hover,
.research-doc-preview-photo:focus-visible {
  border-color: rgba(110, 231, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  outline: none;
}

.research-doc-preview-photo img {
  width: 100%;
  height: 100%;
  min-height: 14rem;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.research-doc-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.research-doc-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

.research-doc-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .research-card {
    grid-template-columns: 1fr;
  }

  .research-doc-preview {
    min-height: 7rem;
  }

  .research-doc-preview-photo img {
    min-height: 12rem;
    max-height: 18rem;
  }
}

/* ========== Ongoing projects ========== */
.ongoing-section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 50% 45% at 80% 10%, rgba(167, 139, 250, 0.1), transparent 55%),
    var(--bg);
}

.ongoing-header {
  max-width: 40rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.ongoing-section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  letter-spacing: -0.03em;
}

.ongoing-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.ongoing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.15rem, 2.5vw, 1.65rem);
}

.ongoing-card {
  padding: clamp(1.4rem, 2.5vw, 1.85rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.ongoing-label {
  margin: 0 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.ongoing-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ongoing-tagline {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-2);
}

.ongoing-body {
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.ongoing-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.ongoing-points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.ongoing-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

@media (max-width: 860px) {
  .ongoing-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Live demo ========== */
.demo-section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(110, 231, 255, 0.07), transparent 60%),
    var(--bg);
}

.demo-header {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.demo-header h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.025em;
}

.demo-lead {
  margin: 0;
  color: var(--text-muted);
}

.demo-panel {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  max-width: 720px;
}

.demo-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.status-dot.online {
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.chat-window {
  min-height: 260px;
  max-height: 360px;
  overflow-y: auto;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.chat-bubble {
  max-width: 88%;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  font-size: 0.95rem;
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(90, 216, 240, 0.25), rgba(139, 124, 246, 0.3));
  border: 1px solid rgba(110, 231, 255, 0.25);
}

.chat-form {
  display: flex;
  gap: 0.65rem;
}

.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  outline: none;
}

.chat-form input:focus {
  border-color: rgba(110, 231, 255, 0.45);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.demo-note {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.demo-note code {
  font-family: var(--mono);
  font-size: 0.78em;
  color: var(--accent);
}

/* ========== Contact ========== */
.contact-section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  border-bottom: 1px solid var(--border);
}

.contact-inner {
  max-width: 36rem;
}

.contact-section h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.025em;
}

.contact-lead {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
}

.contact-form {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  outline: none;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(110, 231, 255, 0.45);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.contact-links a {
  color: var(--accent);
  font-weight: 500;
}

.contact-links a:hover {
  text-decoration: underline;
}

/* ========== Footer ========== */
.site-footer {
  padding: 1.75rem 0 2rem;
  background: #080a0e;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.footer-brand {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-top {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-top:hover {
  color: var(--text);
}

/* ========== Responsive (layout-preserving: desktop defaults untouched) ========== */

/*
  Do NOT set overflow-x: hidden on body/html — it breaks sticky/fixed
  header behavior in some browsers. Clip only on main content if needed.
*/
main {
  overflow-x: clip;
  max-width: 100%;
}

/* Safe area for notched phones (desktop padding stays 0) */
@supports (padding: max(0px)) {
  .site-header {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
}

/* Tablets / small laptops: same structure, slightly wider content band */
@media (max-width: 1024px) {
  :root {
    --portfolio-box-width: 88%;
    --portfolio-box-side: 6%;
    --portfolio-box-pad: clamp(1rem, 2.2vw, 1.45rem);
  }

  .container {
    width: min(100% - 2rem, var(--container));
  }

  .header-inner {
    width: min(100% - 2rem, var(--container));
  }
}

/* Mid tablets: stack dense grids, keep card designs */
@media (max-width: 900px) {
  .hero-shell {
    min-height: auto;
  }

  .project-section-label {
    font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    line-height: 1.25;
    word-break: break-word;
  }

  .research-card {
    grid-template-columns: 1fr;
  }

  .ongoing-grid {
    grid-template-columns: 1fr;
  }

  .contact-inner,
  .hire-inner,
  .skills-inner,
  .info-section-inner,
  .education-band-inner {
    width: min(100% - 2rem, 100%);
  }

  /* Touch-friendlier controls without changing desktop hit areas */
  .site-map-btn {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .project-nav-card {
    min-height: 2.75rem;
    justify-content: center;
  }

  .btn,
  .showcase-btn,
  .lumen-btn,
  .bavaria-btn {
    min-height: 2.75rem;
  }
}

@media (max-width: 860px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-block.flip .portfolio-grid {
    direction: ltr;
  }

  .portfolio-media {
    order: -1;
  }

  /* Feature rows: stack media above copy on narrow tablets (desktop 40/60 kept) */
  .lumen-feature,
  .lumen-feature-reverse,
  .showcase-feature,
  .showcase-feature-reverse {
    grid-template-columns: 1fr;
  }

  .lumen-feature-reverse .lumen-feature-media,
  .lumen-feature-reverse .lumen-feature-copy,
  .showcase-feature-reverse .showcase-feature-media,
  .showcase-feature-reverse .showcase-feature-copy {
    order: initial;
  }

  .lumen-feature-media,
  .showcase-feature-media {
    max-width: 100%;
  }

  .expertise-card,
  .education-card,
  .process-step,
  .optimize-card {
    min-width: 0;
  }
}

/* Phones + small tablets: hamburger nav */
@media (max-width: 820px) {
  /* Allow mobile menu to expand (desktop header height unchanged above this) */
  .site-header {
    height: auto;
    min-height: var(--header-h);
  }

  .header-inner {
    height: var(--header-h);
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .mobile-nav a {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
  }

  .chat-form {
    flex-direction: column;
  }

  .chat-form .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@media (max-width: 720px) {
  :root {
    --portfolio-box-width: 92%;
    --portfolio-box-side: 4%;
    --header-h: 58px;
  }

  body {
    font-size: 1rem;
  }

  .hero-meta {
    gap: 0.85rem 1.25rem;
  }

  .site-map-card {
    flex: 0 0 min(260px, 82vw);
  }

  .site-map-card img {
    height: 120px;
  }

  .skill-bar-head {
    gap: 0.35rem 0.5rem;
  }

  .contact-form,
  .demo-panel {
    max-width: 100%;
  }

  input,
  textarea,
  button,
  .btn {
    font-size: 16px; /* reduces iOS zoom-on-focus */
  }
}

/* Small phones */
@media (max-width: 560px) {
  :root {
    --portfolio-box-width: 94%;
    --portfolio-box-side: 3%;
    --portfolio-section-pad-y: clamp(1.25rem, 5vw, 2rem);
  }

  .container,
  .header-inner {
    width: min(100% - 1.25rem, var(--container));
  }

  .project-section-label {
    font-size: clamp(1.05rem, 5.5vw, 1.35rem);
    letter-spacing: 0.03em;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .showcase-frame,
  .lumen-feature .lumen-frame {
    aspect-ratio: 16 / 11;
  }

  .research-doc-preview-photo img {
    min-height: 10rem;
    max-height: 16rem;
  }

  .hire-modes {
    gap: 0.4rem;
  }

  .fact-availability-list li {
    font-size: 0.85rem;
  }

  /* Avoid scale hover jank on touch */
  .portfolio-panel:hover,
  .lumen-panel:hover,
  .wizard-panel:hover,
  .bavaria-panel:hover {
    transform: none;
  }
}

/* Very narrow phones */
@media (max-width: 380px) {
  :root {
    --portfolio-box-width: 96%;
    --portfolio-box-side: 2%;
  }

  .logo-text {
    font-size: 0.72rem;
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-map-card {
    flex: 0 0 min(240px, 88vw);
  }
}

/* Landscape phones: don't force huge min-heights */
@media (max-height: 480px) and (orientation: landscape) {
  .hero-shell {
    min-height: auto;
    padding-block: 1.25rem;
  }
}
