/* ==========================================================================
   Sylvester Ayodeji V2 - Obsidian & Redstone Immersive Theme
   ========================================================================== */

/* Design Tokens */
:root {
    --bg-obsidian: #08080c;
    --bg-panel: #111116;
    --bg-console: #050508;
    --border-redstone: #ff2a2a;
    --redstone-glow: rgba(255, 42, 42, 0.2);
    --redstone-glow-intense: rgba(255, 42, 42, 0.55);
    --emerald-green: #3bf43b;
    --emerald-glow: rgba(59, 244, 59, 0.2);
    --lapis-blue: #2d5af5;
    --lapis-glow: rgba(45, 90, 245, 0.2);
    --text-terminal: #00ff66; /* Classic Terminal Green */
    --text-primary: #f0f2f5;
    --text-secondary: #9ea2b0;
    --text-muted: #535661;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --transition-snappy: all 0.2s cubic-bezier(0.19, 1, 0.22, 1);
    --transition-glow: box-shadow 0.4s ease, border-color 0.3s ease;
}

/* Reset & Immersive Background Scanlines */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-obsidian);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Grid & Voxel Scanline Overlay to give retro/gaming texture */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    background-color: var(--bg-obsidian);
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-snappy);
}

/* Redstone interactive particles container */
.redstone-dust-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Navigation Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(8, 8, 12, 0.96);
    border-bottom: 2px solid var(--bg-panel);
    transition: var(--transition-snappy);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.header.scrolled {
    background: rgba(17, 17, 22, 0.98);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.logo span {
    color: var(--border-redstone);
    text-shadow: 0 0 10px var(--border-redstone);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-link:hover, .nav-link.active-link {
    color: var(--border-redstone);
    text-shadow: 0 0 8px var(--border-redstone);
}

/* gaming styled buttons (sharp corners) */
.btn-primary-custom {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--border-redstone);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px 0 rgba(255, 42, 42, 0.35);
    clip-path: polygon(8px 0%, 100% 0%, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0% 100%, 0% 8px);
    transition: var(--transition-snappy);
}

.btn-primary-custom:hover {
    box-shadow: 0 6px 22px 0 rgba(255, 42, 42, 0.65);
    transform: translateY(-2px);
}

.btn-secondary-custom {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: transparent;
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 2px solid var(--text-muted);
    cursor: pointer;
    clip-path: polygon(8px 0%, 100% 0%, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0% 100%, 0% 8px);
    transition: var(--transition-snappy);
}

.btn-secondary-custom:hover {
    border-color: #ffffff;
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn .bar {
    width: 25px;
    height: 2px;
    background-color: #ffffff;
}

/* Badge (Gaming Grid) */
.badge-gaming {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(255, 42, 42, 0.08);
    border: 1px solid rgba(255, 42, 42, 0.35);
    color: var(--border-redstone);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    position: relative;
}

.badge-gaming::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--border-redstone);
    margin-right: 8px;
    animation: flash 1.5s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* Hero Section */
.hero-section {
    padding-top: 190px;
    padding-bottom: 140px;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 5rem;
    align-items: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.8rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
    border-left: 3px solid var(--border-redstone);
    padding-left: 1rem;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

/* Interactive Developer Terminal Widget */
.terminal-widget {
    background-color: var(--bg-console);
    border: 2px solid var(--text-muted);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
    transition: var(--transition-snappy), var(--transition-glow);
}

.terminal-widget:focus-within {
    border-color: var(--border-redstone);
    box-shadow: 0 20px 50px rgba(255, 42, 42, 0.15);
}

.terminal-header {
    background: var(--bg-panel);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--bg-console);
    position: relative;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.terminal-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

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

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.terminal-body {
    padding: 2rem;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.terminal-line {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.cmd-prompt {
    color: var(--emerald-green);
}

.terminal-output {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-terminal);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.terminal-interactive-zone {
    flex-grow: 1;
}

.terminal-actions-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.term-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: var(--transition-snappy);
}

.term-btn:hover {
    background: var(--redstone-glow);
    border-color: var(--border-redstone);
    color: #ffffff;
    text-shadow: 0 0 5px var(--border-redstone);
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
}

#term-input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    flex-grow: 1;
}

/* About & Circuit Animation */
section {
    padding: 120px 0;
}

.section-header-left {
    margin-bottom: 5rem;
}

.section-tag-gaming {
    font-family: var(--font-mono);
    color: var(--border-redstone);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
}

.section-title-gaming {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-text-container p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-text-container .lead-text {
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.5;
}

/* Interactive circuit board graphic */
.about-circuit-card {
    background: #0d0e14;
    border: 2px solid var(--bg-panel);
    height: 380px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.circuit-node {
    position: absolute;
    background: var(--bg-panel);
    border: 1px solid var(--text-muted);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    z-index: 5;
}

.circuit-node.main-node {
    top: 50%;
    left: 15%;
    transform: translateY(-50%);
    border-color: var(--border-redstone);
    box-shadow: 0 0 15px var(--redstone-glow);
}

.main-node .node-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--border-redstone);
    border-radius: 10px;
    animation: breathing 3s infinite ease-in-out;
}

@keyframes breathing {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}

.node-content h4 {
    font-size: 1.1rem;
    color: #ffffff;
}

.node-content p {
    font-size: 0.8rem;
    color: var(--border-redstone);
    font-family: var(--font-mono);
}

.circuit-line {
    position: absolute;
    background: var(--text-muted);
    z-index: 2;
}

.circuit-line.line-1 {
    height: 2px;
    width: 25%;
    top: 30%;
    left: 45%;
    background: linear-gradient(90deg, var(--border-redstone), var(--text-muted));
}

.circuit-line.line-2 {
    height: 2px;
    width: 25%;
    top: 50%;
    left: 45%;
    background: linear-gradient(90deg, var(--border-redstone), var(--text-muted));
}

.circuit-line.line-3 {
    height: 2px;
    width: 25%;
    top: 70%;
    left: 45%;
    background: linear-gradient(90deg, var(--border-redstone), var(--text-muted));
}

.circuit-node.node-a { top: 20%; right: 15%; }
.circuit-node.node-b { top: 44%; right: 15%; }
.circuit-node.node-c { top: 68%; right: 15%; }

.node-content-mini {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.circuit-node:hover {
    border-color: #ffffff;
}

/* Skills Section V2 */
.skills-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.skill-block-v2 {
    background: var(--bg-panel);
    border: 2px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-snappy);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.skill-block-v2:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.08);
}

.block-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    pointer-events: none;
}

.block-glow.redstone { background: var(--border-redstone); }
.block-glow.emerald { background: var(--emerald-green); }
.block-glow.lapis { background: var(--lapis-blue); }

.block-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.block-icon {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
    padding: 0.25rem 0.6rem;
}

.skill-block-v2:hover .block-icon {
    color: #ffffff;
    border-color: #ffffff;
}

.skill-block-v2 h3 {
    font-size: 1.4rem;
}

.skill-block-v2 p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.98rem;
}

.block-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.item-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.8rem;
    color: var(--text-secondary);
}

.skill-block-v2:hover .item-tag {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Projects Section (V2 Cards) */
.projects-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem;
}

.project-card-v2 {
    background: var(--bg-panel);
    border: 2px solid rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card-v2:hover {
    border-color: var(--border-redstone);
    box-shadow: 0 15px 45px rgba(255, 42, 42, 0.08);
}

.card-image-wrap {
    height: 250px;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid rgba(255, 255, 255, 0.03);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card-v2:hover .card-img {
    transform: scale(1.05);
}

.card-overlay-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(8, 8, 12, 0.8) 100%);
    pointer-events: none;
}

.card-body-v2 {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    transform: translateZ(30px); /* 3D effect depth */
}

.card-category-gaming {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--border-redstone);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-card-v2 h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.project-card-v2 p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.card-tech-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.card-tech-row span {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.25rem 0.75rem;
    color: var(--text-secondary);
}

.card-action-btn {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    position: relative;
}

.card-action-btn::after {
    content: '→';
    transition: var(--transition-snappy);
}

.card-action-btn:hover {
    color: var(--border-redstone);
    text-shadow: 0 0 5px var(--border-redstone);
}

.card-action-btn:hover::after {
    transform: translateX(5px);
}

/* No Image Fallback Card layout */
.no-img-card {
    min-height: 380px;
    height: 100%;
}

/* FAQ Node system */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-node {
    background: var(--bg-panel);
    border: 2px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-snappy);
}

.faq-node-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-node-header h4 {
    font-size: 1.15rem;
    color: #ffffff;
}

.faq-plus {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--border-redstone);
    transition: var(--transition-snappy);
}

.faq-node.active {
    border-color: rgba(255, 42, 42, 0.2);
}

.faq-node.active .faq-plus {
    transform: rotate(45deg);
}

.faq-node-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    background: rgba(0, 0, 0, 0.15);
}

.faq-node-body p {
    padding: 0 2rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* Contact Block & Terminal Box */
.contact-block-gaming {
    background: linear-gradient(135deg, #111116 0%, #0c0c11 100%);
    border: 2px solid var(--bg-panel);
    border-radius: 20px;
    padding: 4.5rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.contact-block-gaming::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-redstone);
    box-shadow: 0 0 12px var(--border-redstone);
}

.contact-grid-v2 {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 5rem;
    align-items: center;
}

.contact-info-panel h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.contact-info-panel p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.direct-contact-tags {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.direct-tag {
    display: flex;
    flex-direction: column;
}

.direct-tag .label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.direct-tag .val {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ffffff;
}

.direct-tag .val:hover {
    color: var(--border-redstone);
}

.contact-terminal-box {
    background-color: var(--bg-console);
    border: 1px solid var(--text-muted);
    border-radius: 8px;
    overflow: hidden;
}

.box-bar {
    background-color: var(--bg-panel);
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--bg-console);
}

.box-body-terminal {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.term-msg {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-terminal);
}

.full-width {
    width: 100%;
}

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

/* Footer Gaming */
.footer-gaming {
    background-color: #050508;
    border-top: 2px solid var(--bg-panel);
    padding: 3rem 0;
}

.footer-container-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-gaming p {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 2.5rem;
}

.footer-socials a {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.footer-socials a:hover {
    color: var(--border-redstone);
    text-shadow: 0 0 5px var(--border-redstone);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .hero-container, .about-grid, .contact-grid-v2 {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }

    .hero-content, .about-text-container {
        align-items: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .skills-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-circuit-card {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background-color: var(--bg-panel);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 2px solid var(--border-redstone);
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .skills-grid-v2, .projects-grid-v2 {
        grid-template-columns: 1fr;
    }

    .contact-block-gaming {
        padding: 2.5rem 1.5rem;
    }
}
