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

body {
    font-family: "Playfair Display", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    color: #666666;
    background-color: #fcfcfc;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    padding: 0.2rem;
    border-style: solid;
    border-width: 0.01rem;
    border-color: #f0f0f0;
    width: 90%;
    max-width: 27rem;

    border-radius: 1.5rem;
    position: sticky;
    top: 1rem;
    margin: 1rem auto 0 auto;
    z-index: 1000;
}

.navbar li {
    display: flex;
    border-color: #ffffff;
    border-style: solid;
    border-width: 0.01rem;
    border-radius: 1.5rem;
    list-style: none;
    padding: 0.7rem;
    width: 5rem;
    align-content: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    margin: 0 0.2rem;
}

.navbar .links {
    display: flex;
    justify-content: center;
    gap: 0.1rem;
    list-style: none;
    width: 100%;
}

.navbar .links a {
    color: #666666;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.navbar li:hover {
    background-color: #eaeaea;
}

.home-button {
    background-color: #eaeaea;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666666;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    align-items: end;
    gap: 1rem;
    margin: 2rem
}

.content {
    grid-column: 1;
    grid-row: 1 / span 2;
    border-color: #f0f0f0;
    background-color: #ffffff;
    border-width: 0.01rem;
    border-style: solid;
    border-radius: 1.5rem;
    padding: 2rem;
}

.content p {
    font-size: 1.2rem;
}

.social_media {
    grid-column: 1;
    grid-row: 3;
    border-style: solid;
    text-align: center;
    border-width: 0.01rem;
    border-color: #f0f0f0;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1.5rem;
}

.social_media ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
}

.social-btn {
    display: flex;
    background: #ffffff;
    border: none;
}

.social-icon {
    width: 3rem;
    height: 3rem;
    border: none;
    fill: #666666;
}

.interests {
    grid-column: 2;
    grid-row: 1;
    border-style: solid;
    text-align: center;
    border-width: 0.01rem;
    border-color: #f0f0f0;
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 1.5rem;
    min-width: 0;
}

.interests ul {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

.interests .carousel{
    overflow: hidden;
    width: 100%;
}

.interest-card {
    background-color: transparent;
    width: 9rem;          
    height: 9rem;         
    perspective: 1000px; 
    flex-shrink: 0; 
}

.flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d; 
}

.interest-card:hover .flipper {
    transform: rotateY(180deg);
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-style: solid;
    border-width: 0.01rem;
    border-color: #f0f0f0;
    border-radius: 1.5rem;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
}

.front {
    font-size: 2.5rem; 
    color: #666666;
}

.back {
    transform: rotateY(180deg);
    font-weight: bold;
    text-align: center;
    padding: 0.5rem;
}

/* Carousel Accent Colors */
.interest-card:nth-child(12n + 1) { --accent: #3498db; } /* Coding (Blue) */
.interest-card:nth-child(12n + 2) { --accent: #2ecc71; } /* Finance (Green) */
.interest-card:nth-child(12n + 3) { --accent: #9b59b6; } /* Data Analysis (Purple) */
.interest-card:nth-child(12n + 4) { --accent: #e74c3c; } /* Norwegian (Red) */
.interest-card:nth-child(12n + 5) { --accent: #f1c40f; } /* Photography (Yellow) */
.interest-card:nth-child(12n + 6) { --accent: #e67e22; } /* Web Development (Orange) */
.interest-card:nth-child(12n + 7) { --accent: #1abc9c; } /* Content Creation (Teal) */
.interest-card:nth-child(12n + 8) { --accent: #fd79a8; } /* Wedding Stuff (Pink) */
.interest-card:nth-child(12n + 9) { --accent: #27ae60; } /* Flowers (Dark Green) */
.interest-card:nth-child(12n + 10) { --accent: #34495e; } /* Economics (Navy) */
.interest-card:nth-child(12n + 11) { --accent: #d35400; } /* Languages (Burnt Orange) */
.interest-card:nth-child(12n + 12) { --accent: #8e44ad; } /* Music (Deep Purple) */

.interest-card .front i, .interest-card .back {
    color: var(--accent, #666666);
}

.interest-card:hover .front, .interest-card:hover .back {
    border-color: var(--accent, #f0f0f0);
}

.stock_portfolio {
    grid-column: 2;
    grid-row: 2 / span 2;
    border-style: solid;
    border-width: 0.01rem;
    border-color: #f0f0f0;
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 1.5rem;
}

.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; 
    height: 18rem; 
    width: 100%; 
    max-width: 25rem;
    margin: 0 auto;
}

.stock_portfolio .comment {
    font-size: 0.8rem;
    text-align: end;
}


@media (max-width: 768px) {
    .navbar {
        width: 90%;
        left: 5%;
    }

    .menu-toggle {
        display: flex;
    }

    .navbar .links {
        display: none;
        grid-column: 1/-1;
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding-top: 1rem;
    }

    .navbar .links.active {
        display: flex;
    }

    .hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }

    .content {
        grid-column: 1;
        grid-row: 1;
    }

    .social_media {
        grid-column: 1;
        grid-row: 2;
    }

    .interests {
        grid-column: 1;
        grid-row: 3;
    }
    
    .stock_portfolio {
        grid-column: 1;
        grid-row: 4;
    }
}