:root {
    /* Colors */
    --primary-color: #607D8B;
    /* Blue-gray */
    --accent-color: #FFEB3B;
    /* Yellow */
    --bg-color: #F0F0F0;
    /* Slightly cooler grey for contrast */
    --text-color: #212121;
    --card-bg: #FFFFFF;
    --shadow: 5px 5px 0px rgba(0, 0, 0, 1);
    /* Hard shadow */
    --shadow-hover: 8px 8px 0px rgba(0, 0, 0, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    background-image:
        linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd),
        linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.container {
    width: 100%;
    max-width: 600px;
    /* Constrained width */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centered items */
    gap: 30px;
}

/* Header */
.profile-header {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
    position: relative;
}

.profile-image-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.profile-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    border: 4px solid #000;
    transform: rotate(10deg);
    z-index: 0;
    box-shadow: var(--shadow);
}

.profile-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    border: 4px solid #000;
    background-color: white;
    z-index: 1;
    transition: transform 0.2s;
}

.profile-image-wrapper:hover .profile-image-container {
    transform: translate(-2px, -2px);
}

.profile-image-wrapper:hover .profile-image-bg {
    transform: rotate(15deg) scale(1.05);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-family: 'Dela Gothic One', cursive;
    font-size: 3rem;
    font-weight: 400;
    color: #000;
    margin-bottom: 10px;
    background: var(--accent-color);
    display: inline-block;
    padding: 5px 10px;
}

.profile-role {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 20px;
}

/* Links Grid - Scattered Layout */
.links-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.link-card {
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    padding: 25px;
    text-decoration: none;
    color: var(--text-color);
    border: 3px solid #000;
    box-shadow: var(--shadow);
    transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Scattered Effect using nth-child */
.link-card:nth-child(odd) {
    transform: rotate(1deg);
    margin-right: 20px;
}

.link-card:nth-child(even) {
    transform: rotate(-1.5deg);
    margin-left: 20px;
}

.link-card:nth-child(3n) {
    transform: rotate(2deg);
    margin-right: -10px;
}

/* Hover Effects - Full Color Fill */
.link-card:hover {
    transform: translate(-3px, -3px) rotate(0deg) scale(1.02);
    box-shadow: var(--shadow-hover);
    color: white;
    border-color: #000;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: currentColor;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-in-out;
}

.link-card:hover::before {
    transform: scaleX(1);
}

/* Specific Colors for Hover */
.link-card.x-twitter {
    color: #000;
}

.link-card.x-twitter:hover {
    background-color: #000;
    color: white;
}

.link-card.x-twitter:hover::before {
    background-color: #000;
}

.link-card.note {
    color: #222;
}

.link-card.note:hover {
    color: white;
}

.link-card.note:hover::before {
    background-color: #41C9B4;
}

.link-card.standfm {
    color: #222;
}

.link-card.standfm:hover {
    color: white;
}

.link-card.standfm:hover::before {
    background-color: #2954ed;
}

.link-card.marshmallow {
    color: #222;
}

.link-card.marshmallow:hover {
    color: white;
}

.link-card.marshmallow:hover::before {
    background-color: #E91E63;
}

.link-card.kindle {
    color: #222;
}

.link-card.kindle:hover {
    color: white;
}

.link-card.kindle:hover::before {
    background-color: #FF9900;
}


.card-icon {
    font-size: 3rem;
    margin-right: 25px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #000;
    background: #fff;
    color: #000;
    z-index: 1;
    transition: all 0.2s;
}

.link-card:hover .card-icon {
    background: #fff;
    color: #000;
    transform: rotate(10deg);
}

.card-content {
    z-index: 1;
}

.card-content h2 {
    font-family: 'Dela Gothic One', cursive;
    font-size: 1.5rem;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.card-content p {
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.8;
}

.link-card:hover .card-content p {
    color: white;
    opacity: 1;
}

/* Coming Soon Card */
.link-card.coming-soon {
    opacity: 1;
    background-color: #ddd;
    border-style: dashed;
}

.link-card.coming-soon:hover {
    transform: rotate(0deg);
    box-shadow: var(--shadow);
}

.link-card.coming-soon:hover::before {
    transform: scaleX(0);
    /* No fill for coming soon */
}


/* Footer */
footer {
    margin-top: 60px;
    text-align: center;
    font-weight: 900;
    font-size: 1rem;
    color: #000;
    background: var(--accent-color);
    padding: 10px 20px;
    border: 3px solid #000;
    box-shadow: 5px 5px 0px #000;
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 20px 20px;
    }

    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    .profile-header {
        margin-top: 40px;
        margin-bottom: 10px;
    }

    .profile-image-wrapper {
        width: 150px;
        height: 150px;
    }

    .profile-name {
        font-size: 2.2rem;
    }

    .profile-role {
        font-size: 1rem;
    }

    .link-card {
        padding: 18px;
        margin: 0 !important;
        /* Reset scattered margins for mobile */
        transform: rotate(0deg) !important;
        /* Reset rotation for mobile readability */
        color: white;
    }

    /* Mobile: Show cards with colors by default */
    .link-card.x-twitter {
        background-color: #000;
        color: white;
    }

    .link-card.note {
        background-color: #41C9B4;
        color: white;
    }

    .link-card.standfm {
        background-color: #2954ed;
        color: white;
    }

    .link-card.marshmallow {
        background-color: #E91E63;
        color: white;
    }

    .link-card.kindle {
        background-color: #FF9900;
        color: white;
    }

    .link-card p {
        color: white;
        opacity: 1;
    }

    .card-icon {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
        margin-right: 15px;
    }

    .card-content h2 {
        font-size: 1.3rem;
    }

    .card-content p {
        font-size: 0.9rem;
    }
}