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

:root {
    --bg-primary: #0B0F14;
    --bg-secondary: #111827;
    --bg-card: #1F2937;
    --text-primary: #E5E7EB;
    --text-secondary: #9CA3AF;
    --accent-green: #22C55E;
    --accent-blue: #38BDF8;
    --accent-cyan: #06B6D4;
    --border-color: #374151;
    --gradient-primary: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
    --gradient-secondary: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 15, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--accent-green);
}

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

.logo-name {
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-green);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at 20% 50%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.1) 0%, transparent 50%),
                var(--bg-primary);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(11, 15, 20, 0.8) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 15, 20, 0.8) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
}

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

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.typing-text {
    border-right: 3px solid var(--accent-green);
    animation: typing 3s steps(40) infinite;
}

@keyframes typing {
    0%, 50% { border-color: var(--accent-green); }
    51%, 100% { border-color: transparent; }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-green);
    border: 2px solid var(--accent-green);
}

.btn-secondary:hover {
    background: var(--accent-green);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* Terminal Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.terminal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: var(--bg-card);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.btn-close, .btn-minimize, .btn-maximize {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-close { background: #FF5F56; }
.btn-minimize { background: #FFBD2E; }
.btn-maximize { background: #27C93F; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
    text-align: center;
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
}

.terminal-line {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.prompt {
    color: var(--accent-green);
    margin-right: 8px;
}

.command {
    color: var(--text-primary);
}

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

.cursor {
    animation: blink 1s infinite;
}

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

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

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 2px solid var(--accent-green);
    border-bottom: 2px solid var(--accent-green);
    transform: rotate(45deg);
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(-10px) rotate(45deg); }
    60% { transform: translateY(-5px) rotate(45deg); }
}

/* Section Styles */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-line {
    width: 100px;
    height: 3px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-intro, .about-focus {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.about-focus strong {
    color: var(--text-primary);
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 5px;
}

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

.about-image {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cyber-grid {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.grid-line {
    position: absolute;
    background: var(--accent-green);
    opacity: 0.3;
}

.grid-line:nth-child(1) {
    width: 2px;
    height: 100%;
    left: 25%;
    animation: grid-pulse 3s infinite;
}

.grid-line:nth-child(2) {
    width: 2px;
    height: 100%;
    right: 25%;
    animation: grid-pulse 3s infinite 1s;
}

.grid-line:nth-child(3) {
    height: 2px;
    width: 100%;
    top: 25%;
    animation: grid-pulse 3s infinite 2s;
}

.grid-line:nth-child(4) {
    height: 2px;
    width: 100%;
    bottom: 25%;
    animation: grid-pulse 3s infinite 0.5s;
}

@keyframes grid-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-green);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.2);
}

.skill-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: var(--bg-primary);
}

.skill-icon svg {
    width: 30px;
    height: 30px;
}

.skill-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.skill-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-green);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(56, 189, 248, 0.1));
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
}

.project-category {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-content {
    padding: 30px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tech-tag {
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent-green);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--accent-cyan);
}

.project-link svg {
    width: 18px;
    height: 18px;
}

/* Certifications Section */
.certifications-content {
    display: grid;
    gap: 60px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.cert-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.cert-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-green);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.2);
}

.cert-icon {
    margin-bottom: 20px;
}

.cert-badge {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-mono);
}

.cert-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.cert-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.tool-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
}

.tool-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.2);
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.tool-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.tool-item ul {
    list-style: none;
}

.tool-item li {
    color: var(--text-secondary);
    padding: 5px 0;
    position: relative;
    padding-left: 20px;
}

.tool-item li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: var(--text-secondary);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-link {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--accent-cyan);
}

.contact-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.binary-rain {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent-green);
    opacity: 0.6;
}

.binary-char {
    animation: binary-fall 3s infinite;
    animation-delay: calc(var(--i) * 0.2s);
}

.binary-char:nth-child(1) { --i: 0; }
.binary-char:nth-child(2) { --i: 1; }
.binary-char:nth-child(3) { --i: 2; }
.binary-char:nth-child(4) { --i: 3; }
.binary-char:nth-child(5) { --i: 4; }
.binary-char:nth-child(6) { --i: 5; }
.binary-char:nth-child(7) { --i: 6; }
.binary-char:nth-child(8) { --i: 7; }
.binary-char:nth-child(9) { --i: 8; }
.binary-char:nth-child(10) { --i: 9; }
.binary-char:nth-child(11) { --i: 10; }
.binary-char:nth-child(12) { --i: 11; }
.binary-char:nth-child(13) { --i: 12; }
.binary-char:nth-child(14) { --i: 13; }
.binary-char:nth-child(15) { --i: 14; }
.binary-char:nth-child(16) { --i: 15; }

@keyframes binary-fall {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-20px); opacity: 1; }
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-content p:last-child {
    color: var(--accent-green);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-secondary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 10px 0;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .terminal {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .about-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .skill-card,
    .project-card,
    .cert-item,
    .tool-item {
        padding: 20px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Scroll Animations */
.navbar.scrolled {
    background: rgba(11, 15, 20, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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