:root {
    --bg-base: #0a0a0a;
    --bg-surface: #141414;
    --bg-surface-glass: rgba(20, 20, 20, 0.7);
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent-primary: #7c3aed;
    --accent-secondary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* hintergrund */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* fonts und so */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
    max-width: 65ch;
}

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

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

.secret-hover {
    cursor: crosshair;
    transition: color 0.3s;
}

.secret-hover:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

/* layout zeugs */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
}

section {
    padding: var(--space-xl) 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* nav bar / oben */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--space-md) 0;
    transition: transform var(--transition-smooth);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
    color: var(--text-main);
}

.brand span {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* hero bereich ganz oben */
.hero {
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    filter: blur(150px);
    opacity: 0.1;
    z-index: -1;
    border-radius: 50%;
}

/* karten layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.card {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ueber mich timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-lg) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: rgba(255,255,255,0.1);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: var(--space-lg);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-content {
    background: var(--bg-surface);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.05);
}

/* code box */
.code-window {
    background: #0f0f0f;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    margin-top: var(--space-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.code-header {
    background: #1a1a1a;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.code-title {
    margin-left: 1rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

pre {
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #e6e6e6;
    line-height: 1.5;
}

/* syntax farben */
/* syntax farben */
.kwd { color: #c678dd; } /* keywords */
.str { color: #98c379; } /* strings halt */
.typ { color: #e5c07b; } /* typen und klassen */
.fun { color: #61afef; } /* funktionen */
.com { color: #5c6370; font-style: italic; } /* kommentare */
.num { color: #d19a66; } /* zahlenwerte */

/* buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all var(--transition-smooth);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(124, 58, 237, 0.4);
    color: white;
}

/* terminal kram / altes easter egg */
#terminal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.terminal-container {
    width: 600px;
    background: #000;
    border: 1px solid #33ff00;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(51, 255, 0, 0.2);
    color: #33ff00;
    font-family: var(--font-mono);
}

.terminal-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px dashed #33ff00;
    padding-bottom: 10px;
}

#snake-canvas {
    background: #000;
    border: 1px solid #33ff00;
    display: block;
    margin: 0 auto;
}

.close-terminal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #33ff00;
    font-family: var(--font-mono);
    cursor: pointer;
    font-size: 1.5rem;
}

/* kleine animationen */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* footer halt */
footer {
    text-align: center;
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

footer p {
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* tabs in css */
.tabs-container {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: var(--space-sm);
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-mono);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: all var(--transition-fast);
    position: relative;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

.tab-btn.active {
    color: var(--accent-primary);
    background: rgba(124, 58, 237, 0.1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

/* accordion styles */
.accordion-item {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.accordion-item:hover {
    border-color: rgba(124, 58, 237, 0.3);
}

.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.accordion-header .icon {
    font-size: 1.5rem;
    margin-right: var(--space-md);
}

.accordion-header .title {
    flex-grow: 1;
    text-align: left;
}

.accordion-header .arrow {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform var(--transition-smooth);
}

.accordion-header.active .arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth);
    background: rgba(0, 0, 0, 0.2);
}

.accordion-content-inner {
    padding: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* minigame overlay */
.arcade-layout {
    display: flex;
    gap: var(--space-lg);
    align-items: stretch;
    justify-content: center;
    position: relative;
    max-width: 1400px;
    padding: var(--space-lg);
}

.arcade-panel {
    background: rgba(10, 10, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    width: 260px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.5);
}

.close-arcade {
    position: absolute;
    top: -20px;
    right: 20px;
    color: #ff0033;
    font-family: var(--font-mono);
    cursor: pointer;
    font-size: 2.5rem;
    transition: color 0.2s;
    z-index: 10;
}
.close-arcade:hover { color: #fff; }

@media (max-width: 1300px) {
    .arcade-layout {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
        height: 90vh;
        overflow-y: auto;
    }
    .arcade-panel {
        width: 760px;
        height: auto;
    }
    .close-arcade {
        top: 10px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; 
    }
    h1 {
        font-size: 2.5rem;
    }
    section {
        padding: calc(var(--space-xl) * 1.5) 0 var(--space-xl);
    }
}
