@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --navy: #0f4258;
    --dark-navy: #082f3d;
    --teal: #0b7576;
    --blue: #336585;
    --gold: #e1ae55;
    --orange: #b87532;
    --light-gray: #f4f6f7;
    --medium-gray: #dfe6e9;
    --text-dark: #0d1f2a;
    --text-muted: #5f6f76;
    --white: #ffffff;

    --shadow: 0 18px 40px rgba(15, 66, 88, 0.12);
    --radius: 18px;
    --section-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 112px;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

hr {
    margin-bottom: 60px;
    border: none;
}

/* Header */

header {
    width: min(calc(var(--section-width) + 200px), 100%);
    margin: 0 auto;
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;

    padding: 25px min(2%, 30px);

    background-color: #ffffffbb;
    backdrop-filter: blur(40px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 48px;
}

.brand-name {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
}

.brand-subtitle {
    margin: -3px 0 0;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nav-links {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 34px;
    font-size: 0.9rem;
    font-weight: 600;
}

.nav-links a {
    position: relative;
}

.nav-links a:nth-child(4) {
    display: none;
}

.nav-links a::after {
    content: "";
    width: 0;
    height: 2px;
    background-color: var(--teal);
    position: absolute;
    left: 0;
    bottom: -8px;
    transition: width 0.2s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px 7px;
    border: none;
    background: none;
    color: var(--text-dark);
    cursor: pointer;
}

.menu-button-line {
    display: block;
    width: 28px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background-color: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* General sections */

.section {
    width: min(var(--section-width), calc(100% - 40px));
    margin: 0 auto;
    padding: 56px 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.section-heading h2,
.about-text h2,
.cta-section h2 {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.1;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.hero {
    min-height: 560px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 40px;
    padding-top: 34px;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 600;
}

.hero h1 {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(3rem, 7vw, 5.7rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
    color: var(--dark-navy);
}

.hero h2 {
    margin: 10px 0 18px;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
    color: var(--navy);
}

.hero-description {
    max-width: 500px;
    margin: 0;
    margin-top: 16px;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.hero-details {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 24px 0;
    color: var(--text-muted);
    font-weight: 600;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border-radius: 8px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.primary-btn {
    color: var(--white);
    background-color: var(--navy);
    box-shadow: 0 10px 22px rgba(15, 66, 88, 0.22);
}

.secondary-btn {
    color: var(--navy);
    border: 2px solid var(--navy);
}

.accent-btn {
    background-color: var(--gold);
    color: var(--dark-navy);
}

.dark-outline-btn {
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.65);
}

.small-btn {
    margin-top: 10px;
}

.hero-image-wrap {
    display: flex;
    justify-content: center;
}

.hero-image {
    width: 100%;
    max-width: 650px;
}

/* Filter pills */

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.pill {
    border: none;
    border-radius: 999px;
    padding: 9px 16px;
    background-color: var(--light-gray);
    color: var(--text-dark);
    font-weight: 700;
    cursor: pointer;
}

.pill.active {
    background-color: var(--navy);
    color: var(--white);
}

.pill[data-filter="all"] {
    background-color: #e7eef3;
    color: var(--navy);
}

.pill[data-filter="Landing Page"],
.project-type[data-type="Landing Page"] {
    background-color: #fff2dc;
    color: #8a541d;
}

.pill[data-filter="Web App"],
.project-type[data-type="Web App"] {
    background-color: #e1f3f1;
    color: #086566;
}

.pill[data-filter="Game"],
.project-type[data-type="Game"] {
    background-color: #ead7f5;
    color: #69317c;
}

.pill[data-filter="all"].active {
    background-color: var(--navy);
    color: var(--white);
}

.pill[data-filter="Landing Page"].active {
    background-color: var(--gold);
    color: var(--dark-navy);
}

.pill[data-filter="Web App"].active {
    background-color: var(--teal);
    color: var(--white);
}

.pill[data-filter="Game"].active {
    background-color: #7a438e;
    color: var(--white);
}

/* Project carousel */

.projects-carousel {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 14px;
}

.carousel-button {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--medium-gray);
    background-color: var(--white);
    color: var(--navy);
    box-shadow: 0 6px 16px rgba(15, 66, 88, 0.12);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.carousel-button:hover:not(:disabled),
.carousel-button:focus-visible {
    color: var(--white);
    background-color: var(--navy);
    transform: scale(1.06);
}

.carousel-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Projects */

#project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.project-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius);
    background-color: var(--white);
    box-shadow: var(--shadow);

    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
        box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.12);
}

.project-image-link {
    display: block;
    cursor: pointer;
}

.project-image-link:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: -3px;
}

.project-image-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.project-content {
    padding: 20px;
}

.project-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #e8f4f4;
    color: var(--teal);
    font-size: 0.75rem;
    font-weight: 800;
}

.project-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.project-card h3 {
    margin: 0 0 8px;
    font-family: "Montserrat", sans-serif;
    font-size: 1.1rem;
}

.project-card p {
    color: var(--text-muted);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.project-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    background-color: var(--light-gray);
    font-size: 0.75rem;
    font-weight: 700;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 2px solid var(--navy);
    border-radius: 8px;
    color: var(--white);
    background-color: var(--navy);
    box-shadow: 0 8px 18px rgba(15, 66, 88, 0.18);
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.secondary-project-link {
    color: var(--navy);
    background-color: var(--white);
    box-shadow: none;
}

.project-link:hover,
.project-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 11px 22px rgba(15, 66, 88, 0.26);
}

/* About */

.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 42px;
}

.about-image-wrap {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.about-image-wrap img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.about-text p {
    color: var(--text-muted);
}

/* Skills */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 14px;
}

.skill-card {
    min-height: 104px;
    padding: 18px 10px;
    border: 1px solid var(--medium-gray);
    border-radius: 14px;
    display: grid;
    place-items: center;
    text-align: center;
    background-color: var(--white);

    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-6px);
    border-color: var(--dark-gray, #333);
}

.skill-card img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.skill-card p {
    margin: 10px 0 0;
    font-size: 0.8rem;
    font-weight: 800;
}

/* CTA */

.cta-section {
    margin-top: 24px;
    margin-bottom: 44px;
    padding: 42px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--dark-navy), var(--navy));
}

.cta-section p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.78);
}

/* Footer */

.site-footer {
    padding: 42px;
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 28px;
    color: var(--white);
    background-color: var(--dark-navy);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand img {
    width: 58px;
}

.footer-name {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
}

.footer-subtitle {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: self-end;
}

.footer-links h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    text-align: center;
    margin-top: auto;
}

/* Project Card animation */
@keyframes projectCardFloatIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card.card-entrance {
    animation-name: projectCardFloatIn;
    animation-duration: 0.3s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;

    animation-delay: calc(var(--i) * 0.1s);

    opacity: 0;
}

/* First-load entrance */

.motion-ready header,
.motion-ready .hero-text > *,
.motion-ready .hero-image-wrap {
    opacity: 0;
}

.motion-ready header {
    transform: translateY(-24px);
}

.motion-ready .hero-text > * {
    transform: translateY(28px) rotate(-1deg);
}

.motion-ready .hero-image-wrap {
    transform: translateX(42px) rotate(2deg) scale(0.96);
}

.motion-ready.page-loaded header,
.motion-ready.page-loaded .hero-text > *,
.motion-ready.page-loaded .hero-image-wrap {
    opacity: 1;
    transform: none;
    transition: opacity 0.65s ease, transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.motion-ready.page-loaded .hero-text > :nth-child(1) {
    transition-delay: 100ms;
}

.motion-ready.page-loaded .hero-text > :nth-child(2) {
    transition-delay: 180ms;
}

.motion-ready.page-loaded .hero-text > :nth-child(3) {
    transition-delay: 260ms;
}

.motion-ready.page-loaded .hero-text > :nth-child(4) {
    transition-delay: 340ms;
}

.motion-ready.page-loaded .hero-text > :nth-child(5) {
    transition-delay: 420ms;
}

.motion-ready.page-loaded .hero-image-wrap {
    transition-delay: 240ms;
}

/* One-time scroll reveals */

.scroll-reveal {
    opacity: 0;
    transform: translateY(38px) scale(0.98);
    transition: opacity 0.65s ease,
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.scroll-reveal.reveal-from-left {
    transform: translateX(-48px) rotate(-2deg);
}

.scroll-reveal.reveal-from-right {
    transform: translateX(48px) rotate(2deg);
}

.skill-card.scroll-reveal:nth-child(even) {
    transform: translateY(32px) rotate(2deg) scale(0.9);
}

.skill-card.scroll-reveal:nth-child(odd) {
    transform: translateY(32px) rotate(-2deg) scale(0.9);
}

.scroll-reveal.is-visible,
.skill-card.scroll-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .motion-ready header,
    .motion-ready .hero-text > *,
    .motion-ready .hero-image-wrap,
    .scroll-reveal,
    .skill-card.scroll-reveal,
    .project-card.card-entrance {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none;
    }
}

/* Tablet */

@media (max-width: 950px) {
    header {
        flex-wrap: wrap;
    }

    hr {
        display: none;
    }

    .brand {
        order: 1;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        order: 3;
        flex-direction: column;
        gap: 0;
        padding: 0 min(4%, 30px);
        background-color: rgba(255, 255, 255, 0.97);
        box-shadow: 0 14px 24px rgba(15, 66, 88, 0.12);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.25s ease;
    }

    .menu-button {
        display: block;
        order: 2;
        margin-left: auto;
    }

    .nav-links a {
        padding: 10px 0;
    }

    .nav-links a:nth-child(4) {
        display: block;
    }

    header[data-menu-open="true"] .nav-links {
        max-height: 320px;
        padding-bottom: 14px;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    header[data-menu-open="true"] .menu-button-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    header[data-menu-open="true"] .menu-button-line:nth-child(2) {
        opacity: 0;
    }

    header[data-menu-open="true"] .menu-button-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        text-align: left;
    }

    .hero-image-wrap {
        justify-content: flex-start;
    }

    #project-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        display: grid;
        grid-template-columns: 220px 1fr;
    }

    .project-image-link img {
        height: 100%;
        aspect-ratio: auto;
    }

    .about-section {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .cta-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer {
        grid-template-columns: 1.2fr 1fr 1.1fr;
    }
}

/* Mobile */

@media (max-width: 600px) {

    .site-header,
    .section {
        width: min(100% - 28px, var(--section-width));
        padding-block: 42px;
    }

    .brand-name,
    .brand-subtitle {
        display: none;
    }

    .hero {
        padding-top: 24px;
        gap: 22px;
    }

    .hero h1 {
        font-size: clamp(2.35rem, 12vw, 2.8rem);
    }

    .hero-details {
        flex-direction: column;
        gap: 6px;
    }

    .button-row {
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .section-heading {
        align-items: flex-start;
    }

    .projects-carousel {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 6px;
    }

    .carousel-button {
        width: 44px;
        height: 44px;
    }

    .project-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    #project-grid {
        touch-action: pan-y;
    }

    .project-link {
        width: 100%;
    }

    .filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
    }

    .pill {
        white-space: nowrap;
    }

    .project-card {
        display: block;
    }

    .project-image-link img {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-section {
        padding: 30px 22px;
        align-items: center;
        text-align: center;
    }

    .cta-section .button-row {
        width: 100%;
        justify-content: center;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }

    .footer-links {
        align-items: center;
    }

    .footer-brand {
        justify-content: center;
    }
}
