:root {
    --bg: #f7f0e6;
    --text: #2b2b2b;
    --text-secondary: #6b6b6b;
    --link: #004f90;
    --link-hover: #003060;
    --border: #e0dbd4;
}

[data-theme="dark"] {
    --bg: #1c1c1c;
    --text: #e0dcd6;
    --text-secondary: #9a9590;
    --link: #7daed4;
    --link-hover: #a3c8e4;
    --border: #3a3a3a;
}

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

body {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    transition: background-color 0.3s, color 0.3s;
}

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

/* Typography */

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
}

/* Hero */

.hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 1.25em;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

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

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

a:hover {
    color: var(--link-hover);
}

/* Navbar */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 24px 0;
}

.nav-name {
    font-family: "Montserrat", sans-serif;
    font-size: 1.8rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text);
    text-decoration: none;
}

.nav-name:hover {
    color: var(--link);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.95rem;
}

.nav-right a {
    color: var(--text-secondary);
    text-decoration: none;
}

.nav-right a:hover {
    color: var(--text);
}

/* Divider */

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* CV contact row */

.cv-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.cv-contact span,
.cv-contact a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.cv-contact a:hover {
    color: var(--text);
}

.cv-contact svg {
    stroke: currentColor;
}


/* Short divider */

hr.short-divider {
    border: none;
    border-top: 1px solid var(--border);
    width: 80px;
    margin: 2rem 0 -1rem;
}

/* Say Hi */

.say-hi {
    display: flex;
    gap: 2rem;
}

.say-hi a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.say-hi a:hover {
    color: var(--text);
}

.say-hi svg {
    stroke: currentColor;
}

/* Lists */

ul {
    list-style: none;
    padding: 0;
}

ul li {
    position: relative;
    padding-left: 1.2em;
    margin-bottom: 0.6rem;
}

ul li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}

/* Experience items */

.role {
    margin-bottom: 2rem;
}

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.role-header strong {
    font-size: 1.05rem;
}

.role-title {
    font-style: italic;
    margin-bottom: 0.5rem;
}

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

/* Tech section */

.tech-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Theme toggle */

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--border);
    border-radius: 24px;
    transition: 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--bg);
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .slider {
    background-color: var(--link);
}

input:checked + .slider::before {
    transform: translateX(20px);
}

/* Responsive */

@media (max-width: 600px) {
    .container {
        padding: 40px 16px 60px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .role-header {
        flex-direction: column;
        gap: 0.15rem;
    }

    .navbar {
        padding: 16px 16px 0;
    }

}

@media print {
    .navbar .switch { display: none; }
}
