/* Custom Properties for Theme Management */
:root {
    --primary-color: #D72638;
    --secondary-color: #8AC6D1;
    --accent-color: #FFE066;
    --bg-color: #F4E9F0;
    --text-color: #1E1E2F;
    --surface-color: #ffffff;
    --border-color: #1E1E2F;
    --shadow-color: rgba(30, 30, 47, 0.2);
    
    --font-display: 'Amatic SC', cursive;
    --font-heading: 'Amatic SC', cursive;
    --font-body: 'IBM Plex Mono', monospace;
    --font-mono: 'IBM Plex Mono', monospace;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-color: #1E1E2F;
    --text-color: #F4E9F0;
    --surface-color: #2A2A3E;
    --border-color: #F4E9F0;
    --shadow-color: rgba(244, 233, 240, 0.1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: all 0.3s ease;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(215, 38, 56, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(138, 198, 209, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 224, 102, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

html {
    scroll-behavior: smooth;
}

/* Floating Shapes Animation */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    top: 10%;
    left: 80%;
    animation-delay: -5s;
}

.shape-2 {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    top: 60%;
    left: 10%;
    animation-delay: -10s;
    border-radius: 0;
    transform: rotate(45deg);
}

.shape-3 {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    top: 30%;
    left: 60%;
    animation-delay: -15s;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.shape-4 {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    top: 80%;
    left: 90%;
    animation-delay: -8s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-color);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--primary-color);
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .brand-text {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary-color);
    transform: rotate(-1deg);
    font-weight: 700;
    position: relative;
}

.nav-brand .brand-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: skew(-12deg);
    opacity: 0.7;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: all 0.3s ease;
    background: var(--surface-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid transparent;
    text-transform: uppercase;
    font-family: var(--font-body);
}

.nav-link:hover,
.nav-link.active {
    color: var(--bg-color);
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(-1deg) scale(1.05);
}

.nav-link:hover {
    animation: wobble 0.5s ease-in-out;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-1deg) scale(1.05); }
    25% { transform: rotate(1deg) scale(1.05); }
    75% { transform: rotate(-2deg) scale(1.05); }
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.dark-mode-toggle:hover {
    background: var(--primary-color);
    transform: rotate(15deg);
}

/* Main Content */
.main-content {
    margin-top: 80px;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.9;
    margin-bottom: 2rem;
    font-weight: 700;
    position: relative;
}

.title-line-1 {
    color: var(--primary-color);
    transform: rotate(-2deg);
    display: block;
    margin-left: -1rem;
    animation: flicker 3s ease-in-out infinite;
}

.title-line-2 {
    color: var(--secondary-color);
    transform: rotate(1deg);
    display: block;
    margin-left: 1rem;
    animation: flicker 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

.title-line-3 {
    color: var(--accent-color);
    transform: rotate(-1deg);
    display: block;
    margin-left: -0.5rem;
    animation: flicker 3s ease-in-out infinite;
    animation-delay: 1s;
}

.title-line-4 {
    color: var(--primary-color);
    transform: rotate(2deg);
    display: block;
    margin-left: 2rem;
    animation: flicker 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
    75% { opacity: 0.9; }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
}

.subtitle-text {
    font-weight: normal;
}

.subtitle-emphasis {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-size: 2rem;
    transform: skew(-5deg);
    display: inline-block;
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--bg-color);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 25px;
    transform: rotate(-1deg);
    transition: all 0.3s ease;
    border: 3px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

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

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-color);
    transform: rotate(1deg) scale(1.05);
    animation: glitchBtn 0.3s ease-in-out;
}

@keyframes glitchBtn {
    0%, 100% { transform: rotate(1deg) scale(1.05); }
    25% { transform: rotate(-1deg) scale(1.05) translateX(2px); }
    75% { transform: rotate(2deg) scale(1.05) translateX(-2px); }
}

.hero-visual {
    position: relative;
    height: 500px;
}

.rotating-element {
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 10s linear infinite;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.glitch-text {
    position: absolute;
    top: 20%;
    right: 10%;
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--accent-color);
    animation: glitch 2s infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes glitch {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
}

/* Collage Elements */
.collage-element {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.scribble-1 {
    width: 100px;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M20,20 Q40,10 60,30 T80,50 Q70,70 50,60 T20,40 Z' stroke='%23D72638' stroke-width='3' fill='none' opacity='0.6'/%3E%3C/svg%3E");
    top: 10%;
    right: 10%;
    animation: float 6s ease-in-out infinite;
}

.torn-paper {
    width: 80px;
    height: 120px;
    background: var(--accent-color);
    opacity: 0.7;
    bottom: 20%;
    left: 5%;
    clip-path: polygon(0% 0%, 85% 0%, 100% 15%, 90% 30%, 100% 45%, 85% 60%, 100% 75%, 90% 90%, 100% 100%, 0% 100%);
    transform: rotate(-15deg);
    animation: floatSlow 8s ease-in-out infinite;
}

.collage-scribble {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0.4;
    animation: spin 20s linear infinite;
}

.scribble-red {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cpath d='M10,10 L50,50 M50,10 L10,50 M30,5 L30,55 M5,30 L55,30' stroke='%23D72638' stroke-width='2' opacity='0.6'/%3E%3C/svg%3E");
    top: 10px;
    right: 10px;
}

.scribble-blue {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='25' stroke='%238AC6D1' stroke-width='3' fill='none' opacity='0.6'/%3E%3Cline x1='15' y1='15' x2='45' y2='45' stroke='%238AC6D1' stroke-width='2' opacity='0.6'/%3E%3C/svg%3E");
    top: 10px;
    left: 10px;
}

.scribble-green {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cpath d='M15,15 Q30,5 45,15 Q55,30 45,45 Q30,55 15,45 Q5,30 15,15 Z' stroke='%23FFE066' stroke-width='3' fill='none' opacity='0.6'/%3E%3C/svg%3E");
    top: 10px;
    right: 10px;
}

.floating-heart {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    transform: rotate(45deg);
    position: relative;
    top: 30%;
    right: 20%;
    animation: heartbeat 2s ease-in-out infinite;
}

.floating-heart::before,
.floating-heart::after {
    content: '';
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
}

.floating-heart::before {
    top: -20px;
    left: 0;
}

.floating-heart::after {
    left: -20px;
    top: 0;
}

@keyframes floatSlow {
    0%, 100% { transform: rotate(-15deg) translateY(0); }
    50% { transform: rotate(-15deg) translateY(-10px); }
}

@keyframes heartbeat {
    0%, 100% { transform: rotate(45deg) scale(1); }
    50% { transform: rotate(45deg) scale(1.1); }
}

/* Entries Section */
.entries-section {
    padding: 4rem 2rem;
    background: var(--surface-color);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--primary-color);
    transform: rotate(-1deg);
    margin-bottom: 1rem;
    font-weight: 700;
}

.header-decoration {
    width: 150px;
    height: 4px;
    background: var(--accent-color);
    margin: 0 auto;
    transform: skew(-15deg);
    opacity: 0.8;
}

.entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.entry-card {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 5px 5px 15px var(--shadow-color);
}

.entry-card:hover {
    transform: rotate(0deg) scale(1.03);
    box-shadow: 8px 8px 25px var(--shadow-color);
    border-color: var(--primary-color);
}

.entry-1 {
    transform: rotate(1deg);
    border-left: 4px solid var(--primary-color);
}

.entry-2 {
    transform: rotate(-1deg);
    border-left: 4px solid var(--secondary-color);
}

.entry-visual {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.entry-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
}

.entry-image-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: var(--accent-color);
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0.7;
}

.entry-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.entry-number {
    font-family: var(--font-display);
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 0 var(--text-color);
}

.entry-content {
    padding: 2rem;
}

.entry-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transform: rotate(-1deg);
    font-weight: 700;
    position: relative;
}

.entry-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60%;
    height: 2px;
    background: var(--accent-color);
    transform: skew(-20deg);
}

.entry-excerpt {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.entry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.entry-tags {
    color: var(--secondary-color);
}

.entry-link {
    display: inline-block;
    background: var(--primary-color);
    color: var(--bg-color);
    padding: 0.7rem 1.8rem;
    text-decoration: none;
    font-weight: 500;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.entry-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    transition: left 0.4s ease;
}

.entry-link:hover::before {
    left: 0;
}

.entry-link:hover {
    color: var(--text-color);
    transform: rotate(-2deg) scale(1.05);
    animation: glitchLink 0.3s ease-in-out;
}

.entry-link span {
    position: relative;
    z-index: 1;
}

@keyframes glitchLink {
    0%, 100% { transform: rotate(-2deg) scale(1.05); }
    25% { transform: rotate(1deg) scale(1.05) translateX(1px); }
    75% { transform: rotate(-3deg) scale(1.05) translateX(-1px); }
}

/* About Section */
.about-section {
    padding: 4rem 2rem;
    min-height: 60vh;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.about-title {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    transform: rotate(-2deg);
}

.about-description {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-tagline {
    font-size: 1.1rem;
    font-style: italic;
}

.emphasis {
    color: var(--primary-color);
    font-weight: bold;
}

.about-visual {
    position: relative;
    height: 300px;
}

.spinning-logo {
    width: 150px;
    height: 150px;
    background: conic-gradient(var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color));
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 15s linear infinite;
}

.spinning-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    background: var(--bg-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Footer */
.main-footer {
    background: var(--text-color);
    color: var(--bg-color);
    padding: 2rem;
    text-align: center;
    font-family: var(--font-body);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--bg-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-link:hover {
    color: var(--primary-color);
    transform: rotate(-2deg);
}

/* Floating Badge */
.floating-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface-color);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 0.8rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    box-shadow: 5px 5px 15px var(--shadow-color);
    z-index: 1000;
    transform: rotate(-2deg);
    transition: all 0.3s ease;
    max-width: 200px;
}

.floating-badge:hover {
    transform: rotate(0deg) scale(1.05);
    border-color: var(--secondary-color);
}

.badge-content {
    text-align: center;
}

.badge-text {
    display: block;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.badge-author {
    display: block;
    color: var(--text-color);
    font-size: 0.7rem;
    opacity: 0.8;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 6vw, 4rem);
    }
    
    .entries-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title span {
        display: block;
        margin: 0.5rem 0;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .entry-card {
        transform: none !important;
    }
}
