/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f5f6fa;
    --white: #ffffff;
    --gradient-1: #00F5A0;
    --gradient-2: #00D9F5;
    --nav-height: 80px;
    --gradient-1-rgb: 0, 245, 160;
    --gradient-2-rgb: 0, 217, 245;
    --accent-color-rgb: 231, 76, 60;
    --secondary-color-rgb: 52, 152, 219;
    --success-color: #27ae60;
    --success-color-rgb: 39, 174, 96;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--white);
    overflow-x: hidden;
}

/* Hide SEO helper text visually while keeping it in the HTML. */
.seo-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    height: var(--nav-height);
}

.nav-logo {
    display: flex;
    align-items: center;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.logo-dot {
    position: absolute;
    width: 120%;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--success-color), transparent);
    border-radius: 2px;
    left: -10%;
    bottom: 0;
    opacity: 0.7;
    z-index: 0;
    animation: shineEffect 3s infinite;
}

@keyframes shineEffect {
    0% {
        left: -120%;
        opacity: 0;
    }
    15% {
        opacity: 0.7;
    }
    45% {
        left: 100%;
        opacity: 0.7;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

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

.briefcase-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.briefcase-icon:hover {
    transform: rotate(10deg);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(to right, var(--gradient-1), var(--gradient-2));
    transition: width 0.3s ease;
}

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

.theme-toggle {
    font-size: 1.3rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(45deg);
}

/* Hero Section */
.hero {
    min-height: 10vh;
    padding-top: var(--nav-height);
    padding-bottom: 0;
    display: flex;
    align-items: center;
    background: var(--white);
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 5% 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

.hero-content {
    padding-right: 1.5rem;
}

.title-container {
    margin-bottom: 0.8rem;
}

.intro-text {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    animation: fadeInUp 0.8s ease forwards;
}

.intro-text .highlight {
    color: var(--primary-color);
    font-weight: bold;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.animated-text {
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--primary-color);
    animation: fadeInUp 0.8s ease forwards 0.2s;
    margin-top: 0.3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.typing-text {
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    font-weight: bold;
}

.typing-text::after {
    content: "|";
    position: absolute;
    right: -8px;
    color: var(--primary-color);
    background: none;
    -webkit-text-fill-color: initial;
    animation: blink 0.7s infinite;
}

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

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
    animation: fadeInUp 0.8s ease forwards 0.2s;
    opacity: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.social-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideInFade 0.4s ease forwards;
}

/* Cascade animation with a clear left-to-right progression */
.social-links a:nth-child(1) { animation-delay: 0.1s; }
.social-links a:nth-child(2) { animation-delay: 0.2s; }
.social-links a:nth-child(3) { animation-delay: 0.3s; }
.social-links a:nth-child(4) { animation-delay: 0.4s; }
.social-links a:nth-child(5) { animation-delay: 0.5s; }
.social-links a:nth-child(6) { animation-delay: 0.6s; }
.social-links a:nth-child(7) { animation-delay: 0.7s; }
.social-links a:nth-child(8) { animation-delay: 0.8s; }
.social-links a:nth-child(9) { animation-delay: 0.9s; }
.social-links a:nth-child(10) { animation-delay: 1.0s; }

.social-icon:hover {
    color: var(--gradient-1);
    transform: translateY(-3px) scale(1.1);
}

/* Make sure the social icons animation looks good on all screen sizes */
@media screen and (max-width: 992px) {
    .social-icon {
        animation-name: slideInFade;
    }
}

.hero-image {
    position: relative;
    animation: floatAnimation 6s ease-in-out infinite;
    max-width: 350px;
    margin: 0 auto;
}

.profile-img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    object-fit: cover;
    aspect-ratio: 3/4;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .animated-text {
        font-size: 2.3rem;
    }
    
    .subtitle {
        font-size: 1.5rem;
    }

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

@media screen and (max-width: 992px) {
    .hero-container {
        padding-bottom: 0;
    }
    
    .title-container {
        margin-bottom: 0.6rem;
    }
    
    .animated-text {
        font-size: 2rem;
        justify-content: center;
        margin-top: 0.2rem;
    }

    .hero {
        min-height: 10vh;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1rem 5% 0;
    }

    .hero-content {
        padding-right: 0;
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: 1rem;
        max-width: 350px;
    }

    .social-links {
        justify-content: center;
    }

    .intro-text {
        font-size: 1.6rem;
    }
    
    .nav-links {
        position: fixed;
        right: -100%;
        top: var(--nav-height);
        height: calc(100vh - var(--nav-height));
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        width: 100%;
        text-align: center;
        transition: 0.3s ease-in-out;
        padding: 2rem 0;
        display: flex;
    }

    .dark-mode .nav-links {
        background: rgba(26, 26, 26, 0.98);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
        opacity: 0;
        transform: translateX(50px);
        transition: 0.3s ease-in-out;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links li:nth-child(4) { transition-delay: 0.4s; }

    .burger {
        display: block;
        cursor: pointer;
        z-index: 1000;
        padding: 0.5rem;
    }

    .burger div {
        width: 25px;
        height: 2px;
        background-color: var(--primary-color);
        margin: 6px;
        transition: all 0.3s ease;
    }

    .dark-mode .burger div {
        background-color: var(--white);
    }

    .burger.active div:nth-child(1) {
        transform: rotate(-45deg) translate(-6px, 6px);
    }

    .burger.active div:nth-child(2) {
        opacity: 0;
    }

    .burger.active div:nth-child(3) {
        transform: rotate(45deg) translate(-6px, -6px);
    }

    .education-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .education-card .img-container, 
    .experience-card .img-container {
        min-height: 120px;
    }
    
    .education-card .img-container img,
    .experience-card .img-container img {
        max-height: 120px;
    }
}

@media screen and (max-width: 480px) {
    .hero {
        min-height: 10vh;
    }

    .hero-container {
        padding: 0.5rem 1rem;
    }

    .hero-image {
        max-width: 280px;
        margin-bottom: 0.8rem;
    }

    .intro-text {
        font-size: 1.4rem;
    }
    
    .animated-text {
        font-size: 1.6rem;
    }

    .social-icon {
        font-size: 1.2rem;
    }

    .navbar {
        padding: 0.8rem 1rem;
    }

    .nav-logo {
        font-size: 1.4rem;
    }

    .burger div {
        width: 22px;
        height: 2px;
        margin: 5px;
    }

    .theme-toggle {
        font-size: 1.1rem;
    }

    .about-title {
        font-size: 2rem;
    }

    .about-text {
        font-size: 1rem;
        text-align: left;
    }

    .education-card {
        padding: 1.2rem;
        margin-left: 0;
    }
    
    .education-card .img-container,
    .experience-card .img-container {
        min-height: 120px;
    }
    
    .education-card .img-container img,
    .experience-card .img-container img {
        max-height: 120px;
    }
}

/* Dark Mode Styles */
body.dark-mode {
    background: #1a1a1a;
    color: var(--white);
}

body.dark-mode .navbar {
    background: rgba(26, 26, 26, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

body.dark-mode .nav-links a,
body.dark-mode .briefcase-icon,
body.dark-mode .theme-toggle {
    color: var(--white);
}

body.dark-mode .nav-logo .logo-text {
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .hero {
    background: #1a1a1a;
}

body.dark-mode .intro-text {
    color: var(--white);
}

body.dark-mode .animated-text {
    color: var(--white);
}

body.dark-mode .typing-text::after {
    color: var(--white);
}

body.dark-mode .subtitle {
    color: var(--white);
}

body.dark-mode .social-icon {
    color: var(--white);
}

/* Common section styling */
.about, .tech-stack-section, .education, .experience, .projects, .contact {
    padding: 3rem 10% 2rem;
    background: var(--white);
    scroll-margin-top: var(--nav-height);
}

/* Section title styling with line */
.section-title, .about-title, .education h2, .experience h2, .projects h2, .contact h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section-title::after, .about-title::after, .education h2::after, .experience h2::after, .projects h2::after, .contact h2::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -8px;
    left: 0;
    background: linear-gradient(to right, var(--gradient-1), var(--gradient-2));
    border-radius: 2px;
}

/* Education Section */
.education {
    padding: 3rem 10% 2rem;
    background: var(--white);
    scroll-margin-top: var(--nav-height);
}

.education h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.education-card {
    background: var(--white);
    padding: 1.2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    margin-left: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 1;
    transform: none;
}

/* Line by line animations for education card elements */
.education-card .img-container {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.education-card h3 {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.education-card .degree {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.education-card .details {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.education-card .period {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Animation classes */
.education-card.animate .img-container {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.1s;
}

.education-card.animate h3 {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.2s;
}

.education-card.animate .degree {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.3s;
}

.education-card.animate .details {
    animation: lineSlideIn 0.4s ease forwards;
}

.education-card.animate .period {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.9s;
}

/* Animation for each details element with sequential delay */
.education-card .details:nth-of-type(1) {
    animation-delay: 0.4s !important;
}

.education-card .details:nth-of-type(2) {
    animation-delay: 0.5s !important;
}

.education-card .details:nth-of-type(3) {
    animation-delay: 0.6s !important;
}

.education-card .details:nth-of-type(4) {
    animation-delay: 0.7s !important;
}

.education-card .details:nth-of-type(5) {
    animation-delay: 0.8s !important;
}

.education-card.animate .details {
    animation: lineSlideIn 0.4s ease forwards;
}

.education-card.animate .period {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.9s;
}

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

/* Sequential animation for education cards */
.education-card:nth-child(1) { animation-delay: 0.1s; }
.education-card:nth-child(2) { animation-delay: 0.2s; }
.education-card:nth-child(3) { animation-delay: 0.3s; }
.education-card:nth-child(4) { animation-delay: 0.4s; }
.education-card:nth-child(5) { animation-delay: 0.5s; }
.education-card:nth-child(6) { animation-delay: 0.6s; }

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Center alignment for education cards */
.education-card {
    text-align: center;
}

.education-card .img-container {
    width: 100%;
    height: auto;
    min-height: 140px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin: 0 auto 1rem;
}

.education-card .img-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 140px;
    transition: transform 0.5s ease;
}

.education-card:hover .img-container img {
    transform: scale(1.1);
}

.education-card .img-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.3));
    border-radius: 12px;
}

.education-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.6rem;
    font-size: 1rem;
    line-height: 1.3;
    position: relative;
    padding-bottom: 0.5rem;
}

.education-card h3::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, var(--gradient-1), var(--gradient-2));
    border-radius: 2px;
}

.education-card .degree {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.education-card .details {
    color: var(--text-color);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Highlight current/present education in red */
.education-card .period {
    font-size: 0.85rem;
    margin-top: 0.8rem;
    font-weight: 600;
    display: inline-block;
    padding: 0.3rem 0.9rem;
    background: rgba(var(--success-color-rgb), 0.25);
    border-radius: 15px;
    color: var(--success-color);
    box-shadow: 0 2px 8px rgba(var(--success-color-rgb), 0.3);
    transition: all 0.3s ease;
}

.education-card .period.current {
    color: var(--white);
    background: var(--accent-color);
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(var(--accent-color-rgb), 0.4);
}

/* Dark mode support for periods */
body.dark-mode .education-card .period {
    background: rgba(var(--success-color-rgb), 0.2);
    color: var(--success-color);
    box-shadow: 0 2px 8px rgba(var(--success-color-rgb), 0.2);
}

body.dark-mode .education-card .period.current {
    background: var(--accent-color);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(var(--accent-color-rgb), 0.3);
}

/* Experience Section */
.experience {
    padding: 3rem 10% 2rem;
    background: var(--white);
    scroll-margin-top: var(--nav-height);
}

.experience h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.experience-card {
    background: var(--white);
    padding: 1.2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 1;
    transform: none;
    text-align: center;
}

/* Line by line animations for experience card elements */
.experience-card .img-container {
    opacity: 0;
    transform: translateX(-30px);
}

.experience-card h3 {
    opacity: 0;
    transform: translateX(-30px);
}

.experience-card .company {
    opacity: 0;
    transform: translateX(-30px);
}

.experience-card .role {
    opacity: 0;
    transform: translateX(-30px);
}

.experience-card .description {
    opacity: 0;
    transform: translateX(-30px);
}

.experience-card .period {
    opacity: 0;
    transform: translateX(-30px);
}

/* Animation classes */
.experience-card.animate .img-container {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.1s;
}

.experience-card.animate h3 {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.2s;
}

.experience-card.animate .company {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.3s;
}

.experience-card.animate .role {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.4s;
}

.experience-card.animate .description {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.5s;
}

.experience-card.animate .period {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.6s;
}

/* Sequential animation for experience cards */
.experience-card:nth-child(1) { animation-delay: 0.1s; }
.experience-card:nth-child(2) { animation-delay: 0.2s; }
.experience-card:nth-child(3) { animation-delay: 0.3s; }
.experience-card:nth-child(4) { animation-delay: 0.4s; }

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.experience-card .img-container {
    width: 100%;
    height: auto;
    min-height: 140px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin: 0 auto 1rem;
}

.experience-card .img-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 140px;
    transition: transform 0.5s ease;
}

.experience-card:hover .img-container img {
    transform: scale(1.1);
}

.experience-card .img-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.3));
    border-radius: 12px;
}

.experience-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.5rem;
    line-height: 1.3;
}

.experience-card h3::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, var(--gradient-1), var(--gradient-2));
    border-radius: 2px;
}

.experience-card .company {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.experience-card .role {
    color: var(--text-color);
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.experience-card .description {
    color: var(--text-color);
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    line-height: 1.4;
    flex-grow: 1;
}

.experience-card .period {
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    padding: 0.3rem 0.9rem;
    background: rgba(var(--success-color-rgb), 0.25);
    border-radius: 15px;
    align-self: center;
    color: var(--success-color);
    box-shadow: 0 2px 8px rgba(var(--success-color-rgb), 0.3);
    transition: all 0.3s ease;
}

.experience-card .period.current {
    color: var(--white);
    background: var(--accent-color);
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(var(--accent-color-rgb), 0.4);
}

/* Dark mode support for experience */
body.dark-mode .experience-card {
    background: rgba(26, 26, 26, 0.8);
}

body.dark-mode .experience-card h3 {
    color: var(--white);
}

body.dark-mode .experience-card .description,
body.dark-mode .experience-card .role {
    color: var(--white);
}

@media screen and (max-width: 992px) {
    .experience-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode support for periods */
body.dark-mode .experience-card .period {
    background: rgba(var(--success-color-rgb), 0.2);
    color: var(--success-color);
    box-shadow: 0 2px 8px rgba(var(--success-color-rgb), 0.2);
}

body.dark-mode .experience-card .period.current {
    background: var(--accent-color);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(var(--accent-color-rgb), 0.3);
}

/* Projects Section */
.projects {
    padding: 3rem 10% 2rem;
    background: var(--white);
    scroll-margin-top: var(--nav-height);
}

.projects h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 1;
    transform: none;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Line by line animations for project cards */
.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    opacity: 0;
    transform: translateX(30px);
}

.project-card h3 {
    padding: 1rem 1rem 0.5rem;
    color: var(--primary-color);
    font-size: 1.3rem;
    opacity: 0;
    transform: translateX(30px);
}

.project-card p {
    padding: 0 1rem 1rem;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0;
    transform: translateX(30px);
}

.project-links {
    padding: 0 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateX(30px);
}

/* Animation classes for project cards */
.project-card.animate img {
    animation: projectSlideIn 0.4s ease forwards;
    animation-delay: 0.1s;
}

.project-card.animate h3 {
    animation: projectSlideIn 0.4s ease forwards;
    animation-delay: 0.2s;
}

.project-card.animate p {
    animation: projectSlideIn 0.4s ease forwards;
    animation-delay: 0.3s;
}

.project-card.animate .project-links {
    animation: projectSlideIn 0.4s ease forwards;
    animation-delay: 0.4s;
}

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

/* Dark mode support for projects */
body.dark-mode .project-card {
    background: rgba(26, 26, 26, 0.8);
}

body.dark-mode .project-card h3 {
    color: var(--white);
}

body.dark-mode .project-card p {
    color: var(--white);
}

@media screen and (max-width: 768px) {
    .projects {
        padding: 4rem 5%;
    }
    
    .projects h2 {
        font-size: 2rem;
    }
    
    .project-card h3 {
        font-size: 1.2rem;
    }
}

/* Contact Section */
.contact {
    padding: 3rem 10% 2rem;
    background: var(--white);
    scroll-margin-top: var(--nav-height);
}

.contact h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

#contact-form input,
#contact-form textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(var(--secondary-color-rgb), 0.2);
}

#contact-form textarea {
    height: 150px;
    resize: vertical;
}

.submit-btn {
    padding: 1rem;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    color: var(--white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-item i {
    font-size: 1.5rem;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-item p {
    color: var(--text-color);
}

.info-item p a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-item p a:hover {
    color: var(--secondary-color);
}

/* Dark mode support for contact */
body.dark-mode #contact-form,
body.dark-mode .contact-info {
    background: rgba(26, 26, 26, 0.8);
}

body.dark-mode #contact-form input,
body.dark-mode #contact-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: #444;
    color: var(--white);
}

body.dark-mode .info-item p {
    color: var(--white);
}

body.dark-mode .info-item p a {
    color: var(--white);
}

body.dark-mode .info-item p a:hover {
    color: var(--gradient-1);
}

/* Contact page social icons (GitHub and LinkedIn) */
body.dark-mode .contact-info .social-links a {
    color: var(--white);
}

body.dark-mode .contact-info .social-links a:hover {
    color: var(--gradient-1);
}

@media screen and (max-width: 768px) {
    .contact {
        padding: 4rem 5%;
    }
    
    .contact h2 {
        font-size: 2rem;
    }
}

/* Footer */
footer {
    background: linear-gradient(to right, var(--primary-color), #1a2a3a);
    color: var(--white);
    text-align: center;
    padding: 1rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Mobile Navigation */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        width: 100%;
        text-align: center;
        transition: 0.5s;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 2rem 0;
    }

    .burger {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .education-card h3,
    .experience-card h3 {
        font-size: 1.1rem;
    }

    .stats {
        flex-direction: column;
        gap: 2rem;
    }
}

/* About Section */
.about {
    padding: 3rem 10% 2rem;
    background: var(--white);
    scroll-margin-top: var(--nav-height);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.about-content {
    position: relative;
    padding: 2rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.about-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    width: 100%;
    display: block;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    text-align: left;
}

.about-text:nth-child(2) { animation-delay: 0.2s; }
.about-text:nth-child(3) { animation-delay: 0.4s; }

.highlight {
    color: var(--secondary-color);
    font-weight: 600;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.tech-item {
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    color: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.tech-item:nth-child(1) { animation-delay: 0.5s; }
.tech-item:nth-child(2) { animation-delay: 0.6s; }
.tech-item:nth-child(3) { animation-delay: 0.7s; }
.tech-item:nth-child(4) { animation-delay: 0.8s; }
.tech-item:nth-child(5) { animation-delay: 0.9s; }
.tech-item:nth-child(6) { animation-delay: 1.0s; }

@media screen and (max-width: 768px) {
    .about {
        padding: 4rem 5%;
    }
    
    .about-title {
        font-size: 2rem;
    }
    
    .about-text {
        font-size: 1rem;
    }
    
    .tech-stack {
        justify-content: center;
    }
}

/* Dark mode support */
body.dark-mode .about-content {
    background: rgba(26, 26, 26, 0.8);
}

body.dark-mode .about-text {
    color: var(--white);
}

/* Tech Stack Section */
.tech-stack-section {
    padding: 3rem 10% 2rem;
    background: var(--white);
    scroll-margin-top: var(--nav-height);
}

.tech-stack-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.stack-category {
    margin-bottom: 1.5rem;
}

.stack-category h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 1.2rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.8rem;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stack-category.animate h3 {
    opacity: 1;
    transform: translateX(0);
}

.stack-category h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--gradient-1), var(--gradient-2));
    transition: width 0.6s ease;
    border-radius: 2px;
}

.stack-category.animate h3::after {
    width: 80px;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: translateX(-30px);
}

.stack-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(var(--secondary-color-rgb), 0.15);
}

.stack-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.stack-item span {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}

.stack-item span:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
}

.stack-item:hover span {
    opacity: 1;
    visibility: visible;
}

/* Dark mode tooltip */
body.dark-mode .stack-item span {
    background: var(--gradient-1);
}

body.dark-mode .stack-item span:after {
    border-color: var(--gradient-1) transparent transparent transparent;
}

/* Dark mode support */
body.dark-mode .tech-stack-section {
    background: #1a1a1a;
}

body.dark-mode .stack-category h3 {
    color: var(--white);
    position: relative;
}

body.dark-mode .stack-category h3::after {
    background: linear-gradient(to right, var(--gradient-1), var(--gradient-2));
}

body.dark-mode .stack-item {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .stack-item span {
    color: var(--white);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .tech-stack-section {
        padding: 2rem 5% 1.5rem;
    }

    .section-title, .stack-category h3 {
        margin-bottom: 1.2rem;
    }

    .stack-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1.5rem;
    }

    .stack-item img {
        width: 40px;
        height: 40px;
    }

    .stack-category h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .stack-category h3::after {
        width: 60px;
        height: 2px;
    }
}

@media screen and (max-width: 480px) {
    .stack-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 1rem;
    }

    .stack-item {
        padding: 0.8rem;
    }

    .stack-item img {
        width: 35px;
        height: 35px;
    }

    .stack-item span {
        font-size: 0.8rem;
    }

    .stack-category h3 {
        font-size: 1rem;
        margin-bottom: 0.7rem;
    }
    
    .stack-category h3::after {
        width: 50px;
        height: 2px;
    }
}

/* Dark Mode Styles for sections */
body.dark-mode .about, 
body.dark-mode .tech-stack-section,
body.dark-mode .education,
body.dark-mode .experience,
body.dark-mode .projects,
body.dark-mode .contact {
    background: #1a1a1a;
}

/* Update dark mode */
body.dark-mode .education-card {
    background: rgba(26, 26, 26, 0.8);
}

body.dark-mode .education-card h3,
body.dark-mode .education-card .details {
    color: var(--white);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .education-card {
        padding: 1.5rem;
        margin-left: 0;
    }
}

@media screen and (max-width: 480px) {
    .education-card {
        padding: 1.2rem;
        margin-left: 0;
    }
}

@media screen and (max-width: 992px) {
    .education-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .education-card .img-container, 
    .experience-card .img-container {
        min-height: 120px;
    }
    
    .education-card .img-container img,
    .experience-card .img-container img {
        max-height: 120px;
    }
}

@media screen and (max-width: 768px) {
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    .education-card .img-container,
    .experience-card .img-container {
        min-height: 150px;
    }
    
    .education-card .img-container img,
    .experience-card .img-container img {
        max-height: 150px;
    }
    
    .education-card {
        padding: 1.5rem;
        margin-left: 0;
    }
}

@media screen and (max-width: 480px) {
    .education-card {
        padding: 1.2rem;
        margin-left: 0;
    }
    
    .education-card .img-container,
    .experience-card .img-container {
        min-height: 120px;
    }
    
    .education-card .img-container img,
    .experience-card .img-container img {
        max-height: 120px;
    }
}

/* Media query adjustments */
@media screen and (max-width: 768px) {
    .about, .tech-stack-section, .education, .experience, .projects, .contact {
        padding: 2rem 5% 1.5rem;
    }
    
    .section-title, .about-title, .education h2, .experience h2, .projects h2, .contact h2 {
        font-size: 1.8rem;
        margin-bottom: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .about, .tech-stack-section, .education, .experience, .projects, .contact {
        padding: 1.5rem 5% 1rem;
    }
}

/* Section entrance animations */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Add direction-based animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-up {
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-in.slide-in-left,
.animate-in.slide-in-right,
.animate-in.slide-in-up {
    opacity: 1;
    transform: translate(0);
}

/* Special animations for home section */
#home .hero-content {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#home .hero-image {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease 0.2s;
}

#home.animate-in .hero-content,
#home.animate-in .hero-image {
    opacity: 1;
    transform: translateX(0);
}

/* Ensure parallax effect doesn't conflict with animations */
#home.animate-in .hero-image {
    animation: floatAnimation 6s ease-in-out infinite;
    transform: translateX(0);
}

/* Change the parallax effect to work with our animations */
.parallax-scroll {
    transition: transform 0.1s ease-out !important;
}

@media (prefers-reduced-motion: reduce) {
    section, 
    .slide-in-left, 
    .slide-in-right, 
    .slide-in-up,
    #home .hero-content,
    #home .hero-image {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Animation for stack items */
.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: translateX(-30px);
}

/* Left to right animation for tech stack items */
.stack-category.animate .stack-item {
    animation: stackItemSlideIn 0.4s ease forwards;
}

/* Make sure hover works after animation */
.stack-category.animate .stack-item:hover {
    transform: translateY(-5px);
}

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

/* Reverse sequence for right-to-left animation - items will appear from right to left in each row */
.stack-category.animate .stack-item:nth-child(5n + 1) { animation-delay: 0.5s; } /* 5th item in a row of 5 */
.stack-category.animate .stack-item:nth-child(5n + 2) { animation-delay: 0.4s; }
.stack-category.animate .stack-item:nth-child(5n + 3) { animation-delay: 0.3s; }
.stack-category.animate .stack-item:nth-child(5n + 4) { animation-delay: 0.2s; }
.stack-category.animate .stack-item:nth-child(5n + 5) { animation-delay: 0.1s; } /* 1st item in a row of 5 */

/* For rows with fewer items, these will be used */
.stack-category.animate .stack-item:nth-child(4n + 1) { animation-delay: 0.4s; }
.stack-category.animate .stack-item:nth-child(4n + 2) { animation-delay: 0.3s; }
.stack-category.animate .stack-item:nth-child(4n + 3) { animation-delay: 0.2s; }
.stack-category.animate .stack-item:nth-child(4n + 4) { animation-delay: 0.1s; }

.stack-category.animate .stack-item:nth-child(3n + 1) { animation-delay: 0.3s; }
.stack-category.animate .stack-item:nth-child(3n + 2) { animation-delay: 0.2s; }
.stack-category.animate .stack-item:nth-child(3n + 3) { animation-delay: 0.1s; }

body.dark-mode .hero-container {
    background: #1a1a1a;
}

body.dark-mode .intro-text .highlight {
    background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .about-content,
body.dark-mode .tech-stack-section,
body.dark-mode .education,
body.dark-mode .experience,
body.dark-mode .projects,
body.dark-mode .contact {
    background: #1a1a1a;
}

/* 
Note: The following old animation for experience cards is kept 
for compatibility but doesn't actually run because we have
line-by-line animations defined above that take precedence.
*/
.experience-card.animate {
    animation: educationCardSlideIn 0.5s ease forwards;
}

.project-card.animate .project-links {
    animation: lineSlideIn 0.4s ease forwards;
    animation-delay: 0.4s;
}

.project-links a {
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.project-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
} 