/* =====================================================
   GLOBAL RESET & TRANSITIONS
===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    transition:
        background-color 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease,
        fill 0.35s ease,
        stroke 0.35s ease,
        box-shadow 0.35s ease;
}

/* =====================================================
   ROOT VARIABLES
===================================================== */
:root {
    font-size: 16px;

    --seethrough: rgba(0, 0, 0, 0.9);
    --transparent: rgba(0, 0, 0, 0);
    --transition-speed: 600ms;

    --page: #141414;
    --card: #161A23;
    --overlay: #1D2230;

    --txt: #FAFAFF;
    --txt-muted: oklch(0.65 0.01 275);

    --highlight: oklch(0.30 0.04 265);
    --border: oklch(0.25 0.02 265);

    --shadow: 0px 2px 4px hsla(0, 0%, 0%, 0.5),
        0px 6px 10px hsla(0, 0%, 0%, 0.7);
}

/* =====================================================
   HTML / BODY
===================================================== */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    padding-top: 10rem;
    background-color: var(--page);
    color: var(--txt);
    overflow-x: hidden;
    user-select: none;
}

/* =====================================================
   HEADER
===================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    display: flex;
    align-items: center;
    padding: 16px 40px;

    background: var(--page);
    border-bottom: thick double var(--border);
    z-index: 10;
}

header>div {
    display: flex;
    align-items: center;
    gap: 16px;
}

header .avatar {
    margin-bottom: 0;
}

button.avatar-button {
    all: unset;
    cursor: pointer;
    display: inline-block;
}

button.avatar-button img {
    display: block;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;

    background-image: url('../img/hero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

img {
    vertical-align: middle;
    border-style: none;
    user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    max-width: 800px;
    max-height: 1000px;
    pointer-events: none;
}

/* =====================================================
   MAIN CONTENT
===================================================== */
main {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin: 32px;
    margin-bottom: 120px;
}

section {
    margin-bottom: 8rem;
}

h1,
h2,
h3 {
    margin: 0 0 1rem 0;
}

p {
    line-height: 1.6;
    color: var(--txt-muted);
}

/* =====================================================
   HERO SECTION
===================================================== */
.home-section .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    width: 100%;
}

.hero-intro {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-heading {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* =====================================================
   WHY WORK WITH ME GRID
===================================================== */
.why-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.step {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 48%;
    min-width: 250px;
    border-left: 3px solid var(--highlight);
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

/* =====================================================
   SECTION STYLING
===================================================== */
.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: auto;
}

.section-narrow {
    max-width: 900px;
    margin: auto;
}

/* =====================================================
   SKILLS GRID
===================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.skill-group {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--card);
}

.skill-group h3 {
    margin-bottom: 0.5rem;
}

/* =====================================================
   CONTACT
===================================================== */
.contact {
    margin-bottom: 0;
}

.contact-inner {
    padding: 3rem 2rem;
    max-width: 700px;
    margin: auto;
}

#contactOverlay form button {
    display: block;
    margin: 20px auto 0;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

textarea {
    resize: none;
    color: var(--txt);
    background-color: var(--page);
}

/* =====================================================
   BUTTONS
===================================================== */
button {
    background-color: var(--highlight);
    padding: 8px 12px;
    border: none;
    color: var(--txt);
    cursor: pointer;
    box-shadow: var(--shadow);
}

button:hover {
    background-color: var(--page);
}

/* =====================================================
   BOTTOM ARROW
===================================================== */
#contact {
    position: relative;
}

.bottom-arrow {
    position: fixed;
    bottom: 4rem;
    left: 2.5rem;
    ;
    margin: 0;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 35px solid var(--txt);
    filter: drop-shadow(0 0 6px var(--txt));
    margin: 2rem auto 0;
}

/* =====================================================
   FOOTER
===================================================== */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px 20px;
    background-color: var(--page);
    border-top: thick double var(--border);
    z-index: 10;
}

/* =====================================================
   MODALS
===================================================== */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.overlay-content {
    background: var(--overlay);
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

/* =====================================================
   FORMS
===================================================== */
form label {
    margin-top: 15px;
    display: block;
    font-weight: bold;
}

form input,
form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    background-color: var(--page);
    color: var(--txt);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.blur {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    /* Safari support */
    z-index: 1000;
}

.hidden {
    display: none;
}

.date {
    text-align: center;
    font-style: italic;
    margin-bottom: 2.5rem;
    color: var(--txt-muted);
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
    .step {
        width: 100%;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        padding: 12px 16px;
    }

    .avatar {
        width: 90px;
        height: 90px;
    }

    main {
        margin: 16px;
    }

    .hero-heading {
        font-size: 1.8rem;
    }

    .hero-intro {
        font-size: 1rem;
    }

    .why-grid {
        flex-direction: column;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}