/* ============================================
   Jochen Thoelen - Portfolio Website Styles
   Modern, Responsive, Light/Dark Mode
   Gebaseerd op CV website ontwerp
   ============================================ */

/* CSS Variables for Light/Dark Mode */
:root {
    /* Light Mode Colors - Softer, warmer tones */
    --bg-primary: #faf9f7;
    --bg-secondary: #f5f4f2;
    --bg-tertiary: #ebe9e6;
    --bg-card: #ffffff;
    --bg-navbar: rgba(250, 249, 247, 0.95);
    
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-inverse: #faf9f7;
    
    --accent-primary: #3b82f6;
    --accent-secondary: #6366f1;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --accent-hover: #2563eb;
    
    --border-color: #e2e0dc;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    --navbar-height: 80px;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-navbar: rgba(15, 23, 42, 0.95);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    
    --accent-primary: #60a5fa;
    --accent-secondary: #818cf8;
    --accent-gradient: linear-gradient(135deg, #60a5fa 0%, #818cf8 100%);
    --accent-hover: #3b82f6;
    
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

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

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--bg-navbar);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    height: 64px;
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-text {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    transition: transform var(--transition-base);
}

.nav-logo:hover .logo-text {
    transform: scale(1.05) rotate(-5deg);
}

.nav-brand {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--accent-primary);
    transition: transform var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Navigation Actions (Theme Toggle) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: white;
    transform: rotate(15deg);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
}

.hamburger {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   Hero Section (for index)
   ============================================ */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 100px 0 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0.03;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-greeting::before {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--accent-primary);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 32px;
    line-height: 1.8;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    color: white !important;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary) !important;
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary) !important;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary) !important;
    border: 2px solid var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white !important;
}

/* ============================================
   Feature Grid (homepage)
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 3rem 0;
}

.feature {
    background: var(--bg-card);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.feature:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    padding: 4px 12px;
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
}

/* ============================================
   Card Grid (projects)
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin: 3rem 0;
}

.card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    display: block;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
    color: inherit;
}

.card h3 {
    font-size: 1.375rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card .muted {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.badge {
    padding: 4px 12px;
    background: var(--accent-gradient);
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
}

.card ul {
    margin: 0;
    padding-left: 1.25rem;
}

.card li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.card li::marker {
    color: var(--accent-primary);
}

/* ============================================
   CTA Box
   ============================================ */
.cta-box {
    background: var(--bg-secondary);
    padding: 48px;
    border-radius: var(--radius-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.cta-left {
    flex: 1;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.cta-text {
    color: var(--text-secondary);
}

.cta-right {
    display: flex;
    gap: 16px;
}

/* ============================================
   Page Content Styles
   ============================================ */
.page-content {
    padding: 60px 0;
}

.page-content h1 {
    margin-top: 0;
}

.page-content h2 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* ============================================
   Screenshot Grid (for subpages)
   ============================================ */
.shot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 2rem 0;
}

.shot {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.shot:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.shot a {
    display: block;
}

.shot img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.shot:hover img {
    transform: scale(1.02);
}

.shot figcaption {
    padding: 16px 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.shot figcaption strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.arch-figure {
    grid-column: 1 / -1;
}

.arch-figure img {
    aspect-ratio: 21/9;
}

/* ============================================
   Section Common Styles
   ============================================ */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: 48px 0 24px;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

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

.footer-logo {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-bottom i {
    color: var(--accent-primary);
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* ============================================
   Scroll Reveal Animation
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .shot-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-box {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-right {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--bg-navbar);
        flex-direction: column;
        padding: 24px;
        gap: 8px;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        width: 100%;
        padding: 12px 16px;
        text-align: center;
    }
    
    .nav-toggle {
        display: flex;
        margin-left: auto;
    }
    
    .nav-actions {
        margin-right: 16px;
    }
    
    .hero {
        min-height: auto;
        padding: 60px 0 40px;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-box {
        padding: 32px;
    }
    
    .cta-right {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-container {
        padding: 0 16px;
    }
    
    .card {
        padding: 24px;
    }
    
    .feature {
        padding: 24px 20px;
    }
    
    .section {
        padding: 60px 0;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .navbar,
    .back-to-top,
    .footer-social,
    .theme-toggle,
    .nav-toggle {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0;
    }
    
    .hero {
        min-height: auto;
        padding: 40px 0;
    }
    
    .section {
        padding: 40px 0;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card, .feature, .shot {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}
