/* ============================================================
   Jonas Gießler – Personal Website
   style.css  –  shared design system
   ============================================================ */

/* ── Custom properties ─────────────────────────────────────── */
:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --surface-2:    #21262d;
  --border:       #30363d;
  --text:         #e6edf3;
  --text-muted:   #8b949e;
  --accent:       #f0b429;
  --accent-dark:  #c9941a;
  --accent-glow:  rgba(240, 180, 41, 0.15);
  --blue:         #4cb1ff;
  --radius:       12px;
  --nav-h:        64px;
}

/* ── Skip link (accessibility) ─────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: .5rem 1rem;
  background: var(--accent);
  color: #0d1117;
  font-size: .85rem;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus {
  left: 50%;
  transform: translateX(-50%);
}

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.nav__inner {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.03em;
  transition: opacity .2s;
}
.nav__logo:hover { opacity: .75; }

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

.nav__links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .02em;
  transition: color .2s;
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .2s;
}
.nav__links a:hover,
.nav__links a.active { color: var(--text); }
.nav__links a:hover::after,
.nav__links a.active::after { transform: scaleX(1); }

/* ── Mobile nav ─────────────────────────────────────────────── */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

@media (max-width: 640px) {
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
  }
  .nav__links.open { display: flex; }
  .nav__toggle { display: flex; }
}

/* ── Page wrapper ───────────────────────────────────────────── */
.page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ── Section utility ────────────────────────────────────────── */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem clamp(1.25rem, 5vw, 2rem);
}

.section + .section {
  padding-top: 0;
}

.section__label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

.section__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  line-height: 1.2;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 4rem clamp(1.25rem, 5vw, 2rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
}

.hero__avatar {
  width: 160px; height: 160px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  object-fit: cover;
  flex-shrink: 0;
}

.hero__greeting {
  font-size: .875rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.hero__name {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}

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

.hero__role {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero__role strong { color: var(--text); font-weight: 500; }

.hero__btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  border: none;
  font-family: inherit;
}

.btn--primary {
  background: var(--accent);
  color: #0d1117;
}
.btn--primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--text-muted);
  background: var(--surface);
  transform: translateY(-1px);
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.card__tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(240,180,41,.25);
  padding: .2rem .55rem;
  border-radius: 4px;
  margin-bottom: .75rem;
}

.card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

.card__text {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .75rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--accent);
  transition: gap .2s;
}
.card__link:hover { gap: .55rem; }

/* ── Grid layouts ───────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* ── Timeline ───────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline__item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-4px);
  box-shadow: 0 0 0 3px var(--bg);
}

.timeline__date {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .3rem;
}

.timeline__company {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .2rem;
}

.timeline__role {
  font-size: .8rem;
  color: var(--blue);
  font-weight: 500;
  margin-bottom: .5rem;
}

.timeline__desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Sub-timeline (nested SAP phases) ───────────────────────── */
.timeline__sub {
  position: relative;
  margin-top: 1rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.timeline__sub-item {
  position: relative;
}

/* small connector dot */
.timeline__sub-item::before {
  content: '';
  position: absolute;
  left: -1.42rem;
  top: .45rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
}

.timeline__sub-item--current::before {
  background: var(--accent);
}

.timeline__sub-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .3rem;
}

.timeline__sub-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
}

.timeline__sub-date {
  font-size: .7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .04em;
}

.badge--current {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: .1rem .4rem;
}

.timeline__sub-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Tags row ────────────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .6rem;
}

.tag {
  font-size: .7rem;
  font-weight: 500;
  padding: .2rem .55rem;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── Divider ─────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 clamp(1.25rem, 5vw, 2rem);
}

/* ── Nav cards (index page links) ───────────────────────────── */
.nav-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  cursor: pointer;
}
.nav-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.nav-card__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.nav-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .2rem;
}

.nav-card__desc {
  font-size: .825rem;
  color: var(--text-muted);
}

/* ── Contact form ────────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.form__label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-muted);
}

.form__input,
.form__textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  padding: .75rem 1rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  resize: vertical;
}
.form__input:focus,
.form__textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form__status {
  font-size: .875rem;
  margin-top: .5rem;
  min-height: 1.5rem;
}
.form__status.success { color: #3fb950; }
.form__status.error   { color: #f85149; }

/* Honeypot: hidden from humans but visible to bots */
.form__honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.25rem, 5vw, 2rem);
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Highlight text ─────────────────────────────────────────── */
.hl { color: var(--accent); font-weight: 500; }
.hl-blue { color: var(--blue); font-weight: 500; }

/* ── Responsive tweaks ─────────────────────────────────────── */
@media (max-width: 640px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__inner > :nth-child(2) { order: -1; }
  .hero__avatar { margin: 0 auto; width: 120px; height: 120px; }
  .hero__role { max-width: 100%; }
  .hero__btns { justify-content: center; }
}

/* ── Scroll reveal animations ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger cards inside grids */
.reveal .card { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible .card { opacity: 1; transform: translateY(0); }
.reveal.visible .card:nth-child(1) { transition-delay: 0s; }
.reveal.visible .card:nth-child(2) { transition-delay: .1s; }
.reveal.visible .card:nth-child(3) { transition-delay: .2s; }
.reveal.visible .card:nth-child(4) { transition-delay: .3s; }
.reveal.visible .card:nth-child(5) { transition-delay: .4s; }
.reveal.visible .card:nth-child(6) { transition-delay: .5s; }

/* respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal .card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Language banner ───────────────────────────────────────── */
.lang-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  z-index: 150;
  font-size: .85rem;
  color: var(--text-muted);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  animation: bannerIn .4s ease;
  max-width: calc(100vw - 2rem);
}

@keyframes bannerIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lang-banner__btn {
  background: var(--accent);
  color: #0d1117;
  border: none;
  padding: .4rem .8rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.lang-banner__btn:hover { background: var(--accent-dark); }

.lang-banner__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0 0 .25rem;
  line-height: 1;
  transition: color .2s;
}
.lang-banner__close:hover { color: var(--text); }

/* ── Language toggle in nav ────────────────────────────────── */
.nav__lang {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .2rem .5rem;
  transition: color .2s, border-color .2s;
  margin-left: .5rem;
}
.nav__lang:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .lang-banner { bottom: 1rem; right: 1rem; left: 1rem; }
}
