:root {
    --bg: #fcfbf8;
    --surface: #ffffff;
    --text: #121212;
    --muted: #5f5f5f;
    --border: #d7d7d7;
    --icon-bg-hover: rgba(0, 0, 0, 0.06);
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: "Lato", sans-serif;
    max-width: 1040px;
    margin: 0 auto;
    padding: 3rem 5rem;
    line-height: 1.6;
    transition: background-color 0.25s ease, color 0.25s ease;
}

body.dark-mode {
    --bg: #161616;
    --surface: #202020;
    --text: #f5f1ea;
    --muted: #b6b6b6;
    --border: #373737;
    --icon-bg-hover: rgba(255, 255, 255, 0.08);
}

section {
    margin-bottom: 3rem;
}

.about-section {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 2.5rem;
}

.about-image {
    flex: 0 0 150px;
}

.about-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    object-fit: cover;
}

.image-caption {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
}

.about-content {
    flex: 1;
}

.about-content h2 {
    margin-top: 0;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
}

nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav a,
nav a:visited,
nav a:hover,
nav a:active {
    color: var(--text);
    text-decoration: none;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.theme-toggle:hover {
    background-color: var(--icon-bg-hover);
    border-radius: 999px;
}

.theme-toggle-icon {
    display: block;
}

.theme-toggle-icon-sun {
    display: none;
}

body.dark-mode .theme-toggle-icon-moon {
    display: none;
}

body.dark-mode .theme-toggle-icon-sun {
    display: block;
}

.experience-section h2 {
    margin-bottom: 1rem;
}

.experience-list {
    border-top: 1px solid var(--border);
}

.experience-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.experience-main h3,
.experience-main p,
.experience-meta p {
    margin: 0;
}

.experience-main h3 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.experience-main h3 a,
.experience-main h3 a:visited,
.experience-main h3 a:hover,
.experience-main h3 a:active {
    color: inherit;
    text-decoration: none;
}

.experience-main p {
    color: var(--muted);
    font-size: 1rem;
}

.experience-meta {
    flex-shrink: 0;
    text-align: right;
}

.experience-meta p {
    font-size: 1rem;
    font-weight: 700;
}

footer {
    text-align: center;
    color: var(--muted);
}

@media (max-width: 1024px) {
    body {
        padding: 2.5rem 2.5rem;
    }

    header {
        align-items: center;
        gap: 1rem;
    }

    .about-image {
        display: none;
    }

    .about-section {
        flex-direction: row;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1.5rem 1.25rem;
    }

    section {
        margin-bottom: 2.25rem;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 2rem;
    }

    header h1 {
        margin: 0;
    }

    nav ul {
        gap: 0.75rem;
    }

    .about-section {
        gap: 1rem;
    }

    .experience-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1.25rem 0;
    }

    .experience-meta {
        text-align: left;
    }

    .experience-main h3 {
        font-size: 1.05rem;
    }

    .experience-main p,
    .experience-meta p {
        font-size: 0.95rem;
    }
}
