/* === @font-face declarations === */

@font-face {
    font-family: 'Space Grotesk';
    src: url('/fonts/SpaceGrotesk-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('/fonts/SpaceGrotesk-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Work Sans';
    src: url('/fonts/WorkSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Work Sans';
    src: url('/fonts/WorkSans-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Work Sans';
    src: url('/fonts/WorkSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Mono';
    src: url('/fonts/SpaceMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Mono';
    src: url('/fonts/SpaceMono-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* === Design tokens — Light mode (default) === */

:root {
    /* Primaire kleuren */
    --navy: #1a365d;
    --teal: #0d9488;
    --amber: #f59e0b;
    --electric: #3b82f6;
    --midnight: #0f172a;

    /* Neutrale tinten */
    --ice: #f1f5f9;
    --slate-light: #e2e8f0;
    --slate: #94a3b8;
    --white: #ffffff;

    /* Semantische kleuren */
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-nav: #1a365d;
    --bg-footer: #0f172a;
    --text-primary: #0f172a;
    --text-secondary: #94a3b8;
    --text-on-dark: #ffffff;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --card-border: #e2e8f0;

    /* Font stacks */
    --font-display: 'Space Grotesk', 'Outfit', system-ui, -apple-system, sans-serif;
    --font-body: 'Work Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'Space Mono', 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
}

/* === Dark mode — auto-detect === */

@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) {
        --bg-primary: #0f172a;
        --bg-secondary: #1a2332;
        --bg-nav: #0c1220;
        --bg-footer: #080d15;
        --text-primary: #e2e8f0;
        --text-secondary: #94a3b8;
        --text-on-dark: #e2e8f0;
        --card-bg: #1a2332;
        --card-shadow: rgba(0, 0, 0, 0.3);
        --card-border: #2a3a4e;
    }
}

/* === Dark mode — manual override === */

:root.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1a2332;
    --bg-nav: #0c1220;
    --bg-footer: #080d15;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-on-dark: #e2e8f0;
    --card-bg: #1a2332;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --card-border: #2a3a4e;
}

/* === Reset & base === */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--teal);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* === Navigation === */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-nav);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: 0.05em;
}

.nav-brand svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 0.9rem;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 1;
    text-decoration: none;
}

.nav-cta {
    background-color: var(--amber) !important;
    color: var(--midnight) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 700 !important;
    opacity: 1 !important;
    transition: background-color 0.2s;
}

.nav-cta:hover {
    background-color: #d97706 !important;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
}

.lang-switch a {
    color: var(--white);
    opacity: 0.6;
    text-decoration: none;
    padding: 0.15rem 0.3rem;
}

.lang-switch a:hover {
    opacity: 0.9;
}

.lang-switch a.active {
    opacity: 1;
    font-weight: 700;
}

.lang-switch span {
    color: var(--white);
    opacity: 0.4;
}

.dark-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--white);
    font-size: 1.25rem;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.dark-toggle:hover {
    opacity: 1;
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    margin: 5px 0;
    transition: transform 0.3s, opacity 0.3s;
}

/* === Hero === */

.hero {
    background-color: var(--bg-primary);
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-banner {
    max-width: 1100px;
    width: 100%;
    margin-bottom: 1.5rem;
}

.hero-banner svg {
    width: 100%;
    height: auto;
}

/* Banner light/dark switching */
.banner-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) .banner-light {
        display: none;
    }
    :root:not(.light-mode) .banner-dark {
        display: block;
    }
}

.dark-mode .banner-light {
    display: none;
}

.dark-mode .banner-dark {
    display: block;
}

.light-mode .banner-light {
    display: block;
}

.light-mode .banner-dark {
    display: none;
}

/* === Tagline band === */

.tagline-band {
    background-color: var(--navy);
    padding: 1.5rem 2rem;
    text-align: center;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 1.35rem;
    color: var(--slate-light);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.5;
    white-space: nowrap;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

/* === About section === */

.about {
    background-color: var(--bg-secondary);
    padding: 5rem 2rem;
}

.about-content {
    max-width: 720px;
    margin: 0 auto;
}

.about h2 {
    color: var(--navy);
    font-size: 2rem;
    margin-bottom: 2rem;
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) .about h2 {
        color: var(--teal);
    }
}

.dark-mode .about h2 {
    color: var(--teal);
}

.about p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.about p:first-of-type {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.about p:last-of-type {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--navy);
    margin-top: 2rem;
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) .about p:last-of-type {
        color: var(--teal);
    }
}

.dark-mode .about p:last-of-type {
    color: var(--teal);
}

/* === Projects section === */

.projects {
    background-color: var(--bg-primary);
    padding: 5rem 2rem;
}

.projects h2 {
    text-align: center;
    color: var(--navy);
    font-size: 2rem;
    margin-bottom: 3rem;
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) .projects h2 {
        color: var(--teal);
    }
}

.dark-mode .projects h2 {
    color: var(--teal);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: 3px solid var(--teal);
    border-left: 3px solid var(--teal);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.project-card:first-child {
    border-top-color: var(--electric);
    border-left-color: var(--electric);
}

.project-card:last-child {
    border-top-color: var(--electric);
    border-left-color: var(--electric);
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--card-shadow);
}

.project-screenshot {
    width: 100%;
    overflow: hidden;
    background-color: var(--midnight);
}

.project-screenshot img {
    width: 100%;
    height: auto;
    display: block;
}

.project-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.project-card p {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-stat {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--teal);
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.project-card:last-child .project-stat {
    color: var(--electric);
}

.project-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--electric);
    background-color: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}

/* === Resources page === */

.hero-compact {
    padding: 2rem 2rem 1rem;
}

.resources {
    background-color: var(--bg-primary);
    padding: 4rem 2rem 6rem;
    min-height: 50vh;
}

.resources-content {
    max-width: 800px;
    margin: 0 auto;
}

.resources h2 {
    color: var(--navy);
    font-size: 2rem;
    margin-bottom: 2rem;
}

@media (prefers-color-scheme: dark) {
    :root:not(.light-mode) .resources h2 {
        color: var(--teal);
    }
}

.dark-mode .resources h2 {
    color: var(--teal);
}

.resource-card {
    max-width: 480px;
    margin-bottom: 1.5rem;
}

.resource-download {
    display: inline-block;
    background-color: var(--amber);
    color: var(--midnight);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

.resource-download:hover {
    background-color: #d97706;
    text-decoration: none;
}

@media (max-width: 768px) {
    .hero-compact {
        padding: 1.5rem 1.5rem 0.5rem;
    }

    .resources {
        padding: 3rem 1.5rem;
    }
}

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

.contact {
    background-color: var(--bg-footer);
    padding: 5rem 2rem;
    color: var(--text-on-dark);
}

.contact-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.contact-intro {
    font-size: 1.05rem;
    color: var(--slate);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-links {
    list-style: none;
}

.contact-links li {
    margin-bottom: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.contact-links .contact-name {
    color: var(--amber);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
}

.contact-links a {
    color: var(--amber);
}

.contact-links a:hover {
    color: #d97706;
}

.contact-details {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 2;
}

.contact-details strong {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--white);
    display: block;
    margin-bottom: 0.5rem;
}

.footer {
    background-color: var(--bg-footer);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

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

.footer-extended {
    padding: 3rem 2rem 1.5rem;
}

.footer-cta {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--slate);
    line-height: 1.6;
}

.footer-contact {
    list-style: none;
    margin-top: 1rem;
}

.footer-contact li {
    margin-bottom: 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.footer-contact .contact-name {
    color: var(--amber);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-contact a {
    color: var(--amber);
}

.footer-license {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* === Responsive — Tablet === */

@media (max-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Responsive — Mobile === */

@media (max-width: 768px) {
    /* Nav */
    .hamburger {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background-color: var(--bg-nav);
        padding: 1rem 2rem 2rem;
        flex-direction: column;
        gap: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav-controls {
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Hero */
    .hero {
        padding: 2rem 1.5rem;
    }

    .hero-banner {
        max-width: 90vw;
    }

    .hero-tagline {
        font-size: 1.1rem;
        white-space: normal;
    }

    /* About */
    .about {
        padding: 3rem 1.5rem;
    }

    .about h2 {
        font-size: 1.5rem;
    }

    /* Projects */
    .projects {
        padding: 3rem 1.5rem;
    }

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

    .projects h2 {
        font-size: 1.5rem;
    }

    /* Contact */
    .contact {
        padding: 3rem 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact h2 {
        font-size: 1.5rem;
    }
}

/* === Hamburger animation === */

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

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

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