:root {
    /* Color Palette - Dark Theme */
    --color-bg: #0a0a0a;
    --color-bg-elevated: #141414;
    --color-surface: #1a1a1a;
    --color-border: #2a2a2a;
    --color-text: #e8e8e8;
    --color-text-muted: #888888;
    --color-accent: #57a2ef;
    --color-accent-dim: #2f78c8;

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-mono: 'DM Mono', monospace;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;

    /* Layout */
    --sidebar-width: 40%;
    --content-max-width: 1400px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--color-bg);
    border-right: 1px solid var(--color-border);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--space-2xl) var(--space-xl);
}

.name-section {
    margin-bottom: var(--space-2xl);
    animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.title {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Contact Section */
.contact-section {
    margin-bottom: var(--space-2xl);
    animation: slideInLeft 0.8s 0.1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    font-weight: 400;
}

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

.contact-list li {
    margin-bottom: var(--space-md);
}

.contact-link {
    display: block;
    padding: var(--space-sm) 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 2px solid transparent;
    padding-left: var(--space-sm);
    margin-left: -var(--space-sm);
}

.contact-link:hover {
    border-left-color: var(--color-accent);
    transform: translateX(4px);
}

.contact-type {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.contact-value {
    display: block;
    font-size: 0.875rem;
    word-break: break-all;
}

/* CV Section */
.cv-section {
    margin-top: auto;
    animation: slideInLeft 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.cv-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.cv-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-accent);
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.cv-link:hover::before {
    left: 0;
}

.cv-link:hover {
    border-color: var(--color-accent);
    color: var(--color-bg);
}

.cv-icon {
    font-size: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-link:hover .cv-icon {
    transform: translateY(3px);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
    animation: slideInLeft 0.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.year {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: var(--space-2xl);
    overflow-y: auto;
}

/* Sections */
.section {
    max-width: 900px;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.section:nth-child(1) { animation-delay: 0.2s; }
.section:nth-child(2) { animation-delay: 0.3s; }
.section:nth-child(3) { animation-delay: 0.4s; }

.section:last-child {
    border-bottom: none;
}

.section-number {
    position: absolute;
    top: 0;
    left: -60px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--space-xl);
    letter-spacing: -0.02em;
}

.section-content {
    font-size: 0.95rem;
    line-height: 1.8;
}

/* About Section */
.lead-text {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.section-content p {
    margin-bottom: var(--space-md);
    color: var(--color-text-muted);
}

/* Timeline */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    padding-left: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    width: 9px;
    height: 9px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--color-bg);
}

.timeline-header {
    margin-bottom: var(--space-md);
}

.timeline-period {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

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

.timeline-description {
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.project-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--color-bg-elevated);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: var(--space-lg);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.project-description {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.project-card:hover .tag {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 35%;
    }

    .sidebar-content {
        padding: var(--space-xl) var(--space-lg);
    }

    .section-number {
        position: static;
        margin-bottom: var(--space-sm);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .sidebar-content {
        padding: var(--space-xl) var(--space-lg);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: var(--space-lg);
    }

    .section {
        margin-bottom: var(--space-xl);
        padding-bottom: var(--space-xl);
    }

    .section-title {
        font-size: 2rem;
    }

    .lead-text {
        font-size: 1.1rem;
    }

    .timeline-item {
        padding-left: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .sidebar-content {
        padding: var(--space-lg) var(--space-md);
    }

    .main-content {
        padding: var(--space-md);
    }

    .name {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .contact-value {
        font-size: 0.8rem;
    }

    .project-image {
        height: 200px;
    }

    .project-content {
        padding: var(--space-md);
    }
}