/* Base Styles */
:root {
    --primary-color: #0066ff;
    --secondary-color: #00c3ff;
    --accent-color: #00e5ff;
    --text-primary: #333;
    --text-secondary: #666;
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 102, 255, 0.1);
    --grid-color: rgba(0, 102, 255, 0.03);
    --grid-size: 30px;
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Grid Background */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
    z-index: -1;
    opacity: 0.8;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 50%;
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 1000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    box-shadow: 0 2px 15px var(--shadow-color);
    z-index: 100;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    top: 50%;
    left: -100%;
    animation: scan 2s linear infinite;
}

.logo-text {
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    font-size: 18px;
    color: var(--primary-color);
}

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

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

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

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

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 50px;
}

/* Profile Section */
.profile-section {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.profile-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px var(--shadow-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.profile-image-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 5px 15px var(--shadow-color);
    position: relative;
    z-index: 2;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-border {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px dashed var(--primary-color);
    border-radius: 50%;
    animation: rotate 10s linear infinite;
    z-index: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.profile-title {
    font-family: 'Roboto Mono', monospace;
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

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

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px var(--shadow-color);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Section Styles */
.section {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px var(--shadow-color);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.section.in-view {
    opacity: 1;
    transform: translateY(0);
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    position: relative;
}

.section-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
}

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

.section-content p {
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.7;
}

.section-content h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

/* Skills */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.skill-tag {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05), rgba(0, 197, 255, 0.1));
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    border: 1px solid rgba(0, 102, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.skill-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
    border-color: var(--primary-color);
}

.skill-tag:hover::before {
    left: 100%;
}

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

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.project-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.project-image {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.1), transparent);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-content {
    padding: 20px;
}

.project-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.project-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: normal;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tech span {
    background: rgba(0, 102, 255, 0.08);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-family: 'Roboto Mono', monospace;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px var(--shadow-color);
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* Resume */
.resume-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.resume-icon {
    font-size: 60px;
    color: var(--primary-color);
    animation: pulse 2s infinite ease-in-out;
}

.resume-details {
    flex: 1;
}

.resume-details h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.resume-details p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.resume-update {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.resume-update h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

/* Animations */
@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
    
    .header {
        flex-direction: column;
        height: auto;
        padding: 15px 5%;
        align-items: flex-start;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }
    
    .header.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .logo {
        margin-bottom: 20px;
    }
    
    .nav {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .nav-link {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .container {
        padding-top: 80px;
    }
    
    .section {
        padding: 30px 20px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .resume-container {
        flex-direction: column;
        text-align: center;
    }
    
    .resume-details {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .profile-card {
        padding: 30px 20px;
    }
    
    .profile-image-container {
        width: 120px;
        height: 120px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-icon {
        margin-bottom: 10px;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .project-link {
        width: 100%;
        justify-content: center;
    }
    
    .skills-container {
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    .header, .mobile-toggle, .grid-background {
        display: none;
    }
    
    .container {
        padding: 0;
    }
    
    .section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
a:focus, button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}