/* ==========================================================================
   Base Theme & Variables
   ========================================================================== */
   :root {
    --bg-color: #050505;
    --text-main: #e0e0e0;
    --neon-green: #00FF41;
    --neon-blue: #00FFFF;
    --dark-green: #008F11;
    --glass-bg: rgba(5, 5, 5, 0.7);
    --glass-border: rgba(0, 255, 65, 0.2);
    --font-mono: 'Space Mono', monospace;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--neon-green);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* Typography elements */
h1, h2, h3, h4, h5, h6, .giant-text, .glitch {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
}

ul {
    list-style: none;
}

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

/* ==========================================================================
   Matrix Canvas
   ========================================================================== */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.15;
}

/* ==========================================================================
   Utility Classes & Glassmorphism
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-panel {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Neon accents */
.neon-text {
    color: var(--neon-green);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.cyber-link {
    color: var(--neon-blue);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.cyber-link:hover {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.primary-btn {
    background: transparent;
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
}
.primary-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--neon-green);
    transition: all 0.3s ease;
    z-index: -1;
}
.primary-btn:hover {
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--neon-green);
}
.primary-btn:hover::before {
    left: 0;
}

.secondary-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-main);
}
.secondary-btn:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.2);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.cyber-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0) 100%);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neon-green);
}

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

.nav-btn {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-bottom: 2px solid transparent;
}
.nav-btn:hover, .nav-btn.active {
    color: var(--neon-green);
    border-bottom-color: var(--neon-green);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--neon-green);
    font-size: 2rem;
    cursor: pointer;
}

/* ==========================================================================
   Glitch Text Effect
   ========================================================================== */
.glitch {
    position: relative;
    color: white;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(21px, 9999px, 86px, 0); }
    5% { clip: rect(66px, 9999px, 12px, 0); }
    10% { clip: rect(81px, 9999px, 81px, 0); }
    15% { clip: rect(51px, 9999px, 20px, 0); }
    20% { clip: rect(74px, 9999px, 66px, 0); }
    25% { clip: rect(24px, 9999px, 11px, 0); }
    30% { clip: rect(10px, 9999px, 32px, 0); }
    35% { clip: rect(40px, 9999px, 5px, 0); }
    40% { clip: rect(21px, 9999px, 86px, 0); }
    45% { clip: rect(66px, 9999px, 12px, 0); }
    50% { clip: rect(81px, 9999px, 81px, 0); }
    55% { clip: rect(51px, 9999px, 20px, 0); }
    60% { clip: rect(74px, 9999px, 66px, 0); }
    65% { clip: rect(24px, 9999px, 11px, 0); }
    70% { clip: rect(10px, 9999px, 32px, 0); }
    75% { clip: rect(40px, 9999px, 5px, 0); }
    80% { clip: rect(21px, 9999px, 86px, 0); }
    85% { clip: rect(66px, 9999px, 12px, 0); }
    90% { clip: rect(81px, 9999px, 81px, 0); }
    95% { clip: rect(51px, 9999px, 20px, 0); }
    100% { clip: rect(74px, 9999px, 66px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    5% { clip: rect(52px, 9999px, 74px, 0); }
    10% { clip: rect(79px, 9999px, 85px, 0); }
    15% { clip: rect(75px, 9999px, 5px, 0); }
    20% { clip: rect(67px, 9999px, 61px, 0); }
    25% { clip: rect(14px, 9999px, 79px, 0); }
    30% { clip: rect(1px, 9999px, 66px, 0); }
    35% { clip: rect(86px, 9999px, 30px, 0); }
    40% { clip: rect(23px, 9999px, 98px, 0); }
    45% { clip: rect(85px, 9999px, 72px, 0); }
    50% { clip: rect(71px, 9999px, 75px, 0); }
    55% { clip: rect(2px, 9999px, 48px, 0); }
    60% { clip: rect(30px, 9999px, 16px, 0); }
    65% { clip: rect(59px, 9999px, 50px, 0); }
    70% { clip: rect(41px, 9999px, 62px, 0); }
    75% { clip: rect(2px, 9999px, 82px, 0); }
    80% { clip: rect(47px, 9999px, 73px, 0); }
    85% { clip: rect(3px, 9999px, 27px, 0); }
    90% { clip: rect(26px, 9999px, 55px, 0); }
    95% { clip: rect(42px, 9999px, 97px, 0); }
    100% { clip: rect(38px, 9999px, 49px, 0); }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    padding: 3rem;
    max-width: 800px;
}

.giant-text {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin: 1rem 0;
    line-height: 1.1;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-family: var(--font-sans);
    font-weight: 300;
    color: #aaa;
    margin-bottom: 2rem;
    text-transform: none;
    letter-spacing: normal;
}

.sys-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.typeout-line {
    font-family: var(--font-mono);
    color: var(--text-main);
    background: rgba(0,0,0,0.5);
    padding: 1rem;
    border-radius: 4px;
    border-left: 2px solid var(--neon-green);
    margin-bottom: 2.5rem;
    min-height: 3.5rem;
}

.typeout-line .prompt {
    color: var(--neon-green);
}

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

@keyframes blink {
    50% { opacity: 0; }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   Sections Formatting
   ========================================================================== */
section:not(.hero-section) {
    padding: 6rem 0;
}

.section-header {
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-header h2 {
    font-size: 2.5rem;
    color: white;
}
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 2px;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

/* ==========================================================================
   About Terminal
   ========================================================================== */
.terminal-window {
    background: #111;
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.terminal-header {
    background: #252526;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

.btn-close, .btn-min, .btn-max {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}
.btn-close { background: #ff5f56; }
.btn-min { background: #ffbd2e; }
.btn-max { background: #27c93f; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #888;
    margin-left: auto;
    margin-right: auto;
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    color: #00FF41;
    font-size: 0.95rem;
    min-height: 250px;
    white-space: pre-wrap;
}
.terminal-body p {
    margin-bottom: 1rem;
    color: #aaa;
}
.terminal-body .cmd-highlight {
    color: var(--neon-blue);
}

.mt-4 {
    margin-top: 2rem;
}

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

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed #333;
    padding-bottom: 0.5rem;
}

.skill-category h3 ion-icon {
    color: var(--neon-blue);
    font-size: 1.3rem;
}

.skill-list li {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: #bbb;
}
.skill-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--neon-green);
    font-weight: bold;
}

/* ==========================================================================
   Projects / Encrypted Cards
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-green);
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0,255,65,0.2) 0%, rgba(0,0,0,0) 70%);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.project-card:hover .card-glow {
    width: 150%;
    height: 150%;
}

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

.project-meta {
    margin-bottom: 1rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
    border-radius: 4px;
}

.project-title {
    font-size: 1.4rem;
    color: white;
    margin-bottom: 1rem;
    min-height: 2rem;
    cursor: default;
}

.project-desc {
    color: #999;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Contact / Secure Form
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    color: var(--neon-green);
    margin-bottom: 1rem;
}

.contact-info p {
    color: #aaa;
    margin-bottom: 2rem;
}

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

.cyber-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.cyber-form input,
.cyber-form textarea {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid #333;
    padding: 1rem;
    color: white;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

.cyber-form label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #666;
    pointer-events: none;
    transition: all 0.3s ease;
    background: var(--bg-color);
    padding: 0 0.5rem;
}

.cyber-form textarea + label {
    top: 1rem;
    transform: none;
}

/* Float label effect */
.cyber-form input:focus ~ label,
.cyber-form input:not(:placeholder-shown) ~ label,
.cyber-form textarea:focus ~ label,
.cyber-form textarea:not(:placeholder-shown) ~ label {
    top: -0.5rem;
    font-size: 0.75rem;
    color: var(--neon-green);
}

.cyber-form input:focus,
.cyber-form textarea:focus {
    border-color: var(--neon-green);
}

.focus-border {
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background-color: var(--neon-blue);
    transition: 0.4s;
}

.cyber-form input:focus ~ .focus-border,
.cyber-form textarea:focus ~ .focus-border {
    width: 100%;
    transition: 0.4s;
}

.submit-btn {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.cyber-footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px dashed #333;
    position: relative;
    margin-top: 4rem;
}

.scanline {
    width: 100%;
    height: 100px;
    background: linear-gradient(0deg, rgba(0,255,65,0) 0%, rgba(0,255,65,0.1) 50%, rgba(0,255,65,0) 100%);
    opacity: 0.1;
    position: absolute;
    bottom: 0;
    left: 0;
    animation: scanline 8s linear infinite;
    pointer-events: none;
}

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

.cyber-footer p {
    font-family: var(--font-mono);
    color: #555;
    font-size: 0.9rem;
}

.cyber-footer .small-text {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: var(--neon-blue);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .hero-content {
        padding: 1.5rem;
    }
}
