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

:root {
    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-accent: #f5f5f5;
    --text-primary: #2c2c2c;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent-color: #8b7355;
    --accent-hover: #6d5940;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-dark: rgba(0, 0, 0, 0.16);
    
    /* Typography */
    --font-serif: 'Crimson Text', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 4rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-accent: #333333;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --accent-color: #a08060;
    --accent-hover: #c0a080;
    --border-color: #404040;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-dark: rgba(0, 0, 0, 0.5);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-medium), color var(--transition-medium);
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-lg);
}

.logo h1 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -1px;
    margin-bottom: -0.25rem;
}

.logo .tagline {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: lowercase;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.hero-content h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Featured Poem */
.featured-poem {
    background: var(--bg-accent);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.featured-poem::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 6rem;
    font-family: var(--font-serif);
    color: var(--accent-color);
    opacity: 0.2;
}

.poem-header {
    margin-bottom: var(--space-md);
    position: relative;
    z-index: 1;
}

.poem-label {
    font-size: 0.75rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.poem-header h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--space-xs);
}

.poem-content {
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.poem-content p {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.poem-content p:last-child {
    margin-bottom: 0;
}

.poem-actions {
    text-align: center;
    position: relative;
    z-index: 1;
}

.poem-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
}

.poem-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

/* Links Section */
.links {
    margin-bottom: var(--space-xl);
}

.link-item {
    margin-bottom: var(--space-sm);
}

.link-button {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.link-button:hover {
    background: var(--bg-accent);
    transform: translateX(4px);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.link-button.primary {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.link-button.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.link-icon {
    font-size: 1.5rem;
    margin-right: var(--space-md);
    width: 40px;
    text-align: center;
}

.link-content {
    flex: 1;
}

.link-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
    display: block;
}

.link-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Stats Section */
.stats {
    display: flex;
    justify-content: space-around;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-xl);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--accent-color);
    font-family: var(--font-serif);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

/* Connect Section */
.connect {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.connect h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.social-link {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--bg-accent);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.social-icon {
    font-size: 1.25rem;
    margin-right: var(--space-md);
    width: 30px;
    text-align: center;
}

.social-content {
    flex: 1;
    text-align: left;
}

.social-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
    display: block;
}

.social-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.footer-links {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px var(--shadow-medium);
    transition: all var(--transition-fast);
    z-index: 1000;
}

.theme-toggle:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.theme-icon {
    transition: transform var(--transition-fast);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: var(--space-sm);
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .featured-poem {
        padding: var(--space-md);
    }
    
    .poem-content p {
        font-size: 1rem;
    }
    
    .stats {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .stat-item {
        padding: var(--space-sm);
    }
    
    .theme-toggle {
        bottom: var(--space-md);
        right: var(--space-md);
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .link-button {
        padding: var(--space-sm);
    }
    
    .link-icon {
        font-size: 1.25rem;
        margin-right: var(--space-sm);
    }
    
    .social-link {
        padding: var(--space-sm);
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    animation: fadeIn 0.8s ease;
}

.featured-poem {
    animation: fadeIn 0.8s ease 0.2s both;
}

.link-item {
    animation: fadeIn 0.8s ease both;
}

.link-item:nth-child(1) { animation-delay: 0.1s; }
.link-item:nth-child(2) { animation-delay: 0.2s; }
.link-item:nth-child(3) { animation-delay: 0.3s; }
.link-item:nth-child(4) { animation-delay: 0.4s; }
.link-item:nth-child(5) { animation-delay: 0.5s; }
.link-item:nth-child(6) { animation-delay: 0.6s; }

/* Print Styles */
@media print {
    .theme-toggle {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .link-button {
        break-inside: avoid;
    }
}
