@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* palette */
    --bg-dark: oklch(0.1 0 137);
    --bg: oklch(0.15 0 137);
    --bg-light: oklch(0.2 0 137);
    --text: oklch(0.96 0 137);
    --text-muted: oklch(0.76 0 137);
    --highlight: oklch(0.5 0 137);
    --border: oklch(0.4 0 137);
    --border-muted: oklch(0.3 0 137);
    --primary: oklch(0.76 0.1 137);
    --secondary: oklch(0.76 0.1 317);
    --danger: oklch(0.7 0.05 30);
    --warning: oklch(0.7 0.05 100);
    --success: oklch(0.7 0.05 160);
    --info: oklch(0.7 0.05 260);

    /* gradient */
    --gradient: linear-gradient(0deg, var(--bg-dark) 0%, var(--bg-light) 100%);
    --gradient-small: linear-gradient(0deg, var(--bg) 0%, var(--bg-light) 50%);
    --gradient-colored: linear-gradient(0deg, var(--bg-light) 0%, var(--primary) 600%);

    /* type */
    --ff: 'IBM Plex Mono', 'Plus Jakarta Sans', sans-serif;
    --step--2: clamp(0.7813rem, 0.7736rem + 0.0341vw, 0.8rem);
    --step--1: clamp(0.9375rem, 0.9119rem + 0.1136vw, 1rem);
    --step-0: clamp(1.125rem, 1.0739rem + 0.2273vw, 1.25rem);
    --step-1: clamp(1.35rem, 1.2631rem + 0.3864vw, 1.5625rem);
    --step-2: clamp(1.62rem, 1.4837rem + 0.6057vw, 1.9531rem);
    --step-3: clamp(1.944rem, 1.7405rem + 0.9044vw, 2.4414rem);
    --step-4: clamp(2.3328rem, 2.0387rem + 1.3072vw, 3.0518rem);
    --step-5: clamp(2.7994rem, 2.384rem + 1.8461vw, 3.8147rem);

    /* space */
    --space-3xs: clamp(0.3125rem, 0.3125rem + 0vw, 0.3125rem);
    --space-2xs: clamp(0.5625rem, 0.5369rem + 0.1136vw, 0.625rem);
    --space-xs: clamp(0.875rem, 0.8494rem + 0.1136vw, 0.9375rem);
    --space-s: clamp(1.125rem, 1.0739rem + 0.2273vw, 1.25rem);
    --space-m: clamp(1.6875rem, 1.6108rem + 0.3409vw, 1.875rem);
    --space-l: clamp(2.25rem, 2.1477rem + 0.4545vw, 2.5rem);
    --space-xl: clamp(3.375rem, 3.2216rem + 0.6818vw, 3.75rem);
    --space-2xl: clamp(4.5rem, 4.2955rem + 0.9091vw, 5rem);
    --space-3xl: clamp(6.75rem, 6.4432rem + 1.3636vw, 7.5rem);

    /* width */
    --small: min(800px, 90%);
    --medium: min(1000px, 96%);
    --large: min(1200px, 98%);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-dark: oklch(0.92 0 137);
        --bg: oklch(0.96 0 137);
        --bg-light: oklch(1 0 137);
        --text: oklch(0.15 0 137);
        --text-muted: oklch(0.4 0 137);
        --highlight: oklch(1 0 137);
        --border: oklch(0.6 0 137);
        --border-muted: oklch(0.7 0 137);
        --primary: oklch(0.4 0.1 137);
        --secondary: oklch(0.4 0.1 317);
        --danger: oklch(0.5 0.05 30);
        --warning: oklch(0.5 0.05 100);
        --success: oklch(0.5 0.05 160);
        --info: oklch(0.5 0.05 260);
    }
}

/* global */
*, ::before, ::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: var(--ff);
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: var(--text);
}

h1 {font-size: var(--step-3); font-weight: 700;}
h2 {font-size: var(--step-2); font-weight: 700;}
h3 {font-size: var(--step-1); font-weight: 600;}
h4 {font-size: var(--step-0); font-weight: 600;}
p {font-size: var(--step--1); font-weight: 400; line-height: 1.5;}

/* body */
body {
    color: var(--text);
    background-color: var(--bg);
}

.container {
    width: var(--medium);
    margin-inline: auto;
    margin-block: var(--space-xl);
}

b {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--primary);
}

hr {
    border: 1px dashed var(--border-muted);
}

h2 {
    width: fit-content;
    position: relative;
    margin-bottom: var(--space-3xs);
}

h2::after {
    content: "";
    position: absolute;
    width: 102%;
    height: 6px;
    top: 74%;
    left: -1%;
    border-radius: 1px;
    background-color: var(--secondary);
    z-index: -1;
}

/* header */
header {
    width: var(--medium);
    margin-inline: auto;
    margin-bottom: var(--space-m);
    margin-top: var(--space-s);
    padding-block: var(--space-l);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-items: center;
    column-gap: var(--space-l);
    row-gap: var(--space-2xs);
    position: relative;
    border-block: 2px dashed var(--border);
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header-text h1 {
    text-align: center;
}

.header-text p {
    text-align: center;
    color: var(--text-muted);
}

.header-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
}

.btn {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--border-muted);
    padding: var(--space-3xs) var(--space-2xs);
    border-radius: 4px;
    font-size: var(--step-0);
    font-weight: 600;
    background: var(--gradient-small);
    transition: all .2s ease;
}

#aboutme-btn {
    border-color: var(--primary);
    color: var(--primary);

    &:hover {
        background: none;
        background-color: var(--primary);
        color: var(--bg-dark);
    }
}

#contacts-btn {
    border-color: var(--secondary);
    color: var(--secondary);

    &:hover {
        background: none;
        background-color: var(--secondary);
        color: var(--bg-dark);
    }
}

/* about me */
.aboutme {
}

/* skills */
.skills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-2xs);
    row-gap: var(--space-2xs);
}

.card {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    border: 1px solid var(--primary);
    border-radius: 4px;
    background: var(--gradient);
    padding: var(--space-2xs);
    padding-top: var(--space-3xs);
    gap: var(--space-3xs);
}

.card-title {
    padding-inline: var(--space-xs);
    color: var(--primary);
    font-size: var(--step-0);
    font-weight: 600;
}

.dev {
    border: 1px dashed var(--secondary);

    & .card-title {
        color: var(--secondary);
    }
}

.github-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
        "github-title icon"
        "pills-container icon";
    gap: var(--space-3xs);

    background: var(--gradient-colored);
    border: 1px solid var(--secondary);
    border-radius: 4px;
    padding: var(--space-3xs);
}

.github-title {
    grid-area: github-title;
    font-size: var(--step-0);
}

.github-icon {
    grid-area: git-icon;
    color: var(--secondary);
}

.pills-container {
    grid-area: pills-container;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3xs);
    list-style: none;
}

.pills-container li {
    background-color: var(--bg-light);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: var(--step--2);
    border: 1px solid var(--secondary);
}

.link-icon {
    grid-area: icon;
    margin: auto;
    fill: var(--secondary);
    transition: all .2s ease;
}

/* timeline */
.timeline {
    position: relative;

    display: flex;
    flex-direction: column;
    gap: var(--space-s);
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50px + var(--space-2xs) + 12px);
    transform: translateX(-50%);
    width: 5px;
    background-color: var(--border-muted);
    border-radius: .25rem;
    z-index: 0;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 50px 24px 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
        "date dot title"
        ".    .   subtitle"
        ".    .   text";
    column-gap: var(--space-2xs);
    row-gap: var(--space-3xs);
}

.timeline-date {
    grid-area: date;
    align-self: center;

    font-size: var(--step--1);
    font-weight: 600;
    text-align: right;
    color: var(--primary);
}

.timeline-divider {
    grid-area: dot;
    align-self: stretch;

    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-title {
    grid-area: title;
    align-self: center;
    color: var(--primary);
    font-size: var(--step-1);
}

.timeline-subtitle {
    grid-area: subtitle;
    font-size: var(--step--1);
    color: var(--text-muted);
    align-self: center;
}

.timeline-text {
    grid-area: text;
    font-size: var(--step--1);
    color: var(--text);
    align-self: center;
}

.timeline-divider::after {
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--secondary);
    border: 3px solid var(--bg);
}

/* hobbies */
.hobbies {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    grid-template-areas:
    "music music climbing climbing others";
}

.music {
    grid-area: music;
}

.climbing {
    grid-area: climbing;
}

.others {
    grid-area: others;
}

.sb-btn {
    gap: var(--space-xs);
    margin: auto;
    width: fit-content;
}

.sb-btn:hover .link-icon {
    fill: var(--bg-dark);
}

/* contacts */
#contacts {
    margin-bottom: var(--space-m);
}

.contacts-container {
    margin-block: var(--space-2xs);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: var(--space-s);
}

.contact-btn {
    border-color: var(--primary);
    padding: var(--space-3xs);
    width: fit-content;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    fill: var(--primary);
}

.contact-btn:hover {
    background: none;
    background-color: var(--primary);
    color: var(--bg-dark);
    fill: var(--bg-dark);
}

/* mobile */
@media (max-width: 600px) {
    header {
        grid-template-columns: 1fr;
    }

    .skills {
        grid-template-columns: 1fr;
    }

    .hobbies {
        grid-template-columns: 1fr;
        grid-template-areas: none;
    }

    .music,
    .climbing,
    .others {
        grid-area: auto;
    }
}