/* ============================================
   Stefan Berge — Personal Website
   Clean & Minimal | Navy/Blue Palette
   ============================================ */

/* --- Variables --- */
:root {
    --navy: #0a1628;
    --navy-light: #132240;
    --blue: #2563eb;
    --blue-light: #3b82f6;
    --blue-muted: #1e40af;
    --slate: #64748b;
    --slate-light: #94a3b8;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --white: #ffffff;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-width: 1100px;
    --transition: 0.3s ease;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--navy);
    background: var(--white);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    display: block;
}

/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}

.nav.scrolled {
    border-bottom-color: var(--gray-200);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo-initials {
    font-size: 1rem;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: -0.02em;
    line-height: 1;
}

.nav-logo-sep {
    display: block;
    width: 1px;
    height: 15px;
    background: var(--gray-200);
    flex-shrink: 0;
}

.nav-logo-name {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--navy);
    letter-spacing: 0.03em;
    line-height: 1;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 36px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--slate);
    transition: color var(--transition);
    letter-spacing: 0.01em;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    transition: all var(--transition);
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 100px;
    background: linear-gradient(160deg, var(--white) 0%, var(--gray-50) 100%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 80px;
    align-items: center;
}

.hero-photo {
    flex-shrink: 0;
}

.hero-portrait {
    width: 100%;
    display: block;
    border-radius: 6px;
    filter: grayscale(8%);
}

.hero-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-name {
    font-size: clamp(2.75rem, 6vw, 5rem);
    font-weight: 800;
    color: var(--navy);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
}

.hero-tagline {
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    font-weight: 500;
    color: var(--slate);
    max-width: 600px;
    line-height: 1.5;
    margin-bottom: 28px;
}

.hero-summary {
    font-size: 1rem;
    color: var(--slate-light);
    max-width: 600px;
    line-height: 1.85;
    margin-bottom: 16px;
}

.hero-summary:last-child {
    margin-bottom: 0;
}

/* --- Sections --- */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--gray-50);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--slate);
    max-width: 560px;
    margin-bottom: 56px;
    line-height: 1.7;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--blue);
}

.timeline-item:first-child .timeline-marker {
    background: var(--blue);
}

.timeline-date {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.timeline-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--slate);
    margin-bottom: 10px;
}

.timeline-content p:last-child {
    font-size: 0.95rem;
    color: var(--slate-light);
    line-height: 1.7;
}

/* --- Expertise Grid --- */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.expertise-card {
    background: var(--white);
    padding: 32px 28px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    transition: all var(--transition);
}

.expertise-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(10, 22, 40, 0.08);
    border-color: transparent;
}

.expertise-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
    color: var(--blue);
}

.expertise-icon svg {
    width: 100%;
    height: 100%;
}

.expertise-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}

.expertise-card p {
    font-size: 0.9rem;
    color: var(--slate);
    line-height: 1.7;
}

/* --- Contact --- */
.contact-content {
    max-width: 480px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    transition: all var(--transition);
    font-weight: 500;
    color: var(--navy);
}

.contact-item:hover {
    background: var(--white);
    border-color: var(--blue);
    transform: translateX(4px);
}

.contact-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--blue);
}

/* --- Blog Placeholder --- */
.blog-soon {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px 0;
    border-top: 1px solid var(--gray-200);
}

.blog-soon-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 6px 14px;
    white-space: nowrap;
}

.blog-soon-text {
    font-size: 0.95rem;
    color: var(--slate-light);
}

.blog-soon-text a {
    color: var(--blue);
    font-weight: 500;
    transition: color var(--transition);
}

.blog-soon-text a:hover {
    color: var(--blue-muted);
}

/* --- Footer --- */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.footer p {
    font-size: 0.85rem;
    color: var(--slate-light);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Footer Links --- */
.footer a {
    color: var(--slate-light);
    transition: color var(--transition);
}

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

/* --- Legal Pages --- */
.legal-page {
    padding: 140px 0 100px;
    min-height: 100vh;
}

.legal-content {
    max-width: 720px;
}

.legal-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.legal-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--blue);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 56px;
}

.legal-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--gray-200);
}

.legal-section:last-of-type {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.legal-section p {
    font-size: 0.95rem;
    color: var(--slate);
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    font-size: 0.95rem;
    color: var(--slate);
    line-height: 1.8;
    padding-left: 20px;
    margin: 12px 0;
}

.legal-section a {
    color: var(--blue);
    transition: color var(--transition);
}

.legal-section a:hover {
    color: var(--blue-muted);
}

.legal-placeholder {
    color: var(--blue);
    font-style: italic;
    background: rgba(37, 99, 235, 0.07);
    padding: 1px 6px;
    border-radius: 4px;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    margin-top: 48px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--slate);
    transition: color var(--transition);
}

.legal-back:hover {
    color: var(--navy);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--gray-200);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-photo {
        order: -1;
        max-width: 160px;
    }

    .section {
        padding: 72px 0;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .blog-soon {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 1.6rem;
    }
}
