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

body {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 300;
    color: var(--text);
    line-height: 1.7;
}

.container {
    width: min(1100px, 90%);
    margin: auto;
}


/*----------------Text Styles--------------------------------------------------*/

h1,
h2,
h3, h4 {
    line-height: 1.2;
    font-family: 'Madimi One', sans-serif;
    color: var(--text);
}

h3 {
    font-size: 2rem;
    padding-bottom: 1.5rem;
}

h4 {
    font-size: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}

.highlight {
    background: linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    background-clip: text;
    color: transparent;
}

a {
    text-decoration: none;
    color: var(--primary);
}

.section-title-grid {
    display: grid;
    grid-template-columns: .6fr 2.25fr;
    gap: 2rem;
    width: 90%;
    align-items: center;
}

.section-title {
    font-size: 2.2rem;
    grid-column: span 1;
    margin: 0;
    padding: 1.5rem .75rem;
}

.section-subtitle {
    color: var(--muted);
    grid-column: span 2/4;
    align-self: center;
    margin: 0;
}


/*=================================================================================
 Static Upside-Down Waves - last section
 =================================================================================*/

static-bottom-wave {
    background-attachment: scroll;
    background-clip: border-box;
    background-origin: padding-box;
    background-position-x: 0%;
    background-position-y: 0%;
    background-repeat: repeat;
    overflow-y: hidden;
    overflow-y: hidden;
}
#bottomWavePath0 {
    fill: var(--wave0);
}
#bottomWavePath1 {
    fill: var(--wave1);
}
#bottomWavePath2 {
    fill: var(--wave2);
}
#bottomWavePath3 {
    fill: var(--wave3);
}
#bottomWavePath4 {
    fill: var(--wave4);
}


/*==================================================================================
 Wave-adjacent Backgrounds
 ==================================================================================*/

/* Gradient background on top section to fade into animated waves */
.animated-wave-gradient {
    background: linear-gradient(to top,
            var(--bg),
            var(--wave4));
}

/* Gradient background on second last section to fade into static waves */
.static-wave-gradient {
    background: linear-gradient(to bottom,
            var(--bg),
            var(--wave4))
}

/*===================================================================================
 Buttons
 ==================================================================================*/

.btn {
    display: inline-block;
    background: linear-gradient(135deg,
            var(--primary-transparent80),
            var(--secondary-transparent80));
    color: white;
    padding: 0.9rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    transition: .3s ease;
    box-shadow: var(--card-shadow);
}

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


/*===================================================================================
 Cards
 ==================================================================================*/

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.card-list {
    margin-top: 1.5rem;
}

.card-list>div {
    margin-top: 2rem;
}

.card {
    background: var(--card);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    overflow: hidden; /*important*/
}

.card-header {
    padding-bottom: 1rem;
}

.card-content {
    display: grid;
    column-gap: 1rem;
    align-items: center;
}

.card-content-1-1 {
    grid-template-columns: 1fr 1fr;
}

.card-content-img-right {
    grid-template-columns: 1fr 2fr;
}

.card-content-img-left {
    grid-template-columns: 2fr 1fr;
}


.card-content p{
    padding-bottom: .5rem;
}

.card-content ul{
    padding-left: 2rem;
}

/* Accent or highlighted border on left side of card */
.card-accent {
    border-left: 4px solid var(--secondary);
    position: relative;
}

.card-divider {
    width: 100%;
    height: 1px;
    margin: 3rem auto;
    border-radius: 999px;
    background: linear-gradient(to right,
            white 0%,
            white 35%,
            var(--theme-medium)50%,
            white 65%,
            white 100%);
}

/* Small pill-shaped cards */
.pill-card {
    background-color: var(--card-transparent);
    backdrop-filter: blur(4px);
    padding: .75rem 1.5rem;
    border-radius: 999px;
    font-size: .9rem;
    box-shadow: var(--card-shadow);
}

.pill-width {
    width: 95%;
    border: 1px solid var(--theme-light);
}

.section-divider {
    margin-bottom: 1.5rem;
    width: 100%;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(to right,
            var(--bg)0%,
            var(--bg)35%,
            var(--wave4)50%,
            var(--bg)65%,
            var(--bg)100%);
}



/*====================================================================================
 General Section Styling
 ====================================================================================*/
section {
    padding: 2rem 0;
}

.section-header {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 2rem;
    align-items: end;
}

/* Small pill-style cards */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
    align-content: start;
}

contact-content {
    position: relative;
    z-index: 1;
}

.contact {
    text-align: center;
}

.waveCanvas {
    width: 100%;
    height: 300px;
    position: absolute;
    bottom: 0;
}

header {
    position: relative;
    height: auto;
}

/*===================================================================================
 Hero Section
 ==================================================================================*/

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 1rem;
    align-items: center;
}

.hero-project-grid {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    grid-template-rows: auto auto;
    column-gap: 3rem;
    align-items: stretch;
}

.hero-project-grid h3 {
    padding-left: 2.5rem;
}

.hero-project-button-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-project-button {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg,
            var(--primary-transparent80),
            var(--secondary-transparent80));
    color: white;
    padding: 0.9rem 2.5rem;
    border-radius: 999px;
    transition: 
        transform .2s ease,
        box-shadow 0.2s ease;
    box-shadow: var(--card-shadow);
}

.hero-project-button>img {
    height: 3rem;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.hero-project-button>div {
    position: relative;
    z-index: 1;
}

.hero-project-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    background:
        linear-gradient(
            90deg,
            hsl(165 45% 38%),
            hsl(135 35% 65%)
        );
}

.hero > div:first-child p {
    max-width: 22ch;
}

.hero-project-title {
    font-weight: 600;
}

.hero-project-tagline {
    font-weight: 300;
}

.hero h1 {
    font-size: clamp(2.8rem, 5vw, 5rem);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--muted);
    padding-bottom: .75rem;
}

/* --- Home Hero card ---*/
.hero-card {
    display: flex;
    align-items: center;
    height: 100%;
    border-radius: 2rem;
    padding: 1.75rem;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--card-shadow);
}

/*================================================================================
 Footer
 ================================================================================*/

footer {
    text-align: center;
    color: var(--card);
    background-color: var(--primary-transparent90);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow:
        0 -4px 10px hsla(0, 0%, 0%, 0.1);
    align-items: center;
    gap: 5rem;
    padding: .5rem .5rem;
    border-top: 1px solid hsla(0, 0%, 0%, 0.05);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
}

.footer-message {
    flex: 1;
    color: var(--bg);
    text-align: left;
    padding-left: 20px;
}

.footer-actions {
    display: flex;
    gap: 0.75rem;
    justify-self: center;
}

.footer-copyright {
    flex: 1;
    text-align: right;
    color: var(--bg);
    text-align: right;
    padding-right: 20px;
}

.footer-btn {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow);
}

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

.footer-tagline {
    font-weight: 200;
}


/*=====================================================================================
 Mobile Responsiveness
 ====================================================================================*/

@media (max-width:768px) {

    .hero-grid {
        grid-template-columns: 1fr;
        padding-top: 40px;
        padding-bottom: 80px;
    }

    .hero-grid > div:first-child p {
    max-width: none !important;
}


    .hero {
        min-height: auto;
        padding-top: 4rem;
    }

    .profile-card {
        margin-bottom: -4rem;
    }


    .hero-project-grid {
        display: flex;
        flex-direction: column;
    }

    .hero-project-grid > :nth-child(1) {
        order: 3;
        margin-top: 3rem;
    }

    .hero-project-grid > :nth-child(2) {
        order: 1;
        margin-top: 1.5rem;
    }

    .hero-project-grid > :nth-child(3) {
        order: 4;
    }

    .hero-project-grid > :nth-child(4) {
        order: 2;
    }

    .hero-project-button-list {
        order: 1;
    }

    .hero-project-button {
        padding: 0.8rem 1.5rem
    }

    .hero-card {
        order: 2;
    }

    .hero p {
    max-width: 100%;
    align-content: center;
}

    .hero h1 {
        font-size: 3.5rem;
    }

    .card-content-1-1,
    .card-content-img-left,
    .card-content-img-right {
        grid-template-columns: 1fr;
    }

    .footer-copyright {
        text-align: center;
        padding: 0;
    }

    .footer-message {
        display: none;
    }

    .footer {
        display: flex;
        align-content: space-around;
        gap: 50px;
        justify-content: center;
    }

}