:root {
    color-scheme: dark;

    --bg: #000;
    --fg: #e6e6e6;
    --bio: #b3b3b3;
    --muted: #858585;
    --line: #242424;
    --accent: #ff6b01;
    --nav: rgba(0, 0, 0, .78);
}

:root[data-theme=light] {
    color-scheme: light;

    --bg: #fff;
    --fg: #161616;
    --bio: #525252;
    --muted: #666;
    --line: #dedede;
    --nav: rgba(255, 255, 255, .8);
}

* {
    user-select: none;
    box-sizing: border-box;
    user-select: none;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

::selection {
    background: #ff6b0130;
    color: var(--accent);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
select {
    font: inherit;
    color: inherit;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
}

button {
    cursor: pointer;
}

.navbar {
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: min(800px, calc(100% - 32px));
    height: 56px;
    border: 1px solid #ffffff40;
    border-radius: 17px;
    background: var(--nav);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 10px #0005;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    z-index: 5;
}

[data-theme=light] .navbar {
    border-color: #0004;
}

.logo {
    font-family: Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -1px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.controls button {
    padding: 6px;
    border: 0;
    background: none;
    display: flex;
}

.controls svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.language {
    display: flex;
    gap: 5px;
    align-items: center;
}

select {
    background: transparent;
    border: 0;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
}

option {
    background: var(--bg);
}

main {
    width: min(800px, calc(100% - 40px));
    margin: auto;
    padding: 128px 0 25px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.portrait {
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    background: #222;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

h1 {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.6px;
}

.role {
    font-size: 26px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 2px;
    letter-spacing: -.5px;
}

.bio {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 25px;
    font-size: 24px;
    line-height: 34px;
    font-weight: 600;
    color: var(--bio);
    letter-spacing: -.3px;
}

.bio u,
.bio a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-decoration-color: var(--muted);
}

h2,
h3 {
    font-size: 24px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -.4px;
}

h4 {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
}

.projects {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.group h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--muted);
}

.project {
    display: flex;
    justify-content: space-between;
    gap: 25px;
}

.project > div {
    max-width: 660px;
}

.project h4 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-icon {
    display: inline-flex;
    background: #ff6b011c;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    border-radius: 5px;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
}

.project p,
.learning-row p {
    font-size: 18px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: 8px;
}

.view {
    font-size: 20px;
    white-space: nowrap;
    color: var(--muted);
}

.tags {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
}

.all-projects {
    color: var(--muted);
    font-size: 15px;
}

.section-note {
    color: var(--muted);
    margin-top: 10px;
}

.toolbox {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.toolbox span {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 6px 12px;
    font-size: 14px;
    color: var(--bio);
}

.learning-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

.orange {
    color: var(--accent);
}

.language-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.language-row span + span,
.language-row a {
    color: var(--muted);
}

.language-row a:hover {
    color: var(--accent);
}

.contact {
    padding-top: 10px;
}

.contact p {
    color: var(--muted);
    margin: 12px 0 18px;
}

.email {
    font-size: 24px;
    color: var(--bio);
    letter-spacing: -.5px;
}

.socials {
    display: flex;
    gap: 25px;
    color: var(--muted);
    margin-top: 26px;
    font-size: 15px;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 12px;
    padding-top: 10px;
}

.to-top {
    position: fixed;
    bottom: 25px;
    right: 20px;
    background: var(--accent);
    color: #fff;
    border-radius: 14px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 26px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.to-top:hover {
    color: #fff;
    background: #da5c00;
}

.skip {
    position: fixed;
    left: 15px;
    top: -60px;
    z-index: 20;
    background: var(--bg);
    padding: 8px;
}

.skip:focus {
    top: 12px;
}

@media (max-width: 600px) {
    main {
        padding-top: 110px;
        gap: 46px;
    }

    .portrait {
        width: 105px;
        height: 105px;
    }

    h1 {
        font-size: 28px;
    }

    .role {
        font-size: 20px;
        margin-top: 5px;
    }

    .bio {
        font-size: 20px;
        line-height: 30px;
        gap: 22px;
    }

    .project {
        gap: 12px;
    }

    .view {
        font-size: 17px;
    }

    .project p {
        font-size: 16px;
    }

    .learning-row {
        flex-wrap: wrap;
        gap: 5px;
    }

    .email {
        font-size: 21px;
    }

    footer {
        flex-direction: column;
        gap: 8px;
        padding-bottom: 35px;
    }

    .to-top {
        right: 12px;
        bottom: 15px;
    }

    .navbar {
        padding: 0 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}
