/* ========================================
   INFOCESA - Cybersecurity Theme
   ======================================== */

/* Variables */
:root {
    --primary-color: #00ff88;
    --secondary-color: #00d9ff;
    --accent-color: #ff0055;
    --bg-dark: #0a0e27;
    --bg-darker: #060918;
    --bg-card: #0f1729;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-muted: #606060;
    --border-color: #1a2332;
    --success: #00ff88;
    --danger: #ff0055;
    --warning: #ffa500;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

code, pre, .terminal-prompt {
    font-family: 'Fira Code', 'Courier New', monospace;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

/* ========================================
   NAVIGATION
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.terminal-prompt {
    color: var(--text-secondary);
}

.cursor {
    color: var(--primary-color);
    animation: blink 1s infinite;
}

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

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

.matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 217, 255, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.matrix-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(0, 255, 136, 0.05) 25%, rgba(0, 255, 136, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 136, 0.05) 75%, rgba(0, 255, 136, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 136, 0.05) 25%, rgba(0, 255, 136, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 136, 0.05) 75%, rgba(0, 255, 136, 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.glitch-wrapper {
    margin-bottom: 1rem;
}

.glitch {
    font-size: 5rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    color: var(--primary-color);
    letter-spacing: 0.1em;
    animation: glitch-skew 1s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(61px, 9999px, 100px, 0); }
    20% { clip: rect(89px, 9999px, 33px, 0); }
    40% { clip: rect(21px, 9999px, 87px, 0); }
    60% { clip: rect(45px, 9999px, 12px, 0); }
    80% { clip: rect(78px, 9999px, 67px, 0); }
    100% { clip: rect(34px, 9999px, 91px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(12px, 9999px, 78px, 0); }
    20% { clip: rect(67px, 9999px, 23px, 0); }
    40% { clip: rect(34px, 9999px, 89px, 0); }
    60% { clip: rect(91px, 9999px, 45px, 0); }
    80% { clip: rect(23px, 9999px, 56px, 0); }
    100% { clip: rect(56px, 9999px, 12px, 0); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    10% { transform: skew(2deg); }
    20% { transform: skew(0deg); }
    30% { transform: skew(-2deg); }
    40% { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-family: 'Fira Code', monospace;
}

.typing-text {
    border-right: 2px solid var(--primary-color);
    padding-right: 5px;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

.hero-description {
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-description p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-dark);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

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

.btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.btn-icon {
    font-size: 1.2rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 30px; }
}

/* ========================================
   SECTIONS
   ======================================== */

section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-number {
    font-family: 'Fira Code', monospace;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* ========================================
   SERVICES
   ======================================== */

.services-preview {
    background: var(--bg-darker);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

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

.card-icon {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-list {
    margin-bottom: 1.5rem;
}

.feature-list li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.card-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link:hover {
    gap: 1rem;
}

/* ========================================
   STATS
   ======================================== */

.stats-section {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-darker) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Fira Code', monospace;
    margin-bottom: 0.5rem;
}

.stat-number::after {
    content: '+';
    color: var(--secondary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========================================
   WRITEUPS
   ======================================== */

.writeups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.writeup-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.writeup-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.15);
}

.writeup-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.writeup-tag {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: 'Fira Code', monospace;
}

.writeup-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-family: 'Fira Code', monospace;
}

.writeup-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.writeup-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.writeup-link {
    color: var(--secondary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.writeup-link:hover {
    gap: 1rem;
}

.section-cta {
    text-align: center;
}

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section {
    background: var(--bg-darker);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: grid-rotate 30s linear infinite;
}

@keyframes grid-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-column h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.footer-terminal {
    font-family: 'Fira Code', monospace;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.cursor-blink {
    animation: blink 1s infinite;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 968px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .glitch {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .glitch {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}
