/* ===== CSS Variables & Reset ===== */
:root {
    --primary: #e63946;
    --primary-light: #ff6b6b;
    --primary-dark: #c1121f;
    --accent: #00ff41;
    --accent-dim: #00cc33;
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: rgba(230, 57, 70, 0.15);
    --border-green: rgba(0, 255, 65, 0.15);
    --gradient-1: linear-gradient(135deg, #e63946, #ff6b6b);
    --gradient-2: linear-gradient(135deg, #00ff41, #00cc33);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    --radius: 12px;
    --radius-sm: 6px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-mono: 'Fira Code', 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== Scanlines Overlay ===== */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* ===== Matrix Canvas ===== */
#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}

.nav-logo .accent {
    animation: blink 1s step-end infinite;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-links a::before {
    content: '>';
    margin-right: 4px;
    color: var(--primary);
    opacity: 0;
    transition: var(--transition);
}

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

.nav-links a:hover::before {
    opacity: 1;
}

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content { max-width: 600px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(230, 57, 70, 0.08);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary-light);
    margin-bottom: 2rem;
}

.hero-badge .blink {
    animation: blink 1.5s ease-in-out infinite;
    color: var(--accent);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -3px;
    margin-bottom: 1.5rem;
}

.hero-title .line { display: block; }

.accent-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero-subtitle .separator {
    color: var(--primary);
    margin: 0 0.5rem;
    font-family: var(--font-mono);
}

.hero-description {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-mono);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(230, 57, 70, 0.05);
    color: var(--primary-light);
}

.hero-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition);
}

.hero-social:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 255, 65, 0.08);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat { display: flex; flex-direction: column; }

.stat-value { display: flex; align-items: baseline; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent);
    line-height: 1;
}

.stat-suffix {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-mono);
    margin-top: 0.25rem;
}

/* ===== Terminal Window ===== */
.hero-visual {
    width: 500px;
}

.terminal-window {
    background: #0d0d0d;
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 255, 65, 0.05);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid rgba(0, 255, 65, 0.1);
}

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

.terminal-dot.red { background: #e63946; }
.terminal-dot.yellow { background: #f4a261; }
.terminal-dot.green { background: #00ff41; }

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

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    height: 300px;
    overflow-y: auto;
    line-height: 1.8;
    text-align: left;
}

.terminal-body .prompt {
    color: var(--primary);
    font-weight: 700;
}

.terminal-body .cursor {
    animation: blink 0.8s step-end infinite;
    color: var(--accent);
}

.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;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: var(--font-mono);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--primary);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===== Sections ===== */
.section {
    padding: 5rem 2rem;
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header { margin-bottom: 3rem; }

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
}

/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text .lead {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.highlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--gradient-1);
    transition: height 0.4s ease;
}

.highlight-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.highlight-card:hover::before {
    height: 100%;
}

.highlight-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.highlight-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.highlight-card p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: var(--transition);
}

.skill-category:hover { border-color: var(--primary); }

.skill-category-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-icon { font-size: 1.25rem; }

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    padding: 0.35rem 0.75rem;
    background: rgba(230, 57, 70, 0.06);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tag:hover {
    background: rgba(230, 57, 70, 0.12);
    color: var(--primary-light);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.2);
}

.tag.highlight {
    background: rgba(0, 255, 65, 0.06);
    border-color: rgba(0, 255, 65, 0.25);
    color: var(--accent-dim);
}

.tag.highlight:hover {
    background: rgba(0, 255, 65, 0.12);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

/* ===== Experience Timeline ===== */
.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent-dim), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideIn {
    to { opacity: 1; transform: translateX(0); }
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    transform: translateX(-5px);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.6);
}

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

.timeline-content:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(230, 57, 70, 0.08);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.timeline-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.company {
    font-size: 0.85rem;
    color: var(--accent-dim);
    font-family: var(--font-mono);
    font-weight: 400;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    padding: 0.25rem 0.75rem;
    background: rgba(230, 57, 70, 0.08);
    border: 1px solid var(--border);
    border-radius: 3px;
}

.timeline-summary {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.88rem;
}

.timeline-achievements {
    list-style: none;
    display: grid;
    gap: 0.4rem;
}

.timeline-achievements li {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-left: 1.25rem;
    position: relative;
}

.timeline-achievements li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-family: var(--font-mono);
    font-weight: 700;
}

/* ===== CyberSecurity Section ===== */
.cyber-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.cyber-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.cyber-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cyber-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.cyber-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 0 40px rgba(230, 57, 70, 0.1);
}

.cyber-card:hover::after { opacity: 1; }

.cyber-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.cyber-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-light);
}

.cyber-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== Certifications ===== */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.cert-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(230, 57, 70, 0.1);
}

.cert-card.featured {
    border-color: var(--accent-dim);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.05);
}

.cert-badge {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cert-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cert-card p {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ===== Contact Section ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-lead {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.88rem;
}

.contact-link:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateX(8px);
    box-shadow: -4px 0 0 var(--primary);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.contact-icon svg {
    fill: var(--accent-dim);
    transition: var(--transition);
}

.contact-link:hover .contact-icon svg {
    fill: var(--primary-light);
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-green);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
}

.contact-card-inner p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

/* ===== Footer ===== */
.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 2;
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero { flex-direction: column; text-align: center; padding-top: 8rem; }
    .hero-content { max-width: 100%; }
    .hero-description { margin: 0 auto 2.5rem; }
    .hero-cta { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { width: 100%; max-width: 420px; margin-top: 3rem; }
    .terminal-window { text-align: left; }
    .about-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .certs-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .section { padding: 3.5rem 1.5rem; }
    .nav-links { display: none; }
    .nav-toggle { display: flex; }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
    }

    .hero-title { letter-spacing: -2px; }
    .hero-stats { flex-direction: row; gap: 1.5rem; justify-content: center; }
    .stat { align-items: center; text-align: center; }
    .hero-visual { margin-top: 2rem; }
    .scroll-indicator { display: none; }
    .about-highlights { grid-template-columns: 1fr; }
    .certs-grid { grid-template-columns: 1fr; }
    .cyber-grid { grid-template-columns: 1fr; }
    .timeline-header { flex-direction: column; }
    .timeline-date { align-self: flex-start; }
}
