/* ═══════════════════════════════════════════════════════════════════════════════
   index.html styles — Hero, Main Content, Sections, Cards, Animations
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   Hero Section
   ───────────────────────────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    overflow: hidden;
}

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

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    background-color: var(--accent-amber);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 213, 79, 0.3);
}

.hero-illustration {
    animation: float 3s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Animations
   ───────────────────────────────────────────────────────────────────────────── */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 213, 79, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 213, 79, 0.9));
    }
}

.glowing-gem {
    animation: glow 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

.sparkle {
    animation: sparkle 1.5s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Main Content Layout
   ───────────────────────────────────────────────────────────────────────────── */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Sections
   ───────────────────────────────────────────────────────────────────────────── */
section {
    background: white;
    margin: 3rem 0;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 1rem;
}

section h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.5em;
    background: linear-gradient(to bottom, var(--accent-gold), var(--accent-amber));
    border-radius: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Quick Tutorial
   ───────────────────────────────────────────────────────────────────────────── */
.tutorial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    align-items: center;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    background: var(--bg-light);
    padding: 1.5rem;
    border-left: 4px solid var(--accent-gold);
    border-radius: 4px;
}

.step h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.step p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.code-block {
    background: var(--primary-dark);
    color: var(--accent-gold);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    margin: 1rem 0;
    border-left: 4px solid var(--accent-gold);
}

.code-comment {
    color: #a0d995;
}

.code-keyword {
    color: #64b5f6;
}

.code-string {
    color: #ffb74d;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Spells Reference
   ───────────────────────────────────────────────────────────────────────────── */
.spells-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.spell-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.spell-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 8px 16px rgba(255, 213, 79, 0.15);
    transform: translateY(-4px);
}

.spell-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.spell-card h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
}

.spell-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.spell-example {
    background: var(--primary-dark);
    color: var(--accent-gold);
    padding: 0.8rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Projects Grid
   ───────────────────────────────────────────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 8px 16px rgba(57, 73, 171, 0.15);
    transform: translateY(-4px);
}

.project-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.project-header h3 {
    font-size: 1.3rem;
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-content code {
    display: inline;
}

.difficulty {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: auto;
}

/* ─────────────────────────────────────────────────────────────────────────────
   About Section
   ───────────────────────────────────────────────────────────────────────────── */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.about-text ul {
    list-style: none;
    margin-left: 0;
}

.about-text li {
    padding: 0.5rem 0;
    color: var(--text-light);
    padding-left: 1.5rem;
    position: relative;
}

.about-text li::before {
    content: '✨';
    position: absolute;
    left: 0;
}

.about-illustration {
    text-align: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Responsive Design
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

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

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

    section {
        padding: 2rem 1.5rem;
        margin: 2rem 0;
    }

    section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }
}
