:root {
    --primary-yellow: #FFD700;
    --dark-yellow: #B8860B;
    --cyber-bg: #0a0a0a;
    --cyber-dark: #111111;
    --cyber-gray: #1a1a1a;
    --text-light: #ffffff;
    --text-gray: #cccccc;
    --accent-red: #ff3333;
    --accent-blue: #3366ff;
    --accent-purple: #9933ff;
    --accent-green: #00ff00;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', monospace;
    background-color: var(--cyber-bg);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Matrix Background Canvas */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

/* --- NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 2px solid var(--primary-yellow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-yellow);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-logo i {
    margin-right: 0.8rem;
    color: var(--accent-red);
    animation: pulse 2s infinite;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link:hover {
    color: var(--primary-yellow);
    text-shadow: 0 0 8px var(--primary-yellow);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-yellow);
    margin: 3px 0;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.glitch-container {
    margin-bottom: 2rem;
}

.glitch {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-yellow);
    position: relative;
    animation: glitch 2.5s infinite;
}

.sub-glitch {
    font-size: 1.4rem;
    color: var(--accent-red);
    margin-top: 0.5rem;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 3px;
    text-shadow: 0 0 5px var(--accent-red);
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-gray);
    font-family: 'Share Tech Mono', monospace;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 1.5rem 0;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-yellow);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-yellow);
    color: var(--cyber-bg);
}

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 20px var(--primary-yellow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-yellow);
    color: var(--primary-yellow);
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-gray);
    color: var(--text-gray);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    border-color: var(--primary-yellow);
    color: var(--primary-yellow);
}

/* Terminal Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.terminal {
    width: 100%;
    max-width: 480px;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid var(--text-gray);
    border-radius: 6px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.terminal-header {
    background: #222;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    border-radius: 6px 6px 0 0;
}

.terminal-buttons span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.btn-close { background: #ff5f56; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #27ca3f; }

.terminal-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #888;
}

.terminal-body {
    padding: 1.5rem;
    height: 280px;
    font-family: 'Share Tech Mono', monospace;
    color: var(--accent-green);
    font-size: 0.95rem;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--primary-yellow);
}

/* --- SECTIONS (Centering Fix) --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    text-align: center; /* Helper for grid/block elements below */
}

/* Corrected Section Title Centering */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--primary-yellow);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block; /* allows us to center it visually */
    /* Remove transform/positioning, margin auto on the container centers it */
}

/* Inner elements should use margin auto for block centering */
.thm-grid, .domains-grid, .projects-grid {
    text-align: left; /* reset alignment for content inside grid */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* --- THM & OPS SECTION --- */
.thm-section {
    background: var(--cyber-dark);
    border-top: 1px solid #222;
}

.thm-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.thm-card {
    background: var(--cyber-gray);
    padding: 2rem;
    border: 1px solid #333;
    border-radius: 8px;
    position: relative;
    transition: transform 0.3s ease;
}

.thm-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-yellow);
}

.thm-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--primary-yellow);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.thm-card h3 i {
    color: var(--primary-yellow);
    margin-right: 10px;
}

.iframe-wrapper {
    background: #000;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.thm-desc {
    font-family: 'Share Tech Mono', monospace;
    color: #999;
    font-size: 0.9rem;
}

/* Cert Tags */
.cert-tags {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cert-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #555;
    transition: all 0.3s ease;
}

.cert-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.cert-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.cert-item span {
    font-weight: 700;
    font-size: 0.9rem;
}

.cert-item.gold { border-color: #FFD700; color: #FFD700; }
.cert-item.red { border-color: #ff3333; color: #ff3333; }
.cert-item.blue { border-color: #3366ff; color: #3366ff; }
.cert-item.green { border-color: #00ff00; color: #00ff00; }
.cert-item.gray { border-color: #aaa; color: #aaa; }

/* --- TIMELINE & CLASSIFIED --- */
.journey {
    background: #050505;
}

.journey-timeline {
    max-width: 800px;
    margin: 0 auto;
    border-left: 2px solid #333;
    padding-left: 2rem;
    position: relative;
    text-align: left; /* reset for content inside timeline */
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-icon {
    position: absolute;
    left: -3.6rem;
    top: 0;
    width: 50px;
    height: 50px;
    background: var(--cyber-gray);
    border: 2px solid var(--primary-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-yellow);
    z-index: 10;
}

.timeline-content {
    background: var(--cyber-gray);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #333;
}

/* Classified Styling */
.classified-item .timeline-icon {
    border-color: var(--accent-red);
    color: var(--accent-red);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
}

.classified-content {
    border: 1px solid var(--accent-red);
    background: rgba(255, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.classified-content h3 {
    color: var(--accent-red);
    letter-spacing: 2px;
}

.rubber-stamp {
    position: absolute;
    top: 1rem;
    right: 2rem;
    color: var(--accent-red);
    border: 3px solid var(--accent-red);
    padding: 0.2rem 1rem;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.2rem;
    transform: rotate(-12deg);
    opacity: 0.6;
    letter-spacing: 4px;
    pointer-events: none;
}

.redacted-blur {
    color: #555;
    filter: blur(4px);
    user-select: none;
    margin: 1rem 0;
    background: #111;
}

.small-text {
    font-size: 0.8rem;
    font-family: 'Share Tech Mono', monospace;
}

.text-red { color: var(--accent-red); }

/* --- SKILLS & PROJECTS --- */
.domain-card, .project-card {
    background: var(--cyber-gray);
    padding: 2rem;
    border: 1px solid #333;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: left;
}

.domain-card:hover, .project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-yellow);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.domain-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.domain-header i {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--primary-yellow);
}

.domain-content ul {
    list-style: none;
    margin-top: 1rem;
}

.domain-content li {
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
    font-size: 0.9rem;
    color: #ccc;
}

.domain-content li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--primary-yellow);
}

.progress-bar {
    background: #111;
    height: 6px;
    margin-top: 1.5rem;
    position: relative;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-yellow);
    width: 0; /* JS Animates this */
    transition: width 1.5s ease-out;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 0.7rem;
    color: var(--primary-yellow);
}

/* Project Specifics */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.tag.red-team { background: var(--accent-red); color: #fff; }
.tag.blue-team { background: var(--accent-blue); color: #fff; }
.tag.intel { background: var(--accent-purple); color: #fff; }

.github-link {
    text-align: center;
    margin-top: 3rem;
}

/* --- CONTACT & FOOTER --- */
.contact-content {
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.contact-links a {
    color: var(--text-gray);
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
}

.contact-links a:hover {
    color: var(--primary-yellow);
}

.footer {
    background: var(--cyber-dark);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #333;
    color: #666;
    font-size: 0.8rem;
}

/* --- ANIMATIONS --- */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes glitch {
    0% { text-shadow: 2px 2px var(--accent-red), -2px -2px var(--accent-blue); }
    25% { text-shadow: -2px 2px var(--accent-red), 2px -2px var(--accent-blue); }
    50% { text-shadow: 2px -2px var(--accent-red), -2px 2px var(--accent-blue); }
    75% { text-shadow: -2px -2px var(--accent-red), 2px 2px var(--accent-blue); }
    100% { text-shadow: 2px 2px var(--accent-red), -2px -2px var(--accent-blue); }
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; padding-top: 7rem; }
    .hero-stats { justify-content: center; flex-wrap: wrap; }
    .thm-grid { grid-template-columns: 1fr; }
    
    .hamburger { display: flex; }
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: var(--cyber-dark);
        flex-direction: column;
        justify-content: center;
        transition: 0.3s;
    }
    .nav-menu.active { left: 0; }
    
    .journey-timeline { padding-left: 0; border: none; }
    .timeline-item { padding-left: 0; display: flex; flex-direction: column; gap: 1rem; }
    .timeline-icon { position: relative; left: 0; margin: 0 auto; }
}

/* --- DEV SWITCH BUTTON (Complex Styles) --- */
.dev-switch {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.8rem !important;
    padding: 0.8rem 1.5rem !important;
    background: linear-gradient(135deg, rgba(51, 102, 255, 0.15), rgba(0, 191, 255, 0.15)) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #3366ff !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.4s ease !important;
    overflow: hidden !important;
    cursor: pointer !important;
    font-family: 'Orbitron', monospace !important;
    box-shadow: 0 0 15px rgba(51, 102, 255, 0.2) !important;
}

/* Animated Border */
.dev-switch::before {
    content: '' !important;
    position: absolute !important;
    top: -2px !important; left: -2px !important; right: -2px !important; bottom: -2px !important;
    background: linear-gradient(45deg, #3366ff, #00bfff, #3366ff) !important;
    background-size: 200% 200% !important;
    border-radius: 8px !important;
    z-index: -1 !important;
    animation: dev-border 3s linear infinite !important;
}

.dev-switch:hover {
    transform: scale(1.05) !important;
    color: #00bfff !important;
    box-shadow: 0 0 30px rgba(51, 102, 255, 0.5) !important;
}

.dev-icon {
    width: 20px !important; height: 20px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
}
.dev-icon::before {
    content: '💻' !important; font-size: 18px !important;
    filter: hue-rotate(200deg) brightness(1.5) !important;
}

@keyframes dev-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Code Rain Container (For JS injection) */
.code-rain {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9999;
    opacity: 0; transition: opacity 1s;
}
.code-rain.active { opacity: 1; }
.code-column {
    position: absolute; top: -200px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px; color: #3366ff;
    animation: code-fall linear infinite;
    text-shadow: 0 0 8px rgba(51, 102, 255, 0.8);
    writing-mode: vertical-rl;
    text-orientation: upright;
}

@keyframes code-fall {
    to { transform: translateY(120vh); }
}