/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --background: #f5f5f2;
    --background-gradient: #ffffff;

    --surface: #ffffff;
    --surface-hover: #fafafa;

    --text: #171717;
    --text-secondary: #6f6f6a;
    --text-muted: #999993;

    --border: #e5e5df;
    --border-hover: #d2d2ca;

    --accent: #171717;
    --accent-text: #ffffff;

    --icon-background: #f0f0ec;
    --tag-background: #f0f0ec;
    --tag-text: #676761;

    --radius: 18px;
    --max-width: 720px;

    --shadow: rgba(0, 0, 0, 0.06);
}


/* =========================================================
   DARK MODE
   ========================================================= */

html.dark {
    --background: #111111;
    --background-gradient: #1b1b1b;

    --surface: #1b1b1b;
    --surface-hover: #222222;

    --text: #f1f1ee;
    --text-secondary: #a8a8a2;
    --text-muted: #777771;

    --border: #2d2d2a;
    --border-hover: #41413d;

    --accent: #f1f1ee;
    --accent-text: #111111;

    --icon-background: #272724;
    --tag-background: #272724;
    --tag-text: #aaa9a2;

    --shadow: rgba(0, 0, 0, 0.30);
}


/* =========================================================
   RESET
   ========================================================= */

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


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at top,
            var(--background-gradient) 0%,
            var(--background) 45%
        );

    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    line-height: 1.6;

    -webkit-font-smoothing: antialiased;

    transition:
        background 250ms ease,
        color 250ms ease;
}


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


/* =========================================================
   CONTAINER
   ========================================================= */

.container {
    width: min(
        calc(100% - 40px),
        var(--max-width)
    );

    margin: 0 auto;

    padding: 70px 0 40px;
}


/* =========================================================
   PROFILE
   ========================================================= */

.profile {
    text-align: center;

    margin-bottom: 42px;
}


.top-bar {
    position: relative;

    display: flex;

    justify-content: center;
    align-items: center;

    margin-bottom: 22px;
}


.avatar {
    width: 76px;
    height: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--accent);
    color: var(--accent-text);

    font-size: 21px;
    font-weight: 700;

    letter-spacing: -0.04em;

    box-shadow:
        0 10px 30px var(--shadow);

    transition:
        background 250ms ease,
        color 250ms ease;
}


/* =========================================================
   THEME BUTTON
   ========================================================= */

.theme-toggle {
    position: absolute;

    right: 0;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);

    border-radius: 50%;

    background: var(--surface);

    color: var(--text);

    font-size: 17px;

    cursor: pointer;

    transition:
        transform 180ms ease,
        background 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}


.theme-toggle:hover {
    transform: rotate(10deg) scale(1.05);

    border-color: var(--border-hover);

    background: var(--surface-hover);
}


.theme-toggle .moon {
    display: none;
}


html.dark .theme-toggle .sun {
    display: none;
}


html.dark .theme-toggle .moon {
    display: inline;
}


h1 {
    font-size: clamp(32px, 6vw, 46px);

    line-height: 1.1;

    letter-spacing: -0.045em;

    font-weight: 700;
}


.subtitle {
    margin-top: 12px;

    color: var(--text-secondary);

    font-size: 15px;
}


.intro {
    max-width: 560px;

    margin: 18px auto 0;

    color: var(--text-secondary);

    font-size: 15px;

    line-height: 1.7;
}


/* =========================================================
   LINKS
   ========================================================= */

.links {
    display: flex;
    flex-direction: column;

    gap: 12px;

    margin-bottom: 70px;
}


.link-card {
    min-height: 76px;

    display: grid;

    grid-template-columns:
        44px
        1fr
        30px;

    align-items: center;

    gap: 14px;

    padding: 14px 18px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 250ms ease;
}


.link-card:hover {
    transform: translateY(-2px);

    border-color: var(--border-hover);

    background: var(--surface-hover);

    box-shadow:
        0 12px 30px var(--shadow);
}


.icon {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--icon-background);

    font-size: 17px;
    font-weight: 700;

    transition:
        background 250ms ease;
}


.link-card strong {
    display: block;

    font-size: 15px;

    line-height: 1.3;
}


.link-card small {
    display: block;

    margin-top: 3px;

    color: var(--text-secondary);

    font-size: 13px;
}


.arrow {
    color: var(--text-muted);

    font-size: 18px;

    text-align: right;

    transition:
        transform 180ms ease,
        color 180ms ease;
}


.link-card:hover .arrow {
    color: var(--text);

    transform: translate(2px, -2px);
}


/* =========================================================
   SECTIONS
   ========================================================= */

section {
    margin-bottom: 70px;
}


.section-heading {
    display: flex;
    align-items: flex-start;

    gap: 16px;

    margin-bottom: 24px;
}


.section-label {
    flex-shrink: 0;

    padding-top: 5px;

    color: var(--text-muted);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 12px;
}


.section-heading h2 {
    font-size: 25px;

    line-height: 1.2;

    letter-spacing: -0.03em;
}


.section-heading p {
    margin-top: 5px;

    color: var(--text-secondary);

    font-size: 14px;
}


/* =========================================================
   PROJECTS
   ========================================================= */

.project-list {
    display: flex;
    flex-direction: column;

    border-top: 1px solid var(--border);
}


.project {
    display: grid;

    grid-template-columns: 55px 1fr;

    gap: 12px;

    padding: 28px 0;

    border-bottom: 1px solid var(--border);
}


.project-number {
    color: var(--text-muted);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 12px;

    padding-top: 3px;
}


.project-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;
}


.project h3 {
    font-size: 18px;

    letter-spacing: -0.02em;
}


.status {
    flex-shrink: 0;

    padding: 4px 9px;

    border: 1px solid var(--border);

    border-radius: 999px;

    color: var(--text-secondary);

    font-size: 11px;
}


.project-content > p {
    margin-top: 9px;

    max-width: 570px;

    color: var(--text-secondary);

    font-size: 14px;

    line-height: 1.7;
}


/* =========================================================
   TAGS
   ========================================================= */

.tags {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 15px;
}


.tags span {
    padding: 4px 9px;

    border-radius: 6px;

    background: var(--tag-background);

    color: var(--tag-text);

    font-size: 11px;

    font-weight: 500;
}


/* =========================================================
   PROJECT LINK
   ========================================================= */

.project-link {
    display: inline-block;

    margin-top: 17px;

    font-size: 13px;

    font-weight: 600;

    border-bottom: 1px solid transparent;

    transition:
        border-color 160ms ease;
}


.project-link:hover {
    border-color: var(--text);
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact-button {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 17px 20px;

    background: var(--accent);

    color: var(--accent-text);

    border-radius: 14px;

    font-size: 14px;

    font-weight: 600;

    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background 250ms ease,
        color 250ms ease;
}


.contact-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 28px var(--shadow);
}


.contact-button span {
    font-size: 18px;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding-top: 25px;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 11px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 600px) {

    .container {
        width: min(
            calc(100% - 28px),
            var(--max-width)
        );

        padding-top: 45px;
    }


    .profile {
        margin-bottom: 32px;
    }


    .avatar {
        width: 68px;
        height: 68px;
    }


    .theme-toggle {
        width: 38px;
        height: 38px;
    }


    .intro {
        font-size: 14px;
    }


    .links {
        margin-bottom: 55px;
    }


    .link-card {
        min-height: 70px;

        padding: 12px 14px;

        grid-template-columns:
            40px
            1fr
            24px;
    }


    .icon {
        width: 40px;
        height: 40px;
    }


    section {
        margin-bottom: 55px;
    }


    .project {
        grid-template-columns: 38px 1fr;

        padding: 23px 0;
    }


    .project-top {
        align-items: flex-start;
    }


    .project h3 {
        font-size: 17px;
    }


    .status {
        font-size: 10px;
    }


    footer {
        flex-direction: column;

        align-items: flex-start;

        gap: 5px;
    }

}
