/* Base Variables */
:root {
    /* Colors */
    --primary: #3498db;
    --primary-dark: #2c3e50;
    --primary-light: #a0cfee;
    --secondary: #16a085;
    --bg-light: #ffffff;
    --bg-dark: #1a1a2e;
    --text-light: #2c3e50;
    --text-dark: #e6e6e6;
    --accent: #f39c12;
    --muted: #7f8c8d;
    --border-light: #e0e0e0;
    --border-dark: #0f3460;
    --success: #27ae60;
    --error: #e74c3c;
    --card-light: #ffffff;
    --card-dark: #16213e;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 0.1s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* Font Families */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    --font-code: 'Fira Code', monospace;
    
    /* Current Theme Values (Light Mode Default) */
    --bg-color: var(--bg-light);
    --text-color: var(--text-light);
    --card-bg: var(--card-light);
    --border-color: var(--border-light);
    --navbar-bg: rgba(255, 255, 255, 0.8);
}

/* Dark Mode Override */
.dark-mode {
    --bg-color: var(--bg-dark);
    --text-color: var(--text-dark);
    --card-bg: var(--card-dark);
    --border-color: var(--border-dark);
    --navbar-bg: rgba(22, 33, 62, 0.8);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    font-size: 16px; /* Base font size for better scaling */
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7; /* Improved line height for better readability */
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3; /* Better line height for headings */
    margin-bottom: 1.5rem; /* Increased margin for better spacing */
    color: var(--text-color);
    transition: color var(--transition-normal);
    letter-spacing: -0.02em; /* Slightly tighter letter spacing for headings */
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 2.2rem; }
h4 { font-size: 1.8rem; }
h5 { font-size: 1.4rem; }
h6 { font-size: 1.2rem; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0; /* Increased section padding for better breathing room */
}

.section-header {
    text-align: center;
    margin-bottom: 4rem; /* Increased margin for better separation */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.8rem;
    position: relative;
    display: inline-block;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 1rem;
    text-align: center;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 8px rgba(52, 152, 219, 0.3);
}

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

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.btn-resume {
    background-color: var(--card-bg);
    color: var(--primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0.7rem 1.5rem;
    margin: 0.5rem;
    transition: all var(--transition-normal);
}

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

.accent {
    color: var(--primary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    padding: 1rem 0;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text {
    color: var(--text-color);
    transition: color var(--transition-normal);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem;
    transition: color var(--transition-normal);
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1100;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: all var(--transition-normal);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    background-color: var(--primary);
    color: white;
    transform: rotate(360deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.5);
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.typing-container {
    font-family: var(--font-code);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    min-height: 1.8em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.typing-prefix {
    color: var(--muted);
}

.typing-text {
    color: var(--primary);
    font-weight: 600;
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary);
    animation: blink 1s infinite;
    margin-left: 2px;
}

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

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    transition: opacity var(--transition-normal);
}

.scroll-indicator:hover {
    opacity: 1;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-color);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--text-color);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(15px); opacity: 0; }
}

.scroll-indicator p {
    font-size: 0.8rem;
    margin-top: 10px;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.about-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.about-image-container {
    position: relative;
    width: 350px;
    height: 350px;
}

.about-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-lg);
}

.image-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    border-radius: 10px;
    top: -20px;
    left: -20px;
    z-index: 1;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

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

.about-cta {
    margin-top: 2rem;
}

/* Skills Section */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 4rem; /* Increased gap for better separation */
    max-width: 1400px;
    margin: 0 auto;
}

.skill-category {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 3rem; /* Increased padding for better breathing room */
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

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

.category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem; /* Increased margin */
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 700;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem; /* Increased gap for better spacing */
}

.skill-card {
    background-color: rgba(var(--primary-rgb), 0.05);
    padding: 2rem 1.5rem; /* Increased vertical padding */
    border-radius: 12px; /* Increased border radius */
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

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

.skill-card:hover {
    transform: translateY(-8px);
    background-color: rgba(var(--primary-rgb), 0.1);
    box-shadow: var(--shadow-lg);
}

.skill-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.skill-name {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.skill-level {
    width: 100%;
    height: 6px;
    background-color: rgba(var(--text-color-rgb), 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary);
    border-radius: 3px;
    transition: width 1.5s ease;
}

/* Projects Section */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-normal);
    color: var(--text-color);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 3rem; /* Increased gap for better separation */
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 15px; /* Increased border radius */
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform var(--transition-normal);
    z-index: 1;
}

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

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

.project-image {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

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

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.3rem 0.8rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-info {
    padding: 2rem; /* Increased padding */
}

.project-title {
    font-size: 1.4rem; /* Slightly larger title */
    margin-bottom: 1rem; /* Increased margin */
    font-weight: 700;
    line-height: 1.3;
}

.project-description {
    color: var(--muted);
    margin-bottom: 2rem; /* Increased margin */
    font-size: 1rem; /* Slightly larger text */
    line-height: 1.6; /* Better line height for readability */
}

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

.project-link {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: white;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-3px);
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 900px; /* Increased max-width for better content display */
    margin: 0 auto;
}

.timeline-tabs {
    display: flex;
    justify-content: center;
    gap: 2.5rem; /* Increased gap */
    margin-bottom: 4rem; /* Increased margin */
}

.timeline-tab {
    padding: 0.7rem 2rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-normal);
    color: var(--text-color);
}

.timeline-tab.active, .timeline-tab:hover {
    background-color: var(--primary);
    color: white;
}

.timeline-content {
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    height: 100%;
    width: 2px;
    background-color: var(--border-color);
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-date {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(50% - 40px);
    text-align: right;
    padding-right: 30px;
    font-weight: 600;
    color: var(--primary);
}

.timeline-content-box {
    width: calc(50% - 40px);
    padding: 2.5rem; /* Increased padding */
    background-color: var(--card-bg);
    border-radius: 15px; /* Increased border radius */
    box-shadow: var(--shadow-md);
    margin-left: 50%;
    margin-right: 0;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
}

.timeline-content-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 15px 15px 0 0;
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.timeline-content-box:hover::before {
    transform: scaleX(1);
}

.timeline-content-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.timeline-content-box h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-content-box h4 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.timeline-details {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.timeline-details ul {
    list-style-position: inside;
    margin-top: 0.8rem;
}

.timeline-details li {
    margin-bottom: 0.5rem;
}

.resume-download {
    text-align: center;
    margin-top: 4rem;
}

.resume-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Contact Section */
.contact-container {
    display: flex;
    gap: 4rem; /* Increased gap */
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    flex: 1;
    min-width: 320px; /* Slightly larger minimum width */
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 2rem; /* Increased gap */
    padding: 2rem; /* Increased padding */
    background-color: var(--card-bg);
    border-radius: 15px; /* Increased border radius */
    margin-bottom: 2rem; /* Increased margin */
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.contact-card:hover::before {
    transform: scaleY(1);
}

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

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
}

.contact-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.contact-details p {
    color: var(--muted);
}

.contact-social {
    margin-top: 2rem;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.social-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-5px);
}

.contact-form-container {
    flex: 1;
    min-width: 300px;
}

.contact-form {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: rgba(var(--text-color-rgb), 0.05);
    color: var(--text-color);
    font-family: var(--font-primary);
    transition: border-color var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Footer */
.footer {
    background-color: var(--card-bg);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-color);
    transition: color var(--transition-normal);
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--muted);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: auto;
    position: relative;
    transform: translateY(50px);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color var(--transition-normal);
    z-index: 10;
}

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

.modal-body {
    padding: 2rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 900;
    box-shadow: var(--shadow-md);
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .section {
        padding: 6rem 0; /* Increased padding for better mobile spacing */
    }
    
    .section-title {
        font-size: 2.4rem; /* Slightly larger for better mobile readability */
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .typing-container {
        font-size: 1.1rem;
    }
    
    .about-image-container {
        width: 300px;
        height: 300px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .timeline-content::before {
        left: 50px;
    }
    
    .timeline-dot {
        left: 50px;
    }
    
    .timeline-date {
        position: relative;
        width: 100%;
        text-align: left;
        padding-left: 80px;
        margin-bottom: 1rem;
    }
    
    .timeline-content-box {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem; /* Reduced padding for mobile */
    }
    
    .section {
        padding: 4rem 0; /* Adjusted padding for mobile */
    }
    
    .section-title {
        font-size: 2rem; /* Adjusted for mobile */
    }
    
    .section-subtitle {
        font-size: 1.1rem; /* Adjusted for mobile */
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--card-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right var(--transition-normal);
        z-index: 1000;
        box-shadow: var(--shadow-xl);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .about-cta {
        display: flex;
        justify-content: center;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.5rem; /* Adjusted gap for mobile */
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem; /* Adjusted gap for mobile */
    }
    
    .skill-category {
        padding: 2rem; /* Reduced padding for mobile */
    }
    
    .project-card {
        margin: 0 0.5rem; /* Added margin for mobile */
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .timeline-date {
        padding-left: 50px;
    }
    
    .timeline-content-box {
        width: 100%;
        margin-left: 0;
        margin-top: 70px;
    }
    
    .contact-container {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-nav {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .typing-container {
        font-size: 1rem;
    }
    
    .about-image-container {
        width: 250px;
        height: 250px;
    }
    
    .timeline-tabs {
        gap: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .hero, .scroll-indicator, .theme-toggle, .projects-filter, 
    .contact-form-container, .footer, .back-to-top {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }
    
    .section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    .project-card, .timeline-content-box, .contact-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .project-card:hover, .timeline-content-box:hover, .contact-card:hover {
        transform: none;
        box-shadow: none;
    }
} 