:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2332;
    --border: #1e293b;
    --border-hover: rgba(139, 92, 246, 0.4);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.15);
    --amber: #f59e0b;
    --amber-hover: #fbbf24;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --container: 1140px;
    --section-py: 6rem;
    --radius: 12px;
    --radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 1rem;
    background-image: radial-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    overflow-x: hidden;
}

.network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

.skip-nav {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: var(--radius-sm);
    z-index: 9999;
    font-weight: 600;
}
.skip-nav:focus { top: 1rem; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- NAVBAR ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: background-color 0.3s, padding 0.3s, backdrop-filter 0.3s;
}
.navbar.scrolled {
    background-color: rgba(10, 14, 20, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.logo-dot { color: var(--accent); }
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- HERO ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 6rem 0 4rem;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 30% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 50%);
    pointer-events: none;
}
.hero-mountain {
    position: absolute;
    inset: 0;
    background: url('../assets/images/snowdon-peaks.jpg') center top / cover no-repeat;
    opacity: 0.07;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 40%, transparent 75%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 40%, transparent 75%);
    pointer-events: none;
}
.hero-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 1;
}
.hero-content { flex: 1; }
.hero-greeting {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}
.hero-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}
.hero-title-line {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 500;
    min-height: 2rem;
    margin-bottom: 1.5rem;
}
.typing-cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 540px;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-image { flex-shrink: 0; }
.hero-image-wrapper {
    width: 340px;
    height: 420px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(139, 92, 246, 0.25);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.1), 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
}
.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: var(--font-mono);
}
.scroll-arrow {
    width: 16px;
    height: 16px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    animation: scroll-bounce 2s ease infinite;
}
@keyframes scroll-bounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.6; }
    50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}
.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---- SECTIONS ---- */
.section {
    padding: var(--section-py) 0;
    position: relative;
    z-index: 2;
}
.section-alt {
    background: var(--bg-secondary);
    background-image: radial-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.05rem;
}
.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ---- PARALLAX ---- */
.parallax-divider {
    height: 420px;
    margin-top: -3rem;
    margin-bottom: -3rem;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    z-index: 1;
}
.parallax-divider::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--bg-primary) 0%, rgba(10, 14, 20, 0.15) 25%, rgba(10, 14, 20, 0.15) 75%, var(--bg-primary) 100%);
}

/* ---- CARDS ---- */
.card {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-4px);
}
.card-icon {
    color: var(--accent);
    margin-bottom: 1.25rem;
    width: 40px;
    height: 40px;
}
.card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---- ABOUT ---- */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}
.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-interests {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.about-interests h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-family: var(--font-mono);
}
.about-interests p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---- EXPERTISE ---- */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* ---- IMPACT ---- */
.section-impact {
    background: var(--bg-secondary);
    background-image: radial-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}
.impact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.impact-item {
    text-align: center;
    padding: 2rem 1rem;
}
.impact-value {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent);
    line-height: 1;
}
.impact-suffix {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--accent);
}
.impact-label {
    display: block;
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ---- PROJECTS ---- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.project-card {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-4px);
    color: var(--text-primary);
}
.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.project-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}
.project-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.project-lang {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.lang-dot {
    width: 10px;
    height: 10px;
    background: #3572A5;
    border-radius: 50%;
    display: inline-block;
}
.project-stars {
    font-size: 0.8rem;
    color: var(--amber);
}
.project-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    color: var(--accent);
}
.project-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    flex: 1;
}
.projects-contribution {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.projects-contribution a {
    font-family: var(--font-mono);
    font-weight: 500;
}

/* ---- ARSENAL ---- */
.arsenal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.arsenal-category h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}
.arsenal-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tool-badge {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s;
}
.tool-badge:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

/* ---- THOUGHT LEADERSHIP ---- */
.leadership-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: start;
}
.leadership-text p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

/* ---- BLOG FILTERS ---- */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.filter-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}
.filter-btn.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

/* ---- BLOG PREVIEW ---- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.blog-card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.blog-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-4px);
}
.blog-tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}
.blog-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}
.blog-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.blog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ---- MALWARE NEWS ---- */
.news-article {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}
.news-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.news-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.news-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}
.news-intro {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
}
.news-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.news-item:last-of-type {
    border-bottom: none;
}
.news-item h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.news-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
.news-item p:last-child {
    margin-bottom: 0;
}
.news-item a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}
.news-item a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.news-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.news-footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}
.news-footer strong {
    color: var(--accent);
    font-weight: 600;
}

/* ---- GALLERY PREVIEW ---- */
.gallery-grid-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.gallery-thumb {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid var(--border);
    transition: border-color 0.3s, transform 0.3s;
}
.gallery-thumb:hover {
    border-color: var(--border-hover);
    transform: scale(1.02);
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.gallery-thumb:hover img { transform: scale(1.08); }

/* ---- CONNECT ---- */
.section-connect {
    text-align: center;
    padding: var(--section-py) 0;
}
.connect-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}
.connect-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    transition: border-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
    font-weight: 500;
}
.connect-card:hover {
    border-color: var(--border-hover);
    color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 0 30px var(--accent-glow);
}
.connect-card svg { transition: color 0.3s; }
.connect-card:hover svg { color: var(--accent); }

/* ---- FOOTER ---- */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.footer-name { font-weight: 600; color: var(--text-secondary); }

/* ---- SCROLL REVEAL ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .hero-container { gap: 2rem; }
    .hero-image-wrapper { width: 280px; height: 350px; }
    .expertise-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .arsenal-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --section-py: 4rem; }

    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        transition: right 0.35s ease;
    }
    .nav-links.open { right: 0; }
    .nav-links li { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
    .nav-links a { font-size: 1rem; }

    .hero-container { flex-direction: column-reverse; text-align: center; }
    .hero-image-wrapper { width: 220px; height: 270px; margin: 0 auto; }
    .hero-tagline { margin: 0 auto 2rem; }
    .hero-cta { justify-content: center; }

    .about-content { grid-template-columns: 1fr; }
    .expertise-grid { grid-template-columns: 1fr; }
    .impact-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: 1fr; }
    .arsenal-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid { grid-template-columns: 1fr; }
    .gallery-grid-preview { grid-template-columns: repeat(2, 1fr); }
    .leadership-content { grid-template-columns: 1fr; }

    .connect-links { flex-direction: column; align-items: center; }
    .connect-card { width: 100%; max-width: 300px; }

    .footer-container { flex-direction: column; gap: 0.5rem; text-align: center; }

    .parallax-divider {
        background-attachment: scroll;
        height: 240px;
        margin-top: -1.5rem;
        margin-bottom: -1.5rem;
    }

    .scroll-indicator { display: none; }
}

@media (max-width: 480px) {
    .hero-name { font-size: 2rem; }
    .impact-grid { grid-template-columns: 1fr; }
    .arsenal-grid { grid-template-columns: 1fr; }
    .gallery-grid-preview { grid-template-columns: 1fr; }
}
