/* ============================================
   Leopold Marx - Personal Website Styles
   ============================================ */

/* CSS Variables / Design Tokens */
:root {
    --bg: #F9F8F6;
    --bg-card: #FFFFFF;
    --text: #292524;
    --text-secondary: #78716C;
    --accent: #EA580C;
    --accent-light: #FFF7ED;
    --border: #E7E5E4;
    --node-color: rgba(234, 88, 12, 0.5);
    --line-color: rgba(234, 88, 12, 0.2);
}

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

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

/* ============================================
   Neural Network Canvas Background
   ============================================ */
#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.content-wrapper {
    position: relative;
    z-index: 2;
}

/* ============================================
   Navigation
   ============================================ */
nav {
    padding: 24px 0;
    background: rgba(249, 248, 246, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

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

.logo {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 80px 0 40px;
    background: rgba(249, 248, 246, 0.3);
}

.hero-card {
    background: var(--bg-card);
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 32px;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 24px;
}

.hero-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.hero-meta a {
    color: var(--accent);
    text-decoration: none;
}

.hero-meta a:hover {
    text-decoration: underline;
}

.hero-meta span {
    color: var(--text-secondary);
}

/* ============================================
   Stats Section
   ============================================ */
.stats-wrapper {
    padding: 40px 0;
    background: rgba(249, 248, 246, 0.3);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================
   Section Common Styles
   ============================================ */
section {
    padding: 60px 0;
    background: rgba(249, 248, 246, 0.3);
    scroll-margin-top: 20px;
}

section[id] {
    scroll-margin-top: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ============================================
   Timeline (Experience Section)
   ============================================ */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--border);
}

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

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

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 20px;
    width: 14px;
    height: 14px;
    background: var(--bg);
    border: 3px solid var(--accent);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.current .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.timeline-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.timeline-company {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.company-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: contain;
    background: #f5f5f5;
}

.current-tag {
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-role {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   Education Section
   ============================================ */
.education-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.education-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.education-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.education-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.education-logo {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: contain;
    background: #f5f5f5;
    flex-shrink: 0;
}

.education-info {
    flex: 1;
}

.education-degree {
    font-weight: 600;
    margin-bottom: 4px;
}

.education-school {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.education-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.education-details {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ============================================
   Projects Section
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-name {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-emoji {
    font-size: 1.25rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
}

.project-link:hover {
    text-decoration: underline;
}

/* ============================================
   Skills Section
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.skill-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.skill-items {
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skill-items li {
    padding: 3px 0;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
}

.about-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
}

.about-photo {
    width: 100%;
    max-width: 180px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
}

.about-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.about-info p {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.about-interests {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.interest-tag {
    background: var(--accent-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ============================================
   Footer
   ============================================ */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: rgba(249, 248, 246, 0.3);
}

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

.footer-left {
    font-size: 0.9rem;
}

.footer-left a {
    color: var(--accent);
    text-decoration: none;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .about-info {
        text-align: center;
    }

    .about-photo {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-meta {
        flex-direction: column;
        gap: 8px;
    }

    .nav-links {
        gap: 16px;
    }

    .education-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .education-logo {
        width: 32px;
        height: 32px;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

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

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