: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(255, 255, 255, 0.5);
    --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(200, 50, 50, 0.8), rgba(50, 100, 200, 0.8), rgba(180, 50, 200, 0.8));
}

[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-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.1);
    --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(20, 10, 10, 0.95), rgba(10, 20, 40, 0.95), rgba(20, 10, 30, 0.95));
}

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

body {
    font-family: 'Roboto', 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;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Gradient overlay on top of the image */
    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);
    /* Blur the background image */
    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%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--md-sys-color-surface);
    border-right: 1px solid var(--md-sys-color-outline);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-speed) var(--transition-ease);
}

.sidebar-header {
    margin-bottom: 32px;
}

.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: 'Outfit', 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;
}

.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 .material-symbols-rounded {
    font-size: 24px;
}

.sidebar-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--md-sys-color-outline);
}

.sidebar-theme-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    color: var(--md-sys-color-on-surface-variant);
    transition: all var(--transition-speed) var(--transition-ease);
}

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

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

.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 Adjustments */
.container {
    width: 100%;
    max-width: 800px;
    padding: 60px 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* 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);
}

/* Nested lists */
.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);
}

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

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

/* --- Restored Styles --- */

/* 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 .material-symbols-rounded {
    font-size: 64px;
}

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

.profile-name {
    font-family: 'Outfit', 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%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.links-row {
    display: flex;
    gap: 16px;
    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;
}

@media (max-width: 480px) {
    .links-row {
        flex-direction: column;
    }
}

/* 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;
    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);
}

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

.link-text {
    flex-grow: 1;
    text-align: center;
    font-family: 'Outfit', 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);
}

/* 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: transform var(--transition-speed) var(--transition-ease),
        box-shadow var(--transition-speed) var(--transition-ease),
        background-color var(--transition-speed) var(--transition-ease),
        color 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 .material-symbols-rounded {
    font-size: 24px;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 20px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

/* --- Travel Widget Styles --- */
.tw-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    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: transform var(--transition-speed) var(--transition-ease),
        box-shadow var(--transition-speed) var(--transition-ease),
        background-color var(--transition-speed) var(--transition-ease);
    margin-bottom: 8px;
    text-decoration: none;
}

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

.tw-headline {
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--md-sys-color-primary);
    text-align: center;
    margin-bottom: 4px;
}

.tw-tablewrap {
    overflow-x: auto;
    width: 100%;
}

.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;
    margin-top: 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);
}

/* Responsive */
@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column-reverse;
        /* Sidebar at bottom for mobile */
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        flex-direction: row;
        padding: 12px;
        border-right: none;
        border-top: 1px solid var(--md-sys-color-outline);
        justify-content: space-around;
        z-index: 1000;
    }

    .sidebar-header,
    .sidebar-footer {
        display: none;
        /* Hide header and footer on mobile nav */
    }

    .sidebar-menu {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }

    .sidebar-link {
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        font-size: 0.8rem;
        text-align: center;
    }

    .sidebar-link .material-symbols-rounded {
        font-size: 24px;
    }

    .sidebar-text {
        font-size: 0.75rem;
    }

    .content-area {
        margin-left: 0;
        margin-bottom: 80px;
        /* Space for bottom nav */
        min-height: calc(100vh - 80px);
    }

    .content-section.full-height {
        height: calc(100vh - 80px);
    }
}

/* --- 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);
}

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

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

/* --- Spotify Widget Styles --- */
.sp-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: transform var(--transition-speed) var(--transition-ease),
        box-shadow var(--transition-speed) var(--transition-ease);
    margin-bottom: 8px;
}

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

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

.sp-status-playing {
    color: #1DB954;
    /* Spotify Green */
}

.sp-status-stopped {
    color: var(--md-sys-color-on-surface-variant);
    /* Grey */
    opacity: 0.8;
}

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

.sp-icon-playing {
    background-color: #1DB954;
    /* Spotify Green */
    position: relative;
    z-index: 1;
}

.sp-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: spotify-pulse 2s infinite;
}

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

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

.sp-icon-stopped {
    background-color: var(--md-sys-color-on-surface-variant);
    /* Grey */
    opacity: 0.7;
    animation: none;
}

.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: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--md-sys-color-on-surface);
}

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

.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;
}