/* ========================
   CSS Variables & Reset
   ======================== */

:root {
    /* Colors */
    --primary: #00d9ff;
    --primary-dark: #00b8d4;
    --primary-light: #4df3ff;
    --bg-dark: #0a0e1a;
    --bg-darker: #060913;
    --bg-card: #111827;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #1e293b;
    --accent: #00d9ff;
    --success: #10b981;
    --gradient: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, rgba(0, 217, 255, 0) 100%);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 100px 0;
    --card-padding: 32px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(0, 217, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================
   Navigation
   ======================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
}

.cursor {
    animation: blink 1s steps(2) infinite;
}

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

.nav-menu {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    font-size: 15px;
    color: var(--text-secondary);
    position: relative;
    font-weight: 500;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.nav-toggle span {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ========================
   Hero Section
   ======================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
}

.hero-gradient {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(48px, 8vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.3;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================
   Section Styles
   ======================== */

section {
    padding: var(--section-padding);
    position: relative;
}

.section-title {
    font-size: clamp(36px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 60px;
}

/* ========================
   About Section
   ======================== */

.about {
    background: var(--bg-dark);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.highlight-icon {
    font-size: 24px;
}

/* ========================
   Projects Section
   ======================== */

.projects-grid {
    display: grid;
    gap: 40px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition-slow);
}

.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-darker);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-slow);
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    padding: 12px 24px;
    background: var(--primary);
    color: var(--bg-dark);
    border-radius: 6px;
    font-weight: 600;
}

.project-content {
    padding: var(--card-padding);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    padding: 6px 12px;
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 12px;
    font-family: var(--font-mono);
    border: 1px solid rgba(0, 217, 255, 0.2);
}

.project-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

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

.project-features {
    margin-bottom: 24px;
}

.project-features li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 24px;
    position: relative;
}

.project-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 16px;
}

.project-role {
    font-size: 14px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.project-github {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

.project-github.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.project-github:hover:not(.disabled) {
    color: var(--primary-light);
}

/* Carousel for data management screenshots */
.project-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-image {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-image.active {
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--primary);
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active,
.dot:hover {
    background: var(--primary);
}

/* ========================
   Experience Section
   ======================== */

.experience {
    background: var(--bg-dark);
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 60px;
}

.timeline-dot {
    position: absolute;
    left: -6px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--bg-dark), 0 0 0 6px var(--primary);
}

.timeline-content {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-company {
    color: var(--text-secondary);
    font-size: 16px;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--primary);
}

.timeline-achievements {
    margin-bottom: 16px;
}

.timeline-achievements li {
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.timeline-achievements li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.timeline-achievements strong {
    color: var(--primary);
    font-weight: 600;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-small {
    padding: 4px 10px;
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    border: 1px solid rgba(0, 217, 255, 0.2);
}

/* ========================
   Skills Section
   ======================== */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.skill-category-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--primary);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-name {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 1s ease;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 8px 16px;
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary);
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    transition: var(--transition);
}

.skill-tag:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: translateY(-2px);
}

/* ========================
   Contact Section
   ======================== */

.contact {
    background: var(--bg-dark);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: var(--transition);
    color: var(--text-secondary);
}

.contact-link:hover {
    border-color: var(--primary);
    transform: translateX(8px);
}

.contact-link svg {
    color: var(--primary);
    flex-shrink: 0;
}

.contact-cta {
    text-align: center;
}

/* ========================
   Footer
   ======================== */

.footer {
    background: var(--bg-darker);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-note {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
}

/* ========================
   Animations (AOS)
   ======================== */

[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

/* ========================
   Responsive Design
   ======================== */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px;
        gap: 30px;
        transition: left 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        min-height: calc(100vh - 72px);
        padding-top: 100px;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    section {
        padding: 60px 0;
    }
    
    .timeline::before {
        left: 7px;
    }
    
    .timeline-item {
        padding-left: 36px;
    }
    
    .timeline-header {
        flex-direction: column;
    }
    
    .project-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .stat {
        text-align: center;
    }
    
    .skill-category {
        padding: 20px;
    }
    
    .about-highlights {
        grid-template-columns: 1fr;
    }
}