:root {
    --md-sys-color-background: #121212;
    --md-sys-color-surface: #1E1E1E;
    --md-sys-color-surface-variant: #252525;
    --md-sys-color-primary: #84ff6e;
    --md-sys-color-on-surface: #E1E1E1;
    --md-sys-color-on-surface-variant: #A0A0A0;
    --md-sys-elevation-1: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --md-sys-elevation-2: 0 4px 8px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Dela Gothic One', sans-serif;
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface);
    margin: 0;
    padding: 40px 20px;
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

h1 {
    color: var(--md-sys-color-primary);
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 48px;
    text-align: center;
    font-size: 2.5rem;
}

.cards-container {
    column-count: 3;
    column-gap: 32px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.card-container {
    background-color: transparent;
    width: 100%;
    perspective: 1000px;
    cursor: pointer;
    break-inside: avoid; 
    margin-bottom: 32px;
}

.card {
    display: grid;
    grid-template: 1fr / 1fr;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
    height: 100%;
}

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

.card-container:hover .card-face {
    box-shadow: var(--md-sys-elevation-2);
}

.card-face {
    grid-area: 1 / 1;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: var(--md-sys-elevation-1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    min-height: 320px;
}

.card-back {
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    transform: rotateY(0deg);
    border: 1px solid rgba(125, 255, 82, 0.3);
    position: relative;
    overflow: hidden;
}

.card-back::before {
    content: '';
    position: absolute;
    width: 300%;
    height: 300%;
    top: -100%;
    left: -100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 30px,
            rgba(125, 255, 82, 0.3) 30px,
            rgba(125, 255, 82, 0.3) 32px,
            transparent 32px,
            transparent 50px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 25px,
            rgba(125, 255, 82, 0.3) 25px,
            rgba(125, 255, 82, 0.3) 27px,
            transparent 27px,
            transparent 45px
        ),
        repeating-linear-gradient(
            45deg,
            transparent 0px,
            transparent 40px,
            rgba(125, 255, 82, 0.3) 40px,
            rgba(125, 255, 82, 0.3) 43px,
            transparent 43px,
            transparent 70px
        );
    animation: kill-la-kill-flow-1 2s linear infinite;
    z-index: 0;
    pointer-events: none;
}

.card-back::after {
    content: '';
    position: absolute;
    width: 300%;
    height: 300%;
    top: -100%;
    left: -100%;
    background: 
        repeating-linear-gradient(
            -45deg,
            transparent 0px,
            transparent 35px,
            rgba(125, 255, 82, 0.3) 35px,
            rgba(125, 255, 82, 0.3) 37px,
            transparent 37px,
            transparent 60px
        ),
        repeating-linear-gradient(
            135deg,
            transparent 0px,
            transparent 28px,
            rgba(125, 255, 82, 0.3) 28px,
            rgba(125, 255, 82, 0.3) 30px,
            transparent 30px,
            transparent 55px
        );
    animation: kill-la-kill-flow-2 2s linear infinite;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

@keyframes kill-la-kill-flow-1 {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(100px, 100px);
    }
}

@keyframes kill-la-kill-flow-2 {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-100px, -100px);
    }
}

.card-back h2,
.card-back .icon,
.card-back .material-symbols-outlined {
    position: relative;
    z-index: 1;
}

.card-container:hover .card-back::before {
    animation-duration: 3s;
}

.card-container:hover .card-back::after {
    animation-duration: 4s;
}

.card-back h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 16px 0 0 0;
    letter-spacing: 0.5px;
}

.card-back .icon {
    font-size: 48px;
    color: var(--md-sys-color-primary);
    opacity: 0.9;
}

.card-front {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
    transform: rotateY(180deg);
    border: 3px solid var(--md-sys-color-primary);
    align-items: flex-start;
    text-align: left;
}

.card-front h3 {
    color: var(--md-sys-color-primary);
    font-size: 1.25rem;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 16px;
    width: 100%;
    text-align: center;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--md-sys-color-primary);
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(125, 255, 82, 0.3);
    align-self: center;
}

.card-front p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--md-sys-color-on-surface-variant);
    margin: 8px 0;
    width: 100%;
    word-wrap: break-word;
}

.card-front p strong {
    color: var(--md-sys-color-on-surface);
    font-weight: 400;
}

.material-symbols-outlined {
    font-size: 48px;
    color: var(--md-sys-color-primary);
    opacity: 0.9;
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
}

.audio-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.custom-player {
    background: var(--md-sys-color-surface-variant);
    border: 1px solid rgba(125, 255, 82, 0.3);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
}

.custom-player:hover {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 4px 15px rgba(125, 255, 82, 0.3);
}

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

.player-icon {
    font-size: 24px;
    color: var(--md-sys-color-primary);
}

.track-details {
    display: flex;
    flex-direction: column;
}

.track-name {
    font-size: 1rem;
    color: var(--md-sys-color-on-surface);
    font-weight: 500;
}

.track-time {
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 2px;
}

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

.play-btn {
    background: var(--md-sys-color-primary);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.play-btn:hover {
    transform: scale(1.1);
    background: #7aff7c;
}

.play-btn .play-icon {
    font-size: 22px;
    color: #121212;
    font-variation-settings: 'FILL' 1;
}

.progress-container {
    flex-grow: 1;
    height: 38px;
    position: relative;
    cursor: pointer;
    border-radius: 19px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--md-sys-color-primary);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.links-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(99, 255, 82, 0.1);
    border: 1px solid rgba(105, 255, 82, 0.3);
    border-radius: 12px;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    font-size: 1rem;
    font-family: 'Dela Gothic One', sans-serif;
    transition: all 0.3s ease;
}

.link-btn:hover {
    background: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
    color: #121212;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(99, 255, 82, 0.3);
}

.link-btn .material-symbols-outlined {
    font-size: 24px;
    color: var(--md-sys-color-primary);
    transition: color 0.3s ease;
}

.link-btn:hover .material-symbols-outlined {
    color: #121212;
}

.projects-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(131, 255, 82, 0.05);
    border: 1px solid rgba(99, 255, 82, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.project-item:hover {
    border-color: var(--md-sys-color-primary);
    background: rgba(91, 255, 82, 0.1);
    transform: translateX(3px);
}

.project-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(131, 255, 82, 0.3);
    flex-shrink: 0;
}

.project-name {
    font-size: 1rem;
    color: var(--md-sys-color-on-surface);
    font-weight: 400;
}

.project-desc {
    display: none;
    padding: 0 16px 16px 16px;
}

.project-item.open .project-desc {
    display: block;
}

.project-desc-img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--md-sys-color-primary);
    margin-bottom: 12px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.now-playing-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--md-sys-color-primary);
    z-index: 100;
    padding: 12px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.np-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--md-sys-color-on-surface);
    font-size: 0.95rem;
}

.np-icon {
    color: var(--md-sys-color-primary);
    font-size: 22px;
    animation: pulse 1.5s ease-in-out infinite;
}

.np-text {
    font-weight: 400;
}

.np-text strong {
    color: var(--md-sys-color-primary);
    font-weight: 500;
}

.np-progress {
    height: 3px;
    width: 100%;
    background: rgba(120, 255, 82, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.np-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--md-sys-color-primary);
    border-radius: 2px;
    transition: width 0.1s linear;
}

@media (max-width: 768px) {
    .card-container {
        width: 100%;
        max-width: 100%;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 1200px) {
    .cards-container { column-count: 2; }
}

@media (max-width: 768px) {
    .cards-container { column-count: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

.cursed-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: 8px;
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    animation: cursed-pulse 3s ease-in-out infinite;
    transform: translateY(-30px);
}

.cursed-link:hover {
    background: rgba(255, 82, 82, 0.3);
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-primary);
    transform: scale(0);
}

@keyframes cursed-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}