/* =============================================================================
   Philipp Pamminger — personal site
   No frameworks, no external fonts, no tracking.
   ========================================================================== */

/* --- Design tokens -------------------------------------------------------- */

:root {
  --bg:            #FBFAF8;
  --bg-tint:       #F4F1EC;
  --surface:       #FFFFFF;
  --ink:           #14181D;
  --ink-soft:      #3D454F;
  --muted:         #6B7683;
  --rule:          #E2DED6;
  --rule-strong:   #CFC9BE;
  --accent:        #B4552B;
  --accent-soft:   #F0E3DA;
  --inverted-bg:   #14181D;
  --inverted-ink:  #F1EEE9;
  --inverted-mute: #9AA3AE;
  --inverted-rule: #2A3037;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
                "Times New Roman", serif;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --section-y: clamp(4.5rem, 10vw, 8.5rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0F1216;
    --bg-tint:       #14181D;
    --surface:       #171B21;
    --ink:           #ECE9E4;
    --ink-soft:      #C2C7CE;
    --muted:         #8F98A3;
    --rule:          #262C34;
    --rule-strong:   #39414B;
    --accent:        #E08A5A;
    --accent-soft:   #2A1E17;
    --inverted-bg:   #070909;
    --inverted-ink:  #ECE9E4;
    --inverted-mute: #8F98A3;
    --inverted-rule: #22282F;
  }
}

/* --- Reset ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Shared type ---------------------------------------------------------- */

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
  letter-spacing: -0.015em;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  max-width: 20ch;
}

.section { padding-block: var(--section-y); }

.section-tint { background: var(--bg-tint); }

.section-inverted {
  background: var(--inverted-bg);
  color: var(--inverted-ink);
}
.section-inverted .eyebrow { color: var(--inverted-mute); }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.25s var(--ease),
              color 0.25s var(--ease),
              border-color 0.25s var(--ease),
              transform 0.25s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--ink); transform: translateY(-1px); }

.btn-ghost {
  border-color: var(--rule-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); transform: translateY(-1px); }

/* --- Header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--rule); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.wordmark { text-decoration: none; display: grid; line-height: 1.25; }
.wordmark-name {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
}
.wordmark-role {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.site-nav a {
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); }

.nav-cta {
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  color: var(--ink) !important;
}
.nav-cta:hover { border-color: var(--ink); }

@media (max-width: 640px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .wordmark-role { display: none; }
}

/* --- Hero ----------------------------------------------------------------- */

.hero { padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3rem, 7vw, 5.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 1.2rem + 5.6vw, 5rem);
  letter-spacing: -0.025em;
  line-height: 1.03;
  margin-bottom: 1.75rem;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 2.25rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.portrait { margin: 0; }

.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.5s var(--ease);
}
.portrait img:hover { filter: grayscale(0%); }

.portrait-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background:
    linear-gradient(145deg, var(--accent-soft), transparent 62%),
    var(--surface);
  display: grid;
  place-items: center;
}
.portrait-placeholder span {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 4.5rem);
  letter-spacing: 0.06em;
  color: var(--accent);
  opacity: 0.5;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 17rem; order: -1; }
  .portrait-placeholder { aspect-ratio: 1 / 1; }
}

/* --- Proof strip ---------------------------------------------------------- */

.proof {
  border-block: 1px solid var(--rule);
  padding-block: clamp(2.25rem, 5vw, 3.25rem);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.proof-item {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding-left: 1.25rem;
  border-left: 1px solid var(--rule);
}

.proof-figure {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 1.4rem + 2vw, 2.9rem);
  line-height: 1;
  color: var(--accent);
}

.proof-label {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 26ch;
}

@media (max-width: 780px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
}

/* --- Profile thread ------------------------------------------------------- */

.thread {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.25rem);
}

.thread-step { border-top: 2px solid var(--ink); padding-top: 1.5rem; }

.thread-index {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.thread-step h3 {
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
}

.thread-step p { color: var(--ink-soft); font-size: 0.9688rem; }

@media (max-width: 860px) { .thread { grid-template-columns: 1fr; } }

/* --- Leadership ----------------------------------------------------------- */

.pullquote {
  margin: 0 0 clamp(2.25rem, 4.5vw, 3.25rem);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 0.9rem + 2.8vw, 2.9rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  max-width: 24ch;
  text-wrap: balance;
}
.pullquote::before {
  content: "\201C";
  color: var(--accent);
}

/* Coaching credential — the proof behind the quote above it. */
.credential {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  max-width: 58rem;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  padding-left: clamp(1rem, 2.5vw, 1.75rem);
  border-left: 2px solid var(--accent);
}

.credential-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 0.3rem;
}

.credential-text {
  color: var(--inverted-ink);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
}

@media (max-width: 700px) {
  .credential { grid-template-columns: 1fr; gap: 0.75rem; }
  .credential-tag { padding-top: 0; }
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  border-top: 1px solid var(--inverted-rule);
  padding-top: clamp(2rem, 4vw, 3rem);
}

.principle h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.65rem;
  color: var(--inverted-ink);
}
.principle p { color: var(--inverted-mute); font-size: 0.9375rem; }

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

/* --- Impact cards --------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover { border-color: var(--rule-strong); transform: translateY(-2px); }

.card-meta {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}

.card p:not(.card-meta) { color: var(--ink-soft); font-size: 0.9688rem; }

@media (max-width: 780px) { .cards { grid-template-columns: 1fr; } }

/* --- Fit ------------------------------------------------------------------ */

.fit {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.fit-item { border-top: 2px solid var(--accent); padding-top: 1.5rem; }

.fit-item h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.85rem);
  letter-spacing: -0.015em;
  margin-bottom: 0.9rem;
}

.fit-item p { color: var(--ink-soft); }

@media (max-width: 780px) { .fit { grid-template-columns: 1fr; } }

/* --- Timeline ------------------------------------------------------------- */

.timeline { border-top: 1px solid var(--rule); }

.tl-item {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.tl-years {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.tl-body h3 {
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  margin-bottom: 0.3rem;
}

.tl-org {
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.tl-body > p:last-child {
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 62ch;
}

@media (max-width: 640px) {
  .tl-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .tl-years { padding-top: 0; }
}

/* --- Beyond --------------------------------------------------------------- */

.beyond {
  display: grid;
  gap: 0;
  max-width: 62rem;
}

.beyond li {
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink-soft);
  font-size: 1.0625rem;
}
.beyond li:first-child { border-top: 1px solid var(--rule-strong); }
.beyond strong { color: var(--ink); font-weight: 600; }

/* --- Contact -------------------------------------------------------------- */

.section-contact {
  background: var(--inverted-bg);
  color: var(--inverted-ink);
  text-align: center;
}
.section-contact .eyebrow { color: var(--inverted-mute); }

.contact-inner { display: grid; justify-items: center; }

.contact-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 1rem + 3.2vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.contact-note {
  color: var(--inverted-mute);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.contact-links { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.section-contact .btn-ghost {
  border-color: var(--inverted-rule);
  color: var(--inverted-ink);
}
.section-contact .btn-ghost:hover {
  border-color: var(--inverted-ink);
  background: transparent;
}
.section-contact .btn-primary:hover { background: var(--inverted-ink); color: var(--inverted-bg); }

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  padding-block: 2.25rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer-inner nav { display: flex; gap: 1.5rem; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }

/* --- Legal page ----------------------------------------------------------- */

.legal { padding-block: clamp(3rem, 8vw, 6rem); }

.legal-inner { max-width: 46rem; }

.legal h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}

.legal h2 {
  font-size: 1.125rem;
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.legal p, .legal li { color: var(--ink-soft); margin-bottom: 0.9rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; }
.legal a { color: var(--accent); }
.legal .todo {
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  padding: 0.9rem 1.1rem;
  font-size: 0.9375rem;
}

/* --- Reveal animation ----------------------------------------------------- */

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

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

/* --- Print ---------------------------------------------------------------- */

@media print {
  .site-header, .hero-actions, .contact-links, .site-footer, .portrait { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .hero { padding-block: 1.25rem; }
  .section-inverted, .section-contact { background: #fff; color: #000; }
  .card { break-inside: avoid; border-color: #999; }
  .tl-item { break-inside: avoid; }
  .reveal { opacity: 1; transform: none; }
}
