/* ============================================
   MODERN PORTFOLIO DESIGN
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   CSS VARIABLES - LIGHT MODE
   ============================================ */
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    
    /* Neutrals */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Cards */
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --secondary: #a78bfa;
    --accent: #f472b6;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    
    --card-bg: #1e293b;
    --card-border: #334155;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    display: block;
    width: 100%;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

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

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

section {
    padding: var(--spacing-2xl) 0;
    position: relative;
}

.bg-light {
    background-color: var(--bg-secondary);
}

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

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    z-index: 1000;
    transition: all var(--transition-base);
    height: 80px;
    display: flex;
    align-items: center;
}

[data-theme="dark"] #navbar {
    background: rgba(15, 23, 42, 0.8);
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
    border-radius: var(--radius-full);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    width: 80%;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-2xl) 0;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    opacity: 0.05;
    z-index: -1;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease-out;
}

.hero .tagline {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero .btn {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(-1px);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--spacing-2xl);
    align-items: start;
    margin-top: var(--spacing-xl);
}

.about-text .intro {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
}

.experience {
    margin-top: var(--spacing-xl);
}

.skill-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.skill-category {
    background: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.skill-category h4 {
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    padding: var(--spacing-xs) 0;
    padding-left: var(--spacing-md);
    position: relative;
    color: var(--text-secondary);
}

.skill-category li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.about-image {
    position: sticky;
    top: 100px;
}

.profile-image-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--gradient-card);
    padding: var(--spacing-sm);
}

.profile-photo {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    display: block;
}

.photo-caption {
    margin-top: var(--spacing-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    justify-content: center;
}

.skill-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    animation: float 6s ease-in-out infinite;
}

.skill-tag:nth-child(2) { animation-delay: 0.5s; }
.skill-tag:nth-child(3) { animation-delay: 1s; }
.skill-tag:nth-child(4) { animation-delay: 1.5s; }
.skill-tag:nth-child(5) { animation-delay: 2s; }
.skill-tag:nth-child(6) { animation-delay: 2.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.education {
    margin: var(--spacing-xl) 0;
}

.education-item {
    background: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
    margin: var(--spacing-md) 0;
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
}

.education-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.education-item.future {
    opacity: 0.8;
    border-left-color: var(--secondary);
}

.education-item .date {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.personal-interests {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--card-border);
}

.personal-interests ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.personal-interests li {
    background: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    transition: all var(--transition-base);
}

.personal-interests li:hover {
    transform: translateX(5px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.personal-interests li i {
    color: var(--primary);
    font-size: 1.25rem;
    margin-top: 0.2rem;
    min-width: 1.5rem;
}

.personal-interests li strong {
    color: var(--primary);
}

.goals {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--card-border);
}

.goals ul {
    list-style: none;
    padding: 0;
}

.goals li {
    padding: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
    position: relative;
    color: var(--text-secondary);
}

.goals li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.project-card {
    background: var(--card-bg);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    transition: all var(--transition-base);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

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

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

.project-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    transition: transform var(--transition-base);
}

.project-card:hover .project-icon {
    transform: scale(1.1) rotate(5deg);
}

.project-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   INFRASTRUCTURE SECTION
   ============================================ */
.infra-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    margin-top: var(--spacing-xl);
}

.infra-details h3 {
    margin-bottom: var(--spacing-md);
}

.infra-list {
    list-style: none;
    padding: 0;
    margin: var(--spacing-md) 0;
}

.infra-list li {
    padding: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
    position: relative;
    color: var(--text-secondary);
}

.infra-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.infra-list ul {
    list-style: none;
    margin: var(--spacing-xs) 0 var(--spacing-sm) var(--spacing-md);
    padding-left: var(--spacing-md);
}

.infra-image {
    text-align: center;
}

.infra-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-container {
    max-width: 800px;
    margin: var(--spacing-xl) auto 0;
    padding: var(--spacing-2xl);
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
}

.contact-content h3 {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.contact-content > p {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-base);
    min-width: 120px;
    box-shadow: var(--shadow);
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    color: var(--primary);
}

.social-link i {
    font-size: 2.5rem;
    color: var(--primary);
    transition: transform var(--transition-base);
}

.social-link:hover i {
    transform: scale(1.2);
}

.social-link span {
    font-weight: 500;
    color: var(--text-secondary);
}

.email-contact {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.email-link {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    transition: all var(--transition-fast);
}

.email-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--bg-secondary);
    padding: var(--spacing-xl) 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: all var(--transition-base);
    font-size: 1.5rem;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-xl);
}

.theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out both;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        position: static;
        margin-top: var(--spacing-xl);
    }
    
    .infra-container {
        grid-template-columns: 1fr;
    }
    
    .skill-categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: var(--spacing-xl);
        gap: var(--spacing-lg);
        transition: left var(--transition-base);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--card-border);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    section {
        padding: var(--spacing-xl) 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .personal-interests ul {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero {
        padding: var(--spacing-xl) 0;
    }
    
    .btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }
