:root {
    color-scheme: light;
    --primary-color: #F4F7FA;
    --secondary-color: #A9BDD2;
    --tertiary-color: #0B1B32;
    --primary-fill-color: #102A4C;
    --ink-black: #172B43;
    --accent-color: #FFB547;
    --accent-soft-color: #FFF1D6;
    --surface-color: #FFFFFF;
    --surface-hover-color: #E8F0F8;
    --font-family: Arial, sans-serif;
    --content-width: 72rem;
    --page-gutter: clamp(1rem, 4vw, 2.5rem);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--ink-black);
    background-color: var(--primary-color);
}

img,
iframe {
    max-width: 100%;
}

/* ----- Hero Section ----- */
.hero {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    padding: clamp(10rem, 7vw, 4.5rem) var(--page-gutter);
    color: var(--primary-color);
    background: linear-gradient(110deg, #0B1B32 12%, #143963 62%, #285F9D 100%);
    border-bottom: 4px solid var(--accent-color);
    text-align: center;
}

.hero-title {
    margin: 0;
    font-size: clamp(2.25rem, 7vw, 5rem);
    font-weight: 650;
}


.hero-subtitle {
    margin: 0;
    color: #D7E3F0;
    font-size: clamp(1.5rem, 3vw, 1.5rem);
    font-weight: 650;
}

/* ----- Navigation Section ----- */
.navbar {
    display: grid;
    justify-items: center;
    padding: 0 var(--page-gutter);
    background-color: var(--primary-fill-color);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem clamp(1rem, 4vw, 3rem);
    width: min(100%, var(--content-width));
    margin: 0;
    padding: 0.75rem 0;
    list-style: none;
}

.nav-links a {
    display: inline-block;
    padding: 0.5rem 0;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--accent-color);
}

.nav-links a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* ----- Shared page content ----- */
.item-details {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 1.25rem;
    width: min(100%, var(--content-width));
    margin-inline: auto;
    padding: clamp(1.5rem, 5vw, 3rem) var(--page-gutter);
}

.item-details h3 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.2;
    text-align: center;
}

.item-details h3::after {
    display: block;
    width: 2.75rem;
    height: 3px;
    margin: 0.65rem auto 0;
    background-color: var(--accent-color);
    content: "";
}

.item-body {
    width: min(100%, 50rem);
    line-height: 1.7;
}

.item-body p {
    margin: 0 0 1rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: clamp(1.5rem, 4vw, 3rem);
    width: min(100%, 58rem);
}

.contact-info,
.contact-form {
    padding: clamp(1.25rem, 4vw, 2rem);
    background-color: var(--surface-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 0.5rem;
}

.contact-info h4 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.contact-info p {
    margin: 0 0 0.5rem;
    overflow-wrap: anywhere;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-field {
    display: grid;
    gap: 0.4rem;
}

.contact-field label {
    font-weight: 700;
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--secondary-color);
    border-radius: 0.25rem;
    color: var(--ink-black);
    background-color: #FFFFFF;
    font: inherit;
}

.contact-field textarea {
    min-height: 10rem;
    resize: vertical;
}

.contact-field input:focus-visible,
.contact-field textarea:focus-visible {
    outline: 3px solid var(--primary-fill-color);
    outline-offset: 2px;
}

.contact-submit {
    justify-self: start;
    padding: 0.7rem 1.25rem;
    border: 0;
    border-radius: 0.25rem;
    color: var(--tertiary-color);
    background-color: var(--accent-color);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.contact-submit:hover {
    background-color: #F2A72F;
}

.contact-submit:focus-visible {
    outline: 3px solid var(--primary-fill-color);
    outline-offset: 3px;
}

.contact-note {
    margin: -0.5rem 0 0;
    color: #43566B;
    font-size: 0.9rem;
}

.item-project {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    align-items: stretch;
    gap: clamp(1rem, 3vw, 1.5rem);
    width: 100%;
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.project-filter {
    padding: 0.6rem 1rem;
    border: 2px solid var(--primary-fill-color);
    border-radius: 999px;
    color: var(--primary-fill-color);
    background-color: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.project-filter[aria-pressed="true"] {
    color: var(--primary-color);
    background-color: var(--primary-fill-color);
}

.project-filter[aria-pressed="false"]:hover {
    background-color: var(--surface-hover-color);
}

.project-filter:focus-visible {
    outline: 3px solid #D99527;
    outline-offset: 3px;
}

.project-empty {
    margin: 0;
    text-align: center;
}

.project-empty[hidden],
.item-project-box[hidden] {
    display: none;
}

.item-project-box {
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: start;
    gap: 0.75rem;
    min-width: 0;
    padding: 1rem;
    overflow: hidden;
    background-color: var(--surface-color);
    border-radius: 0.5rem;
    border-top: 3px solid var(--accent-color);
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.item-project-box:hover {
    background-color: var(--surface-hover-color);
    box-shadow: 0 0.35rem 1rem rgb(11 27 50 / 12%);
}

.item-project-box:focus-visible {
    outline: 3px solid var(--tertiary-color);
    outline-offset: 3px;
}

.item-project-title {
    color: var(--ink-black);
    font-size: 1rem;
    font-weight: 700;
}

.item-project-image {
    display: grid;
    place-items: center;
    min-height: 10rem;
}

.item-project-image img {
    display: block;
    width: 100%;
    max-height: 20rem;
    object-fit: contain;
}

.item-box {
    width: 100%;
}

.item-box iframe {
    display: block;
    width: 100%;
    min-height: 70vh;
    border: 1px solid var(--secondary-color);
}

.resume-frame {
    display: block;
    width: 100%;
    height: 80vh;
    height: 80svh;
    min-height: 32rem;
}

.item-details .item-body
.textbox-small {
    width: 15em;
}

.item-details .item-body
.textbox-large {
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: start;
    gap: 0.75rem;
    min-width: 0;
    padding: 1rem;
    overflow: hidden;
}

/* ----- Footer ----- */
footer {
    margin-top: auto;
}

.upper-footer {
    display: flex;
    align-items: center;
    justify-content:center;
    gap: 0.5rem 1.5rem;
    padding: 1rem var(--page-gutter);
    background-color: var(--surface-hover-color);
}

.upper-footer a {
    color: var(--primary-fill-color);
    font-size: 0.95rem;
    font-weight: 700;
    margin-left: 3rem;
    margin-right: 3rem;
    object-fit: contain;
    max-height: 3rem;
}

.upper-footer a img{
    max-height: 3rem;
}

.lower-footer {
    display: column;
    text-align: center;
    gap: 0.5rem 1rem;
    padding: 1.5rem var(--page-gutter);
    background-color: var(--primary-fill-color);
}

.lower-footer div{ 
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 700;
}

@media (max-width: 36rem) {
    .nav-links {
        gap: 0 1rem;
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    .div-footer {
        justify-content: center;
        text-align: center;
    }

    .item-box iframe {
        min-height: 70vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
