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

/* CSS Variables */
:root {
    --background: #f8f8f8;
    --foreground: #1a1a1a;
    --green: #22c55e;
    --border: rgba(255, 255, 255, 0.1);
}

.dark {
    --background: #000000;
    --foreground: #e5e5e5;
    --green: #22c55e;
    --border: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
        "Liberation Mono", monospace;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.75;
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 42rem;
    padding: 1.25rem 1.25rem;
    background: linear-gradient(to bottom, var(--background) 60%, transparent);
    z-index: 40;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.nav-link {
    color: var(--foreground);
    opacity: 0.5;
    text-decoration: none;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 1;
}

/* Hero */
.hero {
    margin-top: 5rem;
    margin-bottom: 2.5rem;
}

.hero-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero p {
    margin-bottom: 1.5rem;
}

/* Sections */
.section {
    margin-top: 3.75rem;
    scroll-margin-top: 5rem;
}

.section-title {
    opacity: 0.5;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* Timeline (Experience & Education) */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .timeline-item {
        grid-template-columns: 12rem 1fr;
    }
}

.timeline-period {
    opacity: 0.5;
    font-size: 0.875rem;
}

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-role {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.5rem;
}

/* Skills */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-category {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.5;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 8rem;
    transition: border-color 0.2s;
}

.skill-tag:hover {
    border-color: rgba(34, 197, 94, 0.5);
}

.skill-name {
    color: var(--green);
    font-size: 0.875rem;
}

.skill-years {
    font-size: 0.65rem;
    opacity: 0.4;
}

.skill-bar {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 2px;
}

.skill-fill {
    background: var(--green);
    height: 4px;
    border-radius: 2px;
}

/* Projects */
.projects-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-item {
    display: flex;
    flex-direction: column;
}

.project-link {
    font-weight: 600;
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.2s;
}

.project-link:hover {
    color: var(--green);
}

.arrow {
    color: var(--green);
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.project-item:hover .arrow {
    opacity: 1;
}

/* Footer */
.footer {
    margin-top: 6rem;
    margin-bottom: 6rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pulse {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.contact-links a {
    color: var(--foreground);
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.2s;
}

.contact-links a:hover {
    opacity: 1;
}

/* Utilities */
.text-green {
    color: var(--green);
}

.opacity {
    opacity: 0.5;
}

.text-sm {
    font-size: 0.875rem;
}

.uppercase {
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 0 1rem;
    }

    .header {
        padding: 1rem 1rem;
    }
    
    .nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.875rem;
    }
    
    .hero {
        margin-top: 4rem;
        margin-bottom: 2rem;
    }

    .hero-name {
        font-size: 1.125rem;
    }

    .section {
        margin-top: 2.5rem;
        scroll-margin-top: 4rem;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .timeline-period {
        font-size: 0.8rem;
    }

    .timeline-role {
        flex-direction: column;
        gap: 0;
    }

    .timeline-role span:last-child {
        opacity: 0.5;
    }

    .skill-tag {
        min-width: 7rem;
        padding: 0.4rem 0.6rem;
    }

    .project-item {
        padding: 0.5rem 0;
    }

    .project-link {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .arrow {
        opacity: 0.5;
        font-size: 0.625rem;
    }

    .contact-links {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .footer {
        margin-top: 4rem;
        margin-bottom: 4rem;
    }

    /* Project pages */
    .project-header h1 {
        font-size: 1.5rem;
    }

    .project-header p {
        font-size: 1rem;
    }

    .content h2 {
        font-size: 1.25rem;
    }

    .content pre {
        font-size: 0.8rem;
        padding: 0.75rem;
        overflow-x: auto;
    }

    .content code {
        font-size: 0.8rem;
    }

    .content table {
        font-size: 0.8rem;
    }

    .content th,
    .content td {
        padding: 0.4rem 0.6rem;
    }
}
