/* ============================================================
   nekst-one — gemeinsames Stylesheet
   index.html · impressum.html · datenschutz.html
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0f1117;          /* deep cool charcoal */
  --ink-soft: #171a23;     /* raised dark surface */
  --ink-line: #262b38;     /* dark hairline */
  --paper: #ece9df;        /* warm bone */
  --paper-2: #e3dfd2;      /* deeper bone, alt light sections */
  --bone: #f4f2ea;
  --signal: #3d5afe;       /* electric cobalt */
  --signal-bright: #6f86ff;
  --signal-deep: #2336c9;  /* cobalt for text on light */
  --muted: #5f6068;        /* muted on light */
  --muted-d: rgba(244,242,234,0.55); /* muted on dark */
  --line: rgba(15,17,23,0.12);
  --c-book: #d99a32;       /* amber */
  --c-app:  #3d5afe;       /* cobalt */
  --c-edu:  #1fae9c;       /* teal */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Hanken Grotesk', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.55;
  mix-blend-mode: multiply;
}

/* blueprint grid helper for dark panels */
.grid-bg {
  background-image:
    linear-gradient(rgba(109,134,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109,134,255,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 3rem;
  backdrop-filter: blur(14px);
  background: rgba(236,233,223,0.82);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.nav-brand .mark,
.nav-brand svg { display: block; width: 20px; height: 20px; }

.nav-links { display: flex; gap: 2rem; list-style: none; }

.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 2px;
  background: var(--signal);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  padding-top: 78px;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 3.5rem 5rem 5rem;
}

.hero-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal-deep);
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  width: 1.6rem; height: 8px;
  background:
    linear-gradient(var(--signal) 0 0) 0 4px/0.5rem 2px no-repeat,
    linear-gradient(var(--signal) 0 0) 0.55rem 2px/0.5rem 2px no-repeat,
    linear-gradient(var(--signal) 0 0) 1.1rem 0/0.5rem 2px no-repeat;
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(3rem, 5.2vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 1.6rem;
}
.hero-title em { font-style: italic; color: var(--signal-deep); font-weight: 600; }

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--muted);
  font-weight: 400;
  max-width: 40ch;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 100px;
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--signal); color: var(--signal-deep); }

/* hero right — the staircase */
.hero-right {
  background: var(--ink);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-right::after {
  content: '';
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61,90,254,0.22) 0%, transparent 68%);
  bottom: -120px; right: -120px;
  pointer-events: none;
}

.stairs {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 3rem;
}

.step {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: 1.15rem 1.6rem 1.15rem 1.3rem;
  background: rgba(23,26,35,0.82);
  border: 1px solid var(--ink-line);
  border-left: 3px solid var(--signal);
  backdrop-filter: blur(2px);
  position: relative;
}
/* ascending offset — each higher step climbs to the right */
.step:nth-child(1) { margin-left: 6.5rem; }
.step:nth-child(2) { margin-left: 3.25rem; margin-top: -1px; }
.step:nth-child(3) { margin-left: 0;       margin-top: -1px; }
/* riser connectors */
.step:nth-child(1)::before,
.step:nth-child(2)::before {
  content: '';
  position: absolute;
  left: -3px; bottom: -1.15rem;
  width: 3px; height: 1.15rem;
  background: var(--signal);
  opacity: 0.5;
}
.step:nth-child(1) { border-left-color: var(--signal-bright); }

.step-num {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--signal-bright);
  min-width: 2.4ch;
}
.step-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-d);
  line-height: 1.45;
  max-width: 14ch;
}

/* ── SECTION SCAFFOLD ── */
section { padding: 6.5rem 5rem; }

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal-deep);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.section-label::before {
  content: '';
  width: 1.4rem; height: 8px;
  background:
    linear-gradient(var(--signal) 0 0) 0 4px/0.45rem 2px no-repeat,
    linear-gradient(var(--signal) 0 0) 0.5rem 2px/0.45rem 2px no-repeat,
    linear-gradient(var(--signal) 0 0) 1rem 0/0.45rem 2px no-repeat;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(2rem, 3.1vw, 3.3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 20ch;
  margin-bottom: 1rem;
}

.section-intro {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 3.5rem;
  line-height: 1.75;
}

/* ── PROJECTS ── */
.projects-section { background: var(--ink); color: var(--paper); }
.projects-section .section-title { color: var(--bone); }
.projects-section .section-intro { color: var(--muted-d); }
.projects-section .section-label { color: var(--signal-bright); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
}

.project-card {
  background: var(--ink);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  transition: background 0.3s;
}
.project-card:hover { background: var(--ink-soft); }
/* stepped accent that climbs on hover */
.project-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 0;
  background: var(--signal);
  transition: height 0.35s ease;
}
.project-card:hover::before { height: 100%; }

.project-number {
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--signal-bright);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.project-number::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--ink-line), transparent);
}

.project-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  align-self: flex-start;
}
.tag-book { background: rgba(217,154,50,0.14); color: var(--c-book); border: 1px solid rgba(217,154,50,0.35); }
.tag-app  { background: rgba(61,90,254,0.16);  color: var(--signal-bright); border: 1px solid rgba(61,90,254,0.4); }
.tag-edu  { background: rgba(31,174,156,0.15); color: var(--c-edu);  border: 1px solid rgba(31,174,156,0.4); }

.project-name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.project-desc {
  font-size: 0.92rem;
  color: var(--muted-d);
  line-height: 1.7;
  flex: 1;
}

.project-link {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--signal-bright);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.2s;
}
.project-link::after { content: '↗'; }
.project-card:hover .project-link { gap: 0.9rem; }

/* ── PHILOSOPHY ── */
.philosophy-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5.5rem;
  align-items: center;
}

.philosophy-quote {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  line-height: 1.38;
  letter-spacing: -0.015em;
  color: var(--ink);
  position: relative;
  padding-left: 2.2rem;
}
.philosophy-quote::before {
  content: '';
  position: absolute;
  left: 0; top: 0.4rem; bottom: 0.4rem;
  width: 4px;
  background:
    linear-gradient(var(--signal) 0 0) 0 0/100% 33% no-repeat,
    linear-gradient(var(--signal-bright) 0 0) 0 50%/100% 33% no-repeat,
    linear-gradient(var(--signal) 0 0) 0 100%/100% 33% no-repeat;
}

.philosophy-portrait { position: relative; margin: 0; max-width: 420px; }
.philosophy-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.philosophy-portrait::after {
  content: '';
  position: absolute;
  left: -16px; bottom: -16px;
  width: 76px; height: 76px;
  background: var(--signal);
  border-radius: 4px;
  z-index: 0;
}

.philosophy-text { display: flex; flex-direction: column; gap: 2rem; }
.philosophy-body { display: flex; flex-direction: column; gap: 1.25rem; }
.philosophy-body p { font-size: 1rem; color: var(--muted); line-height: 1.8; }
.philosophy-body p strong { color: var(--ink); font-weight: 600; }

/* ── CAREER ── */
.career-section { background: var(--paper-2); }
.career-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; }
.career-aside { position: sticky; top: 120px; align-self: start; }
.career-aside p { font-size: 0.95rem; color: var(--muted); line-height: 1.75; margin-top: 1rem; }

.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 2.25rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 113px; top: 0; bottom: 0;
  width: 2px;
  background: rgba(61,90,254,0.22);
}
.timeline-item:first-child { padding-top: 0; }

.timeline-year {
  font-family: 'Space Mono', monospace;
  font-size: 0.74rem;
  color: var(--signal-deep);
  padding-top: 0.3rem;
  text-align: right;
}

/* square "step" markers instead of dots */
.timeline-dot {
  position: absolute;
  left: 108px; top: 2rem;
  width: 12px; height: 12px;
  background: var(--paper-2);
  border: 2px solid var(--signal);
  transform: rotate(45deg);
}
.timeline-item:first-child .timeline-dot { background: var(--signal); }

.timeline-content { padding-left: 1.1rem; }

.timeline-role {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}
.timeline-company {
  font-family: 'Space Mono', monospace;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--signal-deep);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.timeline-detail { font-size: 0.92rem; color: var(--muted); line-height: 1.65; }

.placeholder-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal-deep);
  border: 1px solid rgba(61,90,254,0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  margin-bottom: 0.5rem;
}

/* ── CTA ── */
.cta-section {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 7.5rem 5rem;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(109,134,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109,134,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 72%);
}
.cta-section > * { position: relative; z-index: 1; }

.cta-section .section-label { justify-content: center; color: var(--signal-bright); }

.cta-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 4.2vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}
.cta-title em { font-style: italic; color: var(--signal-bright); }

.cta-body {
  font-size: 1.02rem;
  color: var(--muted-d);
  max-width: 42ch;
  margin: 0 auto 2.6rem;
  line-height: 1.8;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--signal);
  color: #fff;
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1rem 2.2rem;
  border-radius: 100px;
  transition: background 0.2s, gap 0.2s, transform 0.2s;
}
.btn-primary::after { content: '↗'; }
.btn-primary:hover { background: var(--signal-bright); gap: 1.05rem; transform: translateY(-2px); }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  color: var(--muted-d);
  padding: 2rem 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--ink-line);
  font-size: 0.8rem;
  gap: 1rem;
  flex-wrap: wrap;
}
footer a { color: var(--muted-d); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--signal-bright); }
.footer-brand { font-family: 'Fraunces', serif; font-size: 1rem; color: rgba(244,242,234,0.4); }
footer.legal { justify-content: center; text-align: center; padding: 2rem 1.5rem; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes stepIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: translateX(0); } }

.hero-eyebrow { animation: fadeUp 0.7s ease both; }
.hero-title   { animation: fadeUp 0.7s 0.1s ease both; }
.hero-subtitle{ animation: fadeUp 0.7s 0.2s ease both; }
.hero-tags    { animation: fadeUp 0.7s 0.3s ease both; }
.step         { opacity: 0; animation: stepIn 0.6s ease forwards; }
.step:nth-child(3) { animation-delay: 0.35s; }
.step:nth-child(2) { animation-delay: 0.5s; }
.step:nth-child(1) { animation-delay: 0.65s; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── FAQ / AEO ── */
.faq-section { background: var(--paper); }
.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4rem;
  margin-top: 1rem;
}
.faq-item {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  position: relative;
}
.faq-item::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 2.2rem; height: 2px;
  background: var(--signal);
}
.faq-q {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.faq-a { font-size: 0.96rem; color: var(--muted); line-height: 1.7; }

@media (max-width: 900px) {
  .faq-list { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── LEGAL PAGES (Impressum / Datenschutz) ── */
main { max-width: 760px; margin: 0 auto; padding: 5rem 1.5rem 6rem; line-height: 1.7; }
.label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal-deep);
  margin-bottom: 1rem;
}
main h1 { font-family: 'Fraunces', serif; font-weight: 600; font-size: clamp(2.2rem, 4vw, 3.2rem); letter-spacing: -0.025em; margin-bottom: 2.5rem; }
main h2 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.4rem; margin: 2.5rem 0 0.6rem; letter-spacing: -0.015em; }
main h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.4rem; }
main p { color: var(--muted); font-weight: 300; margin-bottom: 0.6rem; }
main ul { color: var(--muted); font-weight: 300; margin: 0.4rem 0 0.8rem 1.2rem; }
main li { margin-bottom: 0.3rem; }
main strong { color: var(--ink); font-weight: 600; }
main a { color: var(--signal-deep); text-decoration: none; word-break: break-word; }
main a:hover { color: var(--ink); }
main table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.85rem; }
main th, main td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; color: var(--muted); font-weight: 300; }
main th { background: rgba(61,90,254,0.1); color: var(--ink); font-weight: 500; font-family: 'Space Mono', monospace; font-size: 0.78rem; }
.back {
  display: inline-block;
  margin-top: 3rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--signal-deep);
  text-decoration: none;
}
.back:hover { color: var(--ink); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 0.9rem 1.4rem; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-left { padding: 3rem 1.5rem; }
  .hero-right { min-height: 380px; }
  .stairs { padding: 2rem; }
  .step:nth-child(1) { margin-left: 4rem; }
  .step:nth-child(2) { margin-left: 2rem; }
  section { padding: 4rem 1.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .philosophy-section { grid-template-columns: 1fr; gap: 2.5rem; }
  .career-grid { grid-template-columns: 1fr; }
  .career-aside { position: static; }
  footer { flex-direction: column; gap: 0.6rem; padding: 1.6rem; text-align: center; }
}
