:root {
    --bg-dark: #030305;
    --bg-panel: rgba(20, 20, 25, 0.25);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-1: #00f0ff; /* Cyber Cyan */
    --accent-2: #8a2be2; /* Neon Purple */
    --accent-3: #ff007f; /* Neon Pink */
    --danger: #ff2a55;
    --warning: #ffb800;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Ambient Background Orbs */
.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent-1);
    animation-delay: 0s;
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 40%;
    width: 350px;
    height: 350px;
    background: var(--accent-3);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Typography & Utilities */
.gradient-text {
    background: linear-gradient(to right, var(--accent-1), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-panel {
    background: rgba(15, 15, 20, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-left: 1px solid var(--glass-highlight);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-panel:hover {
    box-shadow: 0 15px 45px 0 rgba(0, 0, 0, 0.45), inset 0 0 30px rgba(255, 255, 255, 0.04);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.25);
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

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

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand span {
    color: var(--accent-1);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

.highlight-link {
    color: var(--accent-3) !important;
    position: relative;
}

.highlight-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-3);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.highlight-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 120px auto 0;
    padding: 0 24px;
}

/* SPA Views */
.spa-view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.spa-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px;
    margin-bottom: 80px;
    gap: 60px;
}

.hero-content {
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    border: none;
    box-shadow: 0 10px 20px -10px var(--accent-2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

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

.primary-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px -5px var(--accent-2), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.primary-btn:hover::before {
    left: 100%;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--glass-highlight);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.02);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05), 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Code Window */
.hero-visual {
    flex: 1;
    perspective: 1000px;
}

.code-window {
    background: #0d1117;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.4);
}

.code-window:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.window-header {
    background: #161b22;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-header .title {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 10px;
    margin-bottom: 0;
    letter-spacing: 0;
}

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

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

pre {
    padding: 24px;
    margin: 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #c9d1d9;
    overflow-x: auto;
}

.language-python {
    display: block;
}

/* Skills Section */
.skills-section {
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-card {
    padding: 40px 30px;
    text-align: left;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Posts Section & Categories */
.posts-section {
    margin-bottom: 80px;
}

.posts-header-area {
    margin-bottom: 24px;
}

.posts-title-wrapper {
    margin-bottom: 24px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: 8px;
    max-width: 680px;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-family: 'Fira Code', monospace;
}

.breadcrumb-link {
    color: var(--accent-1);
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    cursor: pointer;
}

.breadcrumb-link:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--accent-1);
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.3);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Category Dedicated Page Banner */
.category-page-banner {
    padding: 28px 32px;
    margin-bottom: 28px;
    border-radius: 16px;
    border: 1px solid rgba(0, 240, 255, 0.35);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, rgba(138, 43, 226, 0.1) 100%), rgba(15, 15, 20, 0.85);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(0, 240, 255, 0.08);
    animation: fadeInBanner 0.35s ease forwards;
}

@keyframes fadeInBanner {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.category-banner-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.category-banner-icon {
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

.category-banner-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-1);
    margin-bottom: 4px;
    font-family: 'Fira Code', monospace;
}

.category-banner-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.category-banner-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 18px;
    max-width: 800px;
}

.category-banner-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.category-banner-count {
    color: #a5b4fc;
    font-size: 0.88rem;
    font-family: 'Fira Code', monospace;
}

.view-all-btn {
    padding: 8px 18px;
    font-size: 0.88rem;
    cursor: pointer;
}

/* Category Navigation Pills / Tabs */
.category-nav-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.category-nav-bar::-webkit-scrollbar {
    height: 4px;
}
.category-nav-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.dynamic-cat-tabs {
    display: flex;
    gap: 10px;
}

.cat-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-nav-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.4);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cat-nav-tab.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.18) 0%, rgba(138, 43, 226, 0.22) 100%);
    border: 1px solid var(--accent-1);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.25), inset 0 0 12px rgba(0, 240, 255, 0.1);
}

.cat-tab-icon {
    font-size: 1.05rem;
}

.cat-tab-count {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.72rem;
    font-family: 'Fira Code', monospace;
    color: var(--text-secondary);
}

.cat-nav-tab.active .cat-tab-count {
    background: rgba(0, 240, 255, 0.25);
    color: #ffffff;
}

/* Category Shelf Overview (shown in "All" view) */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}

.category-card {
    padding: 22px 24px;
    border-radius: 14px;
    background: rgba(20, 20, 28, 0.65);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.15);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.category-card-icon {
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-card-count {
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 10px;
    border-radius: 12px;
}

.category-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.category-card-desc {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.category-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--accent-1);
    transition: gap 0.2s ease, color 0.2s ease;
}

.category-card:hover .category-card-action {
    gap: 10px;
    color: #ffffff;
}

/* Status Bar */
.posts-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.posts-list-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.posts-count-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Posts Grid & Cards */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.post-card {
    padding: 36px 40px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background: rgba(15, 15, 20, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-left: 1px solid var(--glass-highlight);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

.post-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: var(--accent-1);
    box-shadow: 0 20px 40px -10px rgba(0, 240, 255, 0.15), 0 0 30px -5px rgba(138, 43, 226, 0.25);
}

.post-card.animate-in {
    animation: postCardFadeIn 0.35s ease forwards;
}

@keyframes postCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Post Card Category Badge */
.post-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(138, 43, 226, 0.15) 100%);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 999px;
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.post-category-badge:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.3) 0%, rgba(138, 43, 226, 0.3) 100%);
    border-color: var(--accent-1);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
    transform: translateY(-1px);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.post-tags-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.post-time-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: 'Fira Code', monospace;
    opacity: 0.8;
}

.post-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
    line-height: 1.3;
}

.post-content {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 18px;
}

.post-content p strong,
.post-ordered-list li strong,
.post-bullet-list li strong {
    color: var(--text-primary);
}

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

.inline-code {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 2px 7px;
    border-radius: 5px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    border: 1px solid rgba(56, 189, 248, 0.22);
}

.post-ordered-list,
.post-bullet-list {
    margin: 16px 0 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-ordered-list li,
.post-bullet-list li {
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Playground Section */
.highlight-panel {
    border: 1px solid rgba(236, 72, 153, 0.3);
    padding: 60px;
    margin-bottom: 80px;
    background: linear-gradient(180deg, rgba(236, 72, 153, 0.03) 0%, var(--bg-panel) 100%);
}

.playground-header {
    text-align: center;
    margin-bottom: 40px;
}

.playground-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.playground-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.playground-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.danger-btn {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.5);
    box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.1);
}

.danger-btn:hover {
    background: rgba(239, 68, 68, 0.4);
    border-color: var(--danger);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.warning-btn {
    background: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.1);
}

.warning-btn:hover {
    background: rgba(245, 158, 11, 0.4);
    border-color: var(--warning);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

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



/* Terminal */
.terminal-container {
    background: #0d1117;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.terminal-body {
    padding: 24px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
}

.log-line {
    margin-bottom: 8px;
    white-space: nowrap;
}

.log-line.info { color: #8b949e; }
.log-line.success { color: #2ea043; }
.log-line.error { color: #f85149; }
.log-line.warning { color: #d29922; }

/* Footer */
footer {
    text-align: center;
    padding: 35px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.2);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-accent);
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(35, 134, 54, 0.12);
    border: 1px solid rgba(63, 185, 80, 0.35);
    color: #e6edf3;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.footer-badge:hover {
    background: rgba(35, 134, 54, 0.22);
    border-color: #3fb950;
    box-shadow: 0 0 16px rgba(63, 185, 80, 0.3);
    transform: translateY(-1px);
    color: #ffffff;
}

.footer-badge .status-dot {
    width: 8px;
    height: 8px;
    background-color: #3fb950;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-shadow: 0 0 6px rgba(63, 185, 80, 0.8);
}

.footer-badge .status-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background-color: #3fb950;
    opacity: 0.6;
    animation: badge-pulse 2s infinite ease-out;
}

@keyframes badge-pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(2.2); opacity: 0; }
    100% { transform: scale(2.2); opacity: 0; }
}

.footer-badge .badge-brand {
    font-weight: 600;
    color: #58a6ff;
    transition: color 0.2s ease;
}

.footer-badge:hover .badge-brand {
    color: #79c0ff;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .nav-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .container {
        margin-top: 180px;
    }

    .hero-section {
        flex-direction: column;
        padding: 40px 24px;
    }
    
    .title {
        font-size: 3rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .playground-controls, .playground-controls-grid {
        flex-direction: column;
    }
}

/* Stepper UI */
.remediation-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 30px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-indicator {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.step-indicator.active {
    background: rgba(35, 134, 54, 0.2);
    color: #3fb950;
    border: 1px solid #3fb950;
    box-shadow: 0 0 10px rgba(63, 185, 80, 0.2);
}

.step-line {
    flex-grow: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 10px;
}

.step-line.active {
    background: #3fb950;
}

/* Playground Grid */
.playground-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

@media (max-width: 900px) {
    .playground-controls-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    .glass-nav {
        padding: 10px 0;
    }

    .brand {
        font-size: 1.2rem;
    }

    .nav-content {
        gap: 8px;
    }

    .nav-links {
        gap: 10px;
    }
    
    .nav-links a {
        font-size: 0.8rem;
    }

    .container {
        padding: 0 !important;
        margin-top: 130px;
    }
    
    .playground-controls-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .hero-section {
        padding: 30px 15px;
    }

    .hero-visual {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }
    
    .code-window {
        transform: none; /* Disable 3D tilt on mobile */
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    pre {
        padding: 15px;
        font-size: 0.75rem;
    }

    .remediation-stepper {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 10px;
    }

    .step-line {
        height: 10px;
        width: 2px;
        margin: 4px 0;
    }

    .skill-card, .post-card {
        padding: 15px;
        margin: 0 10px;
        border-radius: 12px;
    }

    .highlight-panel {
        padding: 15px 0;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .terminal-container {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .terminal-body {
        padding: 15px;
        font-size: 0.8rem;
    }

    .window-header {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
        padding: 10px;
    }

    .window-header .title {
        width: 100%;
        text-align: center;
        margin-left: 0;
    }

    .inspect-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

/* Modal UI */
.hidden {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
}

.modal-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.metric .value {
    font-size: 1.2rem;
    font-family: 'Fira Code', monospace;
    font-weight: bold;
}

.inspect-btn {
    margin-left: auto;
    background: rgba(35, 134, 54, 0.2);
    border: 1px solid #3fb950;
    color: #3fb950;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.inspect-btn:hover {
    background: #3fb950;
    color: #fff;
}

/* Contact Form UI */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Site Crash Effects */
body.site-crashed {
    animation: hollywoodGlitch 3s infinite linear alternate-reverse;
    position: relative;
    overflow-x: hidden;
}

body.site-crashed::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9998;
    pointer-events: none;
    animation: tvGlitchOverlay 2.5s infinite steps(2, end);
}

body.site-crashed::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 3px);
    z-index: 9999;
    pointer-events: none;
    animation: staticFlicker 0.1s infinite;
}

@keyframes hollywoodGlitch {
    0%, 14% { transform: translate(0, 0) skew(0deg); filter: none; }
    15% { transform: translate(-2px, 1px) skew(1deg); filter: contrast(120%); }
    16%, 39% { transform: translate(0, 0) skew(0deg); filter: none; }
    40% { transform: translate(4px, -2px) skew(-2deg); filter: hue-rotate(45deg); }
    41% { transform: translate(-4px, 2px) skew(2deg); filter: hue-rotate(-45deg); }
    42%, 79% { transform: translate(0, 0) skew(0deg); filter: none; }
    80% { transform: translate(2px, 0) skew(0deg); filter: invert(10%); }
    81%, 100% { transform: translate(0, 0) skew(0deg); filter: none; }
}

@keyframes tvGlitchOverlay {
    0%, 14% { backdrop-filter: none; background: transparent; }
    15% { backdrop-filter: blur(2px) contrast(150%); background: rgba(255, 0, 0, 0.05); }
    16%, 39% { backdrop-filter: none; background: transparent; }
    40% { backdrop-filter: hue-rotate(90deg) invert(20%); background: rgba(0, 255, 255, 0.1); }
    41% { backdrop-filter: hue-rotate(-90deg) contrast(200%); background: rgba(255, 0, 255, 0.1); }
    42%, 79% { backdrop-filter: none; background: transparent; }
    80% { backdrop-filter: saturate(300%) sepia(50%); background: rgba(255, 255, 0, 0.05); }
    81%, 100% { backdrop-filter: none; background: transparent; }
}

@keyframes staticFlicker {
    0% { opacity: 0.8; transform: translateY(0); }
    50% { opacity: 0.3; transform: translateY(1px); }
    100% { opacity: 0.9; transform: translateY(-1px); }
}



/* ========================================================== */
/* MOZART'S GHOST - THE NET (1995) EASTER EGG                 */
/* ========================================================== */

body.theme-the-net .ambient-background,
body.theme-the-net nav,
body.theme-the-net main,
body.theme-the-net footer {
    animation: theNetGlitch 2.5s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes theNetGlitch {
    0% { filter: invert(0); transform: skewX(0deg) translateX(0); opacity: 1; }
    10% { filter: invert(100%); transform: skewX(20deg) translateX(-20px); opacity: 1; }
    20% { filter: invert(0); transform: skewX(-15deg) translateX(15px); opacity: 1; }
    30% { filter: blur(2px) invert(100%); transform: skewX(10deg) translateX(-10px); opacity: 1; }
    40% { filter: invert(0); transform: skewX(-30deg) translateX(30px); opacity: 1; }
    50% { filter: blur(5px) invert(100%) hue-rotate(90deg); transform: skewX(45deg) scaleY(1.1); opacity: 1; }
    60% { filter: invert(0); transform: skewX(-45deg) scaleY(0.9); opacity: 1; }
    70% { filter: blur(10px) invert(100%); transform: skewX(20deg) translateX(-50px); opacity: 1; }
    80% { filter: invert(0); transform: skewX(-10deg) translateX(10px); opacity: 1; }
    90% { filter: blur(20px) invert(100%); transform: skewX(60deg) scale(1.5); opacity: 0.5; }
    100% { filter: invert(100%); transform: skewX(0deg) scale(0); opacity: 0; }
}

#praetorian-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #000;
    color: #ff0000;
    z-index: 999999;
}

#praetorian-overlay .praetorian-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2rem, 8vw, 6rem);
    font-family: monospace;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
    opacity: 0;
    animation: revealPraetorians 2s forwards;
    text-align: center;
}

#praetorian-overlay .scanlines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) 2px, transparent 2px, transparent 4px);
    pointer-events: none;
    animation: praetorianScanlines 10s linear infinite;
}

@keyframes revealPraetorians {
    0% { opacity: 0; letter-spacing: -10px; }
    50% { opacity: 1; letter-spacing: 5px; }
    100% { opacity: 1; letter-spacing: 2px; }
}

@keyframes praetorianScanlines {
    from { background-position: 0 0; }
    to { background-position: 0 100vh; }
}

.quick-glitch {
    opacity: 1 !important;
    animation: textGlitchPraetorian 0.1s infinite alternate !important;
    color: #ff0000;
    text-shadow: 3px 0 0 blue, -3px 0 0 yellow !important;
}

@keyframes textGlitchPraetorian {
    0% { transform: translate(-50%, -50%) skew(0deg); }
    20% { transform: translate(calc(-50% - 3px), calc(-50% + 2px)) skew(2deg); }
    40% { transform: translate(calc(-50% - 1px), calc(-50% - 1px)) skew(-1deg); }
    60% { transform: translate(calc(-50% + 3px), calc(-50% + 1px)) skew(3deg); }
    80% { transform: translate(calc(-50% + 1px), calc(-50% - 2px)) skew(-2deg); }
    100% { transform: translate(-50%, -50%) skew(0deg); }
}

#praetorian-overlay {
    cursor: pointer;
}
