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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow-x: hidden;
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f4f7f5;
}

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

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #00ff88;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00ff88;
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 300;
    opacity: 0.9;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #00ff88, #0099ff);
    border: none;
    border-radius: 50px;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.5);
}

/* Network Animation */
.network-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.node {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 4s infinite;
}

.connection-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    transform-origin: left;
    animation: dataFlow 3s infinite;
}

.code-particle {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(0, 153, 255, 0.6);
    animation: codeFloat 8s infinite linear;
}

.binary-rain {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: rgba(0, 255, 136, 0.4);
    animation: binaryFall 6s infinite linear;
}

.network-packet {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #0099ff;
    border-radius: 50%;
    animation: packetTravel 4s infinite linear;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.5);
    }
}

@keyframes dataFlow {
    0% { 
        width: 0; 
        opacity: 0; 
    }
    50% { 
        opacity: 1; 
    }
    100% { 
        width: 200px; 
        opacity: 0; 
    }
}

@keyframes codeFloat {
    0% { 
        transform: translateY(100vh) translateX(0px); 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    90% { 
        opacity: 1; 
    }
    100% { 
        transform: translateY(-100px) translateX(50px); 
        opacity: 0; 
    }
}

@keyframes binaryFall {
    0% { 
        transform: translateY(-100px); 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    90% { 
        opacity: 1; 
    }
    100% { 
        transform: translateY(100vh); 
        opacity: 0; 
    }
}

@keyframes packetTravel {
    0% { 
        transform: translateX(-100px); 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    90% { 
        opacity: 1; 
    }
    100% { 
        transform: translateX(calc(100vw + 100px)); 
        opacity: 0; 
    }
}

/* About Section */
.about {
    padding: 5rem 0;
    background: rgba(255, 255, 255, 0.05);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.profile-picture {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    background: linear-gradient(45deg, #00ff88, #0099ff);
    padding: 3px;
    animation: profileGlow 3s ease-in-out infinite alternate;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #000;
    transition: transform 0.3s ease;
}

.profile-picture:hover img {
    transform: scale(1.05);
}

.profile-border {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(45deg, #00ff88, #0099ff, #00ff88);
    background-size: 200% 200%;
    animation: borderRotate 4s linear infinite;
    z-index: -1;
}

@keyframes profileGlow {
    0% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    }
    100% {
        box-shadow: 0 0 30px rgba(0, 153, 255, 0.5);
    }
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
}

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

.skill-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.skill-card h3 {
    color: #00ff88;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skill-card ul {
    list-style: none;
}

.skill-card li {
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.skill-card li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #0099ff;
}

/* Projects Section */
.projects {
    padding: 5rem 0;
}

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

.project-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00ff88, #0099ff);
}

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

.project-card h3 {
    color: #00ff88;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.project-tag {
    display: inline-block;
    background: rgba(0, 153, 255, 0.2);
    color: #0099ff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin: 0.2rem;
}

.project-links {
    margin-top: 1rem;
}

.project-links a {
    display: inline-block;
    margin-right: 1rem;
    color: #00ff88;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.project-links a:hover {
    border-bottom-color: #00ff88;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: rgba(255, 255, 255, 0.05);
    text-align: center;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item a {
    color: #00ff88;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #0099ff;
}

/* Terminal Effect */
.terminal {
    background: #000;
    color: #00ff88;
    padding: 1rem;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    margin: 2rem 0;
    position: relative;
}

.terminal::before {
    content: '> ';
    color: #0099ff;
}

.typing {
    animation: typing 3s steps(40, end) infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #00ff88;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        backdrop-filter: blur(10px);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 1rem 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        order: 1;
    }
    
    .skills-grid {
        order: 2;
        grid-template-columns: 1fr;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .profile-picture {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .project-card {
        padding: 1.5rem;
    }
    
    .profile-picture {
        width: 120px;
        height: 120px;
    }
}

/* Added Markdown Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-content {
    background: #1a1a2e;
    color: #ffffff;
    padding: 2rem;
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

#markdown-container {
    line-height: 1.7;
}

#markdown-container h1, 
#markdown-container h2, 
#markdown-container h3 {
    color: #00ff88;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

#markdown-container ul {
    list-style: none;
    padding-left: 1rem;
}

#markdown-container li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

#markdown-container li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #0099ff;
}

#markdown-container a {
    color: #00ff88;
    text-decoration: none;
}

#markdown-container a:hover {
    text-decoration: underline;
}

#markdown-container code {
    background: rgba(0,0,0,0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    color: #00ff88;
}
