/* ============================================================
   Steffen Gloth — Portfolio (helle Variante, robin-inspiriert)
   ============================================================ */

:root {
  --bg: #f5f4ef;          /* warmes off-white */
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --text: #17181c;        /* near black */
  --text-soft: #54585f;
  --text-mute: #8b8e95;
  --border: rgba(23, 24, 28, 0.10);
  --accent: #0f7a55;      /* tiefes Gruen, Life Science */
  --accent-ink: #0b5c40;
  --blue: #3155d4;
  --blue-bg: #eaeefb;
  --green: #1f8a5b;
  --green-bg: #e8f3ec;
  --amber: #9a6a16;
  --amber-bg: #f5eddd;
  --shadow: 0 20px 50px -28px rgba(23, 24, 28, 0.30);
  --radius: 18px;
  --maxw: 1120px;
  --display: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "Fira Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  letter-spacing: -0.2px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
a { color: inherit; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  background: var(--text); color: #fff; font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--text); cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(23,24,28,0.6); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--text); box-shadow: none; }
.btn--small { padding: 9px 18px; font-size: 0.875rem; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__brand { display: inline-flex; font-family: var(--display); font-size: 1.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.5px; text-transform: lowercase; }
.nav__brand-dot { color: var(--accent); }
.nav__links { display: flex; gap: 30px; }
.nav__links a { font-size: 0.92rem; color: var(--text-soft); font-weight: 500; position: relative; transition: color 0.2s ease; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--accent); transition: width 0.25s ease; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: 14px; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }

/* ---------- Hero ---------- */
.hero { padding: 150px 0 90px; }
.hero__inner { display: grid; grid-template-columns: 1.55fr 1fr; gap: 60px; align-items: center; }
.hero__main, .hero__aside { min-width: 0; }
.hero__title { overflow-wrap: break-word; }
.hero__eyebrow {
  font-size: 0.82rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 26px;
}
.hero__title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.08; letter-spacing: -1.2px;
}
.hl--green { color: var(--accent); }
.hl--blue { color: var(--blue); }
.hl--amber { color: var(--amber); }
.hero__aside { padding-bottom: 8px; }
.hero__lead { font-size: 1.05rem; color: var(--text-soft); margin-bottom: 18px; }
.codewin { background: #1a1b26; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 44px rgba(20, 22, 38, 0.24); border: 1px solid rgba(255, 255, 255, 0.06); }
.codewin__bar { display: flex; align-items: center; gap: 7px; padding: 11px 15px; background: #16161e; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.codewin__dot { width: 11px; height: 11px; border-radius: 50%; }
.codewin__dot:nth-child(1) { background: #ff5f56; }
.codewin__dot:nth-child(2) { background: #ffbd2e; }
.codewin__dot:nth-child(3) { background: #27c93f; }
.codewin__name { margin-left: 8px; font-family: var(--mono); font-size: 0.72rem; color: #6b7689; }
.codewin__body { margin: 0; padding: 18px 20px 20px; overflow-x: auto; }
.codewin__body code { font-family: var(--mono); font-size: 0.8rem; line-height: 1.8; color: #c0caf5; white-space: pre; display: block; }
.codewin .c-com { color: #565f89; font-style: italic; }
.codewin .c-key { color: #bb9af7; }
.codewin .c-var { color: #c0caf5; font-weight: 500; }
.codewin .c-prop { color: #e0af68; }
.codewin .c-str { color: #9ece6a; }
.codewin .c-fn { color: #7dcfff; }
.codewin__body code.is-typing::after { content: "\2588"; color: #7dcfff; margin-left: 1px; animation: caret 1s step-end infinite; }
@keyframes caret { 50% { opacity: 0; } }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-alt); }
.section__grid { display: grid; grid-template-columns: 260px 1fr; gap: 64px; align-items: start; }
.section__head, .section__content { min-width: 0; }
.section__head { position: sticky; top: 100px; }
.section__eyebrow { font-size: 0.78rem; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.section__title { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.12; letter-spacing: -0.5px; }
.section__desc { margin-top: 16px; color: var(--text-soft); font-size: 0.95rem; }

/* ---------- About ---------- */
.section__head .codewin { margin-top: 30px; }
.about__content { display: grid; grid-template-columns: 280px 1fr; gap: 44px; align-items: start; }
.about__photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.about__photo img { display: block; width: 100%; height: auto; }
.about__text p { color: var(--text-soft); margin-bottom: 16px; }
.about__facts { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 28px; }
.about__facts li { display: flex; flex-direction: column; }
.about__facts strong { font-family: var(--display); font-size: 1.9rem; color: var(--text); line-height: 1; font-weight: 600; }
.about__facts span { font-size: 0.82rem; color: var(--text-mute); margin-top: 6px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), transparent); }
.timeline__item { position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 28px; padding: 0 0 44px 30px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before { content: ""; position: absolute; left: -5px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--green-bg); }
.timeline__period { font-weight: 600; color: var(--accent); font-size: 0.92rem; padding-top: 2px; }
.timeline__body h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; margin-bottom: 4px; }
.timeline__role { color: var(--text); font-weight: 500; margin-bottom: 10px; }
.timeline__body > p { color: var(--text-soft); }
.timeline__stops { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--border); }
.timeline__stops li { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.timeline__stops li:last-child { border-bottom: none; }
.timeline__stop-role { color: var(--text-soft); font-size: 0.86rem; }
.timeline__stop-period { color: var(--text-mute); font-size: 0.8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Filters + Cards ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter { padding: 9px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-soft); font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; }
.filter:hover { color: var(--text); border-color: var(--text); }
.filter.is-active { background: var(--text); color: #fff; border-color: var(--text); }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card.is-hidden { display: none; }
.card--tint-blue { background: var(--blue-bg); border-color: transparent; }
.card--tint-green { background: var(--green-bg); border-color: transparent; }
.card--tint-amber { background: var(--amber-bg); border-color: transparent; }
.card__icon { font-family: var(--display); font-size: 1.5rem; font-weight: 700; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,0.7); margin-bottom: 18px; }
.card--tint-blue .card__icon { color: var(--blue); }
.card--tint-green .card__icon { color: var(--green); }
.card--tint-amber .card__icon { color: var(--amber); }
.card__year { position: absolute; top: 30px; right: 30px; font-family: var(--mono); font-size: 0.74rem; color: var(--text-mute); }
.card__title { font-family: var(--display); font-weight: 600; font-size: 1.5rem; margin-bottom: 4px; }
.card__subtitle { color: var(--text-mute); font-size: 0.92rem; margin-bottom: 14px; }
.card__text { color: var(--text-soft); font-size: 0.96rem; margin-bottom: 18px; }
.card__text em { color: var(--text-mute); font-style: italic; font-size: 0.86rem; }
.card__link { color: var(--accent-ink); border-bottom: 1px solid currentColor; }
.card__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.card__meta li { font-size: 0.78rem; color: var(--text-soft); padding: 5px 12px; background: rgba(23,24,28,0.05); border-radius: 999px; }
.card__meta li a { color: var(--accent-ink); }

/* Feature card */
.card--feature { grid-column: 1 / -1; padding: 0; display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; }
.card--feature .card__cover { position: relative; min-height: 320px; }
.card--feature .card__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card--feature .card__content { position: relative; padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card__logo { display: inline-flex; align-items: center; background: #fff; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--border); }
.card__logo img { height: 22px; width: auto; display: block; }
.card--feature .card__year { position: static; }

/* Cover trigger (opens the lightbox) */
.cover-trigger { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: none; cursor: pointer; background: none; }
.cover-trigger img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-trigger::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,27,58,0) 45%, rgba(12,27,58,0.4)); opacity: 0; transition: opacity 0.25s ease; }
.cover-trigger:hover::after { opacity: 1; }
.cover-trigger__cue { position: absolute; left: 18px; bottom: 18px; z-index: 1; display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; border-radius: 999px; background: rgba(255,255,255,0.94); color: var(--text); font-family: var(--mono); font-size: 0.82rem; box-shadow: var(--shadow); }
.cover-trigger__play { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; flex: none; }
.cover-trigger__play::after { content: ""; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #fff; margin-left: 2px; }

/* Reusable video facade (loads YouTube only on click) */
.video-facade { position: relative; width: 100%; height: 100%; padding: 0; border: none; cursor: pointer; background: #0c1b3a; display: block; }
.video-facade > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-facade__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; background: rgba(15,122,85,0.92); display: grid; place-items: center; transition: transform 0.2s ease, background 0.2s ease; }
.video-facade__play::after { content: ""; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.video-facade:hover .video-facade__play { transform: translate(-50%, -50%) scale(1.08); background: var(--accent); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 6vh 5vw; background: rgba(12,18,28,0.86); }
.lightbox.is-open { display: flex; }
body.lightbox-open { overflow: hidden; }
.lightbox__stage { width: min(1080px, 100%); }
.lightbox__media { width: 100%; }
.lightbox__media--video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.lightbox__media--video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox__media--image img { display: block; width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--radius); }
.lightbox__close { position: absolute; top: 18px; right: 22px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer; background: rgba(255,255,255,0.14); color: #fff; font-size: 1.7rem; line-height: 1; }
.lightbox__close:hover { background: rgba(255,255,255,0.28); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer; background: rgba(255,255,255,0.14); color: #fff; font-size: 1.8rem; line-height: 1; display: grid; place-items: center; }
.lightbox__nav:hover { background: rgba(255,255,255,0.28); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__dots { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.lightbox__dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: none; cursor: pointer; background: rgba(255,255,255,0.4); transition: background 0.2s ease, transform 0.2s ease; }
.lightbox__dots button.is-active { background: #fff; transform: scale(1.25); }

/* ---------- Skills ---------- */
.skills__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.skills__code { margin-top: 48px; }
.skills__col h3 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin-bottom: 16px; }
.skills__subhead { margin-top: 26px; }
.tags { display: flex; flex-wrap: wrap; gap: 9px; }
.tags span { font-size: 0.85rem; padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text-soft); transition: color 0.2s ease, border-color 0.2s ease; }
.tags span:hover { color: var(--text); border-color: var(--text); }
.list { list-style: none; }
.list li { padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: 0.95rem; }
.list li:last-child { border-bottom: none; }

/* ---------- Contact ---------- */
.contact__inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact .section__title { margin-bottom: 16px; }
.contact__lead { color: var(--text-soft); max-width: 560px; margin-bottom: 38px; }
.contact__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; width: 100%; max-width: 780px; }
.contact__link { display: flex; flex-direction: column; gap: 6px; padding: 26px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform 0.25s ease, border-color 0.25s ease; }
.contact__link:hover { transform: translateY(-4px); border-color: var(--text); }
.contact__label { font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-mute); }
.contact__value { font-weight: 600; color: var(--text); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 30px 0; background: var(--bg-alt); }
.footer__inner { display: flex; justify-content: space-between; color: var(--text-mute); font-size: 0.88rem; gap: 16px; flex-wrap: wrap; }
.footer__inner a { color: var(--text-mute); border-bottom: 1px solid transparent; transition: color 0.2s ease, border-color 0.2s ease; }
.footer__inner a:hover { color: var(--text); border-bottom-color: var(--text); }

/* ---------- Legal pages (Impressum / Datenschutz) ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 130px 0 90px; }
.legal__back { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-soft); margin-bottom: 34px; }
.legal__back:hover { color: var(--text); }
.legal h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -0.5px; margin-bottom: 26px; }
.legal h2 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 32px 0 8px; }
.legal p { color: var(--text-soft); margin-bottom: 12px; }
.legal a { color: var(--accent-ink); border-bottom: 1px solid currentColor; }
.legal__note { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-mute); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links, .nav__actions .btn { display: none; }
  .nav__burger { display: flex; }
  .nav__links.is-open { display: flex; flex-direction: column; gap: 0; position: absolute; top: 72px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 28px; }
  .nav__links.is-open a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .hero__inner { grid-template-columns: 1fr; gap: 30px; align-items: start; }
  .section__grid { grid-template-columns: 1fr; gap: 28px; }
  .section__grid--skills { grid-template-columns: 1fr; }
  .section__head { position: static; }
  .section__head .codewin { max-width: 460px; }
  .about__content { grid-template-columns: 1fr; gap: 28px; }
  .about__photo { max-width: 360px; }
  .about__facts { grid-template-columns: repeat(2, 1fr); }
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
  .skills__grid { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: 1fr; }
  .card--feature { grid-template-columns: 1fr; }
  .card--feature .card__cover { min-height: 220px; }
  .card--feature .card__content { padding: 28px; }
  .contact__links { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .section { padding: 72px 0; }
  .hero { padding: 130px 0 70px; }
  .hero__title { font-size: 1.95rem; letter-spacing: -0.5px; }
  .about__facts { gap: 18px; }
}

/* Vorschaumodus fuer Screenshots */
body.preview-mode .hero { padding-top: 150px; }

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