:root {
    --bg-color: #0b0f1a;
    --text-color: #f8fafc;
    --accent-color: #38bdf8;
    --secondary-accent: #818cf8;
    --card-bg: rgba(17, 24, 39, 0.8);
    --code-bg: #0d1117;
    --win-red: #ff5f56;
    --win-yel: #ffbd2e;
    --win-grn: #27c93f;
}

/* Syntax Colors */
.keyword {
    color: #ff7b72;
}

.function {
    color: #d2a8ff;
}

.string {
    color: #a5d6ff;
}

.variable {
    color: #ffa657;
}

.comment {
    color: #8b949e;
}

.bracket {
    color: #f0f6fc;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    padding: 4rem 2rem;
}

.main-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    grid-template-rows: auto auto auto;
    gap: 2.5rem;
    max-width: 1300px;
    width: 100%;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(129, 140, 248, 0.15) 0%, transparent 40%);
    z-index: -1;
}

.window {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    transition: transform 0.5s ease;
}

.window:hover {
    transform: translateY(-5px) scale(1.01);
}

.welcome-window {
    grid-column: 1;
    grid-row: 1;
    padding: 2.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: start;
    /* Verhindert das Strecken auf die Höhe des Code-Fensters */
    height: 200px;
    /* Feste Höhe, damit es immer gleich groß bleibt */
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.code-window {
    width: 100%;

    grid-column: 2;
    grid-row: 1;
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.terminal-window {
    width: 100%;
    grid-column: 1 / span 2;
    grid-row: 2;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-window h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--accent-color), var(--secondary-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-window p {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: white;
    text-decoration: none;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.4);
}

.title-bar {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dots {
    display: flex;
    gap: 8px;
    margin-right: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: var(--win-red);
}

.dot.yel {
    background: var(--win-yel);
}

.dot.grn {
    background: var(--win-grn);
}

.file-name {
    font-size: 0.9rem;
    color: #94a3b8;
    font-family: 'Courier New', monospace;
    flex-grow: 1;
    text-align: center;
    margin-right: 4rem;
    /* Offset for balancing dots */
}

.code-content {
    padding: 2rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    line-height: 1.6;
    display: flex;
    overflow-x: auto;
}

.line-numbers {
    color: #4b5563;
    text-align: right;
    padding-right: 1.5rem;
    user-select: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.code-text {
    padding-left: 1.5rem;
    white-space: pre;
    color: #e2e8f0;
}

/* Terminal Window Styles */
.terminal-window {
    flex: 1.5;
    min-width: 350px;
    max-width: 600px;
    background: #000000;
    border-color: #333;
}

.terminal-content {
    padding: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    height: 350px;
    overflow-y: auto;
    color: #00ff00;
    /* Classic green terminal text */
    display: flex;
    flex-direction: column;
}

.terminal-history {
    white-space: pre-wrap;
    margin-bottom: 0.5rem;
}

.input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt {
    color: var(--accent-color);
    font-weight: bold;
}

.cmd-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: inherit;
    width: 100%;
    outline: none;
}

.output {
    color: #94a3b8;
    margin-bottom: 0.8rem;
}

.error {
    color: #ff5f56;
}

/* Terminal Highlights */
.term-proj {
    color: var(--accent-color);
    font-weight: bold;
}

.term-desc {
    color: #8b949e;
}

.term-head {
    color: var(--secondary-accent);
    font-weight: bold;
    text-decoration: underline;
}

.term-num {
    color: var(--win-yel);
}

/* Custom scrollbar for terminal */
.terminal-content::-webkit-scrollbar {
    width: 6px;
}

.terminal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.terminal-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Projects Section */
.projects-section {
    grid-column: 1 / span 2;
    grid-row: 3;
    margin-top: 2rem;
    animation: slideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: #fff;
}

.section-title::after {
    content: "";
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(to right, var(--accent-color), transparent);
    opacity: 0.3;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.project-card .tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    font-weight: 700;
}

.project-card h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.project-card p {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.6;
}

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

.tech-pill {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    color: #e2e8f0;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .code-text {
        font-size: 0.85rem;
    }

    .line-numbers {
        font-size: 0.85rem;
    }

    .window {
        width: 100%;
        max-width: 100%;
    }

    .main-layout {
        gap: 1.5rem;
    }
}