/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #080f0b;
    --surface: #0d1a10;
    --border: #1a3a2a;
    --accent: #00e5c0;
    --green: #27c93f;
    --text: #e8fff8;
    --text-secondary: #4a8a6a;
    --font-mono: 'Courier New', monospace;
    --font-body: system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== SCANLINE OVERLAY ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 229, 192, 0.015) 2px,
        rgba(0, 229, 192, 0.015) 4px
    );
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-family: var(--font-mono);
    color: var(--text);
    letter-spacing: 1px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.3rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--green);
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

/* ===== NAV ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 15, 11, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
}

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

nav .logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

nav .logo-link img {
    height: 36px;
    width: auto;
}

nav .logo-text {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 2px;
}

nav .logo-text span {
    color: var(--accent);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
}

nav ul a:hover,
nav ul a.active {
    color: var(--accent);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--accent);
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.hero-terminal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem 3rem;
    max-width: 700px;
    width: 100%;
    text-align: left;
}

.terminal-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.terminal-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

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

.hero-name {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.hero-name .cursor {
    display: inline-block;
    width: 14px;
    height: 2.2rem;
    background: var(--accent);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1.2s step-end infinite;
}

.hero-tagline {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-tagline.visible {
    opacity: 1;
}

.hero-bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: 0;
    transition: opacity 0.8s ease 0.3s;
}

.hero-bio.visible {
    opacity: 1;
}

.hero-prompt {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.hero-prompt span {
    color: var(--green);
}

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

/* ===== CTA CARDS ===== */
.cta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.cta-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.cta-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 229, 192, 0.1);
}

.cta-card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.cta-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.cta-card a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* ===== THREAT TICKER ===== */
.ticker-section {
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    overflow: hidden;
}

.ticker-wrap {
    display: flex;
    animation: ticker 30s linear infinite;
}

.ticker-item {
    flex-shrink: 0;
    padding: 0 3rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.ticker-item .tag {
    color: var(--accent);
    margin-right: 0.5rem;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== ABOUT PAGE ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-sidebar {
    position: sticky;
    top: 100px;
}

.photo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-links a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--accent);
}

.about-content h2 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ===== SKILLS GRID ===== */
.skills-section {
    margin-top: 3rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.skill-category {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.skill-category h4 {
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.3rem 0;
    font-family: var(--font-mono);
}

.skill-category li::before {
    content: '> ';
    color: var(--green);
}

/* ===== BADGES ===== */
.badges {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 1px;
}

.badge.clearance {
    border-color: #ff5f56;
    color: #ff5f56;
}

/* ===== CERTIFICATIONS ===== */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.cert-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text);
}

.cert-item .cert-org {
    color: var(--text-secondary);
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
}

/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 229, 192, 0.1);
}

.project-card.featured {
    grid-column: 1 / -1;
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(0, 229, 192, 0.03) 100%);
}

.project-card .featured-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--bg);
    background: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.project-card h3 {
    color: var(--text);
    margin-bottom: 0.75rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-secondary);
}

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

.project-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.project-detail.open {
    max-height: 500px;
}

.project-detail p {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.project-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.expand-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.expand-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* CTF Section */
.ctf-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.ctf-placeholder {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
}

.ctf-placeholder p {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* ===== BLOG ===== */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.blog-column h2 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.blog-column .column-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s, transform 0.3s;
}

.post-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.post-card .post-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.post-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.post-card .post-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.post-card .post-tags span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--accent);
}

.post-card .excerpt {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.post-card .read-more {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.automation-note {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

/* ===== CONTACT ===== */
.contact-layout {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-info {
    margin-bottom: 3rem;
}

.contact-info h2 {
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.contact-item {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.contact-item a {
    color: var(--text);
}

.download-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s, color 0.3s;
}

.btn:hover {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}

/* Contact Form */
.contact-form {
    text-align: left;
    margin-top: 3rem;
}

.contact-form h3 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    text-align: center;
    margin-top: 1.5rem;
}

.form-submit button {
    cursor: pointer;
}

/* Tracking Widget */
.tracking-widget {
    margin-top: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.tracking-widget h4 {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.tracking-widget .cve-id {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.tracking-widget .cve-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ===== CHATBOT ===== */
.chat-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 229, 192, 0.3);
    transition: transform 0.3s;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--bg);
}

.chat-panel {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 380px;
    height: 500px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    overflow: hidden;
}

.chat-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.chat-header h4 {
    font-size: 0.9rem;
    color: var(--accent);
}

.chat-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    font-family: var(--font-mono);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-msg {
    max-width: 85%;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.chat-msg.bot {
    background: var(--bg);
    color: var(--text);
    align-self: flex-start;
    border: 1px solid var(--border);
}

.chat-msg.user {
    background: var(--accent);
    color: var(--bg);
    align-self: flex-end;
}

.chat-input-area {
    display: flex;
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    font-family: var(--font-body);
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--accent);
}

.chat-input-area button {
    padding: 0.6rem 1rem;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 700;
    transition: opacity 0.2s;
}

.chat-input-area button:hover {
    opacity: 0.85;
}

/* ===== FOOTER ===== */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
}

footer p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ===== FADE-IN ANIMATION ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== PAGE HEADER ===== */
.page-header {
    padding-top: 120px;
    padding-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    color: var(--accent);
}

.page-header .prompt-line {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.page-header .prompt-line span {
    color: var(--green);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    nav ul {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 0;
        gap: 1.25rem;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.3s, opacity 0.3s;
        pointer-events: none;
    }

    nav ul.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .hamburger {
        display: flex;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }

    .hero-terminal {
        padding: 1.5rem;
    }

    .hero-name {
        font-size: 1.5rem;
    }

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

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

    .about-sidebar {
        position: static;
    }

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

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

    .project-card.featured {
        grid-column: 1;
    }

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

    .download-btns {
        flex-direction: column;
        align-items: center;
    }

    /* Chat full-screen on mobile */
    .chat-panel {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .chat-toggle {
        bottom: 1rem;
        right: 1rem;
    }
}
