/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    /* Deep Purple Gradient */
    color: #e0e0e0;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    /* Cleaner font for UI */
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* Canvas for Matrix Rain - Reduced opacity for background blend */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
    /* More subtle */
}

/* Main Container */
.container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section (IDE Look) */
header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: left;
}

.ide-window {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 1s forwards 0.5s;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ide-header {
    background: #2d2d2d;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.ide-content {
    padding: 20px;
    font-size: 1.1rem;
    color: #d4d4d4;
}

.keyword {
    color: #569cd6;
}

/* blue */
.type {
    color: #4ec9b0;
}

/* teal */
.string {
    color: #ce9178;
}

/* orange/brown */
.method {
    color: #dcdcaa;
}

/* yellow */
.comment {
    color: #6a9955;
}

/* green */

.cursor {
    display: inline-block;
    width: 8px;
    height: 1.2rem;
    background-color: #0f0;
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0;
    margin-top: 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #0f0;
    border-bottom: 2px solid #0f0;
    display: inline-block;
    padding-bottom: 0.5rem;
    /* Center the title block */
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 500px));
    /* Max width 500px */
    justify-content: center;
    /* Center the grid items */
    gap: 2rem;
    margin-bottom: 4rem;
}

.featured-card {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #0f0;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.featured-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.4);
}

.featured-card img {
    width: 100%;
    height: auto;
    display: block;
}

.featured-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0f0;
    color: #000;
    padding: 5px 10px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: opacity 0.3s;
    opacity: 0.8;
}

.masonry-item:hover {
    opacity: 1;
    border-color: #0f0;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.masonry-item img {
    width: 100%;
    display: block;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.9rem;
    margin-top: 4rem;
    border-top: 1px solid #222;
}

/* Scrollbar */
/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f0c29;
}

::-webkit-scrollbar-thumb {
    background: #ff5e62;
    border-radius: 5px;
}

/* =========================================
   New Theme Styles (Purple/Gradient) 
   ========================================= */

/* Hero Header Styles */
.hero-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    animation: fadeInDown 1s ease-out;
}

.hero-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(255, 165, 0, 0.5));
}

.glow-text {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 100, 50, 0.3);
    margin: 0;
}

.gradient-text {
    background: linear-gradient(to right, #ff9966, #ff5e62);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.hero-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #a29bfe;
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 1px;
    animation: fadeIn 1.5s ease-out;
}

/* Update IDE Window for new Theme */
.ide-window {
    background: rgba(20, 20, 35, 0.85);
    border: 1px solid #4a4a6a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: 'Fira Code', monospace;
}

/* Section & Card Updates */
.section-title {
    color: #fff;
    text-shadow: 0 0 10px rgba(162, 155, 254, 0.5);
    border-bottom: 2px solid #ff9966;
}

.featured-card {
    border-color: #ff9966;
    background: rgba(255, 255, 255, 0.05);
}

.featured-card:hover {
    box-shadow: 0 0 25px rgba(255, 153, 102, 0.3);
}

.featured-tag {
    background: linear-gradient(to right, #ff9966, #ff5e62);
    color: #fff;
}

.masonry-item {
    border-color: #4a4a6a;
}

.masonry-item:hover {
    border-color: #a29bfe;
    box-shadow: 0 0 15px rgba(162, 155, 254, 0.3);
}

/* Main Character Hero Image */
.featured-hero-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.featured-hero-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #ff9966;
    /* Orange border */
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 0 30px rgba(255, 153, 102, 0.2);
    display: inline-block;
    /* Adapt to image size */
    max-width: 100%;
}

.featured-hero-card img {
    max-height: 500px;
    /* Limit height so it's not overwhelming */
    width: auto;
    /* Maintain aspect ratio */
    max-width: 100%;
    display: block;
    border-radius: 8px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}