/* Global Styles - Dark Mode Only */
:root {
  /* Base tones */
  --bg-color:          #1a1a2e;  /* Very dark indigo */
  --text-color:        #e6e6e6;  /* Soft light */
  --card-bg:           #252A3A;  /* Slightly lighter than bg */
  --card-border:       #3a3f54;  /* Subtle border for cards */
  --shadow-color:      rgba(0, 0, 0, 0.4);  /* Stronger shadow */

  /* Accent & brand */
  --primary-color:     #A388C5;  /* Lighter lavender */
  --secondary-color:   #4E5768;  /* Muted slate for secondary UI */
  --accent-color:      #FF6B6B;  /* Bright coral for calls to action */
  --logo-color:        #FFFFFF;  /* Logo pops in white */

  /* Utility */
  --grey-color:        #7D7D7D;  
  --border-radius:     8px;
  --transition:        all 0.3s ease;
  --hero-overlay:      rgba(26, 26, 46, 0.85);
  --timeline-spine:    #4A4F6A;
  --secondary-btn-text: #FFFFFF;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}




section {
    padding: 80px 0;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 10px;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    position: relative;
    color: var(--text-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.about-wrapper .section-title::after {
    left: 0;
    transform: none;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px; /* Ensure minimum touch target */
    box-sizing: border-box;
    /* Background and glass effects handled by frosted-glass.css */
}

.primary-btn {
    /* Background handled by frosted-glass.css */
    color: white;
}

.primary-btn:hover {
    /* Background handled by frosted-glass.css */
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    /* Background and border handled by frosted-glass.css */
    color: var(--secondary-btn-text);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.secondary-btn:hover {
    /* Background handled by frosted-glass.css */
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Header/Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    /* All styling handled by frosted-glass.css */
}

/* Remove dark mode styles for header since we override everything in frosted-glass.css */

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--logo-color);
    transition: color 0.3s ease;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-menu a {
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--border-radius);
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Dark Mode Toggle - Removed since we only have dark mode */
/* Remove all theme toggle related styles */

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #1a1a2e, #252A3A, #4E5768, #A388C5);
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
    padding: 0; /* Remove all padding to center properly */
    position: relative;
    margin-top: 0; /* Ensure no margin at top */
    overflow: hidden; /* Ensure stars don't cause scrollbars */
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.hero-text-content {
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-profile-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* About Section */
.about-wrapper {
    /* Background and glass effects handled by frosted-glass.css */
    border-radius: var(--border-radius);
    /* box-shadow handled by frosted-glass.css */
    padding: 30px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.about-wrapper .section-title {
    margin-top: 0;
    margin-bottom: 30px;
    text-align: left;
}

.about-card {
    /* Background and glass effects handled by frosted-glass.css */
    border-radius: var(--border-radius);
    /* box-shadow handled by frosted-glass.css */
    padding: 30px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-img {
    flex: 1;
    display: flex;
    justify-content: center;
}

.img-placeholder {
    width: 300px;
    height: 300px;
    background-color: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.circular {
    border-radius: 50%;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Education in About Section */

.about, .education {
    padding: 40px 0;
}


.education-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.education-container h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.education-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px 25px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-text .education-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 5px 15px var(--shadow-color);
    margin-top: 10px;
    width: 100%;
    transition: transform .3s ease, box-shadow .3s ease;
}

.about-text .education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

/* Dark theme adjustments */
:root.dark-theme .education-container {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Experience Section */
.timeline {
    position: relative;
    z-index: 0;            /* establish stacking context */
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 40px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--timeline-spine);
    top: 70px;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    z-index: -1;           /* push under everything inside .timeline */
    transition: background-color 0.3s ease;
}

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

.timeline-item:first-child {
    margin-top: 0; /* Ensure first item aligns with start of timeline */
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: 1;            /* above the spine */
    box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    position: relative;
    z-index: 0;            /* above the spine, below dots */
    padding: 30px;
    /* Background and glass effects handled by frosted-glass.css */
    border-radius: var(--border-radius);
    /* box-shadow handled by frosted-glass.css */
    border-left: 4px solid var(--primary-color);
    transition: transform 0.15s ease;
    width: 100%;
}

.timeline-content:hover {
    transform: translateY(-5px);
    /* box-shadow handled by frosted-glass.css */
}

.timeline-item:nth-child(even) .timeline-content {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

/* Timeline Section */
.timeline-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

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

.timeline-date {
    color: var(--grey-color);
    margin-bottom: 15px;
    font-weight: 500;
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(74, 108, 247, 0.1);
    border-radius: 15px;
}

.timeline-content ul {
    padding-left: 20px;
    margin-top: 15px;
}

.timeline-content ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}

.timeline-content ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    /* Background and glass effects handled by frosted-glass.css */
    border-radius: var(--border-radius);
    overflow: hidden;
    /* box-shadow handled by frosted-glass.css */
    padding: 30px;
    transition: transform 0.15s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    /* box-shadow and background handled by frosted-glass.css */
}

/* Project Card Titles */
.project-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.project-card p {
    color: var(--text-color);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-item {
    padding: 4px 12px;
    border-radius: 20px;
    /* Background and glass effects handled by frosted-glass.css */
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.project-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.project-link {
    color: var(--primary-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-link:hover {
    text-decoration: underline;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

/* Skills Category Headings */
.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.skill-tag {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.95rem;
    color: white;
    /* Background and glass effects handled by frosted-glass.css */
    /* box-shadow handled by frosted-glass.css */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-3px);
    /* box-shadow handled by frosted-glass.css */
}

.skill-tag::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    margin-right: 8px;
}

.skill-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.skill-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 80px;
    text-align: center;
}

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

/* Education Section */
.education-container {
    max-width: 800px;
    margin: 0 auto;
}
.education-card {
    /* Background and glass effects handled by frosted-glass.css */
    border-radius: var(--border-radius);
    padding: 30px;
    /* box-shadow handled by frosted-glass.css */
    max-width: 800px;
    margin: 0 auto;
    transition: transform 0.15s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    /* box-shadow handled by frosted-glass.css */
}

.education-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.education-info {
    flex: 1;
    min-width: 200px;
}

.school-logo {
    width: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.school-logo img, 
.school-logo-img {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    height: auto;
    transition: transform 0.3s ease;
    display: block;
    object-fit: contain; /* Ensures image maintains aspect ratio */
}

.school-logo img:hover,
.school-logo-img:hover {
    transform: scale(1.05);
}

.education-card h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    transition: color 0.3s ease;
    margin-bottom: 8px;
}

.education-card h4 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 5px;
}

@media screen and (min-width: 768px) {
    .education-card h3 {
        font-size: 2rem;
    }
    
    .education-card h4 {
        font-size: 1.3rem;
    }
}

.education-card .coursework {
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
}

/* Education responsive styling for larger screens */
@media screen and (min-width: 992px) {
    .education-header {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .school-logo {
        margin-right: 25px;
    }
    
    .education-info {
        padding-top: 5px;
    }
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
    /* Background and glass effects handled by frosted-glass.css */
    border-radius: var(--border-radius);
    padding: 50px;
    /* box-shadow handled by frosted-glass.css */
    overflow: hidden; /* Prevent content from overflowing */
    box-sizing: border-box; /* Ensure padding is included in width */
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%; /* Ensure it doesn't exceed container width */
}

.contact-item {
    display: flex;
    align-items: flex-start; /* Align to top to handle text wrapping better */
    gap: 15px;
    padding: 20px;
    /* Background and glass effects handled by frosted-glass.css */
    border-radius: var(--border-radius);
    transition: transform 0.15s ease;
    width: 100%; /* Ensure proper width */
    overflow-wrap: break-word; /* Allow long text to wrap */
    word-wrap: break-word;
    max-width: 100%; /* Prevent overflow */
    box-sizing: border-box; /* Include padding in width calculation */
}

.contact-item:hover {
    transform: translateY(-5px);
    /* box-shadow and background handled by frosted-glass.css */
}

/* Contact Section Icons and Text */
.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    background-color: rgba(74, 108, 247, 0.1);
    min-width: 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.3s ease, background-color 0.3s ease;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.contact-item a, 
.contact-item span,
.contact-item h4 {
    font-weight: 500;
    color: var(--text-color);
    word-break: break-word; /* Handle email overflow */
}

/* Social Links Section */
.social-links h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
}

.social-links p {
    color: var(--text-color);
    text-align: center;
}

.social-link {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: var(--transition);
    background-color: rgba(74, 108, 247, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.social-link:hover {
    color: white;
    background-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.contact-card {
    padding: 30px;
    border-radius: var(--border-radius);
    /* Background and glass effects handled by frosted-glass.css */
    /* box-shadow handled by frosted-glass.css */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.contact-card img {
    width: 150px;
    height: 150px;
    max-width: 100%;
    margin: 0 auto 20px;
    display: block;
    border-radius: 50%;
    border: 5px solid rgba(74, 108, 247, 0.1);
    object-fit: cover;
}

.resume-link {
    margin-top: 30px;
    text-align: center;
}
    
/* Update card styling for dark mode */
.project-card, 
.education-card, 
.contact-card,
.timeline-content {
    background-color: var(--card-bg);
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Footer Colors */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    transition: background-color 0.3s ease;
}

:root.dark-theme .footer {
    background-color: #131327;
}

/* Responsive Design */
@media screen and (max-width: 991px) {
    /* Timeline improvements for tablet and mobile */
    .timeline {
        padding-top: 30px;
    }
    .timeline::after {
        left: 20px; /* Move spine to the left */
        top: 60px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 60px; /* Give more space for content */
        padding-right: 20px;
        margin-bottom: 30px;
        position: relative; /* Ensure proper positioning context */
    }
    .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-dot {
        left: 10px; /* Align dots with spine */
        right: auto;
    }
    .timeline-item:nth-child(even) .timeline-dot {
        left: 10px;
    }
    
    /* Fix right border for even items in mobile view */
    .timeline-item:nth-child(even) .timeline-content {
        border-right: none;
        border-left: 4px solid var(--primary-color);
    }
    
    .timeline-content {
        padding: 20px; /* More compact padding */
        width: 100%; /* Full width on mobile */
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        padding: 30px 25px;
    }
}

@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        /* Background handled by frosted-glass.css */
        width: 100%;
        text-align: center;
        /* box-shadow handled by frosted-glass.css */
        transition: left 0.3s ease, background-color 0.3s ease;
        padding: 20px 0;
        z-index: 999; /* Ensure it's above other content */
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: block;
        order: 2;
        margin-left: 15px;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .bar {
        background-color: var(--text-color);
        transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    }
    
    /* Hero section mobile adjustments */
    .hero {
        min-height: calc(100vh - 40px);
        padding: 80px 0 60px; /* Adjusted for mobile with hidden header */
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
        line-height: 1.1;
        margin-bottom: 15px;
    }
    
    .tagline {
        font-size: 1.3rem;
        margin-bottom: 25px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 15px 25px;
        font-size: 1rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-wrapper {
        padding: 20px 15px;
    }
    
    /* Education in About section adjustments */
    .about-text .education-card {
        padding: 15px;
    }
    
    .education-header {
        flex-direction: row;
        align-items: center;
    }
    
    .school-logo {
        margin-right: 15px;
        margin-top: 0;
    }
    
    /* Education responsive styling for all screen sizes */
    @media screen and (min-width: 577px) and (max-width: 767px) {
        .education-header {
            flex-direction: row;
            align-items: flex-start;
        }
        
        .education-info {
            flex: 1;
        }
        
        .school-logo {
            width: 100px;
            margin-right: 15px;
        }
        
        .school-logo img,
        .school-logo-img {
            max-height: 100px;
        }
        
        .education-card {
            padding: 25px;
        }
        
        .education-card h3 {
            font-size: 1.8rem;
        }
    }
    
    .contact-content {
        gap: 30px;
        padding: 30px 20px;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item {
        padding: 15px;
    }
    
    /* Improved navigation layout */
    .nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
    }
    
    .logo {
        flex: 1;
        text-align: left;
    }
    
    .nav-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    /* Position theme toggle better on mobile */
    .theme-toggle {
        margin-right: 10px;
        order: 1;
    }
}

@media screen and (max-width: 576px) {
    /* More aggressive hero section adjustments for very small screens */
    .hero {
        min-height: calc(100vh - 30px);
        padding: 70px 0 50px; /* Adjusted for small screens with hidden header */
    }
    
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.1;
    }
    
    .tagline {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.95rem;
        font-weight: 500;
    }
    
    .hero-profile-img {
        width: 180px;
        height: 180px;
    }
    
    /* Section padding adjustments */
    section {
        padding: 60px 0;
    }
    
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    /* Education in About section small screen adjustments */
    .about-text .education-card {
        padding: 15px 10px;
    }
    
    .education-container h3 {
        font-size: 1.2rem;
    }
    
    .education-card h3 {
        font-size: 1.3rem;
    }
    
    .education-card .coursework {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-top: 5px;
    }
    
    .education-header {
        margin-bottom: 0;
    }
    
    /* Improved contact section for very small screens */
    .contact-content {
        padding: 20px 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .contact-item {
        padding: 15px 12px;
        flex-wrap: wrap;
    }
    
    .contact-item i {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .contact-info, 
    .social-links {
        width: 100%;
        box-sizing: border-box;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .social-link {
        width: 50px;
        height: 50px;
    }
    
    /* Smaller timeline for mobile */
    .timeline-content {
        padding: 15px;
    }
    
    .timeline-content h3 {
        font-size: 1.3rem;
    }
    
    /* Fix timeline spacing on small screens */
    .timeline-item {
        padding-left: 50px;
        padding-right: 10px;
    }
    
    .timeline-dot {
        width: 16px;
        height: 16px;
        left: 12px;
    }
    
    /* Make education card fully responsive for mobile */
    .school-logo {
        width: 90px;
        margin-right: 10px;
    }
    
    .school-logo img,
    .school-logo-img {
        max-height: 90px;
    }
    
    .education-header {
        justify-content: flex-start;
        gap: 15px;
    }
    
    .education-card {
        padding: 20px;
    }
    
    .education-info {
        text-align: left;
    }
    
    .education-card h3 {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    
    .education-card h4 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
    
    .education-card p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}



/* ─── EDUCATION SECTION: MOBILE LAYOUT ─── */
@media screen and (max-width: 576px) {
  /* make the card more compact and centered */
  .education-card {
    max-width: 360px;
    width: 90%;
    margin: 0 auto 1.5rem;
    padding: 20px;
  }

  /* specific layout for education header on mobile */
  .education-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 15px;
    flex-wrap: wrap;
  }

  /* position logo on the left */
  .school-logo {
    width: 70px;
    margin: 0;
    align-self: center;
  }
  
  .school-logo img,
  .school-logo-img {
    max-height: 70px;
  }

  /* education info styling */
  .education-info {
    flex-direction: column;
    display: flex;
  }
  
  /* school name styling */
  .education-info h3 {
    font-size: 1.3rem;
    line-height: 1.2;
    margin-bottom: 0;
    align-self: flex-start;
  }
  
  /* position degree and coursework below logo and school name */
  .education-info h4,
  .education-info p {
    width: 100%;
    padding-top: 10px;
  }
  
  .education-info h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    order: 1;
  }
  
  .education-info p {
    font-size: 0.9rem;
    line-height: 1.4;
    order: 2;
  }
}

/* ─── EXTRA SMALL MOBILE DEVICES (320px - 480px) ─── */
@media screen and (max-width: 480px) {
    .hero {
        min-height: calc(100vh - 20px);
        padding: 60px 0 40px; /* Minimal padding for extra small screens */
    }
    
    .hero-content {
        gap: 25px;
        padding: 0 10px;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 10px;
    }
    
    .tagline {
        font-size: 1rem;
        margin-bottom: 20px;
        line-height: 1.3;
    }
    
    .hero-buttons {
        gap: 10px;
        max-width: 240px;
    }
    
    .hero-buttons .btn {
        padding: 12px 18px;
        font-size: 0.9rem;
    }
    
    .hero-profile-img {
        width: 160px;
        height: 160px;
    }
    
    /* Ensure sections don't overlap */
    section {
        padding: 50px 0;
    }
    
    .container {
        width: 95%;
        padding: 0 8px;
    }
    
    /* Better spacing for nav */
    .nav {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    /* Contact section improvements */
    .contact-content {
        padding: 20px 10px;
        gap: 25px;
    }
    
    .contact-item {
        padding: 12px 10px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .contact-item i {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }
    
    /* Timeline adjustments for very small screens */
    .timeline-item {
        padding-left: 45px;
        padding-right: 8px;
    }
    
    .timeline-dot {
        width: 14px;
        height: 14px;
        left: 14px;
    }
    
    .timeline-content {
        padding: 12px;
    }
    
    .timeline-content h3 {
        font-size: 1.2rem;
    }
    
    /* Project cards */
    .project-card {
        padding: 20px 15px;
    }
    
    .project-card h3 {
        font-size: 1.3rem;
    }
    
    /* Skills section */
    .skill-tag {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    /* Education card */
    .education-card {
        padding: 15px 10px;
    }
    
    .school-logo {
        width: 60px;
    }
    
    .school-logo img,
    .school-logo-img {
        max-height: 60px;
    }
    
    .education-info h3 {
        font-size: 1.1rem;
    }
    
    .education-info h4 {
        font-size: 1rem;
    }
    
    .education-info p {
        font-size: 0.85rem;
    }
}

