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

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, sans-serif;
    background: #0a0a0a;
    color: #e5e5e5;
}

/*===========================================================================*/
/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: rgba(20, 20, 20, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav__links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2.25rem;
}

.nav__links>li>a {
    text-decoration: none;
    color: #b3b3b3;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    position: relative;
    transition: color 0.2s ease;
}

.nav__links>li>a:hover {
    color: #fff;
}


/*===========================================================================*/
/* SECTIONS (full vieport for each section) */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}


/*===========================================================================*/
/* HERO (HOME) */
.section--home {
    position: relative;
    overflow: hidden;
    text-align: center;
    gap: 1.75rem;
}

.section--home h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #f5f5f5;
    max-width: 20ch;
}

.section--home .eyebrow {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a8a;
}

/* Background collage track */
.hero-bg {
    position: absolute;
    inset: 0;
    max-width: 2560px;
    margin: 0 auto;
    overflow: hidden;
}

.hero-bg__track {
    display: flex;
    gap: 12px;
    width: fit-content;
    height: 100%;
    animation: hero-scroll 400s linear infinite;
}

@keyframes hero-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.hero-bg__grid {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.hero-bg__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-bg__col--offset {
    margin-top: 60px;
}

.hero-bg__col img {
    width: 220px;
    height: 280px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* Dark scrim with mouse spotlight cutout */
.hero-bg__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(10, 10, 10, 0.75);
    pointer-events: none;

    /* mouse position default*/
    --mx: 50%;
    --my: 50%;

    /* actual spotlight settings */
    mask-image: radial-gradient(circle 220px at var(--mx) var(--my),
            transparent 0%,
            rgba(0, 0, 0, 0.15) 25%,
            rgba(0, 0, 0, 0.5) 55%,
            rgba(0, 0, 0, 0.85) 80%,
            black 100%);
    -webkit-mask-image: radial-gradient(circle 220px at var(--mx) var(--my),
            transparent 0%,
            rgba(0, 0, 0, 0.15) 25%,
            rgba(0, 0, 0, 0.5) 55%,
            rgba(0, 0, 0, 0.85) 80%,
            black 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

/* for users with reduced motion setting */
@media (prefers-reduced-motion: reduce) {
    .hero-bg__track {
        animation: none;
    }
}


/*===========================================================================*/
/* ABOUT */
.section--about h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem); /* minimum, preferred, maximum*/
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #f5f5f5;
    margin-bottom: 2.5rem;
}

.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    max-width: 900px;
    width: 100%;
}

.about-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

/* Overlapping photo stack */
.about-photos {
    display: flex;
}

.about-photos img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #0a0a0a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.about-photos img:not(:first-child) {
    margin-left: -28px;
}

.about-main p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #c4c4c4;
    max-width: 640px;
}

/* scrolling icon row */
.about-icons {
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.about-icons__track {
    display: flex;
    width: fit-content;
    animation: icons-scroll 30s linear infinite;
}

.about-icons__row {
    display: flex;
    gap: 2.5rem;
    padding: 0 1.25rem;
    flex-shrink: 0;
}

.about-icons img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

@keyframes icons-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .about-icons__track {
        animation: none;
    }
}


/*===========================================================================*/
/* PROJECTS */
.section--projects {
    position: relative;
    overflow: hidden;
}

.projects-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    filter: blur(2px) brightness(0.4);
    transition: opacity 0.5s ease, background-image 0.5s ease;
}

.section--projects h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #f5f5f5;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.projects-bg.is-visible {
    opacity: 1;
}

.projects-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    padding: 0 3rem;
}

.project-row {
    display: grid;
    grid-template-columns: 240px 1fr auto;
    align-items: center;
    gap: 2.5rem;
    padding: 1.75rem 2.25rem;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.project-row:hover {
    transform: scale(1.02);
    background: #181818;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Column 1 (media) */
.project-row__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
}

.project-row__static,
.project-row__gif {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.project-row__gif {
    opacity: 0;
}

.project-row:hover .project-row__static {
    opacity: 0;
}

.project-row:hover .project-row__gif {
    opacity: 1;
}

/* Column 2 (description) */
.project-row__info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f5f5f5;
    margin-bottom: 0.5rem;
}

.project-row__info p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #b3b3b3;
}

/* Column 3 (links) */
.project-row__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    white-space: nowrap;
}

.btn--small {
    padding: 0.6rem 1.4rem;
    font-size: 0.85rem;
    text-align: center;
}

.btn--outline {
    background: transparent;
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.btn--outline:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* GITHUB / SCHOOL PROJECTS CARD (smaller) */
.project-row-git {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    align-items: center;
    gap: 2rem;
    padding: 1.25rem 2.25rem;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.project-row-git:hover {
    transform: scale(1.02);
    background: #181818;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.project-row-git__media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.project-row-git__media img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}


/*===========================================================================*/
/* CONTACT */
.section--contact h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #f5f5f5;
    margin-bottom: 1rem;
}

.contact-prompt {
    font-size: 1rem;
    line-height: 1.6;
    color: #b3b3b3;
    max-width: 480px;
    text-align: center;
    margin-bottom: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 480px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #d4d4d4;
}

.form-group input,
.form-group textarea {
    font: inherit;
    font-size: 0.95rem;
    color: #f5f5f5;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #6b6b6b;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
    background: #181818;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn {
    align-self: flex-start;
    margin-top: 0.5rem;
}


/*===========================================================================*/
/* FOOTER */
.site-footer {
    padding: 2.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text {
    font-size: 0.85rem;
    color: #6b6b6b;
}

.footer-links {
    display: flex;
    gap: 1.75rem;
}

.footer-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #b3b3b3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
}


/*===========================================================================*/
/* BUTTONS */
.btn {
    text-decoration: none;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #0a0a0a;
    background: #f5f5f5;
    border: none;
    border-radius: 999px;
    padding: 0.9rem 2rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}


/*===========================================================================*/
/* Mobile */
@media (max-width: 768px) {

    /* Header */
    .nav__links {
        gap: 1.25rem;
    }

    .nav__links>li>a {
        font-size: 0.85rem;
    }

    /* Hero */
    .section--home h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .hero-bg__col img {
        width: 150px;
        height: 190px;
    }

    /* (no spotlight hover on mobile, just dim background)*/
    .hero-bg__scrim {
        mask-image: none;
        -webkit-mask-image: none;
        background: rgba(10, 10, 10, 0.85);
    }

    /* About  */
    .about-photos img {
        width: 120px;
        height: 120px;
    }

    .about-main p {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }

    .about-icons img {
        width: 44px;
        height: 44px;
    }

    /* Projects */
    .project-row,
    .project-row-git {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .project-row__media {
        aspect-ratio: 16 / 9;
    }

    .project-row__links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .project-row-git__media {
        margin: 0 auto;
    }

    /* --- Contact --- */
    .contact-form {
        max-width: 100%;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 0 1rem;
    }

    .nav__links {
        gap: 0.85rem;
    }

    .section {
        padding: 1.5rem 1.25rem;
    }
}