/* Modern Portfolio CSS */
:root {
    /* Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #0f172a;
    --accent-color: #f59e0b;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --background: #ffffff;
    --background-alt: #f8fafc;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --section-padding: 6rem 0;
    --container-padding: 0 1.5rem;
    --border-radius: 0.75rem;
    
    /* Animations */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #64748b;
        --background: #0f172a;
        --background-alt: #1e293b;
        --border-color: #334155;
        --secondary-color: #f1f5f9;
    }
}

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

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

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

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

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(15, 23, 42, 0.9); /* subtle dark */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
}

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

.nav-link {
    color: #ffffff; /* high contrast on dark */
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #e2e8f0;
}

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

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

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--background-alt) 0%, var(--background) 100%);
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
}

.hero-text {
    animation: slideInLeft 1s ease-out;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.title-name {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0;
}

.title-role {
    display: block;
    font-size: 2rem;
    color: var(--accent-color);
    font-weight: 600;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    animation: slideInRight 1s ease-out;
}

.code-snippet {
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow-hover);
    font-family: var(--font-mono);
}

.code-header {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    color: #f1f5f9;
    font-size: 0.875rem;
}

.code-dots {
    display: flex;
    gap: 0.5rem;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ef4444;
}

.code-dots span:nth-child(2) {
    background-color: #f59e0b;
}

.code-dots span:nth-child(3) {
    background-color: #10b981;
}

.code-content {
    padding: 1.5rem;
    color: #f1f5f9;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-content .keyword { color: #c792ea; }
.code-content .class-name { color: #82aaff; }
.code-content .function { color: #82aaff; }
.code-content .param { color: #f78c6c; }
.code-content .string { color: #c3e88d; }

.floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: var(--primary-color);
    animation: float 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

.floating-icon:nth-child(1) { top: 10%; left: 10%; }
.floating-icon:nth-child(2) { top: 20%; right: 10%; }
.floating-icon:nth-child(3) { bottom: 30%; left: 20%; }
.floating-icon:nth-child(4) { bottom: 20%; right: 20%; }

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 2px;
    height: 3rem;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid var(--primary-color);
}

/* Section Styles */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3rem;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background-color: var(--background-alt);
}

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

.about-intro {
    margin-bottom: 3rem;
}

.about-intro p {
    font-size: 1.125rem;
    line-height: 1.7;
}

.about-highlights h3,
.about-journey h3 {
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.highlight-item {
    background-color: var(--background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

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

.highlight-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.highlight-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

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

.timeline-item:last-child::before {
    display: none;
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.875rem;
    position: relative;
}

.timeline-date::after {
    content: '';
    position: absolute;
    right: -11px;
    top: 0.25rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.profile-card {
    background-color: var(--background);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    margin-bottom: 2rem;
}

.profile-image {
    position: relative;
    margin-bottom: 1.5rem;
}

.profile-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.profile-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: none; /* Hidden by default; shown only if image fails to load */
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 3rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5rem;
}

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

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tech-stack-preview {
    background-color: var(--background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tech-icon {
    font-size: 1.5rem;
    padding: 0.5rem;
    background-color: var(--background-alt);
    border-radius: 0.5rem;
    transition: var(--transition);
}

.tech-icon:hover {
    transform: scale(1.1);
}

/* Experience Section */
.experience-content {
    max-width: 900px;
    margin: 0 auto;
}

.experience-item {
    background-color: var(--background);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

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

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.company-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.duration {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.experience-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: var(--primary-color);
    color: white;
}

.experience-badge.research {
    background-color: var(--accent-color);
}

.experience-badge.education {
    background-color: #10b981;
}

.achievements h4,
.responsibilities h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.achievement-item {
    text-align: center;
    padding: 1rem;
    background-color: var(--background-alt);
    border-radius: 0.5rem;
}

.achievement-metric {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.achievement-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.achievement-list .achievement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    margin-bottom: 0.75rem;
}

.achievement-list .achievement-item i {
    color: var(--primary-color);
}

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

.responsibilities li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
}

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

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--background-alt);
    color: var(--text-primary);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* Skills Section */
.skills {
    background-color: var(--background-alt);
}

.skills-category {
    margin-bottom: 3rem;
}

.skills-category h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

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

.skill-item {
    background-color: var(--background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

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

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.skill-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skills-proficiency {
    max-width: 600px;
    margin: 3rem auto 0;
}

.skills-proficiency h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.proficiency-item {
    margin-bottom: 1.5rem;
}

.proficiency-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.proficiency-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.proficiency-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 4px;
    transition: width 1s ease-out;
}

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

.project-card {
    background-color: var(--background);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.project-card.featured {
    border: 2px solid var(--primary-color);
}

/* Full-width variant for additional projects */
.project-card.full-width {
    grid-column: 1 / -1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.production {
    background-color: #10b981;
    color: white;
}

.status-badge.completed {
    background-color: var(--primary-color);
    color: white;
}

.status-badge.research {
    background-color: var(--accent-color);
    color: white;
}

.status-badge.published {
    background-color: #8b5cf6;
    color: white;
}

.project-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric {
    text-align: center;
    flex: 1;
}

.metric-value {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-actions {
    margin-top: auto;
}

/* Research Section */
.research {
    background-color: var(--background-alt);
}

.publication-item {
    background-color: var(--background);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.publication-header {
    margin-bottom: 1rem;
}

.publication-header h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.publication-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.publication-meta span {
    padding: 0.25rem 0.75rem;
    background-color: var(--background-alt);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.venue {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.publication-authors {
    margin-bottom: 1rem;
    font-style: italic;
    color: var(--text-secondary);
}

.publication-abstract p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.publication-impact,
.interests-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.impact-metric,
.interest-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--background-alt);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.impact-metric i {
    color: var(--primary-color);
}

.interest-item {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    flex: 1;
    min-width: 200px;
}

.interest-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.interest-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
}

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

.contact-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.contact-details h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.contact-details a {
    color: var(--text-secondary);
    font-weight: 500;
}

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

.contact-cta h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-cta p {
    margin-bottom: 2rem;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--background);
    padding: 2rem 0;
}

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

.footer-info h3 {
    color: var(--background);
    margin-bottom: 0.25rem;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--background);
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background);
    border-radius: var(--border-radius);
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--card-shadow-hover);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 0;
    }
    
    .nav-menu {
        position: fixed;
        top: 4rem;
        left: -100%;
        width: 100%;
        height: calc(100vh - 4rem);
        background-color: var(--background);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 0;
        transition: var(--transition);
        box-shadow: var(--card-shadow);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .title-name {
        font-size: 3rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .timeline-item::before,
    .timeline-date::after {
        display: none;
    }
    
    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .achievement-grid {
        grid-template-columns: 1fr;
    }
    
    .project-metrics {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .title-name {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .code-content {
        font-size: 0.75rem;
        padding: 1rem;
    }
    
    .cta-actions {
        flex-direction: column;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Performance optimizations */
.hero-visual,
.floating-elements {
    will-change: transform;
}

.btn,
.project-card,
.skill-item {
    will-change: transform, box-shadow;
}
