@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Light Theme & Clean Academic Aesthetics */
:root {
    --f7-theme-color: #ffffff;
    /* White/Grey Theme */
    --f7-theme-color-rgb: 255, 255, 255;
    --f7-theme-color-shade: #dddddd;
    --f7-theme-color-tint: #ffffff;

    /* App Bar Colors (Dark Grey) */
    --f7-bars-bg-color: #2c2c2c;
    --f7-bars-bg-color-rgb: 44, 44, 44;
    --f7-bars-text-color: #ffffff;

    /* Backgrounds */
    --bg-color: #1e1e1e;
    /* Dark Charcoal */
    --text-primary: #ffffff;
    /* White */
    --text-secondary: #cccccc;
    /* Light Grey */
    --divider-color: #444444;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
}

/* Enhancing Heading Contrast */
h1,
h2,
h3,
.title,
.item-title {
    color: #ffffff;
    letter-spacing: -0.01em;
}

/* Background Pattern/Image */
.page-content {
    background-color: #1a1a1a;
    /* Even darker for content area */
    background-image: none;
    padding-bottom: 80px !important;
}

/* Navbar (Top) & Toolbar (Bottom) Styling */
.navbar {
    background: #2c2c2c;
    /* Dark Grey */
    color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar .title,
.navbar .link,
.navbar .icon,
.home-link {
    color: #ffffff !important;
    text-decoration: none !important;
}

.home-link:hover {
    text-decoration: none !important;
    color: #ffffff !important;
    opacity: 0.8;
}

.toolbar.tabbar {
    background: #2c2c2c;
    /* Dark Grey */
    color: rgba(255, 255, 255, 0.7);
}

.toolbar .tab-link {
    color: rgba(255, 255, 255, 0.6);
}

.toolbar .tab-link-active {
    color: #ffffff !important;
    background: transparent !important;
}

.navbar:after {
    background-color: transparent !important;
    /* Remove hairlines */
}

.tabbar .tab-link-active {
    color: #ffffff !important;
    background: transparent !important;
}

/* Remove default blue/highlight from Framework7 */
.tab-link-active:before,
.tab-link-active:after,
.tab-link-highlight {
    display: none !important;
    background: transparent !important;
}

.tabbar .tab-link-active .icon,
.tabbar .tab-link-active .tabbar-label {
    color: #ffffff !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* Completely kill the MD pill/highlight */
.tabbar .tab-link-active .icon:before,
.tabbar .tab-link-active .icon:after,
.tabbar .tab-link-active:after,
.tabbar .tab-link-active:before {
    display: none !important;
    content: none !important;
    background: transparent !important;
}

.tabbar-label {
    font-weight: 600;
    font-size: 11px;
}

/* Typography */
h1 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2em;
}

h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-top: 2em;
    margin-bottom: 1em;
    border-bottom: 2px solid #555555;
    /* Neutral Deep Grey */
    display: inline-block;
    padding-bottom: 5px;
}

p {
    color: var(--text-secondary);
    font-size: 16px;
    /* Slightly increased */
    line-height: 1.8;
    /* Increased for readability */
    margin-bottom: 1.5em;
    font-weight: 400;
}

li {
    line-height: 1.8;
    margin-bottom: 0.6em;
}

a {
    color: #ffffff;
    /* Pure White for links in Dark Mode */
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: all 0.2s ease;
    opacity: 0.9;
}

a:hover {
    color: #ffffff;
    opacity: 1;
    text-decoration-thickness: 2px;
}

/* Media Item Filters (Monochromatic thumbnails) */
.item-media img {
    filter: grayscale(100%) brightness(0.7);
    transition: all 0.4s ease;
    border-radius: 6px;
}

.item-link:hover .item-media img,
.item-link-active .item-media img {
    filter: grayscale(0%) brightness(1);
}

/* Post Detail Styles for Dark Mode */
#post-display-body {
    color: #cccccc;
    font-size: 16px;
    line-height: 1.8;
}

#post-display-body h1,
#post-display-body h2,
#post-display-body h3,
#post-display-body h4 {
    color: #ffffff !important;
}

#post-display-body blockquote {
    border-left: 4px solid #555555;
    background: rgba(255, 255, 255, 0.05);
    color: #aaaaaa;
    padding: 10px 20px;
    font-style: italic;
}

#post-display-title {
    color: #ffffff !important;
}

#post-display-date {
    color: #aaaaaa !important;
}

/* Profile Section (Quarto Style) */
.profile-header {
    text-align: center;
    padding: 40px 20px 20px;
    background: transparent;
    border: none;
}

/* List and Item Styling for Dark Mode */
.item-title {
    color: #ffffff !important;
}

.item-subtitle,
.item-text {
    color: #aaaaaa !important;
}

.list,
.item-content {
    background-color: transparent !important;
}

.item-inner:after,
.list ul:before,
.list ul:after {
    background-color: var(--divider-color) !important;
    /* Use dark divider */
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 24px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.profile-name {
    font-size: 1.8rem;
    margin-top: 20px;
}

/* Full Width Image for About Page */
.about-profile-img-full {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    margin-top: 20px;
    /* Space from navbar */
    margin-bottom: 25px;
    display: block;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.8);
}

/* Floating Portrait for About Page bottom */
.portrait-floating-img {
    float: right;
    width: 120px;
    height: 120px;
    border-radius: 15px;
    margin-left: 20px;
    margin-bottom: 10px;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.8);
}

@media (max-width: 480px) {
    .portrait-floating-img {
        float: none;
        display: block;
        margin: 0 auto 15px;
        width: 140px;
        height: 140px;
    }
}

/* Floating Book Cover for Resources Page */
.book-cover-img {
    float: right;
    width: 120px;
    border-radius: 8px;
    margin-left: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    filter: grayscale(100%) brightness(0.7);
}

.book-cover-img:hover {
    transform: scale(1.05);
    filter: grayscale(0%) brightness(1);
}

@media (max-width: 630px) {
    .book-cover-img {
        float: none;
        display: block;
        margin: 0 auto 20px;
        width: 140px;
    }
}

.profile-role {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Social Icons Row */
.profile-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.profile-social a {
    color: var(--text-secondary);
    font-size: 24px;
    transition: color 0.2s;
}

.profile-social a:hover {
    color: var(--f7-theme-color);
}


/* Clean Lists (No Cards) */
.clean-list {
    list-style: none;
    padding: 0;
}

.clean-list-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--divider-color);
    background: #fff;
    transition: background 0.2s;
}

.clean-list-item:last-child {
    border-bottom: none;
}

.clean-list-item:hover {
    background: var(--bg-color-alt);
}

.item-media img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    margin-right: 15px;
    object-fit: cover;
    border: 1px solid #eee;
}

.item-inner {
    flex: 1;
}

.item-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    margin: 0;
}

.item-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

/* Text Block Container */
.text-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hide Scrollbar but allow scroll */
.page-content::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Splash Screen Styles */
.splash-page {
    background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.45));
    background-size: cover;
    background-position: center;
    color: white !important;
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    text-align: left;
    height: 100%;
    padding: 40px;
}

.splash-content {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    border: none;
    max-width: 380px;
    width: auto;
    animation: fadeInSlide 1.5s ease-out;
    box-shadow: none;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

.splash-name {
    font-family: 'Alex Brush', cursive !important;
    font-size: 3rem !important;
    margin: 0 !important;
    color: #fff !important;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    line-height: 1.1;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .splash-page {
        padding: 25px;
    }

    .splash-name {
        font-size: 2.5rem !important;
    }

    .splash-role {
        font-size: 0.85rem !important;
        letter-spacing: 1.5px !important;
    }

    .splash-social a {
        font-size: 1.5rem !important;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .splash-name {
        font-size: 2.1rem !important;
    }
}

.splash-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 12px 0 18px 0;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

.splash-social {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.splash-social a {
    color: white;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    opacity: 0.85;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.splash-social a:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.splash-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 20px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease !important;
    font-size: 0.75rem !important;
    display: inline-block;
    width: auto !important;
    box-shadow: none !important;
}

.splash-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

.home-page-splash .navbar {
    display: none;
}

.home-page-splash .page-content {
    padding-top: 0 !important;
    overflow: hidden;
}