:root {
    --accent: #006a71;
    --accent-hover: #008492;
    --accent-soft: #f6fbfc;
    --bg: #faf8f6;
    --fg: #111;
    --card: #ffffff;
}

[data-theme='dark'] {
    --accent: #00b3b3;
    --accent-hover: #33d0d0;
    --accent-soft: #131c1d;
    --bg: #111;
    --fg: #f0f0f0;
    --card: #1e1e1e;
}


/* ===== Base ===== */

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none;  
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh; /* make sure body fills screen */
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    transition: background-color 0.2s ease, color 0.2s ease;

    /* lake background */
    background-image: url('../img/lake.png');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 100% auto;
    background-attachment: fixed;
}

/* ===== Links ===== */

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Content links (excluding buttons) */
main a:not(.btn) {
    text-decoration: none;
}

main a:not(.btn):hover,
main a:not(.btn):focus {
    color: var(--accent-hover);
}


/* ===== Layout ===== */

.container {
    max-width: 680px;
    width: 100%;
    /* full width up to max */
    margin: 40px;
    padding: 40px;
    min-height: calc(100vh - 80px);
    /* 100vh minus top+bottom margins (40 + 40) */
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    font-weight: 600;
}


/* ===== Navigation & Theme Toggle ===== */

nav a {
    margin-left: 16px;
    text-decoration: none;
    color: var(--fg);
    transition: color 0.2s;
}

nav a:hover {
    color: var(--accent);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    margin-left: 16px;
    color: var(--fg);
    transition: transform 0.3s;
}

@media (hover: hover) {
    .theme-toggle:hover {
        transform: rotate(20deg);
    }
}


/* ===== Typography ===== */

h1,
h2,
h3 {
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.6rem;
    margin: 16px 0 20px;
}

h3 {
    font-size: 1.4rem;
    margin: 24px 0 0;
}

ul {
    padding-left: 22px;
    margin-top: 8px;
    margin-bottom: 1px;
}

li {
    margin: 10px 0;
}

/* ===== Content sections (CV & portfolio) ===== */

main>section {
    margin: 24px 0;
    padding: 16px 20px;
    border-radius: 6px;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
}

main>section h3,
main>section h4 {
    margin-top: 0;
}

main>section p:last-child {
    margin-bottom: 0;
}


/* ===== Buttons ===== */

.buttons {
    margin: 20px 0 32px;
    /* top: 24px, sides: 0, bottom: 32px */
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.btn {
    position: relative;
    padding: 10px 20px;
    border: 2px solid var(--accent);
    border-radius: 6px;
    color: var(--accent);
    background: transparent;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    transition: color 0.3s;
    z-index: 0;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
    z-index: -1;
}

.btn:hover::before {
    transform: scaleX(1);
}

.btn:hover {
    color: #ffffff;
}


/* ===== Footer ===== */

.footer {
    margin-top: 40px;
    font-size: 0.95rem;
    color: var(--fg);
}


/* ===== Mobile ≤ 600px ===== */

@media (max-width: 600px) {
    body {
        background-attachment: scroll !important;
    }

    .container {
        margin: 20px;
        padding: 24px;
    }

    header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 12px;
        row-gap: 6px;
    }

    nav a {
        margin: 0;
    }

    .theme-toggle {
        margin-left: auto;
        font-size: 1.4rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .buttons {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}