/* ===== CSS VARIABLES ===== */
:root {
    /* Light Theme - Premium Apple Style */
    --bg-primary: #ffffff;
    --bg-secondary: #fbfbfd;
    --bg-tertiary: #f5f5f7;
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #fbfbfd 100%);
    --bg-gradient-accent: linear-gradient(135deg, #0071e3 0%, #2997ff 100%);
    --text-primary: #1d1d1f;
    --text-secondary: #424245;
    --text-tertiary: #86868b;
    --accent-primary: #0071e3;
    --accent-secondary: #2997ff;
    --accent-glow: rgba(0, 113, 227, 0.15);
    --border-color: #e5e5e7;
    --border-light: #f2f2f7;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing */
    --section-padding: 8rem 0;
    --container-max-width: 1280px;
    --border-radius: 20px;
    --border-radius-lg: 28px;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Header */
    --header-height: 80px;
}

/* Dark Theme - Premium Dark Mode */
.dark-mode {
    --bg-primary: #000000;
    --bg-secondary: #1d1d1f;
    --bg-tertiary: #2c2c2e;
    --bg-gradient: linear-gradient(135deg, #000000 0%, #1d1d1f 100%);
    --bg-gradient-accent: linear-gradient(135deg, #2997ff 0%, #0071e3 100%);
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #6e6e73;
    --accent-primary: #2997ff;
    --accent-secondary: #0071e3;
    --accent-glow: rgba(41, 151, 255, 0.2);
    --border-color: #424245;
    --border-light: #2c2c2e;
    --card-bg: rgba(30, 30, 32, 0.7);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(30, 30, 32, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-regular);
    color: var(--text-primary);
    background: var(--bg-gradient);
    line-height: 1.6;
    transition: var(--transition-slow);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-weight-semibold);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 4rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.75rem;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: var(--accent-primary);
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 92%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: var(--section-padding);
    position: relative;
}

/* ===== PREMIUM BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    background: var(--bg-gradient-accent);
    color: white;
    border-radius: var(--border-radius-lg);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.7s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px var(--accent-glow);
}

.btn:hover::before {
    left: 100%;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

/* ===== GLASS MORPHISM HEADER ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: var(--transition-slow);
}

header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo p {
    font-size: 0.85rem;
    margin-bottom: 0;
    color: var(--text-tertiary);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    z-index: 1001;
    background: var(--glass-bg);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--bg-tertiary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links li a {
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    position: relative;
    padding: 0.5rem 0;
    font-size: 1rem;
}

.nav-links li a:hover {
    color: var(--text-primary);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bg-gradient-accent);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(20px);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: rotate(15deg);
}

/* ===== LUXURY HERO SECTION ===== */
.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 8rem;
    background: var(--bg-gradient);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.6;
    animation: float 8s ease-in-out infinite;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(
        135deg,
        var(--text-primary) 0%,
        var(--accent-primary) 50%,
        var(--text-secondary) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    max-width: 600px;
    font-weight: var(--font-weight-light);
}

.hero-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow-hover);
    transform: perspective(1000px) rotateY(-8deg) rotateX(5deg);
    transition: var(--transition-slow);
    border: 1px solid var(--glass-border);
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, var(--accent-glow), transparent);
    opacity: 0;
    transition: var(--transition-slow);
    z-index: 1;
}

.hero-image:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
    box-shadow: 0 24px 80px var(--accent-glow);
}

.hero-image:hover::before {
    opacity: 1;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-slow);
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* ===== PREMIUM BIOGRAPHY SECTION ===== */
.biography {
    background: var(--bg-secondary);
    position: relative;
}

.biography::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.bio-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.bio-image {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    position: relative;
    transform: translateY(0);
    transition: var(--transition);
}

.bio-image:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
}

.bio-image img {
    width: 100%;
    height: auto;
    transition: var(--transition);
}

.bio-image:hover img {
    transform: scale(1.05);
}

.bio-text {
    padding: 2rem 0;
}

.bio-text h3 {
    color: var(--text-primary);
    margin-top: 3rem;
    position: relative;
    padding-bottom: 1rem;
    font-weight: var(--font-weight-semibold);
}

.bio-text h3:first-child {
    margin-top: 0;
}

.bio-text h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--bg-gradient-accent);
    border-radius: 2px;
}

/* ===== LUXURY BOOKS SECTION ===== */
.books {
    background: var(--bg-primary);
    position: relative;
    padding: 5rem 0;
}

.books::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.book-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.book-cover {
    height: 250px;
    overflow: hidden;
    position: relative;
    background: var(--bg-tertiary); /* Fallback background */
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, var(--bg-primary));
    opacity: 0.3;
    z-index: 1;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-info h3 {
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.4;
    color: var(--text-primary);
    font-weight: 600;
}

.book-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.btn-outline {
    padding: 0.5rem 1rem;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    background: transparent;
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

/* ===== PREMIUM ARTICLES SECTION ===== */
.articles {
    background: var(--bg-primary);
    position: relative;
}

.articles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.article-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.article-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.excerpt {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.read-more {
    font-weight: var(--font-weight-semibold);
    color: var(--accent-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    transition: var(--transition);
}

.read-more::after {
    content: '→';
    transition: var(--transition);
}

.read-more:hover {
    gap: 1rem;
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* ===== LUXURY VIDEOS SECTION ===== */

.view-all {
    text-align: center;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.videos-grid iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.view-all {
    text-align: center;
    margin-top: 2rem;
}

.view-all .btn {
    background-color: #cc0000;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.view-all .btn:hover {
    background-color: #ff0000;
}

/* ===== LUXURY CONTACT SECTION ===== */
.contact {
    background: var(--bg-secondary);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.contact-info h3 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-info i {
    color: var(--accent-primary);
    width: 24px;
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--card-bg);
    border-radius: 50%;
    color: var(--accent-secondary);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
    text-decoration: none; /* optional, to remove underline */
}

.social-links a:hover {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 12px 32px var(--accent-glow);
}

/* Make icons inherit link color */
.social-links a i {
    font-size: 20px;
    color: inherit;
    transition: var(--transition);
}

/* ===== PREMIUM FOOTER ===== */
footer {
    background: var(--bg-primary);
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-section h3 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 1.3rem;
}

.footer-section p {
    opacity: 0.8;
    font-size: 1rem;
    line-height: 1.7;
}

.footer-section.links ul {
    list-style: none;
}

.footer-section.links li {
    margin-bottom: 1rem;
}

.footer-section.links a {
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 1rem;
}

.footer-section.links a:hover {
    color: var(--accent-primary);
    padding-left: 8px;
}

.footer-section.newsletter input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 1rem;
}

.footer-section.newsletter input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-tertiary);
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .hero-container {
        gap: 4rem;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .hero-container,
    .bio-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .hero-content {
        text-align: center;
        order: 2;
    }

    .hero-image {
        order: 1;
        transform: none;
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-image:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: blur(40px);
        flex-direction: column;
        padding: 8rem 2rem 2rem;
        transition: var(--transition-slow);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
        border-left: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
    }

    .theme-toggle {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        z-index: 1002;
    }

    .books-grid,
    .lectures-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .lecture-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .container {
        width: 95%;
    }

    section {
        padding: 5rem 0;
    }
}
