:root {
    --primary: #00ff41;
    --secondary: #00b33c;
    --dark: #0a0a0a;
    --light: #f5f5f5;
    --accent: #ff004c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

body {
    background-color: var(--dark);
    color: var(--primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Accessibility improvements */
:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Animation Definitions */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary) }
}

@keyframes scanline {
    0% { top: 0%; }
    100% { top: 100%; }
}

@keyframes fillProgress {
    to { transform: scaleX(1); }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes glitch-anim {
    0% { clip: rect(13px, 9999px, 56px, 0); }
    5% { clip: rect(65px, 9999px, 91px, 0); }
    10% { clip: rect(34px, 9999px, 44px, 0); }
    15% { clip: rect(87px, 9999px, 22px, 0); }
    20% { clip: rect(45px, 9999px, 46px, 0); }
    25% { clip: rect(24px, 9999px, 87px, 0); }
    30% { clip: rect(120px, 9999px, 34px, 0); }
    35% { clip: rect(56px, 9999px, 34px, 0); }
    40% { clip: rect(89px, 9999px, 115px, 0); }
    45% { clip: rect(12px, 9999px, 76px, 0); }
    50% { clip: rect(34px, 9999px, 101px, 0); }
    55% { clip: rect(4px, 9999px, 34px, 0); }
    60% { clip: rect(76px, 9999px, 3px, 0); }
    65% { clip: rect(23px, 9999px, 56px, 0); }
    70% { clip: rect(78px, 9999px, 87px, 0); }
    75% { clip: rect(100px, 9999px, 34px, 0); }
    80% { clip: rect(57px, 9999px, 23px, 0); }
    85% { clip: rect(25px, 9999px, 56px, 0); }
    90% { clip: rect(100px, 9999px, 103px, 0); }
    95% { clip: rect(3px, 9999px, 134px, 0); }
    100% { clip: rect(85px, 9999px, 67px, 0); }
}

/* Background effects */
.glitch-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.05;
}

.glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
            0deg,
            rgba(0, 255, 65, 0.15),
            rgba(0, 255, 65, 0.15) 1px,
            transparent 1px,
            transparent 2px
    );
}

.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: rgba(0, 255, 65, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.7);
    z-index: 3;
    pointer-events: none;
    animation: scanline 10s linear infinite;
}

.binary-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.1;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Header & Navigation */
header {
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--primary);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--primary);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

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

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

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.hero-content {
    width: 60%;
}

.hero-title {
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.hero-title span {
    display: block;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 600px;
}

.cta-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

/* Service Cards */
.services-tabs {
    margin-top: 40px;
}

.tab-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.tab-button {
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-button:hover,
.tab-button.active {
    background-color: var(--primary);
    color: var(--dark);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.security-card {
    padding: 30px;
    border: 1px solid var(--primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.security-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background-color: var(--accent);
    transition: height 0.3s ease;
}

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

.security-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.1);
}

.security-card h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--accent);
}

.security-card p {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Terminal Section */
.terminal-section {
    margin: 100px 0;
}

.terminal {
    background-color: #0f0f0f;
    border: 1px solid var(--primary);
    padding: 20px;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

.terminal-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
}

.terminal-circles {
    display: flex;
    gap: 10px;
    margin-right: 20px;
}

.terminal-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

.terminal-title {
    font-size: 14px;
    color: rgba(0, 255, 65, 0.7);
}

.terminal-content {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--dark);
}

.terminal-content::-webkit-scrollbar {
    width: 6px;
}

.terminal-content::-webkit-scrollbar-track {
    background: var(--dark);
}

.terminal-content::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 6px;
}

.terminal-content p {
    margin-bottom: 10px;
    word-wrap: break-word;
}

.typing {
    border-right: 2px solid var(--primary);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    margin-bottom: 10px;
}

.terminal-input-container {
    display: flex;
    align-items: center;
    width: 100%;
    border-top: 1px solid rgba(0, 255, 65, 0.3);
    padding-top: 15px;
}

.prompt {
    color: var(--primary);
    font-family: 'Courier New', monospace;
    margin-right: 8px;
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    caret-color: var(--primary);
    outline: none;
}

/* Add blinking cursor effect */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background-color: var(--primary);
    margin-left: 2px;
    animation: blink 1s infinite;
}

/* Project Section */
.projects-section {
    margin: 100px 0;
}

.section-title {
    font-size: 36px;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    position: relative;
    height: 300px;
    overflow: hidden;
    border: 1px solid var(--primary);
}

.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    transition: all 0.3s ease;
}

.project-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 30px;
    background-color: rgba(0, 255, 65, 0.9);
    color: var(--dark);
    transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
    bottom: 0;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.project-desc {
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.project-link svg {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.project-link:hover svg {
    transform: translateX(5px);
}

/* Skills Section */
.skills-section {
    margin: 100px 0;
}

.skills-subtitle {
    color: var(--accent);
    font-size: 24px;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
}

.skill-bar {
    margin-bottom: 30px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-progress {
    width: 100%;
    height: 5px;
    background-color: rgba(0, 255, 65, 0.2);
    position: relative;
}

.skill-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--primary);
    /* Remove animation to ensure width setting works */
    transform: none;
}

/* Code Section */
.code-section {
    margin: 100px 0;
}

.code-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.code-tabs {
    display: flex;
    border-bottom: 1px solid var(--primary);
    margin-bottom: 20px;
}

.code-tab {
    background: transparent;
    border: none;
    color: var(--primary);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.code-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.code-tab:hover::after,
.code-tab.active::after {
    width: 100%;
}

.code-tab.active {
    color: var(--accent);
}

.code-editor-container {
    position: relative;
    border: 1px solid var(--primary);
    background-color: #0f0f0f;
    height: 400px;
    overflow: hidden;
}

.code-editor {
    display: none;
    height: 100%;
    overflow: auto;
}

.code-editor.active {
    display: block;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
}

.file-name {
    color: var(--primary);
    font-size: 14px;
}

.editor-actions {
    display: flex;
    gap: 10px;
}

.run-btn {
    background-color: var(--accent);
    color: var(--dark);
    border: none;
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.run-btn:hover {
    background-color: #ff2d6b;
}

.code-content {
    margin: 0;
    padding: 20px;
    overflow: auto;
    height: calc(100% - 50px);
    color: var(--primary);
    line-height: 1.6;
    font-size: 14px;
}

.code-output {
    border: 1px solid var(--primary);
    background-color: #0f0f0f;
    margin-top: 20px;
    height: 200px;
    overflow: hidden;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.3);
}

.output-title {
    color: var(--primary);
    font-size: 14px;
}

.clear-btn {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 5px 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background-color: rgba(0, 255, 65, 0.1);
}

.output-content {
    padding: 20px;
    overflow: auto;
    height: calc(100% - 50px);
    color: var(--primary);
    font-family: monospace;
    white-space: pre-wrap;
}

/* Contact Section */
.contact-section {
    margin: 100px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--accent);
}

.contact-info p {
    line-height: 1.6;
    margin-bottom: 20px;
}

.contact-links {
    margin-top: 30px;
}

.contact-links a {
    display: inline-block;
    margin-right: 20px;
    color: var(--primary);
    font-size: 24px;
    transition: all 0.3s ease;
}

.contact-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

.contact-form {
    display: grid;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-control {
    width: 100%;
    background-color: transparent;
    border: 1px solid var(--primary);
    padding: 15px;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    resize: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

.form-control::placeholder {
    color: rgba(0, 255, 65, 0.5);
}

textarea.form-control {
    min-height: 150px;
}

.submit-btn {
    padding: 15px 30px;
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

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

/* Footer */
footer {
    padding: 50px 0;
    border-top: 1px solid var(--primary);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.copyright {
    font-size: 14px;
    color: rgba(0, 255, 65, 0.7);
}

/* Helper Classes */
.highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 30%;
    background-color: rgba(255, 0, 76, 0.2);
    bottom: 0;
    left: 0;
    z-index: -1;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.appear {
    opacity: 1;
    transform: translateY(0);
}

.glitch-text {
    position: relative;
    display: inline-block;
}

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

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--secondary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content {
        width: 100%;
    }

    .hero-title {
        font-size: 42px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .code-tabs {
        flex-direction: column;
        align-items: flex-start;
    }

    .code-tab {
        width: 100%;
        padding: 10px 0;
    }

    .tab-buttons {
        flex-direction: column;
        width: 100%;
    }

    .tab-button {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    header {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero-title {
        font-size: 36px;
    }

    .security-grid {
        grid-template-columns: 1fr;
    }

    .terminal-instruction {
        text-align: center;
        margin-bottom: 20px;
        color: var(--accent);
        font-size: 16px;
    }
}