/* ================================
   SEETHALA DEVI CHANDU - COMPLETE RESPONSIVE STYLES
   Clean CSS with Fixed Animations Removed
   ================================ */

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

:root {
    --royal-purple: #4a148c;
    --deep-purple: #6a1b9a;
    --royal-blue: #1a237e;
    --gold: #ffd700;
    --dark-gold: #b8860b;
    --burgundy: #800020;
    --cream: #fffdd0;
    --ivory: #fffff0;
    --charcoal: #1a1a1a;
}

[data-theme="dark"] {
    --bg-primary: #0f0a1e;
    --bg-secondary: #1a1333;
    --text-primary: #f5f5f5;
    --text-secondary: #d0d0d0;
    --accent-1: #ffd700;
    --accent-2: #9c27b0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 215, 0, 0.3);
    --hero-bg-gradient: linear-gradient(135deg, #0f0a1e 0%, #1a1333 100%);
}

[data-theme="light"] {
    --bg-primary: #faf8f5;
    --bg-secondary: #f0ede6;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --accent-1: #4a148c;
    --accent-2: #b8860b;
    --card-bg: #ffffff;
    --border-color: rgba(74, 20, 140, 0.2);
    --hero-bg-gradient: linear-gradient(135deg, #faf8f5 0%, #f0ede6 100%);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background 0.35s ease, color 0.35s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    max-width: 100vw;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-1);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100000;
}

.skip-link:focus {
    top: 0;
}

/* === WELCOME BOOK ANIMATION === */
.book-welcome {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(180deg, #05060a 0%, #0b1220 60%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 3000px;
    overflow: hidden;
    padding: 3rem 1.5rem;
}

.book-welcome.hidden {
    animation: fadeOutBook 1s forwards;
}

@keyframes fadeOutBook {
    to {
        opacity: 0;
        pointer-events: none;
        display: none;
    }
}

#welcome-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 1;
    transition: opacity 1s ease-out;
}

.skip-button {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 999999;
    padding: 12px 24px;
    border-radius: 50px;
    border: 2px solid var(--gold);
    background: rgba(0, 0, 0, 0.8);
    color: var(--gold);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'EB Garamond', serif;
    letter-spacing: 1px;
}

.skip-button:hover {
    background: var(--gold);
    color: #111;
    transform: scale(1.05);
}

.book-3d-container {
    width: 90vw;
    height: 75vh;
    max-width: 1200px;
    max-height: 700px;
    position: relative;
    transform-style: preserve-3d;
    animation: bookEntrance 1.5s ease-out;
    z-index: 2;
    margin: auto;
}

@keyframes bookEntrance {
    from {
        transform: translateZ(-1000px) rotateY(-45deg) scale(0.3);
        opacity: 0;
    }
    to {
        transform: translateZ(0) rotateY(0deg) scale(1);
        opacity: 1;
    }
}

/* === SDC LOGO ON COVER === */
.sdc-logo-container {
    position: absolute;
    width: 180px;
    height: 180px;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden !important;
    transform-style: flat !important;
    z-index: 1001;
}

.book-cover.opened .sdc-logo-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.sdc-circle {
    position: absolute;
    animation: rotateCircle 20s linear infinite;
    backface-visibility: hidden !important;
}

@keyframes rotateCircle {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotating-text {
    fill: var(--gold);
    font-family: 'EB Garamond', serif;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.sdc-center {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 8px;
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    backface-visibility: hidden !important;
    transform-style: flat !important;
}

.sdc-letter {
    display: inline-block;
    animation: letterPulse 3s ease-in-out infinite;
}

.sdc-s {
    color: #ffd700;
    animation-delay: 0s;
}

.sdc-d {
    color: #ff69b4;
    animation-delay: 0.3s;
}

.sdc-c {
    color: #00bfff;
    animation-delay: 0.6s;
}

@keyframes letterPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 10px currentColor;
    }
    50% {
        transform: scale(1.2);
        text-shadow: 0 0 25px currentColor, 0 0 40px currentColor;
    }
}

/* === BOOK COVER === */
.book-cover {
    position: absolute;
    width: 50%;
    height: 100%;
    right: 0;
    top: 0;
    background: linear-gradient(135deg, #2d1810 0%, #1a0f08 100%);
    border: 10px solid var(--gold);
    border-radius: 15px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8),
                inset 0 0 40px rgba(0, 0, 0, 0.6),
                inset 0 0 100px rgba(139, 69, 19, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    transform-style: preserve-3d;
    transform-origin: left center;
    backface-visibility: hidden;
    transition: transform 1.2s cubic-bezier(0.6, 0.02, 0.4, 1);
    z-index: 1000;
}

.book-cover.opened {
    transform: rotateY(-180deg);
}

.book-cover.closing {
    transform: rotateY(0deg);
    transition-delay: 0.5s;
}

.book-title-main {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    font-weight: 900;
    color: var(--gold);
    text-align: center;
    margin-top: 240px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5),
                 0 0 25px rgba(255, 215, 0, 0.4),
                 3px 3px 0 rgba(139, 69, 19, 0.8);
    letter-spacing: 6px;
    line-height: 1.1;
}

.book-subtitle-main {
    font-family: 'EB Garamond', serif;
    font-size: clamp(0.95rem, 1.6vw, 1.5rem);
    color: #e8c547;
    font-style: italic;
    margin-top: 1.2rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(232, 197, 71, 0.5);
}

/* === BOOK PAGE LEFT WITH SDC LOGO === */
.book-page-left {
    position: absolute;
    width: 50%;
    height: 100%;
    left: 0;
    top: 0;
    background: var(--ivory);
    border: 1px solid rgba(0,0,0,0.2);
    box-shadow: inset 15px 0 30px rgba(0, 0, 0, 0.15);
    border-radius: 10px 0 0 10px;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.book-page-left .sdc-logo-container {
    display: flex !important;
    position: relative;
    top: auto;
    left: auto;
    transform: none !important;
    backface-visibility: visible !important;
}

.book-page-left .page-inner {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .book-page-left {
    background: #1a1a1a;
    box-shadow: inset 15px 0 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255,215,0,0.3);
}

[data-theme="dark"] .book-page-left .sdc-logo-container .rotating-text {
    fill: var(--gold);
}

/* === BOOK BACK COVER === */
.book-back-cover {
    position: absolute;
    width: 50%;
    height: 100%;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, #2d1810 0%, #1a0f08 100%);
    border: 10px solid var(--gold);
    border-radius: 10px 0 0 10px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
    transform: rotateY(0deg);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    z-index: 0;
    display: none;
}

/* === BOOK PAGES === */
.book-page {
    position: absolute;
    width: 50%;
    height: 100%;
    right: 0;
    top: 0;
    background: var(--ivory);
    border: 1px solid rgba(0,0,0,0.2);
    border-left: none;
    border-radius: 0 10px 10px 0;
    transform-origin: left center;
    backface-visibility: hidden;
    box-shadow: inset -15px 0 30px rgba(0, 0, 0, 0.1),
                0 30px 60px rgba(0, 0, 0, 0.5);
    display: none;
    overflow: hidden;
    transition: transform 1.2s cubic-bezier(0.6, 0.02, 0.4, 1);
    z-index: 10;
}

[data-theme="dark"] .book-page {
    background: #1a1a1a;
    border-color: rgba(255,215,0,0.3);
}

.book-page.active {
    display: block;
}

.book-page.flipping {
    transform: rotateY(-180deg);
    pointer-events: none;
}

.page-inner {
    position: relative;
    width: 100%;
    height: 100%;
    padding: clamp(1rem, 2.5vw, 2rem) clamp(0.8rem, 2vw, 1.5rem);
    overflow: hidden;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

[data-theme="dark"] .page-inner {
    border-color: var(--border-color);
}

body.welcome-active .page-inner {
    font-size: clamp(0.65rem, 1.8vw, 0.9rem);
    line-height: 1.35;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 2.2vw, 1.8rem);
    color: var(--burgundy);
    text-align: center;
    margin-bottom: clamp(0.6rem, 1.5vw, 1rem);
    border-bottom: 3px solid var(--gold);
    padding-bottom: clamp(0.4rem, 1vw, 0.7rem);
    flex-shrink: 0;
}

[data-theme="dark"] .page-title {
    color: var(--gold);
}

.page-content-text {
    font-family: 'Crimson Text', serif;
    font-size: clamp(0.7rem, 1.6vw, 0.95rem);
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
}

.page-content-text h3 {
    font-family: 'EB Garamond', serif;
    color: var(--royal-purple);
    margin: clamp(0.4rem, 1vw, 0.7rem) 0 clamp(0.2rem, 0.6vw, 0.3rem);
    font-size: clamp(0.8rem, 1.8vw, 1.1rem);
}

[data-theme="dark"] .page-content-text h3 {
    color: var(--accent-1);
}

.page-content-text p {
    margin-bottom: clamp(0.3rem, 0.8vw, 0.5rem);
}

.page-number {
    position: absolute;
    bottom: 12px;
    right: 20px;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--royal-purple);
}

[data-theme="dark"] .page-number {
    color: var(--gold);
}

/* === PROGRESS DOTS === */
#welcomeProgress {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 28px;
    z-index: 100000;
    display: flex;
    gap: 10px;
}

#welcomeProgress .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}

#welcomeProgress .dot.active {
    background: var(--gold);
    transform: scale(1.4);
    box-shadow: 0 6px 18px rgba(255,215,0,0.6);
}

/* === NAVIGATION === */
nav {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 9998;
    padding: 1.2rem 5%;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.1);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

nav.scrolled {
    padding: 0.8rem 5%;
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.2);
}

.nav-logo-animated {
    position: relative;
    width: 50px;
    height: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-logo-animated:hover {
    transform: scale(1.1) rotate(5deg);
}

.nav-sdc-circle {
    position: absolute;
    animation: rotateCircle 15s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.nav-rotating-text {
    fill: var(--accent-1);
    font-family: 'EB Garamond', serif;
    text-transform: uppercase;
}

.nav-sdc-center {
    position: relative;
    z-index: 10;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
    filter: drop-shadow(0 2px 10px rgba(255, 215, 0, 0.2));
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    flex: 1;
}

nav a {
    font-family: 'EB Garamond', serif;
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 2px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-2);
    transition: width 0.3s;
}

nav a:hover {
    color: var(--accent-2);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

nav a:hover::after {
    width: 100%;
}

.theme-toggle {
    position: relative;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-family: 'EB Garamond', serif;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.theme-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.theme-toggle span {
    font-size: 1.3rem;
}

.nav-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 2rem;
    color: var(--accent-1);
    background: none;
    border: none;
    padding: 0.5rem;
    flex-shrink: 0;
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg-primary);
    padding: 8rem 5% 6rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -400px;
    right: -400px;
    animation: heroGlow 8s ease-in-out infinite alternate;
}

.hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(156, 39, 176, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -300px;
    left: -300px;
    animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#stars, #stars2, #stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    background-image: radial-gradient(2px 2px at 20% 30%, var(--accent-1), transparent),
                      radial-gradient(2px 2px at 80% 70%, var(--accent-1), transparent),
                      radial-gradient(1px 1px at 50% 50%, var(--accent-2), transparent);
    background-size: 100% 100%;
    opacity: 0.4;
}

#stars {
    animation: animStar 50s linear infinite;
}

#stars2 {
    animation: animStar 100s linear infinite;
    transform: rotate(45deg);
}

#stars3 {
    animation: animStar 150s linear infinite;
    transform: rotate(90deg);
}

@keyframes animStar {
    from {
        transform: translateY(0px) rotate(0deg);
    }
    to {
        transform: translateY(-1000px) rotate(360deg);
    }
}

.royal-pattern {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    opacity: 0.05;
    pointer-events: none;
    background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.02) 0%, transparent 20%),
                      radial-gradient(circle at 80% 70%, rgba(255,255,255,0.015) 0%, transparent 18%);
    background-size: 200% 200%;
    animation: patternFloat 18s linear infinite;
}

@keyframes patternFloat {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 30% 40%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 1200px;
    padding: 0 2rem;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 7vw, 6rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 50%, var(--accent-1) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: 4px;
    animation: fadeInUp 1s ease-out, gradientFlow 8s ease infinite;
    filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.3));
}

@keyframes gradientFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero .subtitle {
    font-family: 'EB Garamond', serif;
    font-size: clamp(1rem, 2.5vw, 2.2rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 3px;
    animation: fadeInUp 1s ease-out 0.2s both;
    font-weight: 600;
}

.hero .tagline {
    font-family: 'Crimson Text', serif;
    font-size: clamp(0.9rem, 2vw, 1.8rem);
    color: var(--accent-2);
    font-style: italic;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.4s both;
    font-weight: 600;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === CTA BUTTONS === */
.cta-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
    margin-top: 2rem;
}

.btn {
    font-family: 'EB Garamond', serif;
    padding: 1.2rem 3.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--royal-purple) 0%, var(--royal-blue) 100%);
    color: var(--gold);
    box-shadow: 0 10px 40px rgba(74, 20, 140, 0.4);
    border: 2px solid var(--gold);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 50px rgba(74, 20, 140, 0.6);
    color: #FFD700 !important;
}

.btn-secondary {
    background: transparent;
    color: var(--accent-1);
    border: 3px solid var(--accent-1);
}

.btn-secondary:hover {
    background: var(--accent-1);
    color: #1a1a1a !important;
    transform: translateY(-5px) scale(1.05);
}

/* === SECTIONS === */
section {
    padding: 6rem 5%;
    position: relative;
    max-width: 100vw;
    overflow-x: hidden;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-family: 'EB Garamond', serif;
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 4rem;
    font-style: italic;
    font-weight: 500;
}

/* === DYNAMIC BACKGROUNDS === */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

#about {
    background: linear-gradient(270deg, var(--bg-secondary), var(--bg-primary), var(--bg-secondary));
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
}

#books {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary), var(--bg-primary));
    background-size: 400% 400%;
    animation: gradientBG 25s ease infinite;
}

#publications {
    background: linear-gradient(45deg, var(--bg-secondary), var(--bg-primary), var(--bg-secondary));
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
}

#contact {
    background: linear-gradient(315deg, var(--bg-primary), var(--bg-secondary), var(--bg-primary));
    background-size: 400% 400%;
    animation: gradientBG 25s ease infinite;
}

/* === ABOUT SECTION === */
.about-container {
    display: flex;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

.about-image {
    flex: 0 0 400px;
    position: relative;
}

.profile-photo {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    border: 8px solid var(--accent-1);
    transition: all 0.5s ease;
}

.profile-photo:hover {
    transform: scale(1.05) rotate(2deg);
    border-color: var(--accent-2);
    box-shadow: 0 40px 100px rgba(74, 20, 140, 0.6);
}

.about-content {
    flex: 1;
    font-family: 'Crimson Text', serif;
    line-height: 1.9;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: var(--text-primary);
}

.about-content p {
    margin-bottom: 1.8rem;
    text-align: justify;
}

/* === ENHANCED SOCIAL BUTTONS === */
.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.social-links a {
    font-family: 'EB Garamond', serif;
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s ease;
    padding: 1.2rem 2.8rem;
    border: 3px solid var(--accent-1);
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(135deg, rgba(74, 20, 140, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    box-shadow: 0 4px 15px rgba(74, 20, 140, 0.2);
}

.social-links a::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.4) 50%, transparent 70%);
    transform: rotate(0deg);
    transition: transform 0.6s ease;
    z-index: -1;
}

.social-links a:hover::after {
    transform: rotate(180deg);
}

.social-links a::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.5s ease;
    z-index: 2;
}

.social-links a:hover::before {
    left: 100%;
}

.social-links a:hover {
    color: #1a1a1a !important;
    background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(74, 20, 140, 0.6);
    border-color: var(--gold);
}

@keyframes socialPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(74, 20, 140, 0.2);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 215, 0, 0.4);
    }
}

.social-links a {
    animation: socialPulse 3s ease-in-out infinite;
}

/* === BOOKS SECTION - CLEAN (NO FLAME/BUTTERFLY ANIMATIONS) === */
.books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}



.book-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    border: 2px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 80px rgba(74, 20, 140, 0.5);
    border-color: var(--accent-2);
}

/* Allow canvas elements for Three.js butterflies and fireworks */
.book-card canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.book-card > * {
    position: relative;
    z-index: 10;
}

.book-card h3 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--accent-1);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.book-card .genre {
    font-family: 'EB Garamond', serif;
    color: var(--accent-2);
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.book-description {
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.book-cover-figure {
    margin: 0 0 2rem 0;
    text-align: center;
}

.book-cover-img {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 4px solid var(--accent-1);
    transition: all 0.5s ease;
}

.book-card:hover .book-cover-img {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 30px 80px rgba(74, 20, 140, 0.7);
    border-color: var(--accent-2);
}

.book-cover-caption {
    margin-top: 1rem;
    font-family: 'EB Garamond', serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.book-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-link {
    font-family: 'EB Garamond', serif;
    display: block;
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(74, 20, 140, 0.3) 0%, rgba(26, 35, 126, 0.3) 100%);
    border: 2px solid var(--accent-1);
    border-radius: 15px;
    color: var(--accent-1);
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    overflow: hidden;
    z-index: 11;
    box-shadow: 0 4px 15px rgba(74, 20, 140, 0.2);
}

.book-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: -1;
}

.book-link:hover::before {
    width: 400px;
    height: 400px;
}

.book-link:hover {
    color: #1a1a1a !important;
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 8px 30px rgba(74, 20, 140, 0.6);
    border-color: var(--gold);
}

.book-link.amazon {
    background: rgba(184, 134, 11, 0.2);
    border-color: var(--dark-gold);
    color: var(--dark-gold);
}

.book-link.amazon::before {
    background: var(--dark-gold);
}

.book-link.amazon:hover {
    color: white !important;
}

.book-link.sample {
    background: rgba(156, 39, 176, 0.2);
    border-color: var(--accent-2);
    color: var(--accent-2);
    font-weight: 700;
}

.book-link.sample::before {
    background: var(--accent-2);
}

.book-link.sample:hover {
    color: white !important;
}

/* === PUBLICATIONS SECTION === */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.publication-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    border-left: 8px solid var(--accent-1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.publication-card:hover::before {
    left: 100%;
}

.publication-card:hover {
    transform: translateX(15px);
    box-shadow: 0 20px 60px rgba(74, 20, 140, 0.4);
}

.publication-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    color: var(--accent-1);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.publication-card .venue {
    font-family: 'EB Garamond', serif;
    color: var(--accent-2);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
}

.publication-card .abstract {
    font-family: 'Crimson Text', serif;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
}

.publication-card a {
    font-family: 'EB Garamond', serif;
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    font-size: 1.15rem;
}

.publication-card a:hover {
    border-bottom-color: var(--accent-1);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* === CONTACT SECTION === */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3.5rem;
    border-radius: 25px;
    border: 3px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    font-family: 'EB Garamond', serif;
    display: block;
    margin-bottom: 0.8rem;
    color: var(--accent-1);
    font-weight: 700;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 20px rgba(74, 20, 140, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 180px;
}

.hidden {
    display: none;
}

/* === FOOTER === */
footer {
    background: var(--bg-secondary);
    padding: 3rem 5%;
    text-align: center;
    border-top: 3px solid var(--border-color);
}

footer p {
    font-family: 'EB Garamond', serif;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0.5rem 0;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
    nav ul {
        gap: 2rem;
    }

    nav a {
        font-size: 1rem;
    }

    .publications-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .about-container {
        flex-direction: column;
    }

    .about-image {
        flex: 0 0 auto;
        max-width: 400px;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem 0;
        gap: 2rem;
        box-shadow: 0 10px 20px var(--border-color);
    }

    nav ul.active {
        display: flex;
    }

    .nav-menu-btn {
        display: block;
    }

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

    .book-card:nth-child(3) {
        grid-column: 1;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 3%;
    }

    .hero {
        padding: 6rem 3% 4rem;
    }

    .books-grid,
    .publications-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 0;
    }

    .btn {
        padding: 1rem 2.5rem;
        font-size: 1.05rem;
        width: 100%;
        max-width: 300px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .book-3d-container {
        width: 92vw;
        height: 70vh;
        max-width: 92vw;
    }

    .book-cover {
        width: 100%;
        right: 0;
    }

    .book-page {
        width: 100%;
        right: 0;
    }

    .book-page-left,
    .book-back-cover {
        display: none !important;
    }

    .page-inner {
        padding: 1.2rem 1rem;
    }

    body.welcome-active .page-inner {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .page-title {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .page-content-text {
        font-size: 0.8rem;
    }

    .page-content-text h3 {
        font-size: 0.9rem;
        margin: 0.5rem 0 0.25rem;
    }

    .page-content-text p {
        margin-bottom: 0.4rem;
    }

    .sdc-logo-container {
        width: 150px;
        height: 150px;
    }

    .sdc-center {
        font-size: 2.5rem;
    }

    #themeText {
        display: none;
    }

    nav {
        padding: 1rem 3%;
    }

    nav.scrolled {
        padding: 0.8rem 3%;
    }

    .book-cover-img {
        max-width: 200px;
    }

    .contact-form {
        padding: 2.5rem;
    }

    .about-content {
        font-size: 1.05rem;
    }

    .social-links {
        gap: 1rem;
        justify-content: center;
    }

    .social-links a {
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    section {
        padding: 3rem 4%;
    }

    .book-3d-container {
        height: 65vh;
        width: 95vw;
    }

    .sdc-logo-container {
        width: 130px;
        height: 130px;
        top: 30px;
    }

    .sdc-center {
        font-size: 2rem;
    }

    body.welcome-active .page-inner {
        font-size: 0.7rem;
        padding: 1rem 0.8rem;
    }

    .page-title {
        font-size: 1rem;
    }

    .page-content-text {
        font-size: 0.75rem;
    }

    .page-content-text h3 {
        font-size: 0.85rem;
    }

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

    .hero .subtitle {
        font-size: 0.95rem;
    }

    .hero .tagline {
        font-size: 0.85rem;
    }

    .book-cover-img {
        max-width: 180px;
    }

    .book-card {
        padding: 2rem;
    }

    .book-card h3 {
        font-size: 1.7rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .books-grid {
        gap: 2rem;
    }

    .social-links a {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    body.welcome-active .page-inner {
        font-size: 0.65rem;
        padding: 0.8rem 0.6rem;
    }

    .page-title {
        font-size: 0.9rem;
    }

    .page-content-text {
        font-size: 0.7rem;
    }

    .page-content-text h3 {
        font-size: 0.8rem;
    }

    .about-content {
        font-size: 0.95rem;
    }
}

/* === REDUCED MOTION SUPPORT === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #welcome-canvas {
        display: none !important;
    }
}



/* === FLOATING BOOKS ANIMATION === */
@keyframes floatUp {
    0% {
        transform: translateY(0px) rotateZ(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    40% {
        transform: translateY(-18vh) rotateZ(6deg) translateX(6px);
    }
    70% {
        transform: translateY(-30vh) rotateZ(-6deg) translateX(-6px);
    }
    100% {
        transform: translateY(-45vh) rotateZ(-12deg) translateX(0px);
        opacity: 0;
    }
}

.floating-book {
    transition: transform 200ms ease, box-shadow 200ms ease;
    will-change: transform;
}

.floating-book:hover {
    transform: scale(1.08) translateZ(0);
    box-shadow: 0 18px 40px rgba(2,6,23,0.6);
}
