/* Base Styles and Variables */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #4f46e5;      /* Modern Indigo */
    --secondary-color: #0ea5e9;    /* Cyan */
    --text-primary: #0f172a;       /* Slate 900 */
    --text-secondary: #475569;     /* Slate 600 */
    --bg-primary: #fafcff;         /* Slate 50 */
    --bg-secondary: hwb(181 80% 0% / 0.725);       /* White */
    --card-bg: #ffffff;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05); /* Modern soft shadow */
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --border-color: #dfc3c3;       /* Slate 200 */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --mobile: 480px;
    --tablet: 768px;
    --laptop: 1024px;
    --desktop: 1200px;
    --space-unit: clamp(1rem, 2vw, 2rem);
    --nav-bg: rgba(255, 255, 255, 0.98);
    --nav-border: rgba(0, 0, 0, 0.1);
    --nav-text: #475569;
    --nav-text-hover: #0f172a;
    --nav-btn-bg: rgba(0, 0, 0, 0.05);
    --nav-btn-border: rgba(0, 0, 0, 0.1);
    --nav-btn-text: #0f172a;
}

/* Dark mode variables */
[data-theme="dark"] {
    --primary-color: #818cf8;      /* Indigo 400 */
    --secondary-color: #38bdf8;    /* Light sky blue */
    --text-primary: #f8fafc;       /* Slate 50 */
    --text-secondary: #94a3b8;     /* Slate 400 */
    --bg-primary: hsl(222, 47%, 11%);         /* Slate 900 */
    --bg-secondary: hsl(222, 47%, 11%);       /* Slate 900 */
    --card-bg: #1e293b;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --border-color: #334155;       /* Slate 700 */
    --nav-bg: rgba(15, 23, 42, 0.98);
    --nav-border: rgba(255, 255, 255, 0.1);
    --nav-text: #cbd5e1;
    --nav-text-hover: #ffffff;
    --nav-btn-bg: rgba(255, 255, 255, 0.1);
    --nav-btn-border: rgba(255, 255, 255, 0.2);
    --nav-btn-text: #ffffff;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Adjust according to header height to prevent section content from hiding under sticky header */
}

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

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: var(--desktop);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
    font-size: 1.5rem;
}

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

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

a:hover {
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
    opacity: 0.95;
}

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

.btn.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}


.about-image {
    width: 320px;
    height: 320px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; /* Blob shape */
    overflow: hidden;
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.2);
    margin: 2rem auto;
    border: 8px solid var(--card-bg);
    animation: morph 8s ease-in-out infinite;
    position: relative;
}

@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-image:hover img {
    transform: scale(1.08) rotate(2deg);
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    background-color: var(--nav-bg); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem; 
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links li {
    margin-left: 0;
}

.nav-links a {
    color: var(--nav-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--nav-text-hover);
}

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

/* Theme Switch - Square Button */
.theme-btn {
    background-color: var(--nav-btn-bg);
    border: 1px solid var(--nav-btn-border);
    color: var(--nav-btn-text);
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.theme-btn i {
    font-size: 1.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-btn {
        width: 35px;
        height: 35px;
    }
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
}

.hamburger .line {
        width: 16px;
        height: 2px; 
        background-color: var(--nav-text); 
        margin: 3px 0;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    padding: 120px 0;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.05), transparent 25%);
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 650px;
    z-index: 10;
    position: relative;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
    margin-bottom: 1.25rem;
    line-height: 1.1;
}

.hero h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    max-width: 540px;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.index-container {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 2rem;
    z-index: 1;
    width: 50%;
}

.about-image2 img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow-hover);
    transition: var(--transition);
}

.about-image2 img:hover {
    transform: translateY(-10px);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: clamp(2rem, 4vw, 3rem);
    position: relative;
    font-weight: 800;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    margin: 20px auto 0;
}

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

.skill-card {
    background-color: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
    border-color: transparent;
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card i {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.skill-level {
    margin-top: 1.5rem;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background-color: var(--bg-primary);
}

.contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3.5rem;
    width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.contact-item i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50%;
    transition: var(--transition);
    font-size: 1.25rem;
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    padding: 60px 0 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-content .social-links {
    margin-bottom: 1rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
.skill-card:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: var(--border-radius);
}

.btn:focus-visible {
    outline-offset: 6px;
}

.hamburger:focus-visible {
    outline: 2px solid #cbd5e1;
    outline-offset: 4px;
    border-radius: 4px;
}

.page-title {
    color: blue;
}

/* Animation Classes */
.animate-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1s;
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 0.15em solid var(--primary-color);
    letter-spacing: 0.05em;
    animation: 
        typing 8s steps(22, end) infinite,
        blink-caret 0.75s step-end infinite;
    display: inline-block;
    vertical-align: bottom;
}

@keyframes typing {
    0%, 5% { max-width: 0; }
    30%, 70% { max-width: 22.5ch; }
    90%, 100% { max-width: 0; }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color); }
}

.delay-6 {
    animation-delay: 1.2s;
}

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

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

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

/* About Page Styles */
.page-title {
    text-align: center;
    margin: 4rem 0;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.about {
    padding: 60px 0;
}

.about-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 4rem;
    align-items: center;
}

.about-content {
    order: 2;
}

.about-image {
    order: 1;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.stat {
    text-align: center;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.count {
    display: block;
    font-size: 2.25rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.personal-interests {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.interests-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.interest-card {
    background-color: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.interest-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--secondary-color);
}

.interest-card i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.25rem;
}

/* Education Page Styles */
.education {
    padding: 100px 0;
    background-color: var(--bg-primary);
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 30px;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-content {
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition);
}

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

.timeline-date {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    display: inline-block;
}

.timeline-content h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.skill-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.timeline-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 20px;
    z-index: 1;
}

.timeline-item.left .timeline-icon {
    right: -20px;
}

.timeline-item.right .timeline-icon {
    left: -20px;
}

.animate-slide-in {
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease;
}

.timeline-item.left .animate-slide-in {
    transform: translateX(-50px);
}

.skills-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-secondary);
    position: relative;
    padding-left: 25px;
}

.skill-list li:before {
    content: '✓';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.skill-list li:last-child {
    border-bottom: none;
}

/* Projects Page Styles */
.projects {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.project-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 50px;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    transform: translateY(-2px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

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

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

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

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

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.project-link:hover {
    transform: scale(1.1) !important;
    background: white;
    color: var(--primary-color);
}

.project-card:hover .project-link {
    transform: translateY(0);
    opacity: 1;
}

.project-info {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

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

.tag {
    padding: 0.35rem 0.85rem;
    background-color: var(--bg-primary);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.cta {
    text-align: center;
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(14, 165, 233, 0.05));
    border-top: 1px solid var(--border-color);
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .about-container {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        margin: 0 auto 2rem auto;
        order: 1;
    }

    .about-content {
        order: 2;
        text-align: center;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 15px;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-icon {
        left: -20px !important; /* Places it on the outer edge of the card */
        top: 20px !important;
        right: auto !important;
    }
    
    .timeline-date {
        padding-left: 15px; /* Adds a bit of breathing room from the left edge/icon */
    }

    .index-container {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 100%;
        justify-content: center;
        margin-top: 2rem;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .theme-btn {
        width: 32px;
        height: 32px;
        margin-right: 10px; /* spacing from hamburger */
    }

    .nav-links {
        position: fixed;
        top: -100vh; /* Start hidden above the screen */
        left: 0; /* Anchor to the left to span entire screen */
        width: 100%; /* Span full horizontal width */
        max-width: none;
        height: auto;
        border-bottom: 1px solid var(--nav-border);
        border-radius: 0 0 20px 20px;
        background-color: var(--nav-bg); 
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: none;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1.5rem 1rem;
        transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 990;
        overflow-y: auto;
    }
    
    .nav-links.active {
        top: 60px;
    }

    /* Add backdrop when menu is open */
    .nav-links.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: -100vw; 
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    .nav-links li {
        width: 100%;
        margin: 0.05rem 0;
    }

    .nav-links a {
        display: block;
        padding: 0.5rem;
        font-size: 0.85rem;
        text-align: center;
        color: var(--nav-text);
        border-radius: var(--border-radius);
    }
    
    .nav-links a:after {
        display: none;
    }
    
    .nav-links a:hover, .nav-links a.active {
        background: var(--nav-btn-bg);
        color: var(--nav-text-hover);
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: transparent;
        border: none;
        z-index: 101;
        padding: 4px; /* Reduced touch target */
        cursor: pointer;
    }
    
    .hamburger.active .line:nth-child(1) {
        transform: translateY(5px) rotate(45deg); 
    }
    
    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .line:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg); 
    }

    .hero {
        padding: 80px 0 60px 0;
        min-height: 100vh; /* Make hero cover full screen on mobile */
        justify-content: center;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: stretch;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
        padding: 16px 24px; /* Larger touch target for thumbs */
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-icon {
        width: 40px;
        height: 40px;
        top: 15px !important;
        left: -20px !important; /* Outer edge of the card */
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1.25rem;
    }

    section, .skills, .about, .contact, .education, .projects {
        padding: 50px 0; /* Reduced massive padding on small screens */
    }

    .hero {
        padding: 80px 0;
        min-height: 100vh;
        justify-content: center;
    }

    h1 { font-size: clamp(2.25rem, 8vw, 2.75rem); }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.35rem; }

    .about-image {
        width: min(220px, 70vw); /* Prevent image overflow scaling gracefully */
        height: min(220px, 70vw);
    }
    
    .about-stats {
        grid-template-columns: 1fr; /* Stack visually into single column */
    }

    .skill-card, .project-card, .interest-card, .contact-item {
        padding: 1.75rem 1.5rem;
    }

    .social-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .project-filters {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .filter-btn {
        flex: 1 1 calc(50% - 8px); /* Buttons will form equal width grid */
        max-width: none;
        padding: 12px 10px;
        font-size: 0.9rem;
    }

    .certificates-container {
        grid-template-columns: 1fr;
    }
}

/* Base Adjustments */
img {
    max-width: 100%;
    height: auto;
}
/* Certificate Gallery Styles */
.certificates-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.certificate-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.certificate-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.certificate-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
    background-color: var(--bg-secondary);
}

.certificate-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.certificate-card:hover .certificate-thumbnail {
    transform: scale(1.1);
}

.certificate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(154, 205, 50, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

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

.certificate-overlay i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.certificate-overlay p {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.certificate-info {
    padding: 20px;
}

.certificate-info h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.certificate-issuer {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.certificate-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

/* Certificate Modal */
.certificate-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.certificate-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-modal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 90vh;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.certificate-modal-content {
    width: 100%;
    height: auto;
    object-fit: contain;
    padding: 20px;
}

.certificate-modal-info {
    padding: 20px;
    text-align: center;
    width: 100%;
    border-top: 1px solid var(--bg-secondary);
}

.certificate-modal-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.certificate-modal-info p {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.certificate-modal-close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 2001;
    transition: var(--transition);
}

.certificate-modal-close:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .certificates-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .certificate-image-wrapper {
        height: 200px;
    }

    .certificate-modal-close {
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .certificates-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .certificate-image-wrapper {
        height: 180px;
    }

    .certificate-info {
        padding: 15px;
    }
}