/* ============================================
   Cybersecurity Portfolio - Main Stylesheet
   Cyberpunk Blue/Purple Theme
   ============================================ */

/* CSS Custom Properties - Cyberpunk Color Palette */
:root {
    /* Backgrounds */
    --color-bg-primary: #050816;
    --color-bg-secondary: #0a0e27;
    --color-bg-tertiary: #1a1f3a;
    --color-bg-overlay: rgba(10, 14, 39, 0.9);

    /* Neon Accents */
    --color-neon-cyan: #00ff9f;
    --color-neon-purple: #bd00ff;
    --color-neon-blue: #00d9ff;
    --color-neon-pink: #ff0099;

    /* Text Colors */
    --color-text-primary: #e0e7ff;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #64748b;

    /* Borders & Dividers */
    --color-border-default: #1e293b;
    --color-border-glow: rgba(0, 255, 159, 0.3);

    /* Neon Glow Effects */
    --glow-cyan: 0 0 10px rgba(0, 255, 159, 0.5),
                 0 0 20px rgba(0, 255, 159, 0.3),
                 0 0 30px rgba(0, 255, 159, 0.1);
    --glow-purple: 0 0 10px rgba(189, 0, 255, 0.5),
                   0 0 20px rgba(189, 0, 255, 0.3),
                   0 0 30px rgba(189, 0, 255, 0.1);
    --glow-blue: 0 0 10px rgba(0, 217, 255, 0.5),
                 0 0 20px rgba(0, 217, 255, 0.3),
                 0 0 30px rgba(0, 217, 255, 0.1);

    /* Typography */
    --font-mono: 'Courier New', 'Courier', monospace;
    --font-display: 'Orbitron', sans-serif;

    /* Timing Functions */
    --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ============================================
   Base Styles & Reset
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

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

/* Font Classes */
.font-orbitron {
    font-family: var(--font-display);
}

/* ============================================
   Selection
   ============================================ */

::selection {
    background-color: var(--color-neon-cyan);
    color: var(--color-bg-primary);
}

::-moz-selection {
    background-color: var(--color-neon-cyan);
    color: var(--color-bg-primary);
}

/* ============================================
   Custom Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-neon-cyan);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-neon-purple);
}

/* ============================================
   Matrix Canvas Background
   ============================================ */

#matrix-canvas {
    opacity: 0.15;
    z-index: 0;
}

/* ============================================
   Scanline Overlay
   ============================================ */

#scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* ============================================
   Navigation
   ============================================ */

.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link.active {
    color: var(--color-neon-cyan);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-neon-cyan);
    transition: width 0.3s var(--ease-out-cubic);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================
   ASCII Art / Terminal Elements
   ============================================ */

.ascii-art {
    line-height: 1.1;
    letter-spacing: 0;
    text-shadow: var(--glow-cyan);
    overflow-x: auto;
    white-space: pre;
}

/* Hide scrollbar for ASCII art on mobile */
.ascii-art::-webkit-scrollbar {
    height: 4px;
}

.terminal-window {
    box-shadow: var(--glow-purple);
}

.terminal-cursor::after {
    content: '█';
    animation: blink 1s infinite;
    margin-left: 2px;
}

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

/* ============================================
   Buttons & CTAs
   ============================================ */

.cta-button {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.cta-button:hover::before {
    left: 100%;
}

/* ============================================
   Skill Cards
   ============================================ */

.skill-card {
    transition: all 0.3s var(--ease-out-cubic);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-cyan);
}

.skill-bar-container {
    position: relative;
    overflow: hidden;
}

.skill-bar {
    transition: width 1s var(--ease-out-cubic);
    box-shadow: 0 0 10px rgba(0, 255, 159, 0.5);
}

/* ============================================
   Experience Timeline
   ============================================ */

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        var(--color-neon-cyan),
        var(--color-neon-purple)
    );
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    box-shadow: var(--glow-cyan);
    z-index: 2;
}

.timeline-content {
    transition: all 0.3s var(--ease-out-cubic);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--glow-purple);
}

/* Tech Badge Styles */
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 159, 0.1);
    border: 1px solid var(--color-neon-cyan);
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.tech-badge:hover {
    background: rgba(0, 255, 159, 0.2);
    box-shadow: var(--glow-cyan);
    transform: scale(1.05);
}

.tech-badge-icon {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 5px var(--color-neon-cyan));
}

/* ============================================
   Blog Cards
   ============================================ */

.blog-card {
    background: rgba(10, 14, 39, 0.5);
    border: 1px solid rgba(189, 0, 255, 0.3);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s var(--ease-out-cubic);
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-neon-purple);
    box-shadow: var(--glow-purple);
}

.blog-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--color-neon-blue);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--color-neon-blue);
}

/* ============================================
   Blog Modal
   ============================================ */

.blog-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: start;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.blog-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.blog-modal-content {
    position: relative;
    z-index: 9999;
    width: 100%;
    max-width: 800px;
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-neon-cyan);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--glow-cyan);
    animation: slideUp 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--color-neon-cyan);
}

.blog-article {
    color: var(--color-text-primary);
    line-height: 1.8;
}

.blog-article h1,
.blog-article h2,
.blog-article h3,
.blog-article h4 {
    font-family: var(--font-display);
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-neon-purple);
}

.blog-article h1 { font-size: 2.5rem; }
.blog-article h2 { font-size: 2rem; }
.blog-article h3 { font-size: 1.5rem; }
.blog-article h4 { font-size: 1.25rem; }

.blog-article p {
    margin-bottom: 1rem;
}

.blog-article code {
    background: rgba(0, 255, 159, 0.1);
    border: 1px solid var(--color-neon-cyan);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--color-neon-cyan);
    font-size: 0.9em;
}

.blog-article pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-border-default);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-article pre code {
    background: none;
    border: none;
    padding: 0;
}

.blog-article ul,
.blog-article ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.blog-article li {
    margin-bottom: 0.5rem;
}

.blog-article a {
    color: var(--color-neon-cyan);
    text-decoration: underline;
    transition: color 0.3s;
}

.blog-article a:hover {
    color: var(--color-neon-blue);
}

.blog-article blockquote {
    border-left: 4px solid var(--color-neon-cyan);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

.blog-article img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* ============================================
   Certification Badges
   ============================================ */

.cert-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(189, 0, 255, 0.1);
    border: 2px solid var(--color-neon-purple);
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.cert-badge:hover {
    transform: scale(1.05);
    box-shadow: var(--glow-purple);
}

.cert-badge-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

/* ============================================
   Form Elements
   ============================================ */

input:focus,
textarea:focus,
button:focus {
    outline: none;
}

input:focus,
textarea:focus {
    box-shadow: 0 0 0 2px var(--color-neon-cyan);
}

/* ============================================
   Utility Classes
   ============================================ */

.text-glow-cyan {
    text-shadow: var(--glow-cyan);
}

.text-glow-purple {
    text-shadow: var(--glow-purple);
}

.box-glow-cyan {
    box-shadow: var(--glow-cyan);
}

.box-glow-purple {
    box-shadow: var(--glow-purple);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .ascii-art {
        font-size: 0.5rem;
    }

    .terminal-window {
        padding: 1rem;
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline::before {
        left: 3px;
    }

    .blog-modal {
        padding: 1rem;
    }

    .blog-modal-content {
        padding: 1.5rem;
    }

    .blog-article h1 { font-size: 1.75rem; }
    .blog-article h2 { font-size: 1.5rem; }
    .blog-article h3 { font-size: 1.25rem; }
    .blog-article h4 { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .ascii-art {
        font-size: 0.4rem;
    }
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #matrix-canvas {
        display: none;
    }

    #scanline-overlay {
        display: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    #matrix-canvas,
    #scanline-overlay,
    #main-nav {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
