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

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #0f1520;
    --bg-card: #111927;
    --bg-card-hover: #162032;
    --border: #1e2a3a;
    --border-bright: #2a3f5f;
    --text-primary: #e2e8f0;
    --text-secondary: #8892a4;
    --text-muted: #4a5568;
    --accent: #00e5a0;
    --accent-dim: #00c48a;
    --accent-glow: rgba(0, 229, 160, 0.15);
    --accent-blue: #38bdf8;
    --accent-red: #f87171;
    --accent-yellow: #fbbf24;
    --accent-purple: #a78bfa;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 6px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-blue); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 6px;
    letter-spacing: -0.02em;
}

.nav-logo:hover { color: var(--text-primary); }
.logo-bracket { color: var(--text-muted); font-weight: 300; }
.logo-accent { color: var(--accent); }
.logo-sub {
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    text-transform: uppercase;
}

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

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
    letter-spacing: 0.02em;
}

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

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

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    max-width: 1140px;
    margin: 0 auto;
    gap: 60px;
    overflow: hidden;
}

.hero-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(30, 42, 58, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 42, 58, 0.3) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -2;
}

.hero-scanline {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes scanline {
    0% { top: 0; }
    100% { top: 100vh; }
}

.hero-content { flex: 1; min-width: 0; }

.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    animation: fadeInUp 0.6s ease both;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-line { display: block; animation: fadeInUp 0.6s ease both; }
.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.2s; }
.hero-line:nth-child(3) { animation-delay: 0.3s; }

.hero-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.btn {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 12px 28px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-block;
    letter-spacing: 0.02em;
}

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

.btn-primary:hover {
    background: #00ffb3;
    color: var(--bg-primary);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-ghost {
    border-color: var(--border-bright);
    color: var(--text-secondary);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.hero-stats {
    display: flex;
    gap: 40px;
    animation: fadeInUp 0.6s ease 0.6s both;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Terminal */
.hero-terminal {
    flex: 0 0 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    animation: fadeInUp 0.8s ease 0.3s both;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

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

.terminal-dot.red { background: #f87171; }
.terminal-dot.yellow { background: #fbbf24; }
.terminal-dot.green { background: #34d399; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.terminal-body { padding: 20px; }

.terminal-line {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.9;
    white-space: nowrap;
}

.t-prompt { color: var(--accent); }
.t-cmd { color: var(--accent-blue); }
.t-out { color: var(--text-secondary); }
.t-warn { color: var(--accent-yellow); }
.t-success { color: var(--accent); }

.t-cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent);
}

@keyframes blink {
    50% { opacity: 0; }
}

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

/* ===== SECTIONS ===== */
.section-header {
    margin-bottom: 48px;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 8px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ===== FEATURES ===== */
.features {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.feature-card:hover {
    border-color: var(--border-bright);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
    color: var(--accent);
}

.feature-icon svg { width: 100%; height: 100%; }

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
}

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

.feature-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
}

/* ===== POSTS ===== */
.latest-posts {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--transition);
}

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

.post-featured {
    grid-column: 1 / -1;
    border-left: 3px solid var(--accent);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.post-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.tag-malware { background: rgba(248, 113, 113, 0.15); color: var(--accent-red); }
.tag-osint { background: rgba(56, 189, 248, 0.15); color: var(--accent-blue); }
.tag-threat { background: rgba(167, 139, 250, 0.15); color: var(--accent-purple); }
.tag-tools { background: rgba(0, 229, 160, 0.15); color: var(--accent); }

.post-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-card h3 a { color: var(--text-primary); }
.post-card h3 a:hover { color: var(--accent); }

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

.post-footer {
    margin-top: 16px;
}

.read-time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.posts-more {
    margin-top: 32px;
    text-align: center;
}

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 60px 0 32px;
    background: var(--bg-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 12px;
    max-width: 300px;
}

.footer-links h4 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-links ul { list-style: none; }

.footer-links li { margin-bottom: 10px; }

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-pgp { font-family: var(--font-mono); }
.mono { color: var(--text-secondary); }

/* ===== PAGE CONTENT (for subpages) ===== */
.page-hero {
    padding: 120px 24px 60px;
    max-width: 1140px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
}

.page-hero .section-tag { margin-bottom: 8px; }

.page-hero h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.page-hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
}

.page-content {
    padding: 60px 0 100px;
}

/* Content cards for subpages */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all var(--transition);
}

.content-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.content-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

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

.content-card .card-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
}

/* Tool list style */
.tool-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.tool-item:last-child { border-bottom: none; }

.tool-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 700;
}

.tool-info h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.tool-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tool-tags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.tool-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 2px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-muted);
}

/* About page */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 16px;
    margin-top: 32px;
}

.about-text h3:first-child { margin-top: 0; }

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.about-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.about-sidebar h4 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.about-sidebar ul {
    list-style: none;
    margin-bottom: 28px;
}

.about-sidebar li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 0;
    padding-left: 16px;
    position: relative;
}

.about-sidebar li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.7rem;
}

/* Contact form */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.contact-info h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.contact-detail-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-detail-icon svg { width: 18px; height: 18px; }

.contact-detail-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-detail-text strong {
    display: block;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        min-height: auto;
        padding-top: 100px;
    }

    .hero-terminal {
        flex: none;
        width: 100%;
    }

    .posts-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .about-content { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 23, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
    }

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

    .nav-toggle { display: flex; }

    .hero-stats { gap: 24px; }
    .hero-title { font-size: 2rem; }
    .hero-actions { flex-direction: column; }
    .btn { text-align: center; }
}
