/* ============================================================
   Patrick Fischer — Portfolio
   Glassmorphism · Apple-inspired · One-page resume
   ============================================================ */

:root {
  --bg: #06070d;
  --text: #f4f6fb;
  --text-dim: rgba(244, 246, 251, 0.62);
  --text-faint: rgba(244, 246, 251, 0.40);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.36);
  --blur: 22px;

  /* Accent gradient */
  --grad: linear-gradient(120deg, #2f6bff 0%, #6ea8ff 50%, #dcebff 100%);
  /* Vertical variant — for thin vertical lines so the color flows top→bottom */
  --grad-v: linear-gradient(180deg, #2f6bff 0%, #6ea8ff 50%, #dcebff 100%);
  /* Dot variant — smooth 2-stop fade (no stark white stop) for small circles */
  --grad-dot: linear-gradient(180deg, #7cb2ff 0%, #3f78ea 100%);

  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---------- Background: soft top glow + subtle dot-grid ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg);
  background-image:
    /* soft blue aurora glow behind the hero */
    radial-gradient(1100px 760px at 72% -14%, rgba(110, 168, 255, 0.17), transparent 60%),
    /* faint glow pooled into the far corner, away from centered text */
    radial-gradient(900px 700px at 108% 108%, rgba(90, 140, 255, 0.10), transparent 60%),
    /* quiet dot-grid texture */
    radial-gradient(rgba(150, 180, 255, 0.05) 1px, transparent 1.5px);
  background-size: auto, auto, 24px 24px;
  background-position: 0 0, 0 0, 0 0;
}

/* ---------- Glass utility ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 100px;
  font-size: 0.96rem;
  font-weight: 550;
  transition: transform 0.2s var(--ease), box-shadow 0.3s, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: var(--grad);
  color: #06070d;
  box-shadow: 0 8px 24px rgba(110, 168, 255, 0.3);
}
.btn--primary:hover { box-shadow: 0 12px 32px rgba(110, 168, 255, 0.42); }
.btn--ghost { color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Layout ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 120px 24px 0;
}
.section__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 40px; }
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 200px 24px 120px;
  text-align: center;
  position: relative;
}
.hero__title {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
/* Rotating hero keyword (revenue → impact → action) */
.rotator {
  display: inline-block;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.rotator.is-swapping {
  opacity: 0;
  transform: translateY(-0.28em);
}
.hero__sub {
  max-width: 560px;
  margin: 0 auto 38px;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--text-dim);
}
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- About ---------- */
.about { border-radius: var(--radius); padding: 44px; }
.about__lead { font-size: clamp(1.2rem, 3vw, 1.6rem); line-height: 1.4; letter-spacing: -0.01em; margin-bottom: 18px; }
.about__body { color: var(--text-dim); max-width: 640px; margin-bottom: 36px; }
.about__stats { display: flex; gap: 48px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { color: var(--text-faint); font-size: 0.9rem; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.timeline__item {
  border-radius: var(--radius);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.timeline__item:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.22); }
.timeline__when { color: var(--text-faint); font-size: 0.92rem; font-variant-numeric: tabular-nums; padding-top: 3px; }
.timeline__what h3 { font-size: 1.25rem; font-weight: 650; }
.timeline__org { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; margin: 0 0 5px; }
.timeline__what > p:last-child { color: var(--text-dim); margin-top: 8px; }

/* Grouped roles at one company, connected by a promotion line */
.rolegroup { position: relative; margin-top: 6px; }
.rolegroup::before {
  content: "";
  position: absolute;
  left: 6px; top: 14px; bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: var(--grad-v);
  opacity: 0.55;
}
.role { display: flex; gap: 16px; }
.role + .role { margin-top: 22px; }
.role__node {
  flex: none;
  position: relative;
  z-index: 1;
  margin-top: 5px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-faint);
}
.role__node--current {
  border-color: transparent;
  background: var(--grad-dot);
  box-shadow: 0 0 0 5px rgba(110, 168, 255, 0.16);
}
.role__body { flex: 1; min-width: 0; }
.role__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 6px; }
.role__head h3 { font-size: 1.15rem; font-weight: 650; }
.role__when { color: var(--text-faint); font-size: 0.85rem; font-variant-numeric: tabular-nums; margin-left: auto; }
.role__body p { color: var(--text-dim); }

/* ---------- Certifications & Education (horizontal rows) ---------- */
/* Education — a single horizontal card */
.edu {
  border-radius: var(--radius);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.edu:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.22); }
.edu__icon {
  flex: none;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--grad);
  color: #06070d;
}
.edu__icon svg { width: 26px; height: 26px; }
.edu__info { flex: 1; min-width: 0; }
.edu__label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--text-faint);
}
.edu__school { font-size: 1.18rem; font-weight: 650; margin: 3px 0 2px; }
.edu__degree { color: var(--text-dim); font-size: 0.95rem; }
.edu__date {
  flex: none;
  color: var(--text-faint);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

/* Certifications — one icon, a clean list of credentials (no dividers) */
.credlist {
  margin-top: 14px;
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.credlist:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.22); }
.cred__icon {
  flex: none;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--grad);
  color: #06070d;
}
.cred__icon svg { width: 26px; height: 26px; }
.cred__items { flex: 1; min-width: 0; }
.cred__label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.cred__group + .cred__group { margin-top: 20px; }
.cred__sub {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  margin-bottom: 11px;
}
.cred__list { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.cred__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.cred__name { font-weight: 550; }
.cred__issuer { flex: none; color: var(--text-dim); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.section--contact { padding-bottom: 120px; }
.contact {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 76px 40px;
  text-align: center;
}
/* Luminous gradient bloom behind the content for depth */
.contact::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 540px; height: 540px;
  transform: translate(-50%, -45%);
  background: radial-gradient(circle, rgba(110, 168, 255, 0.22), transparent 68%);
  pointer-events: none;
}
.contact > * { position: relative; z-index: 1; }
.contact__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.contact__title {
  font-size: clamp(2.2rem, 5.4vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0;
}
/* Short gradient divider that anchors the headline to the icons */
.contact__title::after {
  content: "";
  display: block;
  width: 56px; height: 3px;
  margin: 24px auto 32px;
  border-radius: 3px;
  background: var(--grad);
}
.contact__icons { display: flex; gap: 16px; justify-content: center; }
.contact__icon {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  transition: transform 0.25s var(--ease), background 0.3s, color 0.3s, box-shadow 0.3s;
}
.contact__icon svg { width: 28px; height: 28px; }
.contact__icon:hover {
  transform: translateY(-3px);
  background: var(--grad);
  color: #06070d;
  box-shadow: 0 10px 28px rgba(110, 168, 255, 0.4);
}

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 40px 24px 56px; color: var(--text-faint); font-size: 0.88rem; }

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

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
  .about { padding: 32px 24px; }
  .about__stats { gap: 32px; }
  .edu { flex-wrap: wrap; gap: 14px 18px; }
  .edu__date { width: 100%; padding-left: 68px; }
  .cred__row { flex-direction: column; gap: 2px; }
}

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