/* ==========================================
   Restored Imaginative Homepage Styles
   ========================================== */

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Hero Section */
.hero {
    padding: var(--spacing-3xl) 0;
    background: radial-gradient(circle at 10% 20%, rgba(37, 194, 160, 0.08) 0%, transparent 40%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero {
    background: radial-gradient(circle at 10% 20%, rgba(37, 194, 160, 0.12) 0%, transparent 40%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--spacing-3xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: slide-up 0.8s ease-out forwards;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--color-text) 30%, var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.hero-photo-wrapper {
    position: relative;
    animation: fade-in 1.2s ease-out forwards;
}

.hero-photo-container {
    animation: float 6s ease-in-out infinite;
}

.hero-photo {
    width: 350px;
    height: 450px;
    border-radius: 2rem;
    object-fit: cover;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--color-border);
}

.hero-code-snippet {
    position: absolute;
    bottom: -30px;
    left: -40px;
    width: 320px;
    /* Slightly wider for the Segment Tree snippet */
    background: #0d1117;
    /* Solid Black/Dark Gray */
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    font-family: var(--font-family-mono);
    font-size: 0.75rem;
    color: #c9d1d9;
    z-index: 3;
    border: 1px solid rgba(48, 54, 61, 0.8);
    transform: rotate(-2deg);
}

.code-header {
    display: flex;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.code-body {
    margin-top: 0.5rem;
}

.code-line {
    display: block;
    line-height: 1.6;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-r {
    background: #ff5f56;
}

.dot-y {
    background: #ffbd2e;
}

.dot-g {
    background: #27c93f;
}

.code-keyword {
    color: #ff7b72;
    /* GitHub-style Red/Pink */
}

.code-func {
    color: #d2a8ff;
    /* GitHub-style Purple */
}

.code-var {
    color: #79c0ff;
    /* GitHub-style Blue */
}

.code-str {
    color: #a5d6ff;
}

.code-op {
    color: #ff7b72;
}

.code-class {
    color: #ffa657;
    /* GitHub-style Orange */
}

.code-obj {
    color: #f1e05a;
    /* Bright Yellow */
}

.code-method {
    color: #34d058;
    /* Vibrant Green */
}

/* Sections */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-2xl);
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: var(--spacing-md);
}

.section-lead {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.card {
    background-color: var(--color-bg-secondary);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: var(--spacing-md);
}

/* Blog List */
.blog-preview-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 800px;
    margin: 0 auto;
}

.blog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.blog-item:hover {
    border-color: var(--color-primary);
    transform: translateX(8px);
}

.blog-date {
    font-family: var(--font-family-mono);
    font-size: 0.8rem;
    color: var(--color-text-tertiary);
}

.blog-title {
    font-weight: 600;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 2px 8px;
    border-radius: 99px;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-photo {
        width: 300px;
        height: 380px;
    }

    .hero-code-snippet {
        display: none;
    }
}