/* Base styles for body and smooth scrolling */

:root {
    /* Calculate combined height of header (approx 72px) + mt-8 div (32px) = 104px */
    --header-total-offset: 150px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-total-offset); /* Uses the calculated offset */
}
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for theme changes */
    cursor: default; /* Reverted to default system cursor */
    overflow: auto; /* Restore scrollbar by default as splash is removed */
}

/* Custom clip-path for a unique image shape */
.unique-shape1 {
    object-fit: cover; /* Keeps image covering the area */
    width: 100%;
    height: 100%;
}


/* Custom clip-path for a unique image shape */
.unique-shape2 {
    clip-path: polygon(0% 15%, 15% 0%, 100% 0%, 100% 85%, 85% 100%, 0% 100%);
    object-fit: cover; /* Ensures image covers the clipped area */
    width: 100%;
    height: 100%;
}

/* Responsive styling for the unique shape */
@media (min-width: 768px) { /* md breakpoint */
    .unique-shape2 {
        clip-path: polygon(0% 15%, 15% 0%, 100% 0%, 100% 85%, 85% 100%, 0% 100%);
    }
}
@media (max-width: 767px) { /* Adjust for smaller screens */
    .unique-shape2 {
        clip-path: polygon(0% 15%, 15% 0%, 100% 0%, 100% 85%, 85% 100%, 0% 100%);
    }
}

/* Page Load Animation for main sections */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-load {
    animation: fadeInSlideUp 1.2s ease-out forwards;
    opacity: 0; /* Start invisible */
}
.animate-on-load.delay-1 { animation-delay: 0.2s; }
.animate-on-load.delay-2 { animation-delay: 0.4s; }
.animate-on-load.delay-3 { animation-delay: 0.6s; }
.animate-on-load.delay-4 { animation-delay: 0.8s; }
.animate-on-load.delay-5 { animation-delay: 1.0s; }
.animate-on-load.delay-6 { animation-delay: 1.2s; }
.animate-on-load.delay-7 { animation-delay: 1.4s; }

/* --- Light Mode Styles --- */
body.light-mode {
    background-color: #ffffff; /* Creamy background */
    color: #1f2937; /* Dark text */
}
body.light-mode header,
body.light-mode footer {
    background-color: #f5f4ed; /* Slightly darker creamy for header/footer */
    color: #000000;
}
body.light-mode header h1 {
    color: #1f2937; /* Dark text for light mode header name */
}
body.light-mode #profile-intro,
body.light-mode #about-details {
    background-color: #ebe9e0; /* Creamy section background */
}
body.light-mode .text-gray-400 {
    color: #4b5563; /* Darker gray for accents */
}
body.light-mode .text-gray-300 {
    color: #374151; /* Darker gray for text */
}
body.light-mode .bg-gray-100 { /* Image placeholder background in light mode */
    background-color: #cacfd6; 
}
body.light-mode .text-gray-100 { /* Fallback for general text */
    color: #1f2937;
}
body.light-mode section:not(#profile-intro):not(#about-details) { /* General section backgrounds */
    background-color: #ebe9e0; /* Creamy background */
}
body.light-mode h2,
body.light-mode h3 {
    color: #1f2937;
}
body.light-mode p {
    color: #374151;
}
body.light-mode .bg-gray-900 { /* Card backgrounds in light mode */
    background-color: #e0e0e0; /* White */
}
body.light-mode .text-gray-400 { /* Card text in light mode */
    color: #4d545f;
}
body.light-mode .bg-gray-700 { /* Skill tags in light mode */
    background-color: #ebe9e0; /* Creamy light gray */
}
body.light-mode .text-gray-300 { /* Skill tags text in light mode */
    color: #374151;
}
body.light-mode .text-gray-500 { /* Italic dates in light mode */
    color: #6b7280;
}
body.light-mode .border-white {
    border-color: #1f2937; /* Darker border for light mode */
}
body.light-mode a.hover\:bg-white:hover {
    background-color: #f3f4f6; /* light gray hover */
}
body.light-mode a.hover\:text-black:hover {
    color: #1f2937; /* dark text hover */
}

/* --- Dark Mode Backgrounds - Adjusted to be less grayish --- */
body:not(.light-mode) {
    background-color: #282828; /* Very dark gray, almost black */
}
body:not(.light-mode) #profile-intro,
body:not(.light-mode) #about-details {
    background-color: #0c0c0c; /* Pure black for these prominent sections */
}
body:not(.light-mode) section:not(#profile-intro):not(#about-details) { /* General section backgrounds */
    background-color: #0c0c0c; /* Darker gray for other sections */
}
body:not(.light-mode) .bg-gray-900 { /* Card backgrounds in dark mode */
    background-color: #1a1a1a; /* Slightly lighter black/dark gray for cards */
}
body:not(.light-mode) .bg-gray-700 { /* Skill tags in dark mode */
    background-color: #333333; /* Dark gray for skill tags */
}



/* --- Download Resume & Get in Touch Buttons (Profile Intro) --- */
.btn-main-action {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-align: center;
    /* Default dark mode styles */
    background-color: white;
    color: black;
}
.btn-main-action:hover {
    background-color: #bababa; /* Lighter white on hover */
    transform: scale(1.05);
}
body.light-mode .btn-main-action {
    background-color: #000000; /* Black in light mode */
    color: white;
}
body.light-mode .btn-main-action:hover {
    background-color: #000000;; /* Darker black on hover */
    color: rgb(255, 255, 255);
}


.btn-main-outline-action {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-align: center;
    background-color: transparent;
    /* Default dark mode styles */
    border: 1px solid white;
    color: white;
}
.btn-main-outline-action:hover {
    background-color: white;
    color: rgb(0, 0, 0);
    transform: scale(1.05);
}
body.light-mode .btn-main-outline-action {
    border: 1px solid #000000; /* Black border in light mode */
    color: black;
}
body.light-mode .btn-main-outline-action:hover {
    background-color: #000000;
    color: white;
}


/* --- Scroll Progress Bar --- */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: #fff; /* White for dark mode */
    width: 0%;
    z-index: 9999;
    transition: background-color 0.3s ease;
}
body.light-mode #scroll-progress-bar {
    background-color: #000000; /* Dark for light mode */
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff;
    color: #1f2937;
    padding: 12px 16px;
    border-radius: 9999px; /* Full rounded */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
body.light-mode #back-to-top {
    background-color: #000000;
    color: #f3f4f6;
}
#back-to-top:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Skill Tag Hover Effect */
.skill-tag-item:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgb(255, 255, 255);
}
body.light-mode .skill-tag-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


/* --- Mobile Navigation Overlay (Hamburger Menu) --- */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-height: 0; /* Initially hidden, takes no space */
    overflow: hidden; /* Hide content until opened */
    background-color: #000000; /* Dark gray, matching the image */
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0; /* Initially invisible */
    padding: 0; /* Reset padding to control it within header/items */
}

.mobile-nav-overlay.is-open {
    max-height: 100vh; /* Set a sufficiently large height when open to show all content */
    opacity: 1;
}

.mobile-nav-overlay .mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.5rem 1rem; /* Adjust padding as needed */
    background-color: #000000; /* Slightly lighter header background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
    color:#ebe9e0; /* Header text color */
}

.mobile-nav-overlay .mobile-nav-header h2 {
    font-size: 1.1rem; /* Adjust font size */
    font-weight: bold;
    color: #ebe9e0;; /* Ensure name is white */
}

.mobile-nav-overlay #mobile-nav-close-btn {
    background: none;
    border: none;
    color: #ebe9e0; /* 'X' icon color */
    font-size: 2.5rem; /* Larger 'X' */
    cursor: pointer;
    line-height: 1; /* Center the X vertically */
    padding: 0.25rem 0.5rem;
    transition: color 0.3s ease;
}

.mobile-nav-overlay #mobile-nav-close-btn:hover {
    color: #a0aec0; /* Lighter on hover */
}


.mobile-nav-overlay ul {
    list-style: none;
    padding: 0;
    width: 100%; /* Ensure UL takes full width */
    margin: 0; /* Remove default margin */
}

.mobile-nav-overlay ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator line for each item */
    transition: background-color 0.3s ease;
}

.mobile-nav-overlay ul li:last-child {
    border-bottom: none; /* No border for the last item */
}

.mobile-nav-overlay ul li a {
    font-size: 1.1rem; /* Adjusted font size for menu items */
    color: #ebe9e0;; /* Default white text */
    padding: 1rem 1rem; /* Padding for click area */
    display: block; /* Make the entire list item clickable */
    text-align: left; /* Align text to the left */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Specific styling for 'Contact' link in the menu if it needs to be different,
   based on the provided image where "Contact" and "Home" appear turquoise. */
.mobile-nav-overlay ul li a[href="#contact"] { /* Example for specific link styling */
    color: #ebe9e0;  
}
.mobile-nav-overlay ul li:first-child a { /* Assuming first item is 'Home' and needs color */
    color: #ebe9e0;
}


.mobile-nav-overlay ul li a:hover {
    background-color: #ebe9e0; /* Darker background on hover */
    color: #000000; /* Turquoise on hover */
}
/* Ensure the special colored links also follow hover */
.mobile-nav-overlay ul li a[href="#contact"]:hover,
.mobile-nav-overlay ul li:first-child a:hover {
    color: #000000; /* White on hover for colored links, or adjust to match desire */
    background-color: #ebe9e0;
}


body.light-mode .mobile-nav-overlay {
    background-color: #ebe9e0; /* Light mode creamy/light gray */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
body.light-mode .mobile-nav-overlay .mobile-nav-header {
    background-color:#ebe9e0; 
    border-bottom-color: rgba(0, 0, 0, 0.1);
    color: #000000;
}
body.light-mode .mobile-nav-overlay .mobile-nav-header h2 {
    color: #000000;
}
body.light-mode .mobile-nav-overlay #mobile-nav-close-btn {
    color: #000000;
}
body.light-mode .mobile-nav-overlay #mobile-nav-close-btn:hover {
    color: #000000;
}
body.light-mode .mobile-nav-overlay ul li {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}
body.light-mode .mobile-nav-overlay ul li a {
    color: #000000;
}
body.light-mode .mobile-nav-overlay ul li a:hover {
    background-color: #000000;
    color: #ffffff; /* Turquoise on hover in light mode */
}
/* Adjust specific colored links for light mode */
body.light-mode .mobile-nav-overlay ul li a[href="#contact"],
body.light-mode .mobile-nav-overlay ul li:first-child a {
    color: #000000; /* Turquoise for 'Home' and 'Contact' */
}
body.light-mode .mobile-nav-overlay ul li a[href="#contact"]:hover,
body.light-mode .mobile-nav-overlay ul li:first-child a:hover {
    color: #ffffff; /* Darker text on hover for colored links */
    background-color: #000000;
}


/* Hamburger Icon Animation */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: rgb(202, 202, 202);
    border-radius: 9999px;
    transition: all 0.3s ease-in-out;
}
body.light-mode .hamburger-icon span {
    background: #000000; /* Darker for light mode */
}

.hamburger-icon.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-icon.is-open span:nth-child(2) {
    opacity: 0;
}
.hamburger-icon.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- Sun Icon specific styling for visibility --- */
#sun-icon {
    color: #202020; /* A darker grey to ensure visibility against creamy background */
    stroke: #232323; /* Ensure stroke is also darker */
}
body:not(.light-mode) #sun-icon {
    color: #f7fafc; /* White in dark mode */
    stroke: #f7fafc;
}

/* --- View Project Links --- */
.view-project-link {
    background-color: transparent;
    border: 1px solid currentColor; /* Use current text color for border */
    color: white; /* Default white in dark mode */
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
body.light-mode .view-project-link {
    color: black; /* Black in light mode */
    border-color: black;
}
.view-project-link:hover {
    background-color: white; /* Fill with current text color */
    color: #000; /* Text becomes black on hover */
}
body.light-mode .view-project-link:hover {
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
}

/* --- Social Buttons in Contact Section --- */
.social-btn-action {
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    text-decoration: none;
    /* Default dark mode styles */
    background-color: white;
    color: black;
    border: 1px solid white;
}
.social-btn-action:hover {
    transform: scale(1.05);
    background-color: #dddcd9; /* Lighter white on hover */
    color: rgb(0, 0, 0);
    border-color: #000000;
}
body.light-mode .social-btn-action {
    background-color: #000000; /* Black in light mode */
    color: white;
    border-color: #000000;
}
body.light-mode .social-btn-action:hover {
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    border-color: white;
}

#profile-intro {
    min-height: calc(100vh - var(--header-total-offset)); /* Keep this */
    /* Remove the 'display: flex', 'flex-direction', 'justify-content' properties */
    /* These are already handled by Tailwind's md:grid and items-center classes in index.html */
}


/* Animation for floating image */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); } /* Moves up slightly */
    100% { transform: translateY(0px); }
}

.floating-image {
    animation: float 5s ease-in-out infinite; /* Applies the floating animation */
}
/* Responsive sizing for the profile image circle on larger screens */
@media (min-width: 768px) { /* Corresponds to Tailwind's 'md' breakpoint */
    .profile-image-circle {
        width: 100%; /* Take up full width of its grid column */
        max-width: 450px; /* Cap its maximum size */
        height: auto; /* Height will be managed by aspect-square */
        /* The aspect-square class in HTML will ensure height matches width */
    }
}