/* =====================================================================
   Theme: Nord — Scandi · Pebble · Restraint
   Public Sans + JetBrains Mono · Pebble #F0EEE9 · Nordblau #2D6A9F
   ===================================================================== */

@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/public-sans-v21-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/public-sans-v21-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/public-sans-v21-latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/public-sans-v21-latin-700.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-v24-latin-500.woff2') format('woff2');
}

:root {
    --bg:      #F0EEE9;
    --bg-elev: #F7F5F1;
    --ink:     #1f2937;
    --ink-mid: #6B7280;
    --accent:  #2D6A9F;
    --line:    rgba(31, 41, 55, 0.14);
    --font:    'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono:    'JetBrains Mono', ui-monospace, monospace;
    --maxw:    1060px;
    --gutter:  clamp(24px, 5vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 700; line-height: 1.12; }
::selection { background: var(--accent); color: #fff; }

/* --------------------------------------------------------- STICKY NAV */
.topnav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(240, 238, 233, 0.88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ink);
}
.topnav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.topnav-brand { font-family: var(--mono); font-size: 13px; font-weight: 500; white-space: nowrap; }
.topnav-brand .dot { color: var(--accent); }

.topnav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-right: -10px;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--ink);
}
.topnav-toggle .bars,
.topnav-toggle .bars::before,
.topnav-toggle .bars::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    transition: transform 0.3s ease, background 0.2s ease;
}
.topnav-toggle .bars { position: relative; }
.topnav-toggle .bars::before { position: absolute; left: 0; top: -6px; }
.topnav-toggle .bars::after  { position: absolute; left: 0; top: 6px; }
.topnav.is-open .topnav-toggle .bars { background: transparent; }
.topnav.is-open .topnav-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.topnav.is-open .topnav-toggle .bars::after  { transform: translateY(-6px) rotate(-45deg); }

.topnav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background: rgba(240, 238, 233, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ink);
    padding: 0 var(--gutter);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.34s ease, opacity 0.26s ease;
}
.topnav.is-open .topnav-links {
    max-height: 80vh;
    opacity: 1;
    overflow-y: auto;
    pointer-events: auto;
    padding-bottom: 12px;
}
.topnav-links a {
    display: block;
    padding: 14px 2px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: var(--ink-mid);
    border-bottom: 1px solid var(--line);
    transition: color 0.2s ease;
}
.topnav-links a:last-child { border-bottom: 0; }
.topnav-links a:hover, .topnav-links a.active { color: var(--accent); }

.nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(31, 41, 55, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
body.nav-open .nav-scrim { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

[id] { scroll-margin-top: 72px; }

/* ------------------------------------------------------------- COVER */
.cover {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(28px, 6vw, 56px) var(--gutter) clamp(40px, 7vw, 72px);
}
.cover-main { display: flex; flex-direction: column; gap: 34px; }
.cover-text { order: 1; }
.cover-photo { order: 2; align-self: flex-start; width: clamp(200px, 58vw, 280px); }
.cover-photo img { width: 100%; border: 1px solid var(--ink); }
.photo-cap {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-mid);
}
.photo-cap em { font-style: normal; }

.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    color: var(--accent);
}
.name {
    font-size: clamp(42px, 11vw, 76px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.0;
    margin-top: 16px;
}
.name .last { color: var(--ink); }
.cover-role {
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--ink-mid);
}
.cover-tagline {
    margin-top: 20px;
    max-width: 36ch;
    font-size: 16.5px;
    line-height: 1.55;
    color: var(--ink);
    border-left: 2px solid var(--accent);
    padding-left: 16px;
}

/* -------------------------------------------------------------- BODY */
.body {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: clamp(16px, 4vw, 40px) var(--gutter) clamp(48px, 8vw, 88px);
}
.section { margin-bottom: clamp(44px, 7vw, 72px); }
.section:last-child { margin-bottom: 0; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px 24px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--ink);
}
.section-head h2 {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.section-sub { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mid); }

/* --------------------------------------------------------- ANSCHREIBEN */
.letter { max-width: 680px; }
.letter p { font-size: 15.5px; line-height: 1.75; margin-bottom: 16px; }
.letter .salutation { font-weight: 600; }
.letter .lead { font-size: 17px; line-height: 1.65; margin-bottom: 20px; }
.letter .drop {
    float: left;
    font-size: 52px;
    line-height: 0.85;
    font-weight: 700;
    color: var(--accent);
    margin: 5px 12px 0 0;
}
.letter .sign { margin-top: 26px; font-size: 13.5px; color: var(--ink-mid); }
.letter .sig {
    display: inline-block;
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 16px;
    font-weight: 500;
    color: var(--accent);
}

/* ------------------------------------------------------------ TIMELINE */
.timeline { list-style: none; }
.tl-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}
.tl-item:first-child { border-top: 0; padding-top: 4px; }
.tl-year { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.tl-title { font-size: 16.5px; font-weight: 600; }
.tl-org { font-size: 13.5px; color: var(--ink-mid); margin-top: 2px; }
.tl-note { font-size: 13px; line-height: 1.5; color: var(--ink-mid); margin-top: 6px; }

/* ----------------------------------------------------------- KENNTNISSE */
.skill-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.skill-head {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.skill-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14.5px;
}
.skill-line span:first-child { font-weight: 500; }
.skill-line .lvl { font-family: var(--mono); font-size: 11.5px; color: var(--ink-mid); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink);
    border: 1px solid var(--ink-mid);
    padding: 6px 11px;
}

/* ------------------------------------------------------------ UNTERLAGEN */
.doc-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 300px)); gap: 14px; }
.doc-card {
    display: block;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    padding: 20px;
    transition: border-color 0.2s ease, transform 0.15s ease;
}
.doc-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.doc-title { font-size: 17px; font-weight: 600; }
.doc-meta { font-size: 13px; color: var(--ink-mid); margin-top: 4px; }
.doc-cta {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--accent);
}

/* ---------------------------------------------------------------- FOOTER */
.footer { background: var(--ink); color: var(--bg); padding: clamp(44px, 7vw, 64px) var(--gutter) 26px; }
.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 26px;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(240, 238, 233, 0.18);
}
.footer-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    color: rgba(240, 238, 233, 0.6);
    margin-bottom: 10px;
}
.footer-name { font-size: clamp(28px, 7vw, 44px); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.footer-name::after { content: "."; color: #7FA8CC; }
.footer-contact { font-family: var(--mono); font-size: 13px; line-height: 2.1; }
.footer-contact a:hover { color: #7FA8CC; }
.footer-base {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-top: 18px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.06em;
    color: rgba(240, 238, 233, 0.55);
}

/* ---------------------------------------------------------------- DESKTOP */
@media (min-width: 721px) {
    .topnav-toggle { display: none; }
    .nav-scrim { display: none; }
    .topnav-links {
        position: static;
        flex-direction: row;
        align-items: center;
        gap: clamp(14px, 2.4vw, 30px);
        max-height: none;
        opacity: 1;
        overflow: visible;
        pointer-events: auto;
        background: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border-bottom: 0;
        padding: 0;
    }
    .topnav-links a {
        display: inline-flex;
        align-items: center;
        height: 54px;
        padding: 0;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
    }
    .topnav-links a:last-child { border-bottom: 2px solid transparent; }
    .topnav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }
}
@media (min-width: 760px) {
    .tl-item { grid-template-columns: 150px 1fr; gap: 26px; }
    .skill-grid { grid-template-columns: repeat(3, 1fr); gap: 36px; }
}
@media (min-width: 900px) {
    .cover-main { flex-direction: row; align-items: flex-start; gap: clamp(40px, 6vw, 72px); }
    .cover-photo { order: 1; width: clamp(250px, 27vw, 310px); flex-shrink: 0; }
    .cover-text { order: 2; flex: 1; padding-top: 8px; }
    .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-end; }
    .footer-contact { text-align: right; }
    .footer-base { flex-direction: row; justify-content: space-between; }
}

/* ----------------------------------------------------------------- MOTION */
.reveal-on .section,
.reveal-on .cover-photo {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.2, 0.7, 0.2, 1),
                transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
    will-change: opacity, transform;
}
.reveal-on .section.is-visible,
.reveal-on .cover-photo.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal-on .section, .reveal-on .cover-photo { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* Drucken: alle Sektionen sichtbar (Reveal-Startzustand aufheben) */
@media print {
    .reveal-on .section,
    .reveal-on .cover-photo { opacity: 1 !important; transform: none !important; transition: none !important; }
    .topnav, .nav-scrim { display: none !important; }
}
