:root {
    --og: #c39ff1;
    --rosewater: #f5e0dc;
    --flamingo: #f2cdcd;
    --pink: #f5c2e7;
    --mauve: #cba6f7;
    --red: #f38ba8;
    --maroon: #eba0ac;
    --peach: #fab387;
    --yellow: #f9e2af;
    --green: #a6e3a1;
    --teal: #94e2d5;
    --sky: #89dceb;
    --sapphire: #74c7ec;
    --blue: #89b4fa;
    --lavender: #b4befe;
    --text: #cdd6f4;
    --subtext1: #bac2de;
    --subtext0: #a6adc8;
    --overlay2: #9399b2;
    --overlay1: #7f849c;
    --overlay0: #6c7086;
    --surface2: #585b70;
    --surface1: #45475a;
    --surface0: #313244;
    --base: #1e1e2e;
    --mantle: #272739e5;
    --crust: #11111b;
}

body {
    background-color: var(--base);
    color: var(--text);
    font-family: 'Fira Code', monospace;
    margin: 0;
    padding: 0;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    background-color: var(--crust);
    color: var(--text);
    padding: 18px 10px 18px 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 30px;
}

nav {
    background-color: var(--mantle);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--text);
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 0.5rem;
    border: 1px solid var(--og);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    justify-content: space-between;
    position: fixed;
    width: 97%;
    top: 5px;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items:center;
    gap: 0.5rem;
}

.favicon {
    width: 32px;
    height: 32px;
    margin: 0;
    align-self: center;
}

.text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.tt {
    font-size: 1.5rem;
    color: var(--text);
    font-weight: bold;
    margin: 5px 0 0 0; 
    line-height: 1.1;
    text-align: left;
}

.st {
    font-size: 0.8rem;
    color: var(--subtext1);
    margin: 0 0 5px 0;
    line-height: 1.1;
    text-align: left;
}

.navlinks {
    padding-right: 2rem;
    display: flex;
    gap: 3rem;
}

.navlinks > span {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navlinks > span > button {
    background: none;
    border: none;
    color: var(--text);
    font: inherit;
    font-weight: bolder;
    font-size: large;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    margin: 0;
    outline: none;
}
.navlinks > span > button.active {
    background-color: var(--crust);
    color: var(--lavender);
    border-radius: 2px;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.navlinks > span > button:hover:not(.active) {
    color: var(--og);
    transform: scale(1.05);
    transition: color 0.3s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#intro {
    padding: 9rem 3rem;
    background-color: var(--mantle);
    font-family: 'Fira Code', monospace;
    font-size: 4rem;
    font-weight: 800;
    color: var(--text);
    text-align: left;
    letter-spacing: -2px;
    line-height: 1.1;
}

#intro p {
    font-size: 2.8rem;
    color: var(--subtext1);
    margin: -60px 0 0 0;
}

.socials {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 20px 0 0 0;
    padding: 0;
}
.socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 2.5rem;
    transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.socials a:hover {
    background-color: var(--crust);
    color: var(--lavender);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: scale(1.05);
}
#btn-down {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    margin: 3rem auto -45px auto;
    width: 80px;
    height: 80px;
    z-index: 10;
}
#btn-down i {
    font-size: 50px;
    color: #cdd6f4;
    opacity: 0.7;
    transition: color 0.2s, opacity 0.2s, transform 0.2s;
}
#btn-down:hover i {
    color: #b4befe;
    opacity: 1;
    transform: scale(1.1);
}
#skills,
#projects,
#contact {
    margin-top: 10px;
    background: var(--mantle);
    font-family: 'Fira Code', monospace;
    font-size: 2.5rem;
    color: var(--text);
    text-align: center;
}
#skills h1,
#projects h1,
#contact h1 {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 3rem;
    font-weight: bold;
    color: var(--text);
    margin: 2rem 0 1rem;
    letter-spacing: -1px;
}
.skills-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0;
    margin: 40px 50px 50px;
    list-style: none;
}
.skill-box {
    background: rgb(58, 55, 91);
    border-radius: 6px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #c3c6f7;
    font-family: inherit;
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: -1px;
}
.skill-box i {
    font-size: 3rem;
    color: var(--text);
    transition: transform 0.2s, color 0.2s;
}

.project-holder {
    display: flex;
    flex-direction: row;
    gap: 2.3rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2rem 2.5rem;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}
.project-holder::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.project-card {
    background: var(--surface0);
    border-radius: 18px;
    box-shadow: 0 6px 32px 0 rgba(30,32,46,0.25), 0 1.5px 4px 0 rgba(0,0,0,0.10);
    max-width: 370px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    border: 1.5px solid var(--surface2);
    position: relative;
    flex-shrink: 0;
    transition: transform 0.18s cubic-bezier(.4,0,.2,1), box-shadow 0.18s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.project-card-header {
    position: relative;
    background: var(--surface2);
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
    padding: 0;
}
.project-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--mantle);
    color: var(--lavender);
    font-size: 1.1rem;
    font-weight: bold;
    padding: 6px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    z-index: 2;
    letter-spacing: 1px;
}
.project-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    box-shadow: 0 4px 24px 0 rgba(30,32,46,0.18);
    display: block;
    position: relative;
    z-index: 1;
    margin: 0;
}
.project-icon {
    position: absolute;
    right: 24px;
    bottom: -32px;
    width: 80px;
    height: 80px;
    border-radius: 22px;
    box-shadow: 0 4px 24px 0 rgba(30,32,46,0.18);
    background: var(--surface1);
    border: 3px solid var(--surface2);
    z-index: 3;
}
.project-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 10px 0 0;
    letter-spacing: -1px;
    align-self: flex-start;
}
.project-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
}
.tag {
    background: var(--surface2);
    color: var(--lavender);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.project-description {
    color: var(--subtext1);
    font-size: 1.08rem;
    text-align: left;
    line-height: 1.5;
    margin: 0 0 10px 0;
}
.project-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: flex-end;
    background: transparent;
    margin-top: auto;
    margin-bottom: -30px;
}
.project-card-body {
    padding: 48px 28px 68px 28px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 18px;
    position: relative;
    min-height: 220px;
}
.btn, .btn-secondary {
    font-weight: 700;
    font-size: 1.05rem;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    border: none;
    outline: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}
.btn {
    background: var(--lavender);
    color: var(--crust);
}
.btn:hover, .btn:focus {
    background: var(--og);
    color: var(--crust);
    box-shadow: 0 4px 16px rgba(0,0,0,0.16);
    transform: scale(1.05);
}
.btn-secondary {
    background: var(--surface2);
    color: var(--lavender);
    border: 1.5px solid var(--lavender);
}
.btn-secondary:hover, .btn-secondary:focus {
    background: var(--lavender);
    color: var(--crust);
    transform: scale(1.05);
}

/* Contact Section Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
    margin: 40px auto;
    background: transparent;
}
.contact-form label {
    color: var(--subtext1);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.1rem;
    text-align: left;
    letter-spacing: 0.2px;
}
.contact-form input,
.contact-form textarea {
    background: var(--surface1);
    color: var(--text);
    border: none;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    margin-top: 0.1rem;
    margin-bottom: 0.1rem;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    resize: none;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--overlay1);
    font-weight: 500;
    opacity: 1;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border: 1.5px solid var(--lavender);
    box-shadow: 0 0 0 1.5px var(--lavender);
}
.contact-form textarea {
    min-height: 60px;
    max-height: 100px;
    font-size: 1rem;
    font-weight: 500;
    resize: vertical;
}
.contact-form button[type="submit"] {
    margin: 1rem auto 0 auto;
    background: var(--surface2);
    color: var(--lavender);
    font-size: 1rem;
    font-weight: bold;
    padding: 0.5rem 3rem;
    border: 1.5px solid var(--lavender);
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    letter-spacing: 0.5px;
}
.contact-form button[type="submit"]:hover,
.contact-form button[type="submit"]:focus {
    background: var(--lavender);
    color: var(--crust);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transform: scale(1.05);
}
#extra {
    padding: 2.5rem 0 1.5rem 0;
    background: var(--mantle);
    margin-top: 10px;
    color: var(--subtext1);
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    box-shadow: 0 2px 12px rgba(30,32,46,0.07);
    text-align: center;
    letter-spacing: -1px;
    line-height: 1;
}
.discord-module {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    background: var(--surface1);
    border-radius: 10px;
    padding: 10px 16px;
    line-height: 1.4;
    gap: 18px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 1px 6px rgba(30,32,46,0.12);
    font-family: 'Fira Code', monospace;
    color: var(--text);
    transition: max-width 0.3s cubic-bezier(.4,0,.2,1), width 0.3s cubic-bezier(.4,0,.2,1);
    flex-wrap: nowrap;
    position: relative;
    min-height: 68px;
    min-width: 200px;
    width: max-content;
    max-width: 100%;
}
.discord-avatar-status {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    margin-right: 10px;
}

.discord-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--mauve);
    object-fit: cover;
}
.discord-status-indicator {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--surface1);
    background: var(--green);
    box-shadow: 0 0 0 1px var(--surface1);
}
.discord-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    justify-content: center;
}
.discord-username {
    font-weight: 700;
    font-size: 1rem;
    color: var(--lavender);
    word-break: break-all;
}
.discord-discord {
    color: var(--sky);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 2px;
}
.discord-status-text {
    font-size: 0.85rem;
    color: var(--subtext1);
    white-space: pre-line;
    word-break: break-word;
}
#spotify-info {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin-left: 24px;
    background: var(--surface2);
    border-radius: 6px;
    padding: 8px 18px;
    color: var(--green);
    font-size: 0.9rem;
    min-width: 220px;
    max-width: 420px;
    transition: max-width 0.3s cubic-bezier(.4,0,.2,1);
    box-sizing: border-box;
}
.spotify-album {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
    border: 1.5px solid var(--green);
    margin-top: 0;
    flex-shrink: 0;
    margin-right: 12px;
}
.spotify-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 0;
    min-width: 0;
    justify-content: center;
}
.spotify-song {
    font-weight: bold;
    color: var(--rosewater);
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
}
.spotify-artist {
    color: var(--peach);
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
}

footer {
    background-color: var(--mantle);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
    padding: 0.5rem 8rem;
    flex-direction: row;
    margin-top: 10px;
    text-align: center;
    font-size: 0.9rem;
    position: relative;
    z-index: 1000;
}

/* Responsive Styles */
@media (max-width: 800px) {
    header {
        padding: 10px 5px;
        min-height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    nav {
        min-height: 50px;
        padding: 0;
        margin-top: 5px;
        font-size: 2rem;
        width: 95vw;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        justify-content: center;
        align-items: center;
        border: 1.5px solid var(--lavender);
        border-radius: 10px;
        background-color: var(--mantle);
        position: fixed;
        z-index: 1000;
        box-shadow: none;
    }
    .logo {
        width: 100%;
        justify-content: center;
        align-items: center;
        gap: 0;
        display: flex;
        margin-right: 10px;
    }
    .st {
        display: none;
    }
    .tt {
        font-size: 2rem;
        color: var(--lavender);
        font-weight: 900;
        margin: 0 5px;
        text-align: center;
        letter-spacing: 2px;
        width: 100%;
        display: block;
    }
    .navlinks {
        display: none;
    }
    #intro {
        padding: 4rem 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    #intro h1 {
        font-size: 4rem;
        letter-spacing: 1px;
    }
    #intro p {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
        line-height: 1.4;
        margin-top: -20px;
    }
    .socials {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    margin: 0 10px;
    border-radius: 50%;
    font-size: 1.8rem;
    color: var(--text);
    }
    .socials a:hover {
        background-color: transparent;
        transform: none;
        box-shadow: none;

    }
    .socials a i:hover {
        color: var(--og);
        transform: scale(1.1);
    }
    #btn-down {
        margin: 3rem auto 1rem auto;
        width: 48px;
        height: 48px;
    }
    #btn-down i {
        font-size: 45px;
    }
    #skills, #projects {
        font-size: 1.5rem;
    }
    #skills h1, #projects h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    .skills-list {
        grid-template-columns: repeat(2, 1fr);
        margin: 20px 20px 50px 20px;
    }
    .skill-box {
        padding: 14px;
        font-size: 1rem;
    }
    .skill-box i {
        font-size: 2rem;
    }
    .project-holder {
        flex-direction: column;
        align-items: center;
        padding: 1rem 1rem 0 1rem;
        margin-bottom: 3rem;
    }
    .project-card {
        max-width: 100%;
        min-width: 90%;
        margin: 0;
        min-height: 500px;
        position: relative;
        display: flex;
        flex-direction: column;
    }
    .project-card-header {
        min-height: 180px;
    }
    .project-image {
        height: 180px;
    }
    .project-icon {
        width: 60px;
        height: 60px;
        right: 16px;
        bottom: -24px;
    }
    .project-card-body {
        padding: 36px 20px 50px 20px;
    }
    .project-title {
        font-size: 1.8rem;
        margin: -20px 0 -10px 0;
    }
    .project-tags {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .tag {
        font-size: 0.9rem;
        padding: 2px 6px;
    }
    .project-description {
        font-size: 1rem;
        line-height: 1.4;
        margin: -10px 0 0 0;
    }
    .project-actions {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-top: auto;
        margin-bottom: -50px;
        justify-content: center;
        position: relative;
        bottom: 10px;
        width: 100%;
    }
    .btn, .btn-secondary {
        font-size: 1rem;
        padding: 8px 16px;
    }
    .btn-secondary:hover, .btn-secondary:focus {
        background: var(--lavender);
        color: var(--crust);
    }
    #contact {
        padding: 2rem 0 0 0;
        min-height: 50vh;
    }
    #contact h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
        margin-top: 1rem;
    }
    .contact-form {
        max-width: 95vw;
        gap: 1rem;
    }
    .contact-form input,
    .contact-form textarea {
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
    .contact-form button[type="submit"] {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }
    #extra {
        padding: 1.5rem 0 1rem 0;
        font-size: 0.9rem;
        font-weight: bold;
        line-height: 1.4;
    }
    #extra p {
        margin: 15px 10px 5px 10px; 
        font-size: 0.9rem;
        line-height: 1.4;
    }
    .discord-module,
    .discord-module.spotify-active {
        flex-direction: column;
        align-items: stretch;
        max-width: 90vw;
        padding: 10px 6px;
        gap: 8px;
        min-height: unset;
    }
    .discord-avatar {
        width: 48px;
        height: 48px;
        margin-left: 0;
    }
    .discord-status-indicator {
        width: 12px;
        height: 12px;
        bottom: -10px;
        right: -15px;
    }
    .discord-info {
        align-items: center;
        text-align: center;
        width: 100%;
        margin-top: -50px;
    }
    #spotify-info {
        margin-left: 0;
        min-width: 0;
        max-width: 100vw;
        padding: 8px 8px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    .spotify-album {
        width: 38px;
        height: 38px;
        margin-right: 0;
    }
    .spotify-song,
    .spotify-artist {
        max-width: 90vw;
        font-size: 0.98rem;
    }
    footer {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        font-size: 0.8rem;
        gap: 0;
        line-height: 0;
    }
    footer p {
        margin: 1px;
        font-size: 0.8rem;
        line-height: 1.2;
    }
}