:root {
    --base: #1e1e2e;
    --mantle: #181825;
    --crust: #11111b;
    --text: #cdd6f4;
    --subtext1: #bac2de;
    --subtext0: #a6adc8;
    --surface0: #313244;
    --surface1: #45475a;
    --surface2: #585b70;
    --blue: #89b4fa;
    --green: #a6e3a1;
    --pink: #f5c2e7;
    --red: #f38ba8;
    --yellow: #f9e2af;
    --peach: #fab387;
    --mauve: #cba6f7;
}

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

body {
    background-color: var(--base);
    color: var(--text);
    font-family: 'CommitMono Nerd Font', monospace;
    font-size: clamp(14px, 1.5vw, 15px);
    line-height: 1.6;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Desktop Header Layout */
header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--mauve);
}

nav {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

nav a {
    color: var(--blue);
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline;
}

section {
    margin-bottom: 2rem;
}

a {
    color: var(--blue);
}

a:hover {
    text-decoration: underline;
}

/* Desktop About Section - Image on Right */
#about>div {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

#about p {
    flex: 1;
    line-height: 1.6;
}

.about-text p+p {
    margin-top: 1rem;
}

.about-text {
    flex: 1;
}

#about img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 1px solid var(--surface2);
    object-fit: cover;
    flex-shrink: 0;
    order: 2;
    /* Image on right for desktop */
}

h2 {
    color: var(--peach);
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    margin-bottom: 0.5rem;
}

h3 {
    color: var(--subtext0);
    text-decoration: none;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

h1:hover {
    text-decoration: underline;
}

h4 {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--subtext1)
}

footer {
    text-align: center;
    color: var(--subtext1);
    font-size: 0.9rem;
    margin-top: 2rem;
}

p {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    /* Mobile Header - Navigation on Top */
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Navigation first, then name */
    nav {
        order: -1;
        /* Move navigation above the name */
        width: 100%;
        margin-bottom: 0.5rem;
        text-align: center;
    }

    /* nav a { */
    /*     margin-left: 0; */
    /*     margin-right: 0; */
    /* } */

    /* Mobile About Section - Image Above Text */
    #about>div {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    #about img {
        width: 120px;
        height: 120px;
        order: -1;
        /* Image above text on mobile */
    }

    #about p {
        text-align: left;
        /* Keep text left-aligned for readability */
    }

    footer {
        font-size: 0.8rem;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) and (min-width: 601px) {
    #about img {
        width: 120px;
        height: 120px;
    }
}
