/* Import Security-focused fonts */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Orbitron:wght@400..900&display=swap');

/* CSS Variables (Security-focused Design System) */
:root {
    /* Advanced cybersecurity color palette - Toned down */
    --background: hsl(220, 100%, 2%);
    --foreground: hsl(120, 20%, 85%);
    
    --card: hsl(220, 80%, 4%);
    --card-foreground: hsl(120, 20%, 85%);
    
    --primary: hsl(120, 60%, 35%);
    --primary-foreground: hsl(220, 100%, 2%);
    
    --secondary: hsl(60, 80%, 40%);
    --secondary-foreground: hsl(220, 100%, 2%);
    
    --danger: hsl(0, 80%, 45%);
    --warning: hsl(30, 80%, 45%);
    
    --muted: hsl(220, 50%, 8%);
    --muted-foreground: hsl(120, 15%, 65%);
    
    --accent: hsl(120, 60%, 35%);
    --accent-foreground: hsl(220, 100%, 2%);
    
    --border: hsl(120, 20%, 12%);
    --input: hsl(220, 50%, 8%);
    --ring: hsl(120, 60%, 35%);
    
    --radius: 0.5rem;
    
    /* Security-themed gradients - Subdued */
    --gradient-primary: linear-gradient(135deg, hsl(120, 60%, 35%), hsl(120, 60%, 25%));
    --gradient-danger: linear-gradient(135deg, hsl(0, 80%, 45%), hsl(0, 80%, 35%));
    --gradient-warning: linear-gradient(135deg, hsl(60, 80%, 40%), hsl(45, 80%, 35%));
    --gradient-matrix: linear-gradient(180deg, hsla(120, 60%, 35%, 0.05), transparent);
    
    /* Enhanced shadows for cybersec feel - Reduced intensity */
    --shadow-glow: 0 0 15px hsla(120, 60%, 35%, 0.15);
    --shadow-glow-strong: 0 0 25px hsla(120, 60%, 35%, 0.25);
    --shadow-card: 0 8px 32px hsla(220, 100%, 2%, 0.8);
    --shadow-terminal: inset 0 0 15px hsla(120, 60%, 35%, 0.05);
    
    /* Matrix-style animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-glow: all 0.5s ease-in-out;
    
    /* Typography scale */
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Enhanced security theme background with matrix effect - Reduced intensity */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at top right, hsla(120, 60%, 35%, 0.04), transparent 50%),
        radial-gradient(ellipse at bottom left, hsla(120, 60%, 35%, 0.02), transparent 40%),
        linear-gradient(0deg, transparent 0%, hsla(120, 60%, 35%, 0.01) 50%, transparent 100%);
    pointer-events: none;
    z-index: 0;
    animation: matrix-glow 8s ease-in-out infinite;
}

/* Matrix-style scrolling background effect - Subtle */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 99%, hsla(120, 60%, 35%, 0.015) 100%),
        linear-gradient(180deg, transparent 99%, hsla(120, 60%, 35%, 0.015) 100%);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.2;
    animation: matrix-scroll 20s linear infinite;
}

body > * {
    position: relative;
    z-index: 1;
}

/* Layout */
.container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: var(--transition-smooth);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background-color: hsla(217, 91%, 3%, 0.8);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-card);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 3rem;
    height: 3rem;
    border-radius: 0.375rem;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--primary-foreground);
    box-shadow: var(--shadow-glow);
    animation: terminal-glow 3s ease-in-out infinite;
    border: 1px solid var(--primary);
}

.logo-text h1 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin: 0;
    text-shadow: 0 0 5px hsla(120, 60%, 35%, 0.2);
}

.logo-text p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0;
    letter-spacing: 0.1em;
}

/* Navigation */
.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
    opacity: 0;
}

.nav-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    text-shadow: 0 0 3px var(--primary);
}

.nav-btn:hover::before {
    left: 0;
    opacity: 0.1;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: var(--transition-smooth);
}

.mobile-menu-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    background: linear-gradient(135deg, 
        hsla(220, 80%, 4%, 0.95), 
        hsla(220, 60%, 6%, 0.9));
    backdrop-filter: blur(10px);
}

.mobile-nav .nav-btn {
    justify-content: flex-start;
    text-align: left;
}

/* Sections */
.section {
    padding: 4rem 0;
    animation: fade-in 0.5s ease-out forwards;
}

/* Section Titles */
.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 0 10px hsla(120, 60%, 35%, 0.2);
    letter-spacing: 0.05em;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 3rem;
    height: 2px;
    background: var(--gradient-primary);
    box-shadow: 0 0 10px hsla(120, 60%, 35%, 0.3);
}

/* Enhanced Cards with terminal aesthetics */
.card {
    background: linear-gradient(135deg, 
        hsla(220, 80%, 4%, 0.9) 0%, 
        hsla(220, 60%, 6%, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card), var(--shadow-terminal);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transform: translateY(-2px);
}

.card:hover::before {
    opacity: 1;
}

/* Hero Section */
.hero-card {
    padding: 2rem;
}

.hero-text {
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
}

.contact-item i {
    color: var(--primary);
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.contact-item a:hover {
    color: var(--primary);
}

/* Job Cards */
.job-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.job-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Job Cards with enhanced security styling */
.job-info h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    margin: 0;
    letter-spacing: 0.025em;
}

.job-card:hover .job-info h3 {
    color: var(--primary);
    text-shadow: 0 0 5px hsla(120, 60%, 35%, 0.2);
}

.company {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
    letter-spacing: 0.05em;
}

.job-dates {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--secondary);
    font-weight: 500;
    white-space: nowrap;
    background: hsla(60, 80%, 40%, 0.08);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid hsla(60, 80%, 40%, 0.15);
}

.job-points {
    list-style: none;
    padding: 0;
}

.job-points li {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.job-points li span {
    color: var(--primary);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* Projects */
.projects-grid {
    display: grid;
    gap: 1.5rem;
}

.project-card {
    padding: 1.5rem;
}

/* Project Cards */
.project-card h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
    letter-spacing: 0.025em;
}

.project-card:hover h3 {
    color: var(--primary);
    text-shadow: 0 0 5px hsla(120, 60%, 35%, 0.2);
}

.project-meta {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.project-points {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.project-points li {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.project-points li span {
    color: var(--primary);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* Skills Section */
.skills-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.skill-category {
    padding: 1.5rem;
}

/* Enhanced Skills Categories */
.skill-category h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-shadow: 0 0 5px hsla(120, 60%, 35%, 0.15);
}

.certifications-section {
    padding: 1.5rem;
    background: linear-gradient(135deg, 
        hsla(120, 60%, 35%, 0.06), 
        hsla(60, 80%, 40%, 0.03));
    border: 1px solid hsla(120, 60%, 35%, 0.2);
    position: relative;
    overflow: hidden;
}

.certifications-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        hsla(120, 60%, 35%, 0.01) 50%, 
        transparent 70%);
    animation: cert-scan 3s ease-in-out infinite;
}

.certifications-section h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px hsla(120, 60%, 35%, 0.2);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Contact Section */
.contact-card {
    padding: 2rem;
    text-align: center;
}

.contact-card .contact-links {
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card .contact-item {
    flex-direction: column;
    gap: 0.5rem;
}

.contact-card .contact-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--primary-foreground);
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-glow);
}

.contact-card .contact-item a:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px hsla(160, 100%, 50%, 0.3);
}

.contact-card .contact-item i {
    font-size: 1.5rem;
    color: var(--primary-foreground);
}

/* Contact Form */
.contact-section {
    padding: 2rem;
    max-width: 48rem;
}

.contact-intro {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.form-input,
.form-textarea {
    background-color: hsla(217, 91%, 3%, 0.5);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 0.75rem;
    color: var(--foreground);
    font-size: 0.875rem;
    transition: var(--transition-smooth);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px hsla(160, 100%, 50%, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 6rem;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    border-color: hsla(160, 100%, 50%, 0.3);
}

.form-note {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 1rem;
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    color: var(--foreground);
    box-shadow: var(--shadow-card);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--primary);
    background-color: hsla(160, 100%, 50%, 0.1);
}

.toast.error {
    border-color: hsl(0, 84%, 60%);
    background-color: hsla(0, 84%, 60%, 0.1);
}

/* Security-focused Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes terminal-glow {
    0%, 100% {
        box-shadow: 0 0 15px hsla(120, 60%, 35%, 0.2);
    }
    50% {
        box-shadow: 0 0 25px hsla(120, 60%, 35%, 0.35);
    }
}

@keyframes matrix-glow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes matrix-scroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(50px);
    }
}

@keyframes cert-scan {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes code-flicker {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Terminal-style text effects */
.terminal-text {
    font-family: var(--font-mono);
    color: var(--primary);
    text-shadow: 0 0 5px hsla(120, 60%, 35%, 0.3);
    animation: code-flicker 2s ease-in-out infinite;
}

/* Enhanced Tags with security styling */
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 0.25rem;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, 
        hsla(220, 50%, 8%, 0.9), 
        hsla(220, 60%, 10%, 0.7));
    color: var(--muted-foreground);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-smooth);
}

.tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.tag:hover::before {
    left: 0;
    opacity: 0.1;
}

.certification-tag {
    background: linear-gradient(135deg, 
        hsla(120, 60%, 35%, 0.12), 
        hsla(60, 80%, 40%, 0.08));
    color: var(--primary);
    border: 1px solid hsla(120, 60%, 35%, 0.25);
    padding: 0.5rem 1rem;
    font-weight: 600;
    text-shadow: 0 0 3px hsla(120, 60%, 35%, 0.2);
}

.certification-tag:hover {
    background: linear-gradient(135deg, 
        hsla(120, 60%, 35%, 0.18), 
        hsla(60, 80%, 40%, 0.12));
    box-shadow: var(--shadow-glow);
}

/* Responsive Design */
@media (min-width: 768px) {
    .job-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-actions {
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-nav.show {
        display: flex;
    }
    
    .contact-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .toast {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .header,
    .mobile-menu-btn,
    .mobile-nav,
    .form-actions,
    .toast {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    
    .section-title {
        color: #333 !important;
        -webkit-text-fill-color: #333 !important;
    }
}
