/* ============================================================
   Hubert Kromer – kromer.pl (personal site)
   ============================================================ */

:root {
    --color-bg: #f7f4ee;
    --color-surface: #fffdf9;
    --color-text: #2a3542;
    --color-heading: #16202c;
    --color-muted: #5b6875;
    --color-faint: #98a1ab;
    --color-accent: #a9853a;
    --color-accent-soft: #c9a961;
    --color-line: rgba(22, 32, 44, 0.12);
    --color-line-soft: rgba(22, 32, 44, 0.07);

    --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
    --font-body: 'Inter Tight', -apple-system, sans-serif;

    --max-width: 1080px;
    --pad-x: clamp(1.5rem, 4vw, 3rem);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    overflow-x: hidden;
    font-weight: 300;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Warm paper glow at the top */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 50% at 50% 0%, rgba(201, 169, 97, 0.10) 0%, transparent 55%),
        linear-gradient(180deg, #fbf9f4 0%, var(--color-bg) 45%);
    pointer-events: none;
    z-index: 0;
}

::selection {
    background: rgba(201, 169, 97, 0.30);
    color: var(--color-heading);
}

/* ============================================================
   Layout
   ============================================================ */

.wrap {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--pad-x);
    padding-right: var(--pad-x);
    width: 100%;
}

section {
    scroll-margin-top: 5.5rem;
    padding: clamp(3.5rem, 9vh, 6.5rem) 0;
    border-top: 1px solid var(--color-line-soft);
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 244, 238, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-line-soft);
    opacity: 0;
    animation: fadeIn 1s ease-out 0.15s forwards;
}

.site-header .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.wordmark {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-heading);
    text-decoration: none;
    white-space: nowrap;
}

.wordmark em {
    font-style: italic;
    color: var(--color-accent);
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(1.1rem, 2.5vw, 2rem);
}

.nav a {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-muted);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width 0.4s ease;
}

.nav a:hover {
    color: var(--color-accent);
}

.nav a:hover::after {
    width: 100%;
}

.lang-switch {
    border: 1px solid var(--color-line);
    padding: 0.3rem 0.7rem;
    border-radius: 2px;
}

.lang-switch:hover {
    border-color: var(--color-accent);
}

.lang-switch::after {
    display: none;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
    border-top: none;
    padding: clamp(4rem, 11vh, 7rem) 0;
}

.hero .wrap {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.eyebrow {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.75rem;
    opacity: 0;
    animation: fadeUp 0.9s ease-out 0.35s forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--color-heading);
    margin-bottom: 1.75rem;
    opacity: 0;
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards;
}

.hero-title em {
    font-style: italic;
    color: var(--color-accent);
}

.divider {
    width: 60px;
    height: 1px;
    background: var(--color-accent-soft);
    margin: 2rem 0;
    opacity: 0;
    animation: expandLine 1s ease-out 0.8s forwards;
}

.hero-tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    line-height: 1.45;
    color: var(--color-muted);
    max-width: 44ch;
    text-wrap: balance;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 0.9s ease-out 0.95s forwards;
}

.hero-desc {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--color-muted);
    max-width: 58ch;
    text-wrap: pretty;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.9s ease-out 1.1s forwards;
}

.hero-desc a,
.prose-link {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(169, 133, 58, 0.35);
    transition: border-color 0.3s ease;
}

.hero-desc a:hover,
.prose-link:hover {
    border-color: var(--color-accent);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    opacity: 0;
    animation: fadeUp 0.9s ease-out 1.25s forwards;
}

/* Portrait */
.portrait {
    justify-self: center;
    position: relative;
    opacity: 0;
    animation: fadeIn 1.4s ease-out 0.7s forwards;
}

.portrait img {
    display: block;
    width: clamp(220px, 28vw, 340px);
    height: auto;
    border-radius: 50%;
}

.portrait::after {
    content: '';
    position: absolute;
    inset: -14px;
    border: 1px solid rgba(169, 133, 58, 0.45);
    border-radius: 50%;
    pointer-events: none;
}

.portrait::before {
    content: '';
    position: absolute;
    inset: -28px;
    border: 1px solid rgba(169, 133, 58, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.85rem 1.6rem;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.35s ease;
    border: 1px solid var(--color-accent);
}

.btn-primary {
    color: #fffdf9;
    background: var(--color-accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--color-accent);
}

.btn-ghost {
    color: var(--color-accent);
    background: transparent;
    border-color: rgba(169, 133, 58, 0.4);
}

.btn-ghost:hover {
    border-color: var(--color-accent);
    background: rgba(201, 169, 97, 0.1);
}

/* ============================================================
   Section headings
   ============================================================ */

.section-label {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--color-heading);
    margin-bottom: 1.5rem;
    max-width: 28ch;
}

.section-title em {
    font-style: italic;
    color: var(--color-accent);
}

.section-intro {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--color-muted);
    max-width: 64ch;
    text-wrap: pretty;
    margin-bottom: 2.75rem;
}

/* ============================================================
   Cards (what I do)
   ============================================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.card {
    border: 1px solid var(--color-line-soft);
    background: var(--color-surface);
    padding: 2rem 1.75rem;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(22, 32, 44, 0.03);
    transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    border-color: rgba(169, 133, 58, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(22, 32, 44, 0.06);
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 500;
    color: var(--color-heading);
    margin-bottom: 0.9rem;
}

.card h3::first-letter {
    color: var(--color-accent);
}

.card p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--color-muted);
}

/* ============================================================
   Timeline (my path)
   ============================================================ */

.path {
    position: relative;
    max-width: 720px;
    padding-left: 2rem;
}

.path::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 4px;
    width: 1px;
    background: linear-gradient(180deg,
        rgba(169, 133, 58, 0.55) 0%,
        var(--color-line) 100%);
}

.path-item {
    position: relative;
    padding: 1.1rem 0;
}

.path-item::before {
    content: '';
    position: absolute;
    top: 1.55rem;
    left: -2rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 1px solid var(--color-accent);
}

.path-item.now::before {
    background: var(--color-accent);
}

.path-years {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--color-accent);
    margin-bottom: 0.35rem;
}

.path-item h3 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-heading);
    margin-bottom: 0.4rem;
}

.path-item p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--color-muted);
    max-width: 58ch;
}

/* ============================================================
   Workbench (tools & standards) + interests
   ============================================================ */

.cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 3rem;
}

.list-block h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-heading);
    margin-bottom: 1rem;
}

.list-block ul {
    list-style: none;
}

.list-block li {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-muted);
    padding: 0.5rem 0 0.5rem 1.3rem;
    position: relative;
    border-top: 1px solid var(--color-line-soft);
}

.list-block li:first-child {
    border-top: none;
}

.list-block li::before {
    content: '·';
    position: absolute;
    left: 0.2rem;
    color: var(--color-accent);
    font-weight: 500;
}

.list-block li strong {
    color: var(--color-text);
    font-weight: 500;
}

.certs-note {
    margin-top: 2rem;
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--color-faint);
    max-width: 64ch;
}

/* Interests */
.interests {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 3rem;
    max-width: 880px;
}

.interest {
    border-top: 1px solid var(--color-line);
    padding-top: 1.1rem;
}

.interest h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--color-heading);
    margin-bottom: 0.4rem;
}

.interest h3 em {
    font-style: italic;
    color: var(--color-accent);
}

.interest p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--color-muted);
}

/* ============================================================
   Contact
   ============================================================ */

.contact {
    text-align: center;
    padding-bottom: clamp(4.5rem, 11vh, 8rem);
}

.contact .section-label,
.contact .section-title,
.contact .section-intro {
    margin-left: auto;
    margin-right: auto;
}

.contact .section-intro {
    max-width: 46ch;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.contact-meta {
    margin-top: 2.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--color-faint);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
    border-top: 1px solid var(--color-line);
    padding: 2.5rem 0;
    position: relative;
    z-index: 1;
}

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

.footer-copy {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-faint);
}

.footer-links {
    display: flex;
    gap: 1.75rem;
}

.footer-links a {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-accent);
}

/* ============================================================
   Reveal on scroll
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }

/* ============================================================
   Animations
   ============================================================ */

@keyframes fadeIn {
    to { opacity: 1; }
}

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

@keyframes expandLine {
    from { width: 0; opacity: 0; }
    to { width: 60px; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
    .reveal { opacity: 1; transform: none; }
    .site-header, .eyebrow, .hero-title, .divider, .hero-tagline,
    .hero-desc, .hero-actions, .portrait { opacity: 1; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 880px) {
    .hero .wrap {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .portrait {
        order: -1;
        justify-self: start;
    }

    .portrait img {
        width: clamp(180px, 40vw, 260px);
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .cols-2,
    .interests {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .nav a:not(.lang-switch):not(.nav-contact) {
        display: none;
    }

    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print */
@media print {
    body::before { display: none; }
    body { background: white; }
    .site-header { position: static; background: white; }
}
