/* ------------ GLOBAL ------------------ */
html {
    font-size: 62.5%; /* 10px */
    --font-title: 4rem; /* 40px, 35-50px typical desktop */
    --font-subtitle: 3rem; /* 30px */
    --font-primary: 2.4rem; /* 24px, 18-24px typical desktop */
    --font-secondary: 1.2rem; /* 20px, ~2x smaller than primary */

    font-family: sans-serif;
    scroll-behavior: smooth;

    --primary-tint: #e6b91e;
    --primary-base: #d19c33;
    --primary-shade: #b38529;
    --secondary-tint: #e5dbff;
    --secondary-base: #9775fa;
    --secondary-shade: #7048e8;
    --tertinary-tint: #fed9db;
    --tertinary-base: #f0523d;
    --tertinary-shade: #f76707;
    --grey-tint: #797979;
    --grey-base: #3e3e3e;
    --grey-shade: #222;
    --white: #fff;
    --black: #000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.wrapper {
    max-width: 120rem;
    margin: auto;
    padding: 0 1rem;
}

img {
    width: 100%;
    height: auto;
    display: block;
}

/* ------------ HEADER & NAV ------------------ */
header {
    width: 100%;
    position: absolute;
    z-index: 10;
}

.logo-icon {
    background-color: var(--grey-base);
    border-radius: 50%;
    padding: 0.5em;          /* adjust to control spacing around the SVG */
    display: inline-flex;    /* centers the SVG inside */
    align-items: center;
    justify-content: center;
  }

#logo {
    font-size: var(--font-title);
    font-weight: 100;
}

.last-name {
    color: var(--primary-base);
    font-weight: 700;
}

nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav li:first-child {
    margin-right: auto;
}

nav a {
    font-size: var(--font-primary);
    font-weight: 500;
    cursor: pointer;
    height: 100%;
    padding: 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: var(--grey-base);
}

nav a:hover {
    color: var(--grey-shade);
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    max-width: 100%;
    z-index: 999;
    background-color: var(--grey-tint);
    box-shadow: -10px 0 10px var(--grey-shade);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.sidebar li,
.sidebar a {
    width: 100%;
    color: var(--white);
}

.menu-button {
    display: none;
}

/* ------------ MAIN SECTIONS ------------------ */
section {
    font-size: var(--font-primary);
}

.sub-heading {
    font-size: var(--font-subtitle);
    font-weight: 600;
    padding: 0.5rem;
}

#hero-card {
    display: inline-block;
    position: relative;
    bottom: 10rem;
    color: var(--white);
    background-color: var(--primary-base);
    padding: 2rem;
    font-size: var(--font-subtitle);
}

section:nth-of-type(3) {
    color: var(--white);
    background-color: var(--primary-base);
    padding: 3rem;
}

.stackable {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 47rem) {
    .stackable {
        flex-direction: row;
        align-items: center;
    }

    .stackable > div {
        width: 25%;
        max-width: 25%;
    }

    .stackable > img {
        width: 75%;
        max-width: 75%;
        object-fit: contain; /* Keeps the image scaling clean */
    }
}

.about-section {
    position: relative;
}

.about-section img {
    width: 100%;
    height: auto;
    display: block;
}

.about-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    background-color: var(--white);
    color: var(--black);
    padding: 1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* ------------ FOOTER ------------------ */
footer {
    background-color: var(--grey-base);
    color: var(--white);
    padding: 2rem 1rem;
}

footer ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

footer li {
    font-size: var(--font-primary);
}

footer a {
    text-decoration: none;
    color: var(--white);
    transition: color 0.3s ease;
    display: inline-block;      /* allow padding */
    padding: 1rem;              /* increase click area */
}

footer a:hover {
    color: var(--grey-tint);
}

/* ------------ RESPONSIVE BREAKPOINTS ------------------ */
@media (max-width: 72rem) {
    html {
        font-size: 56.25%;
    }
}

@media (max-width: 51rem) {
    html {
        font-size: 50%;
    }
}

@media (max-width: 47rem) {
    html {
        font-size: 43.755%;
    }

    .hideNav {
        display: none;
    }

    .menu-button {
        display: block;
    }

    nav a {
        font-size: var(--font-title);
    }

    .stackable {
        flex-direction: column;
        text-align: center;
    }

    main section:nth-of-type(4) p {
        text-align: left;
    }

    section ul {
        list-style-position: inside;
    }

    .about-card {
        width: 80%;
    }

    footer a {
        padding: 2rem; /* larger tappable area */
    }
}
