/* ===========================================================
   Max Pfeiffer — redesign draft
   Modern dark theme, electric-teal accent, clean-tech feel
   =========================================================== */

:root {
  --bg: #0a0d12;
  --bg-2: #10151d;
  --surface: #151b24;
  --surface-2: #1b2430;
  --line: rgba(255, 255, 255, 0.10);
  --text: #eef2f6;
  --muted: #9aa7b4;
  --accent: #a06bff;      /* electric purple */
  --accent-2: #c68cff;    /* light violet */
  --accent-ink: #160a2b;
  --radius: 18px;
  --maxw: 1200px;
  --nav-h: 68px;
  --font-head: "Montserrat", "Verdana", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Montserrat", "Verdana", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
}

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1rem;
}
/* Section labels on the homepage destination panels — match the hero roles line */
#entrepreneur .eyebrow,
#engineer .eyebrow,
#audio .eyebrow {
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 0.7rem;
}

.accent { color: var(--accent); }

/* ---------- Top navigation (tabs) ---------- */
.topnav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  z-index: 100;
  background: rgba(10, 13, 18, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.topnav.scrolled {
  background: rgba(10, 13, 18, 0.88);
  border-bottom-color: var(--line);
}
.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}
.tabs {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
}
.tabs a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.tabs a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.tabs a.active { color: var(--accent-ink); background: var(--accent); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  color: var(--text); border-radius: 10px;
  padding: 8px 12px; cursor: pointer; font-size: 1rem;
}

/* ---------- Scroll-snap homepage ---------- */
.scroller {
  scroll-snap-type: y proximity;
}
.panel {
  position: relative;
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) clamp(16px, 5vw, 64px) 80px;
  overflow: hidden;
}
.panel__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transform: scale(1.04);
}
.panel__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,11,16,0.92) 0%, rgba(8,11,16,0.72) 42%, rgba(8,11,16,0.35) 100%),
    linear-gradient(0deg, rgba(8,11,16,0.85) 0%, rgba(8,11,16,0.15) 45%);
}
.panel__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}
.panel__content { max-width: 620px; }

.hero-name {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.98;
  margin-bottom: 0.3em;
}
.hero-roles {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  color: var(--text);
  font-weight: 500;
  margin-bottom: 1.2rem;
}
.hero-roles span { color: var(--accent); }
.panel h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}
.panel p.lead {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  max-width: 54ch;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px rgba(160, 107, 255, 0.30);
}
.btn--ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-color: var(--line);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.8rem; }

/* ---------- Right-side section dots ---------- */
.dots {
  position: fixed;
  right: clamp(12px, 2vw, 26px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  z-index: 90;
}
.dots a {
  --s: 11px;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  position: relative;
  transition: background 0.2s, transform 0.2s;
}
.dots a:hover { background: var(--accent); transform: scale(1.2); }
.dots a.active { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.dots a::after {
  content: attr(data-label);
  position: absolute;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(10,13,18,0.9);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.dots a:hover::after { opacity: 1; }

/* scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--muted);
  font-size: 1.6rem;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-50%,8px)} }

/* ---------- Connect / form ---------- */
.connect-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  width: 100%;
}
.contact-card {
  background: rgba(21, 27, 36, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px);
  backdrop-filter: blur(10px);
  max-width: 560px;
}
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.45rem;
  font-family: var(--font-head);
}
.field input, .field textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding: 0.8rem 0.95rem;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(160,107,255,0.18);
}
.field textarea { resize: vertical; min-height: 120px; }
.captcha {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.captcha .q {
  font-family: var(--font-head);
  font-size: 1.15rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  white-space: nowrap;
}
.captcha input { max-width: 120px; }
.captcha .reload {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 1.1rem; padding: 4px;
}
.captcha .reload:hover { color: var(--accent); }
.form-msg { margin-top: 0.9rem; font-size: 0.95rem; min-height: 1.2em; }
.form-msg.error { color: #ff8080; }
.form-msg.ok { color: var(--accent); }
.contact-meta { color: var(--muted); margin-bottom: 1.6rem; }
.contact-meta a { color: var(--text); border-bottom: 1px solid var(--accent); }

/* ---------- Sub-page layout ---------- */
.page-hero {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-h) + 60px) clamp(16px,5vw,64px) 60px;
  overflow: hidden;
}
.page-hero .panel__bg::after {
  background:
    linear-gradient(0deg, rgba(8,11,16,0.96) 2%, rgba(8,11,16,0.45) 60%, rgba(8,11,16,0.6) 100%);
}
.page-hero__inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }

/* Taller hero with text dropped into the shaded bottom band, so more of the photo stays clear */
.page-hero--low { min-height: 82vh; padding-bottom: 48px; }
.page-hero--low .panel__bg::after {
  background: linear-gradient(0deg,
    rgba(8,11,16,0.95) 0%,
    rgba(8,11,16,0.82) 24%,
    rgba(8,11,16,0.20) 56%,
    rgba(8,11,16,0.38) 100%);
}

/* No stray divider above the first project when there's no section header */
.section .project:first-child { border-top: none; padding-top: 0; }

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(50px, 8vw, 100px) clamp(16px, 5vw, 40px);
}
.section-head { max-width: 60ch; margin-bottom: 2.8rem; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.section-head p { color: var(--muted); }

/* project / highlight blocks */
.project {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
  padding: clamp(30px, 5vw, 56px) 0;
  border-top: 1px solid var(--line);
}
.project:nth-child(even) .project__media { order: 2; }
.project__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 4 / 3;
}
.project__media img, .project__media video {
  width: 100%; height: 100%; object-fit: cover;
}
.project__media.contain { background: var(--bg-2); }
.project__media.contain img { object-fit: contain; }
.project__media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(160,107,255,0.40), transparent 62%),
    radial-gradient(circle at 80% 90%, rgba(198,140,255,0.25), transparent 55%),
    linear-gradient(135deg, #1d1533 0%, #0d0b16 100%);
}
.ph-mark { text-align: center; font-family: var(--font-head); padding: 1.5rem; }
.ph-mark b {
  display: block;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}
.ph-mark span {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(160,107,255,0.5);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
}
.project__meta {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.project h3 { font-size: clamp(1.35rem, 3vw, 2rem); }
.inline-logo { height: 1.05em; width: auto; display: inline-block; vertical-align: -0.14em; margin-right: 0.5rem; }
.project p { color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }
.tag {
  font-size: 0.78rem;
  font-family: var(--font-head);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
}

/* gallery strip */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 1.4rem;
}
.gallery img {
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 46px clamp(16px,5vw,40px);
  background: var(--bg-2);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }
.footer__links { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- Lightbox / image modal ---------- */
.project__media img, .gallery img { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw;
  background: rgba(5, 7, 10, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  cursor: default;
  object-fit: contain;
}
.lightbox__cap {
  position: absolute;
  bottom: 3vh; left: 0; right: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0 1rem;
}
.lightbox__btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--text);
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.lightbox__btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,255,255,0.12); }
.lightbox__close { top: 3vh; right: 3vw; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 3vw; }
.lightbox__next { right: 3vw; }
@media (max-width: 620px) {
  .lightbox__nav { top: auto; bottom: 3vh; transform: none; }
  .lightbox__prev { left: 24%; }
  .lightbox__next { right: 24%; }
  .lightbox__cap { bottom: 11vh; }
}

/* reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) .project__media { order: 0; }
  .dots { display: none; }
  .tabs {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10,13,18,0.97);
    border-bottom: 1px solid var(--line);
    padding: 10px 16px 18px;
    display: none;
  }
  .tabs.open { display: flex; }
  .tabs a { width: 100%; padding: 0.8rem 0.6rem; border-radius: 10px; }
  .nav-toggle { display: inline-block; }
}
