/* ========================================
   Modern Professional Portfolio - Nandan Prakash
   ======================================== */

/* ========================================
   CSS Variables and Root Styles
   ======================================== */
:root {
    /* Light Mode Colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-elevated: #ffffff;
    
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-tertiary: #6c757d;
    --text-muted: #868e96;
    
    --accent-primary: #0891b2;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
    
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-elevated: #1e293b;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --border-light: #475569;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
}

/* ========================================
   Theme Toggle Button
   ======================================== */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.sun-icon, .moon-icon {
    position: absolute;
    transition: opacity var(--transition-base), transform var(--transition-slow);
    color: var(--accent-primary);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0.5);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ========================================
   Container and Layout
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.section {
    padding: var(--spacing-4xl) 0;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-3xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 2rem;
    padding-bottom: var(--spacing-4xl);
    background-color: var(--bg-primary);
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--spacing-4xl);
    align-items: center;
}

.hero-text {
    animation: fadeInUp 0.8s ease;
}

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

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-2xl);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.hero-image {
    animation: fadeInRight 0.8s ease;
    display: flex;
    justify-content: center;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.profile-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 4px solid var(--bg-secondary);
    position: relative;
    z-index: 2;
    transition: transform var(--transition-slow);
}

.profile-photo:hover {
    transform: scale(1.02);
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: var(--accent-gradient);
    border-radius: var(--radius-2xl);
    filter: blur(60px);
    opacity: 0.3;
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition-base);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.about-card {
    background: var(--bg-elevated);
    padding: var(--spacing-3xl);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

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

.subsection-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
}

.technologies-section {
    margin-top: var(--spacing-3xl);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.tech-tag {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: #cffafe;
    color: #155e75;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all var(--transition-base);
}

[data-theme="dark"] .tech-tag {
    background: rgba(8, 145, 178, 0.2);
    color: #67e8f9;
}

.tech-tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.certifications-section {
    margin-top: var(--spacing-2xl);
}

.certifications-list {
    list-style: none;
    padding-left: 0;
}

.certifications-list li {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    padding: var(--spacing-sm) 0;
    position: relative;
    padding-left: var(--spacing-lg);
}

.certifications-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.25rem;
}

/* ========================================
   Experience Section
   ======================================== */
.experience-section {
    background-color: var(--bg-primary);
}

.experience-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    gap: var(--spacing-xl);
}

.experience-card {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--spacing-xl);
    background: var(--bg-elevated);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.experience-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.experience-icon {
    width: 64px;
    height: 64px;
    background: #cffafe;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
}

[data-theme="dark"] .experience-icon {
    background: rgba(8, 145, 178, 0.2);
    color: #67e8f9;
}

.experience-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.company {
    font-size: 1.125rem;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.experience-meta {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.date, .location {
    font-size: 0.9375rem;
    color: var(--text-tertiary);
}

.location::before {
    content: '📍 ';
}

.experience-details {
    list-style: none;
    padding-left: 0;
    margin-top: var(--spacing-md);
}

.experience-details li {
    font-size: 1rem;
    color: var(--text-secondary);
    padding: var(--spacing-xs) 0;
    padding-left: var(--spacing-lg);
    position: relative;
    line-height: 1.7;
}

.experience-details li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

/* ========================================
   What I Do Section
   ======================================== */
.what-i-do-section {
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1100px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-elevated);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all var(--transition-base);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    background: #cffafe;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

[data-theme="dark"] .service-icon {
    background: rgba(8, 145, 178, 0.2);
    color: #67e8f9;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.service-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
    background-color: var(--bg-primary);
}

.contact-content {
    max-width: 900px;
    margin: 0 auto;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-2xl);
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transition: all var(--transition-base);
    border: 1px solid var(--border-light);
    text-align: center;
}

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

.contact-icon {
    width: 70px;
    height: 70px;
    background: var(--accent-gradient);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.contact-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.contact-info p {
    font-size: 1rem;
    color: var(--text-secondary);
    word-break: break-word;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-secondary);
    padding: var(--spacing-2xl) 0;
    border-top: 1px solid var(--border-light);
}

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

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.footer-links a:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-2px);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-3xl);
    }
    
    .hero-image {
        order: -1;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 3rem;
        text-align: center;
    }
    
    .hero-subtitle {
        text-align: center;
    }
    
    .hero-description {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .hero {
        padding-top: 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-3xl);
    }
    
    .hero-image {
        order: -1;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
        text-align: center;
    }
    
    .hero-description {
        font-size: 1rem;
        text-align: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section {
        padding: var(--spacing-3xl) 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-card {
        padding: var(--spacing-xl);
    }
    
    .experience-card {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .experience-icon {
        width: 56px;
        height: 56px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .about-card {
        padding: var(--spacing-lg);
    }
    
    .experience-card {
        padding: var(--spacing-lg);
    }
    
    .service-card {
        padding: var(--spacing-lg);
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .theme-toggle,
    .footer {
        display: none;
    }
    
    .hero {
        padding-top: 0;
        min-height: auto;
    }
    
    body {
        background: white;
        color: black;
    }
}
