:root {
    /* Light Theme Colors */
    --md-sys-color-primary: #6750A4;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #EADDFF;
    --md-sys-color-on-primary-container: #21005D;
    --md-sys-color-secondary: #625B71;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #E8DEF8;
    --md-sys-color-on-secondary-container: #1D192B;
    --md-sys-color-tertiary: #7D5260;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #FFD8E4;
    --md-sys-color-on-tertiary-container: #31111D;
    --md-sys-color-background: #FFFBFE;
    --md-sys-color-on-background: #1C1B1F;
    --md-sys-color-surface: #FFFBFE;
    --md-sys-color-on-surface: #1C1B1F;
    --md-sys-color-surface-variant: #E7E0EC;
    --md-sys-color-on-surface-variant: #49454F;
    --md-sys-color-outline: #79747E;

    /* Custom Card Colors */
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(0, 0, 0, 0.2);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-speed: 0.3s;
    --transition-ease: cubic-bezier(0.4, 0.0, 0.2, 1);


    /* Background Gradient */
    --bg-gradient: linear-gradient(135deg, rgba(245, 245, 245, 0.526), rgba(245, 245, 245, 0.526));
}


[data-theme="dark"] {
    /* Dark Theme Colors */
    --md-sys-color-primary: #D0BCFF;
    --md-sys-color-on-primary: #381E72;
    --md-sys-color-primary-container: #4F378B;
    --md-sys-color-on-primary-container: #EADDFF;
    --md-sys-color-secondary: #CCC2DC;
    --md-sys-color-on-secondary: #332D41;
    --md-sys-color-secondary-container: #4A4458;
    --md-sys-color-on-secondary-container: #E8DEF8;
    --md-sys-color-tertiary: #EFB8C8;
    --md-sys-color-on-tertiary: #492532;
    --md-sys-color-tertiary-container: #633B48;
    --md-sys-color-on-tertiary-container: #FFD8E4;
    --md-sys-color-background: #1C1B1F;
    --md-sys-color-on-background: #E6E1E5;
    --md-sys-color-surface: #1C1B1F;
    --md-sys-color-on-surface: #E6E1E5;
    --md-sys-color-surface-variant: #49454F;
    --md-sys-color-on-surface-variant: #CAC4D0;
    --md-sys-color-outline: #938F99;

    /* Custom Card Colors for Dark Mode */
    --card-bg: rgba(28, 27, 31, 0.7);
    --card-border: rgba(255, 255, 255, 0.3);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);


    /* Background Gradient */
    --bg-gradient: linear-gradient(135deg, rgba(10, 10, 10, 0.526), rgba(10, 10, 10, 0.526));

}

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

h2 {
    color: #D0BCFF !important;
    font-family: "bahnschrift", sans-serif;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 32px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Lucide Icon Styles */
.icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Custom crowbar cursor for buttons and interactive elements */
button,
[role="button"],
.quick-link-btn,
.link-card,
.mobile-menu-toggle,
.sidebar-close,
.sidebar-link,
.footer-theme-toggle,
.home-btn,
.panel h3 .section-title,
.panel h3 .toggle-icon {
    cursor: url("../assets/icons/crowbar_png.png"), pointer;
}

/* Dark mode icon: invert to white */
[data-theme="dark"] .icon {
    filter: invert(1);
}

body {
    font-family: "bahnschrift", sans-serif;
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color var(--transition-speed) var(--transition-ease), color var(--transition-speed) var(--transition-ease);
    overflow-x: hidden;
    cursor: url("../assets/icons/crowbar_png.png"), auto;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        var(--bg-gradient),
        url('https://unsplash.com/photos/yTPd7pUBpRM/download?w=600');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(10px);
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Layout */
.main-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.mobile-menu-toggle,
.sidebar-overlay {
    display: none;
}

/* Sidebar */
.sidebar {
    width: 280px;
    /* use card background so the sidebar becomes translucent/"glass" via variable
       and remains theme-aware */
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-speed) var(--transition-ease);
    /* round the right corners similar to footer */
    border-radius: 0 20px 20px 0;
}

.sidebar-header {
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color var(--transition-speed) var(--transition-ease);
}

.sidebar-close:hover {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-name {
    font-family: "bahnschrift", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--md-sys-color-on-surface);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

/* Section label with separator lines on left and right */
.sidebar-section-label {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.85rem;
    text-transform: none;
    margin: 12px 0;
    gap: 12px;
}

.sidebar-section-label::before,
.sidebar-section-label::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: var(--md-sys-color-surface-variant);
    opacity: 0.35;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface-variant);
    transition: all var(--transition-speed) var(--transition-ease);
}

.sidebar-link:hover {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface);
}

.sidebar-link.active {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.sidebar-link .icon {
    width: 24px;
    height: 24px;
}

.sidebar-text {
    font-family: "bahnschrift", sans-serif;
    font-weight: 500;
    font-size: 1rem;
}

/* Sidebar footer removed - theme toggle moved to main footer */

/* Content Area */
.content-area {
    flex-grow: 1;
    margin-left: 280px;
    /* Width of sidebar */
    padding: 0;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.content-section {
    display: none;
    width: 100%;
    min-height: 100vh;
    animation: fadeIn 0.3s ease-in-out;
}

.content-section.active {
    display: block;
}

.content-section.full-height {
    height: 100vh;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 800px;
    padding: 60px 20px 120px 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Profile Section */
.profile-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.profile-image-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--md-sys-color-surface-variant);
    box-shadow: var(--card-shadow);
    background-color: var(--md-sys-color-surface);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-tertiary));
    color: white;
}

.profile-placeholder .icon {
    width: 64px;
    height: 64px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-family: "bahnschrift", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.profile-bio {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Links Container */
.links-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}



.links-row {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

.links-row .link-card {
    flex: 1;
    justify-content: center;
    padding: 16px;
}

.links-row .link-text {
    font-size: 1rem;
}

.links-row .link-arrow {
    display: block;
    font-size: 18px;
}

/* Link Card */
.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed) var(--transition-ease),
        box-shadow var(--transition-speed) var(--transition-ease),
        background-color var(--transition-speed) var(--transition-ease);
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.link-card:hover::before {
    transform: translateX(100%);
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    background-color: var(--md-sys-color-surface);
}

/* Inverted Card Style */
.link-card.inverted {
    background-color: var(--md-sys-color-on-surface);
    color: var(--md-sys-color-surface);
    border-color: transparent;
}

.link-card.inverted .icon {
    filter: invert(1);
}

[data-theme="dark"] .link-card.inverted .icon {
    filter: none;
}

.link-card.inverted:hover {
    background-color: var(--md-sys-color-on-surface);
    /* Keep dark on hover, maybe lighten slightly? or just scale */
    opacity: 0.9;
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--card-hover-shadow);
}

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

.link-text {
    flex-grow: 1;
    text-align: center;
    font-family: "bahnschrift", sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.link-arrow {
    font-size: 20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-speed) var(--transition-ease);
    color: var(--md-sys-color-secondary);
}

.link-card:hover .link-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Portfolio Card Permanent Glow Effect */
.portfolio-glow .link-text {
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4);
}


/* Quick Links */
.quick-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 8px;
}

.quick-link-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) var(--transition-ease);
}

.quick-link-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-primary);
}

.quick-link-btn .icon {
    width: 24px;
    height: 24px;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    /* align footer horizontally with the centered content column (accounting for sidebar)
         content center = viewport center + (sidebar_width / 2) where sidebar_width = 280px */
    left: calc(50% + 140px);
    transform: translateX(-50%);
    /* make the footer shrink-to-fit its content and stay centered on desktop */
    width: auto;
    min-width: 260px;
    max-width: 500px;
    right: auto;
    margin: 0;
    padding: 12px 20px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.85rem;
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px 20px 0 0;
    box-shadow: var(--card-shadow);
    z-index: 1000;
    border-bottom: none;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-text {
    flex: 1;
    text-align: center;
}

.footer-text p {
    margin: 0;
    line-height: 1.4;
}

.footer-theme-toggle {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-ease);
    padding: 0;
}

.footer-theme-toggle:hover {
    background-color: var(--md-sys-color-surface-variant);
    transform: scale(1.1);
}

.footer-theme-toggle .icon {
    width: 20px;
    height: 20px;
}

#travelling-section.active~.footer {
    display: none;
}

.footer a {
    color: var(--md-sys-color-primary);
    text-decoration: underline;
    position: relative;
    transition: all var(--transition-speed) var(--transition-ease);
}

.footer a:hover {
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4);
}

.footer a::before {
    content: '✨';
    position: absolute;
    left: -20px;
    opacity: 0;
    animation: sparkle-left 2s infinite;
}

.footer a::after {
    content: '✨';
    position: absolute;
    right: -20px;
    opacity: 0;
    animation: sparkle-right 2s infinite;
}

.footer a:hover::before,
.footer a:hover::after {
    animation-play-state: running;
}

/* Equipment List Styles */
.equipment-list-container {
    display: grid;
    gap: 24px;
    width: 100%;
    text-align: left;
}

.equipment-group {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.equipment-group h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--md-sys-color-primary);
    border-bottom: 1px solid var(--md-sys-color-outline);
    padding-bottom: 8px;
    display: block;
}

.equipment-group ul {
    list-style-type: none;
    padding-left: 0;
}

.equipment-group li {
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--md-sys-color-on-surface);
}

.equipment-group ul ul {
    padding-left: 20px;
    margin-top: 4px;
    list-style-type: disc;
}

.equipment-group ul ul li {
    margin-bottom: 4px;
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* Text Helpers */
.text-secondary {
    color: var(--md-sys-color-outline);
    font-weight: 400;
}

.strikethrough {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Photography Section */
.masonry-grid {
    column-count: 3;
    column-gap: 16px;
    width: 100%;
}

.masonry-grid a {
    display: block;
    margin-bottom: 16px;
    break-inside: avoid;
    text-decoration: none;
}

.masonry-grid img {
    width: 100%;
    border-radius: 16px;
    display: block;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed) var(--transition-ease),
        box-shadow var(--transition-speed) var(--transition-ease);
}

.masonry-grid img:hover {
    transform: scale(1.02);
    box-shadow: var(--card-hover-shadow);
}

@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }
}

/* Spotify & Travel Widget */
.sp-card,
.tw-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    color: var(--md-sys-color-on-surface);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) var(--transition-ease);
    margin-bottom: 8px;
    text-decoration: none;
}



.sp-card:hover,
.tw-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
    background-color: var(--md-sys-color-surface);
}

/* Widget Headers */
.sp-header,
.st-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Contents */
.sp-content,
.st-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Covers / Avatars */
.sp-cover,
.st-cover-game,
.st-cover-icon {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Info Text */
.sp-info,
.st-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.sp-header,
.tw-header,
.st-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--md-sys-color-primary);
}

/* Steam Widget Specifics */
.st-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    color: var(--md-sys-color-on-surface);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) var(--transition-ease);
    margin-bottom: 8px;
    text-decoration: none;
}

.st-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Default Icon Style (Square) */
.st-cover-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Game Banner Style (Wide) */
.st-cover-game {
    width: 110px;
    height: auto;
    aspect-ratio: 460 / 215;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.st-info {
    flex-grow: 1;
    overflow: hidden;
}

.st-game {
    font-family: "bahnschrift", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    display: block;
    transition: color var(--transition-speed);
}

.st-game:hover {
    color: var(--md-sys-color-primary);
    text-decoration: underline;
}

.st-playtime {
    display: block;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.8;
    margin-top: 2px;
}

.sp-status-stopped {
    color: var(--md-sys-color-on-surface-variant);
}

.sp-connection-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-left: auto;
    /* Push to the right */
    background-color: var(--md-sys-color-on-surface-variant);
    /* Default/Polling (Gray) */
    opacity: 0.5;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.sp-connection-dot.live {
    background-color: #3ba55c;
    /* Discord Green */
    opacity: 1;
    box-shadow: 0 0 4px #3ba55c;
}

.sp-content {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.st-status {
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
    display: flex;
    align-items: center;
    gap: 6px;
}

.st-status strong {
    color: var(--md-sys-color-primary);
    font-weight: 600;
}

.sp-status-playing,
.tw-status-travelling,
.st-status-playing {
    color: #1DB954;
}

.sp-status-stopped,
.tw-status-stopped,
.st-status-stopped,
.st-status-offline {
    color: var(--md-sys-color-on-surface-variant);
    opacity: 0.8;
}

.st-status-online {
    color: #64C7F0;
    /* Green but distinct from Playing if needed, or same */
}

.sp-icon,
.tw-icon,
.st-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.sp-icon-playing,
.tw-icon-travelling,
.st-icon-playing {
    background-color: #1DB954;
    position: relative;
    z-index: 1;
}

.sp-icon-playing::after,
.tw-icon-travelling::after,
.st-icon-playing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: #1DB954;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.sp-icon-stopped,
.tw-icon-stopped,
.st-icon-stopped,
.st-icon-offline {
    background-color: var(--md-sys-color-on-surface-variant);
    opacity: 0.7;
}

.st-icon-online {
    background-color: #64C7F0;
    /* No pulse */
}

.sp-icon-loading,
.tw-icon-loading,
.st-icon-loading {
    width: 10px;
    height: 10px;
    border: 2px solid var(--md-sys-color-surface-variant);
    border-top-color: var(--md-sys-color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Spotify Content */
.sp-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-cover {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sp-info {
    flex-grow: 1;
    overflow: hidden;
}

.sp-track {
    font-family: "bahnschrift", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    display: block;
    transition: color var(--transition-speed);
}

.sp-track:hover {
    color: var(--md-sys-color-primary);
    text-decoration: underline;
}

.sp-artist {
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color var(--transition-speed);
}

.sp-artist:hover {
    color: var(--md-sys-color-primary);
    text-decoration: underline;
}

.sp-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
}

.sp-progress-bar {
    flex-grow: 1;
    height: 4px;
    background-color: var(--md-sys-color-surface-variant);
    border-radius: 999px;
    overflow: hidden;
}

.sp-progress-fill {
    height: 100%;
    background-color: var(--md-sys-color-primary);
    border-radius: 999px;
    transition: width 1s linear;
}

/* Travelling Widget Layout */
.tw-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tw-cover-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.tw-info {
    flex-grow: 1;
    overflow: hidden;
    width: 100%;
    /* Ensure it takes available space */
}

/* Travel Widget Extras */
.tw-tablewrap {
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
}

.tw-tablewrap::-webkit-scrollbar {
    display: none;
}

.tw-wide {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.tw-cell {
    width: 33.333%;
    vertical-align: middle;
    padding: 0 4px;
    font-size: 0.9rem;
}

.tw-cell.center {
    text-align: center;
}

.tw-linelabel {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: .2px;
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.tw-bigger {
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-block;
    line-height: 1.2;
    color: var(--md-sys-color-on-surface);
}

.tw-cell small {
    display: block;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.75rem;
    margin-top: 2px;
    line-height: 1.2;
}

.tw-progress {
    width: 100%;
    height: 4px;
    background-color: var(--md-sys-color-surface-variant);
    border-radius: 999px;
    overflow: hidden;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 4px;
    /* Reduced from 8px */
}

.tw-progressbar {
    height: 100%;
    width: 0;
    background-color: var(--md-sys-color-primary);
    transition: width 0.5s ease;
}

.tw-title {
    text-align: center;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
}

.tw-msg {
    text-align: center;
    font-size: 0.9rem;
    color: var(--md-sys-color-error, #B3261E);
}

/* ========== MOBILE RESPONSIVE STYLES ========== */
@media (max-width: 768px) {

    /* 1. Body & Wrappers: Align top, allow flow */
    body,
    .main-wrapper {
        align-items: flex-start;
        display: block;
        /* Remove flex centering from body */
        min-height: auto;
    }

    .main-wrapper {
        display: flex;
        flex-direction: column;
    }

    /* 2. Toggle Button */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1100;
        background-color: var(--md-sys-color-surface);
        color: var(--md-sys-color-on-surface);
        border: 1px solid var(--md-sys-color-outline);
        border-radius: 12px;
        width: 48px;
        height: 48px;
        cursor: pointer;
        box-shadow: var(--card-shadow);
        transition: all var(--transition-speed) var(--transition-ease);
    }

    .mobile-menu-toggle:hover {
        background-color: var(--md-sys-color-surface-variant);
        transform: scale(1.05);
    }

    .mobile-menu-toggle .icon {
        width: 28px;
        height: 28px;
    }

    /* 3. Sidebar */
    .sidebar {
        width: 280px;
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        border-right: 1px solid var(--md-sys-color-outline);
        border-top: none;
        z-index: 1200;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
        padding: 24px;
        height: 100vh;
    }

    /* On mobile keep the same translucent glass and rounded right corners so the
       sidebar appearance is consistent across desktop and mobile. */
    .sidebar {
        border-radius: 0 20px 20px 0;
        background-color: var(--card-bg);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-right: 1px solid var(--card-border);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-speed);
        backdrop-filter: blur(4px);
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 4. Content Area */
    .content-area {
        margin-left: 0;
        margin-bottom: 0;
        padding: 0;
        padding-top: 0;
        /* Reset */
        min-height: auto;
        display: block;
        /* Important: use block flow */
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* 5. Container: Top aligned, width 100% */
    .container {
        padding-top: 20px;
        /* Align with hamburger */
        padding-bottom: 100px;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        /* Override desktop 800px */
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Center children (profile, cards) */
        justify-content: flex-start;
        min-height: auto;
    }

    /* 6. Content Section - Reset min-height */
    .content-section {
        min-height: auto;
        display: none;
    }

    .content-section.active {
        display: block;
        /* Keep block display to allow container to center */
    }

    .content-section.full-height {
        height: 100vh;
        min-height: 100vh;
    }

    /* 7. Link Cards Stack */
    .links-container {
        width: 100%;
        /* removed align-items: center to allow children to stretch */
    }

    .links-row {
        flex-direction: column;
        /* removed align-items: center to allow children to stretch */
    }

    .links-row .link-card {
        width: 100%;
        max-width: 400px;
        /* Nice max width for mobile */
        flex: none;
        margin: 0 auto;
        /* Force centering */
    }

    /* 8. Unified Card Widths */
    .sp-card,
    .st-card,
    .tw-card,
    .dc-card,
    .equipment-group {
        width: 100%;
        max-width: 400px;
        margin: 0 auto 16px auto;
        box-sizing: border-box;
    }

    /* 9. Equipment Grid Reset */
    .equipment-list-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    /* 10. Sticky Footer - Mobile Override */
    .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        border-bottom: none;
        border-left: none;
        border-right: none;
        z-index: 1000;
        padding: 12px 20px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        background-color: var(--card-bg);
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
    }

    .footer-theme-toggle {
        order: -1;
    }
}

/* Discord Widget */
.dc-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    color: var(--md-sys-color-on-surface);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) var(--transition-ease);
    margin-bottom: 8px;
    text-decoration: none;
}

.dc-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
    background-color: var(--md-sys-color-surface);
}

.dc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.dc-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dc-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dc-activity-image {
    width: 110px;
    height: 110px;
    border-radius: 12px;
    /* Slightly larger radius for larger image */
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dc-no-activity {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dc-info {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dc-username {
    font-family: "bahnschrift", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--md-sys-color-on-surface);
}

.dc-activity {
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dc-icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.dc-status-online {
    color: #3ba55c;
}

.dc-status-idle {
    color: #faa61a;
}

.dc-status-dnd {
    color: #ed4245;
}

.dc-status-offline {
    color: var(--md-sys-color-on-surface-variant);
    opacity: 0.8;
}

.dc-icon-online {
    background-color: #3ba55c;
}

.dc-icon-idle {
    background-color: #faa61a;
}

.dc-icon-dnd {
    background-color: #ed4245;
}

.dc-icon-offline {
    background-color: var(--md-sys-color-on-surface-variant);
    opacity: 0.7;
}

/* Music Playlist */
#music-playlist {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 600px;
}

/* GitHub Widget */
#github-section .container {
    max-width: 800px;
    /* Wider for commits */
}

#github-widget {
    width: 100%;
}

.gh-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: var(--card-shadow);
}

.gh-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
}

.gh-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gh-repo-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
}

.gh-repo-name:hover {
    text-decoration: underline;
}

.gh-desc {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 1rem;
    line-height: 1.5;
}

.gh-stats {
    display: none;
    /* Hidden as per request */
}

/* Language Bar */
.gh-languages {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gh-section-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 4px;
}

.gh-lang-bar {
    display: flex;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
}

.gh-lang-segment {
    height: 100%;
}

.gh-lang-segment:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.gh-lang-segment:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.gh-lang-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4px;
}

.gh-lang-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
}

.gh-lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.gh-lang-pct {
    color: var(--md-sys-color-outline);
}

.gh-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gh-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--md-sys-color-on-surface);
}

.gh-commits-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gh-commit-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    border: 1px solid transparent;
}

.gh-commit-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.gh-commit-msg {
    font-family: 'JetBrains Mono', monospace;
    /* Code font if available */
    font-size: 0.95rem;
    color: var(--md-sys-color-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
    /* Allow msg to take available space */
}

.gh-commit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.gh-commit-stats {
    display: flex;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.gh-stats-add {
    color: #238636;
    /* GitHub Green */
}

.gh-stats-del {
    color: #da3633;
    /* GitHub Red/Orange */
}

.gh-commit-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--md-sys-color-on-surface-variant);
}

.gh-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px;
    color: var(--md-sys-color-on-surface-variant);
}

.gh-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--md-sys-color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Playlist Styles */
.playlist-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) var(--transition-ease);
}

.playlist-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
    background-color: var(--md-sys-color-surface);
}

.playlist-cover {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.playlist-info {
    flex-grow: 1;
    overflow: hidden;
}

.playlist-title {
    font-family: "bahnschrift", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-artist {
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 2px;
}

.playlist-album {
    font-size: 0.8rem;
    color: var(--md-sys-color-outline);
    font-style: italic;
}

.playlist-action {
    opacity: 0;
    transition: all var(--transition-speed);
    transform: translateX(-10px);
    color: var(--md-sys-color-primary);
}

.playlist-item:hover .playlist-action {
    opacity: 1;
    transform: translateX(0);
}