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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f4f4f4;
    min-height: 100vh;
}

/* Vertical Side Box */
.side-box {
    position: fixed;
    top: 60%; /* Pushed down slightly from the vertical center */
    right: 4%; /* Pushed closer to the right edge */
    transform: translateY(-50%); /* Centers the box perfectly vertically */
    width: 70px; /* Adjusted width */
    height: auto; /* Let the height grow automatically */
    padding: 20px 0; /* Adds spacing at the top and bottom */
    background-color: white;
    border-radius: 15px; /* Gives the box nicely rounded corners */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 5px 15px rgba(0, 0, 0, 0.1); /* Enhanced 3D shadow effect */
    z-index: 10005; /* Placed safely above the 10000 header line and projects section */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers your widgets horizontally */
    justify-content: center; /* Centers your widgets vertically */
    gap: 20px; /* Adds space between your widgets */
}

.side-box a {
    font-size: 32px; /* Increased size of the icons */
    color: #333; /* Default icon color */
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

.side-box a:hover {
    transform: scale(1.2); /* Makes the icon pop on hover */
}

/* Brand specific hover colors */
.side-box a[aria-label="LinkedIn"]:hover {
    color: #0A66C2;
}

.side-box a[aria-label="GitHub"]:hover {
    color: #171515;
}

.side-box a[aria-label="Email"]:hover {
    color: #EA4335;
}

.side-box a[aria-label="Instagram"]:hover {
    color: #E1306C;
}

.side-box a[aria-label="Toggle Dark Mode"]:hover {
    color: #bdc3c7; /* Moon silver when hovered in light mode */
}

.side-box a[aria-label="Toggle Animation"]:hover .fa-pause {
    color: #8e44ad; /* Deep Purple for Pause */
}

.side-box a[aria-label="Toggle Animation"]:hover .fa-play {
    color: #2ecc71; /* Bright Green for Play */
}

.side-box a[aria-label="Toggle Direction"]:hover .fa-arrow-down {
    color: #00cec9; /* Cyan for Down Arrow */
}

.side-box a[aria-label="Toggle Direction"]:hover .fa-arrow-up {
    color: #CFF800; /* Neon Yellow for Up Arrow */
}

/* Folder Widget */
.folder-widget {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.folder-trigger {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
    background-color: #f1f1f1;
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    width: 45px;
    height: 45px;
    place-items: center;
}

.folder-trigger:hover {
    transform: scale(1.1);
    background-color: #e67e22; /* Turns orange on hover */
}

.folder-trigger:hover .mini-icon {
    color: #000; /* Mini icons turn black on hover */
}

.folder-trigger .mini-icon {
    font-size: 11px;
    color: #555;
    transition: color 0.3s ease;
}

.folder-content {
    position: absolute;
    right: 70px; /* Pop out to the left of the side box */
    top: 50%;
    transform: translateY(-50%) scale(0.9) translateX(10px);
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10001;
}

.folder-content.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1) translateX(0);
}

/* Main Header */
.main-header {
    padding: 100px 0 15px 0; /* Further reduced top padding to fit more content on screen */
    text-align: center;
    width: 70%; /* Establishes a unified column with the line */
    max-width: 1000px;
    margin: 0 auto; /* Centers the column on the screen */
}

.main-heading {
    font-size: 5rem; /* Makes the heading large and bold */
    font-weight: 700; /* Uses the boldest Poppins weight */
    color: #333;
    position: relative;
    z-index: 10000; /* Ensures the text is clearly legible above the hexagons */
    mix-blend-mode: multiply; /* Blends and darkens when overlapping with the hexagons */
}

.text-orange {
    color: #e67e22; /* A nice, vibrant orange */
}

.sub-heading {
    font-size: 2rem; /* Smaller text for the subtitle */
    font-weight: 600; /* Uses the semi-bold Poppins weight */
    color: #333; /* Exactly matches the "Hey I'm" text color */
    margin-top: -10px; /* Negative margin to pull it significantly closer to the heading */
    position: relative;
    z-index: 10000;
    mix-blend-mode: multiply; /* Blends and darkens when overlapping with the hexagons */
}

.location-heading {
    font-size: 1.5rem; /* Slightly smaller than the subtitle */
    font-weight: 400; /* Uses the standard regular Poppins weight */
    color: #333; /* Matches the AI/ML Engineer text color */
    margin-top: 5px;
    position: relative;
    z-index: 10000;
    mix-blend-mode: multiply; /* Blends and darkens when overlapping with the hexagons */
}

/* Resume Button */
.resume-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
    padding: 10px 25px;
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    background-color: #e67e22; /* Matches the text-orange */
    text-decoration: none;
    border-radius: 8px;
    position: relative;
    z-index: 10000; /* Ensure it stays above the hexagons */
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
    overflow: hidden; /* Keeps the JS ripple effect contained within the button */
}

.resume-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.resume-btn:hover {
    background-color: #d35400; /* Slightly darker orange */
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(230, 126, 34, 0.4);
}

/* Header Divider Line */
.header-line {
    border: none;
    border-top: 3px solid #ccc; /* Made significantly lighter */
    margin: 0 auto 40px auto; /* Centered with a gap underneath */
    width: 70%; /* Made even wider */
    max-width: 1000px;
    position: relative;
    z-index: 10000; /* Ensures it sits clearly above the background */
}

/* Dropdown Sections */
.dropdown-section {
    width: 70%; /* Perfectly matches the header and line widths */
    max-width: 1000px;
    margin: 0 auto; /* Fully centers the sections horizontally */
    position: relative;
    z-index: 10000;
}

.dropdown {
    margin-bottom: 15px;
    background: transparent;
    border: none;
    overflow: hidden;
}

/* Individual Dropdown Left Borders */
.course-dropdown {
    border-left: 4px solid #feba9e;
}

.exp-dropdown {
    border-left: 4px solid #d1ece3;
}

.proj-dropdown {
    border-left: 4px solid #fceac7;
}

.dropdown summary {
    padding: 10px 15px; /* Added side padding to distance text from the left border */
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none; /* Hides default browser arrow */
    display: flex;
    justify-content: space-between; /* Puts text on the left, icon on the right */
    align-items: center;
    background-color: transparent;
    transition: color 0.2s ease;
}

.ud-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ud-title {
    color: #333;
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 10px;
}

.ud-logo-header {
    width: 85px; /* Increased size for better visibility */
    height: auto;
    background: transparent; /* No white background or borders */
    mix-blend-mode: normal; /* Override any blend modes so it stays clear */
    border-radius: 8px; /* Optional: adds a nice rounded edge if the image is square */
    transition: transform 0.3s ease;
}

.summary-left {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.dropdown-subtitle {
    font-size: 0.85rem;
    font-weight: 400;
    color: #333; /* Matches the color of Coursework, Experience, and Projects */
    margin-bottom: 2px;
}

.dropdown summary::-webkit-details-marker {
    display: none; /* Hides arrow in Safari */
}

.dropdown-icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
    color: #333; /* Keeps the plus/minus icon a highly visible dark color */
}

.dropdown.is-active .dropdown-icon {
    transform: rotate(180deg); /* Adds a spin effect when flipping */
}

.dropdown.is-active .dropdown-icon::before {
    content: "\f068"; /* Automatically changes the FontAwesome Plus into a Minus */
}

.dropdown-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out, opacity 0.4s ease-in-out;
    color: #555;
    background-color: transparent;
    text-align: left; /* Aligns the opened content to the left to match the header */
}

.dropdown.is-active .dropdown-content {
    max-height: 1000px; /* Safely large enough to hold all text while expanding smoothly */
    padding: 10px 15px 20px 15px; /* Adds padding so text aligns evenly with summary */
    opacity: 1;
}

/* Coursework List Styles */
.course-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Adds space between the Completed, In Progress, and Upcoming sections */
}

.course-category h4 {
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.course-category ul {
    list-style-type: disc;
    padding-left: 20px;
    color: #555;
    font-size: 0.95rem;
}

/* Experience Brand inside Dropdown */
.exp-brand {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 0; /* Reduced space between brand and role title */
    flex-wrap: wrap;
}

.exp-logo {
    width: 80px; /* Increased size for better visibility */
    margin-left: 0px; /* Positioned to the left */
    height: auto;
    border-radius: 8px;
}

/* Adjust DIR Lab logo to match Mercor's visual weight */
.dir-logo {
    width: 90px;
    margin-left: 0; /* Prevents the DIR Lab logo from also moving right */
}

/* SafeCircle logo styling */
.exp-brand img[alt="SafeCircle Logo"] {
    width: 140px;
    margin-left: -10px; /* Move it further to the left */
}

/* Steganography logo styling */
.exp-brand img[alt="Steganography Logo"] {
    width: 160px;
    margin-left: -10px; /* Move it further to the left */
}

.exp-brand h3 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 700;
}

.exp-date {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

/* Project GitHub Link */
.project-github-link {
    font-size: 1.4rem;
    color: #333;
    margin-left: auto; /* Pushes the icon to the far right */
    transition: color 0.3s ease, transform 0.3s ease;
}

.project-github-link:hover {
    color: #e67e22; /* Matches the theme orange */
    transform: scale(1.1);
}

.logo {
    display: none;
}

nav ul {
    display: none;
}

.hero {
    display: none;
}

.container {
    display: none;
}

section {
    display: none;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: white;
    position: relative;
    padding-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease forwards;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: transparent;
    border-radius: 2px;
}

/* About Section */
#about {
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: white;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.about-text p:nth-child(1) {
    animation-delay: 0.2s;
}

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

.about-text p:nth-child(3) {
    animation-delay: 0.6s;
}

.about-image {
    width: 100%;
    max-width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    animation: scaleIn 0.8s ease;
}

/* Projects Section */
#projects {
}

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

.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.project-card:nth-child(1) {
    animation-delay: 0.2s;
}

.project-card:nth-child(2) {
    animation-delay: 0.4s;
}

.project-card:nth-child(3) {
    animation-delay: 0.6s;
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: transform 0.3s;
}

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

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.project-content p {
    color: #333;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    position: relative;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s;
}

.project-link:hover {
    color: #2980b9;
}

.project-link:hover::after {
    width: 100%;
}

/* Skills Section */
#skills {
}

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

.skill-category {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    opacity: 0;
    animation: slideInLeft 0.8s ease forwards;
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-category:nth-child(1) {
    animation-delay: 0.2s;
}

.skill-category:nth-child(2) {
    animation-delay: 0.4s;
}

.skill-category:nth-child(3) {
    animation-delay: 0.6s;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.1);
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

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

.skill-list li {
    padding: 0.5rem 0;
    color: white;
    transition: transform 0.3s, color 0.3s;
}

.skill-list li::before {
    content: '✓ ';
    color: #3498db;
    font-weight: bold;
    margin-right: 0.5rem;
}

.skill-list li:hover {
    transform: translateX(5px);
    color: #3498db;
}

/* Contact Section */
#contact {
}

#contact h2 {
    color: white;
}

#contact h2::after {
    background-color: rgba(255,255,255,0.5);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease forwards;
    color: white;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contact-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid white;
    border-radius: 5px;
    transition: all 0.3s;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.contact-links a:nth-child(1) {
    animation-delay: 0.3s;
}

.contact-links a:nth-child(2) {
    animation-delay: 0.4s;
}

.contact-links a:nth-child(3) {
    animation-delay: 0.5s;
}

.contact-links a:nth-child(4) {
    animation-delay: 0.6s;
}

.contact-links a:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.email-text {
    font-size: 1.2rem;
    word-break: break-all;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
}

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

/* --- Dark Mode Styles --- */
body.dark-mode {
    background-color: #121212;
    color: #f1f1f1;
}

body.dark-mode .side-box {
    background-color: #1e1e1e;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 5px 15px rgba(0, 0, 0, 0.5);
}

body.dark-mode .side-box a {
    color: #f1f1f1;
}

body.dark-mode .side-box a[aria-label="Toggle Dark Mode"]:hover {
    color: #f1c40f; /* Sun yellow when hovered in dark mode */
}

body.dark-mode .folder-trigger {
    background-color: #333;
}

body.dark-mode .folder-trigger:hover {
    background-color: #e67e22; /* Turns orange on hover in dark mode too */
}

body.dark-mode .folder-trigger:hover .mini-icon {
    color: #000; /* Mini icons turn black on hover in dark mode too */
}

body.dark-mode .folder-trigger .mini-icon {
    color: #ccc;
}

body.dark-mode .folder-content {
    background-color: #1e1e1e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

body.dark-mode .main-heading,
body.dark-mode .sub-heading,
body.dark-mode .location-heading {
    color: #ffffff;
    mix-blend-mode: normal; /* "Multiply" makes text invisible on dark backgrounds, so we switch back to normal */
}

body.dark-mode .header-line {
    border-top: 3px solid #444;
}

body.dark-mode .dropdown-subtitle,
body.dark-mode .course-category h4,
body.dark-mode .exp-brand h3,
body.dark-mode .ud-title,
body.dark-mode .dropdown-icon,
body.dark-mode .project-github-link {
    color: #ffffff;
}

body.dark-mode .course-category ul,
body.dark-mode .exp-date,
body.dark-mode .dropdown-content {
    color: #cccccc;
}

body.dark-mode .hexagon {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .ud-logo-header,
body.dark-mode .dir-logo {
    filter: brightness(0) invert(1);
}

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

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
/* Large Desktop (1025px+): Full side bar, all animations */
/* Half-Tab/Medium View (650px - 1024px): Bottom bar with all widgets inline, full animations */
/* Tablet (481px - 649px): Bottom bar with social only, reduced animations */
/* Small Mobile (320px - 480px): Bottom bar with social only, no animations */

/* Large Monitors and Standard Desktop (1440px+) */
@media (min-width: 1440px) {
    .main-header, .header-line, .dropdown-section {
        max-width: 1200px;
    }
    .main-heading { font-size: 6rem; }
    .sub-heading { font-size: 2.5rem; }
    .location-heading { font-size: 1.8rem; }
}

/* Full HD, 4K TVs, and Ultrawide Monitors (1920px+) */
@media (min-width: 1920px) {
    .main-header, .header-line, .dropdown-section {
        max-width: 1600px;
    }
    .main-heading { font-size: 7.5rem; }
    .sub-heading { font-size: 3rem; margin-top: -15px; }
    .location-heading { font-size: 2.2rem; margin-top: 10px; }
    .resume-btn { font-size: 1.3rem; padding: 12px 30px; }
    
    .side-box { width: 90px; gap: 30px; right: 6%; padding: 30px 0; }
    .side-box a { font-size: 42px; }
    .folder-trigger { width: 55px; height: 55px; padding: 10px; }
    .folder-trigger .mini-icon { font-size: 14px; }
    .folder-content { right: 90px; }
    
    .dropdown summary { font-size: 1.4rem; padding: 15px 20px; }
    .dropdown-subtitle { font-size: 1rem; }
    .course-category h4, .exp-brand h3 { font-size: 1.5rem; }
    .course-category ul, .exp-date { font-size: 1.2rem; }
    .ud-logo-header { width: 110px; }
    .exp-logo { width: 65px; }
    .exp-brand img[alt="SafeCircle Logo"] { width: 130px; }
    .exp-brand img[alt="Steganography Logo"] { width: 150px; }
    .dir-logo { width: 120px; }
}

/* Super Ultrawide Monitors, Projectors, and 8K Screens (2560px+) */
@media (min-width: 2560px) {
    .main-header, .header-line, .dropdown-section {
        max-width: 2200px;
    }
    .main-heading { font-size: 9rem; }
    .sub-heading { font-size: 4rem; margin-top: -20px; }
    .location-heading { font-size: 3rem; margin-top: 15px; }
    .resume-btn { font-size: 1.6rem; padding: 15px 40px; }
    
    .side-box { width: 110px; gap: 40px; right: 8%; padding: 40px 0; }
    .side-box a { font-size: 55px; }
    .folder-trigger { width: 70px; height: 70px; padding: 12px; }
    .folder-trigger .mini-icon { font-size: 18px; }
    .folder-content { right: 110px; padding: 25px; gap: 25px; }
    
    .dropdown summary { font-size: 1.8rem; padding: 20px 25px; }
    .dropdown-subtitle { font-size: 1.3rem; }
    .course-category h4, .exp-brand h3 { font-size: 2rem; }
    .course-category ul, .exp-date { font-size: 1.5rem; }
    .ud-logo-header { width: 140px; }
    .exp-logo { width: 80px; }
    .exp-brand img[alt="SafeCircle Logo"] { width: 180px; }
    .exp-brand img[alt="Steganography Logo"] { width: 200px; }
    .dir-logo { width: 150px; }
}

/* Mobile & Tablet Shared Adjustments (1024px and below) */
@media (max-width: 1024px) {
    /* Remove hover scaling for touch devices */
    .side-box a:hover {
        transform: none !important;
    }
    
    /* Permanently apply brand colors to social icons */
    .side-box a[aria-label="LinkedIn"] { color: #0A66C2 !important; }
    .side-box a[aria-label="Email"] { color: #EA4335 !important; }
    .side-box a[aria-label="Instagram"] { color: #E1306C !important; }

    /* GitHub gets its brand color in light mode, but white in dark mode for visibility */
    .side-box a[aria-label="GitHub"] { color: #171515 !important; }
    body.dark-mode .side-box a[aria-label="GitHub"] { color: #f1f1f1 !important; }

    /* Remove folder trigger hover effects to prevent sticky touch states */
    .folder-trigger:hover {
        transform: none !important;
        background-color: #f1f1f1 !important;
    }
    .folder-trigger:hover .mini-icon {
        color: #555 !important;
    }

    /* Dark mode folder trigger hover reset */
    body.dark-mode .folder-trigger:hover {
        background-color: #333 !important;
    }
    body.dark-mode .folder-trigger:hover .mini-icon {
        color: #ccc !important;
    }
}

/* Half-Tab/Medium screens (650px to 1024px) */
@media (max-width: 1024px) and (min-width: 650px) {
    .main-header {
        width: 85%;
    }

    .header-line {
        width: 85%;
    }

    .dropdown-section {
        width: 85%;
    }

    .side-box {
        top: auto;
        bottom: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: auto;
        padding: 18px 45px;
        gap: 40px;
        flex-direction: row;
    }

    .side-box a {
        font-size: 30px;
    }

    .folder-trigger {
        width: 42px;
        height: 42px;
        padding: 6px;
    }

    .folder-trigger .mini-icon {
        font-size: 10px;
    }

    .folder-content {
        top: auto;
        bottom: 95px;
        right: auto;
        left: 50%;
        transform: translateX(-50%) scale(0.9) translateY(10px);
    }

    .folder-content.show {
        transform: translateX(-50%) scale(1) translateY(0);
    }

    .dropdown summary {
        font-size: 1.7rem;
    }

    .dropdown-icon {
        font-size: 1.8rem;
    }

    .ud-title, .exp-brand h3 {
        font-size: 1.7rem;
    }

    .course-category h4 {
        font-size: 1.4rem;
    }

    .course-category ul, .exp-date {
        font-size: 1.3rem;
    }

    .dropdown-section {
        margin-bottom: 80px;
    }
}

/* Tablet (481px - 649px) */
@media (max-width: 649px) and (min-width: 481px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    section h2 {
        font-size: 2rem;
    }

    .main-header {
        padding-top: 100px; /* Reduce top padding on smaller screens */
        width: 90%; /* Use more of the screen width */
    }

    .main-heading {
        font-size: 2.2rem; /* Decrease font size for the main heading */
    }

    .sub-heading {
        font-size: 1.1rem; /* Decrease font size for the sub-heading */
    }

    .location-heading {
        font-size: 0.9rem; /* Decrease font size for the location */
    }

    .resume-btn {
        font-size: 0.9rem;
        padding: 8px 20px;
    }

    .side-box {
        display: flex; /* Keep the vertical side box visible on split screen */
        top: auto;
        bottom: 15px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: auto;
        padding: 15px 35px;
        gap: 30px;
        flex-direction: row;
    }

    .side-box a {
        font-size: 26px;
    }

    .folder-trigger {
        width: 38px;
        height: 38px;
        padding: 5px;
    }

    .folder-trigger .mini-icon {
        font-size: 9px;
    }

    .folder-content {
        top: auto;
        bottom: 85px;
        right: auto;
        left: 50%;
        transform: translateX(-50%) scale(0.9) translateY(10px);
    }

    .folder-content.show {
        transform: translateX(-50%) scale(1) translateY(0);
    }

    /* Reduce image sizes on mobile */
    .ud-logo-header {
        width: 60px;
    }

    .exp-logo {
        width: 38px;
    }

    .exp-brand img[alt="SafeCircle Logo"] {
        width: 95px;
    }

    .exp-brand img[alt="Steganography Logo"] {
        width: 115px;
    }

    .dir-logo {
        width: 65px;
    }

    .dropdown summary {
        font-size: 1.3rem;
    }

    .dropdown-icon {
        font-size: 1.4rem;
    }

    .ud-title, .exp-brand h3 {
        font-size: 1.4rem;
    }

    .course-category h4 {
        font-size: 1.15rem;
    }

    .course-category ul, .exp-date {
        font-size: 1.05rem;
    }

    .dropdown-section {
        margin-bottom: 80px;
    }
}

/* Extra small devices (320px - 480px) */
@media (max-width: 480px) {
    .main-header {
        padding-top: 80px;
        width: 95%;
    }

    .main-heading {
        font-size: 1.8rem;
    }

    .sub-heading {
        font-size: 0.95rem;
        margin-top: 0;
    }

    .location-heading {
        font-size: 0.85rem;
    }

    .resume-btn {
        font-size: 0.85rem;
        padding: 7px 18px;
        margin-top: 15px;
    }

    .header-line {
        width: 95%;
    }

    .dropdown-section {
        width: 95%;
    }

    .side-box {
        display: flex; /* Keep the vertical side box visible even on very small screens */
        top: auto;
        bottom: 15px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: auto;
        padding: 14px 25px;
        gap: 22px;
        flex-direction: row;
    }

    .side-box a {
        font-size: 24px;
    }

    .folder-trigger {
        width: 34px;
        height: 34px;
        padding: 5px;
    }

    .folder-trigger .mini-icon {
        font-size: 8px;
    }

    .folder-content {
        top: auto;
        bottom: 75px;
        right: auto;
        left: 50%;
        transform: translateX(-50%) scale(0.9) translateY(10px);
    }

    .folder-content.show {
        transform: translateX(-50%) scale(1) translateY(0);
    }

    /* Reduce image sizes on small mobile */
    .ud-logo-header {
        width: 50px;
    }

    .exp-logo {
        width: 32px;
    }

    .dir-logo {
        width: 55px;
    }

    .dropdown-section {
        margin-bottom: 70px;
    }
}
