/* GLOBAL RESET AND BOX-SIZING */
* {
    margin: 0; /* Remove default outer space */
    padding: 0; /* Remove default inner space */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    scroll-behavior: smooth; /* Enable smooth scrolling when navigating to anchor links */
}

/* ROOT VARIABLES (DARK THEME DEFAULT) */
:root {
    --color: #667dff; /* Primary brand color (blue) */
    --text-primary: #ffffff; /* Main text color (white) */
    --text-secondary: #a0a0a0; /* Secondary text/muted color (light gray) */
    --bg-primary: #0a0a0a; /* Main background color (deep black/dark) */
    --bg-secondary: #1a1a1a; /* Secondary background color for cards/sections (dark gray) */
    --accent: #00aeac; /* Accent color (cyan/teal) */
    --border-color: rgba(255, 255, 255, 0.1); /* Subtle border color */
    --shadow: rgba(0, 0, 0, 0.3); /* Dark shadow for depth */

    /* New variables for Resume Section styling */
    --color-background: var(--bg-primary); /* For cards on secondary background */
    --color-border-dark: rgba(255, 255, 255, 0.15); 
    --color-text-light: var(--text-secondary);
    --color-text-faded: #777; 
    --color-heading: var(--text-primary);
}

/* LIGHT THEME OVERRIDE (APPLIED VIA [data-theme="light"] attribute on body) */
[data-theme="light"] {
    --text-primary: #1E3A5F; /* Deep Indigo Blue */
    --text-secondary: #6B88A4; /* Muted Blue-Gray */
    --bg-primary: #F5F7FA; /* <--- NEW: Cool Gray Background */
    --bg-secondary: #E5E9F2; /* <--- NEW: Darker Cool Gray for cards/sections */
    --accent: #4A90E2; /* Bright Sky Blue Accent */
    --border-color: rgba(0, 0, 0, 0.1); 
    /* ... other styles can remain ... *
    
    /* Light theme overrides for Resume Section styling */
    --color-background: #fff; 
    --color-border-dark: rgba(0, 0, 0, 0.1);
    --color-text-light: var(--text-secondary);
    --color-text-faded: #999;
    --color-heading: var(--text-primary);
}

/* BASE BODY STYLES */
body {
    font-family: "Inter", sans-serif; /* Modern, readable font */
    background-color: var(--bg-primary); /* Use primary background color variable */
    color: var(--text-primary); /* Use primary text color variable */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    line-height: 1.6; /* Good readability line height */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for theme change */
}

/* Utility Classes */
.container {
    max-width: 1200px; /* Max width for content */
    margin: 0 auto; /* Center the container horizontally */
    padding: 0 2rem; /* Horizontal padding for smaller screens */
}
.section-padding {
    padding: 8rem 0; /* Standard vertical padding for sections */
}
.bg-secondary {
    background-color: var(--bg-secondary); /* Use secondary background color */
}
.section-title {
    font-family: 'Playfair Display', serif; /* Decorative font for titles */
    font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive font size */
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%); /* Center the line marker */
    width: 80px;
    height: 4px;
    background: var(--accent); /* Accent color line marker */
    border-radius: 2px;
}
.section-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent);
    text-align: center;
    opacity: 0; 
    /* filter: blur(5px);  */
    transform: translateY(50px);
}
.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%); /* Center the line marker */
    width: 80px;
    height: 4px;
    background: var(--text-primary); /* Accent color line marker */
    border-radius: 2px;
}
.small-button {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    margin-top: 1rem;
}
.reveal {
    opacity: 0; /* Starting state for JavaScript animations */
    transform: translateY(20px);
}

/*Loading Screen*/
.loader{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Highest layer to cover everything */
    flex-direction: column;
}
.loader-text{
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    opacity: 0; /* Ready for animation */
}
.loader-bar{
    width: 300px;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}
.loader-progress{
    width: 0%; /* Starting state for progress bar animation */
    height: 100%;
    background: linear-gradient(90deg,var(--color),var(--accent));
}

/*Custom cursor*/
.cursor{
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none; /* Allows clicks to pass through */
    z-index: 9999;
    mix-blend-mode: difference; /* Invert colors over content */
    transition: transform 0.1s ease; /* Quick follow for main cursor */
}
.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;
    transition: transform 0.2s ease; /* Slower follow for trailing effect */
}

/*Navigation*/
nav {
    position: fixed;
    top: 0;
    width: 100vw;
    padding: 1.5rem 2rem;
    /* --- MOBILE PERFORMANCE FIX: Increased opacity to 0.9 and kept backdrop filter for desktop only --- */
    background-color: rgba(10, 10, 10, 0.9); /* Semi-transparent dark background */
    backdrop-filter: blur(20px); /* Blur effect for "frosted glass" look (Desktop/Powerful devices) */
    /* --------------------------------------------------------------------------------------------------- */
    z-index: 1000;
    transition: background-color 0.3s ease;
}
[data-theme="light"] nav {
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent white background in light mode (Increased opacity) */
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.logo{
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Playfair Display',serif;
}
.nav-links{
    display: flex;
    list-style: none;
    gap: 2rem;
    transition: transform 0.3s ease;
}
.nav-links a{
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}
.nav-links a:hover{
    color: var(--accent);
}
.nav-links a::after{
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.nav-links a:hover::after{
    width: 100%; /* Underline animation on hover */
}

/*Theme Toggle*/
.theme-toggle{
    position: relative;
    width: 60px;
    height: 30px;
    background-color: var(--bg-secondary);
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 2px solid var(--border-color);
    margin-left: 1rem;
    display: flex;
    align-items: center;
}
.theme-toggle::before{
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background-color: var(--accent);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 225, 229 ,0.7); /* Glow effect */
}
[data-theme="light"] .theme-toggle::before{
    transform: translateX(28px); /* Move toggle to the right */
    background: var(--color); /* Use primary color for light mode toggle */
    box-shadow: 0 0 10px rgba(25, 117, 255, 0.7);
}
.theme-toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    transition: opacity 0.3s ease;
}
.theme-toggle-icon.sun{
    right: 6px;
    opacity: 0; /* Hidden in dark mode */
}
.theme-toggle-icon.moon{
    left: 5px;
    opacity: 1; /* Visible in dark mode */
}
[data-theme="light"] .theme-toggle-icon.sun{
    opacity: 1; /* Visible in light mode */
}
[data-theme="light"] .theme-toggle-icon.moon{
    opacity: 0; /* Hidden in light mode */
}

/*Mobile Menu (Hamburger)*/
.menu-toggle{
    display:none; /* Hidden on desktop */
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
}
.menu-toggle span{
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transform-origin: center;
    transition: all 0.3s ease;
}
/* Hamburger to 'X' animation */
.menu-toggle.active span:nth-child(1){
    transform: rotate(45deg) translate(6px,6px);
}
.menu-toggle.active span:nth-child(2){
    opacity: 0; /* Middle bar disappears */
}
.menu-toggle.active span:nth-child(3){
    transform: rotate(-45deg) translate(6px,-6px);
}
.mobile-menu{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transform: translateY(-100%); /* Hidden off-screen initially */
    transition: transform 0.3s ease 
}
.mobile-menu.active{
    transform: translateY(0%); 
}
.mobile-menu a{
    color: var(--text-primary);
    text-decoration: none;
    font-size: 2rem;
    font-weight: 600;
    margin: 1rem 0;
    font-family: 'Playfair Display',serif;
    transform: translateY(20px);
    transition: all 0.3s ease;
    opacity: 0;
}
/* Staggered animation for menu links */
.mobile-menu.active a{
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu a:nth-child(1){
    transition-delay: 0.1s;
}
.mobile-menu a:nth-child(2){
    transition-delay: 0.2s;
}
.mobile-menu a:nth-child(3){
    transition-delay: 0.3s;
}
.mobile-menu a:nth-child(4){
    transition-delay: 0.4s;
}
.mobile-menu a:nth-child(5){
    transition-delay: 0.5s;
}

/*Hero section*/
.hero{
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.hero-bg{
    position: absolute;
    top: 0;
    left: 0; 
    width: 100%;
    height: 100%;
    /* Subtle radial gradient background effect */
    background: radial-gradient(circle at 50% 50%, rgba(0,102,255,0.1) 0%, transparent 70%); 
}
.hero-img{
    height: 90%;
    margin-left: 5%;
    margin-right: 5%;
    object-fit: cover;
}
.hero-content{
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}
.hero-title,
.hero-subtitle,
.highlights-card,
.hero-description,
.cta-button {
    /* Initial state for hero element animations (JS will remove the filter/transform/opacity) */
    filter: blur(10px);
    transform: translateY(5rem);
    opacity: 0;
}
.hero-title{
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}
.hero-subtitle{
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
/* The Outer Card */
.highlights-card {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    max-width: 850px;
    padding-top: 2%;
    padding-left: 2.5%;
    padding-right: 0.5%;
    padding-bottom: 1.5%;
    margin: 18px;
}

/* Heading Style */
.hero-Highlights {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--accent); /* White text as per second image */
    margin-bottom: 0.8rem;
    text-align: left; /* Fixes the centering issue */
}

/* List Formatting */
.highlights-list {
    list-style: none; /* Remove default bullets */
    padding: 0;
    margin: 0;
}

.highlights-list li {
    font-size: 1.01rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 2.5rem; /* Space for the custom bullet */
    text-align: left;    /* Fixes the centering issue */
}

/* The Custom Bullet Point */
.highlights-list li::before {
    content: "•";
    color: var(--text-primary);
    font-size: 0.8rem;
    position: absolute;
    left: 3%;
    top: 0;
}
.cta-button{
    display: inline-block;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, var(--color), var(--accent)); /* Gradient background for main button */
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.1s ease, box-shadow 0.1s ease; 
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.cta-button:hover{
    transform: translateY(-3px); /* Subtle lift */
    box-shadow: 0 0 20px var(--accent), 0 0 10px var(--color); /* Glowing shadow effect */
}
.hero-3d-model{
    position: absolute;
    width: 130%;
    height: 130%;
    z-index: -1; /* Behind the content */
}

/* SOCIAL LINKS STYLES */
.social-links {
    margin-top: 2rem; 
    display: flex;
    justify-content: center;
    gap: 3rem; 
    z-index: 2;
    opacity: 0;
    transform: translateY(5rem); /* Initial state for animation */
}

.social-links a {
    display: flex; 
    flex-direction: column; /* Stack icon and text vertically */
    align-items: center; 
    text-decoration: none; 
    color: var(--text-primary);
    font-weight: 500; 
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--accent); 
    transform: translateY(-5px); /* Lift on hover */
}

.social-links svg {
    width: 30px; 
    height: 30px;
    margin-bottom: 0.5rem; 
}

.social-links a {
    font-size: 1rem;
}
/* END SOCIAL LINKS STYLES */

/*---------------------------
About Section
-----------------------------*/
#about {
    /* Background with two radial gradients for a soft, glowing effect (NEW) */
    background-image: radial-gradient(circle at 10% 90%, rgba(255, 102, 178, 0.08) 0%, transparent 50%),
                      radial-gradient(circle at 90% 10%, rgba(102, 255, 178, 0.08) 0%, transparent 60%);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.about-content {
    /* UPDATED: Changed gap and added flex-wrap for responsiveness */
    display: flex;
    flex-wrap: wrap; 
    gap: 40px; 
    align-items: flex-start;
}
.about-text {
    /* UPDATED: Using flex basis for better distribution */
    flex: 1 1 55%; /* Takes up about 55% of the space */
    min-width: 300px;
}
.about-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}
.about-text p {
    margin-bottom: 1.5rem;
    max-width: 600px;
}

/* UPDATED CSS for the 4-Card Grid */
.about-stats {
    flex: 1 1 35%; /* Takes up about 35% of the space next to the text */
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns in the grid */
    gap: 20px;
    padding: 0; /* Removed old padding/background from container */
    list-style: none;
    margin: 0;
}

/* Style for each individual stat card */
.stat-item {
    /* Updated styling for the card look */
    text-align: left; 
    background-color: var(--bg-secondary); /* Use secondary background for the card */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 174, 171, 0.355);
}

.stat-icon {
    color: var(--accent); /* The icon color */
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    stroke: var(--accent);
}

.stat-number {
    display: block;
    font-size: 1.5rem; /* Smaller size for the main card number */
    font-weight: 700;
    color: var(--text-primary); /* Use primary text color */
    line-height: 1.2;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 5px 0;
}

.stat-subtext {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin: 0;
}
/* END UPDATED ABOUT SECTION CSS */


/*---------------------------
Skills Section
----------------------------*/
#skills {
    /* ... existing styles ... */
    background-image: radial-gradient(circle at 50% 50%, rgba(102, 125, 255, 0.05) 0%, transparent 70%);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    padding-bottom: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    text-align: left;
}

.skill-category {
    background-color: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 20px rgba(0, 174, 171, 0.355);
}

.skill-category h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--accent);
    text-align: center;
}

/* Ensure the category boxes still look good */
.skill-category {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.skill-list-simple li:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05);
}
.skill-list-simple {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center; /* Center the skill tags */
}

.skill-list-simple li {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px; /* Pill shape */
    border: 1px solid var(--border-color);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}
/*------------------
SOFT SKILLS 
--------------------*/
#soft-skills {
    background-image: radial-gradient(circle at 50% 50%, rgba(102, 125, 255, 0.05) 0%, transparent 70%);
    text-align: center;
    padding-top: 0;
}
.soft-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}
#soft-skills .section-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: var(--accent);
    text-align: center;
    opacity: 0; 
    /* filter: blur(5px);  */
    transform: translateY(50px);
}
.soft-skill-card {
    background-color: var(--bg-primary);
    padding: 1.5rem 1.5rem;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.soft-skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 20px rgba(0, 174, 171, 0.355);
}
.soft-skill-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.3s ease, transform 0.3s ease;
}
.soft-skill-card:hover .soft-skill-name {
    color: var(--accent);
    transform: scale(1.05);
}
/* END SOFT SKILLS */

/* -------------------------
Projects Section 
----------------------------*/
#projects {
    /* Adding subtle background gradient for visual interest (Optional, based on overall theme) */
    background-image: radial-gradient(circle at 10% 10%, rgba(102, 125, 255, 0.05) 0%, transparent 70%);
}

.filter-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 600;
}

.filter-btn.active, .filter-btn:hover {
  
  color: white;
  transform: translateY(-5px); /* Gentle lift on hover */
  box-shadow: 0 0 5px var(--accent), 0 0 5px var(--color); /* Glowing shadow effect */
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--color), var(--accent)); /* Gradient background for main button */
}
/* Logic for Hiding/Showing */
.project-card-wrapper.hide {
  display: none;
}

.project-card-wrapper.show {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.projects-grid {
    display: grid;
    /* Default: 2 columns for a balanced look on desktop */
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem; /* Keep existing gap for the older project cards below */
    align-items: start;
}


/* New custom grid for the 4-card layout (The new cards) */
.projects-grid.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 1.5rem; 
    margin-bottom: 3rem;
    align-items: start; /* This is key: it aligns cards to the top rather than stretching them all */
}
/* Project Card Styling (Modern, highly visual look) */
.project-card {
    background-color: var(--bg-secondary);
    border-radius: 12px; /* Consistent rounded corners */
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow); /* Subtle shadow as in image */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    z-index: 1;
    flex-direction: column;
    text-align: left;
    border: 1px solid var(--border-color); /* Subtle border matching the image */
}

.project-card:hover {
    transform: translateY(-5px); /* Gentle lift on hover */
    box-shadow: 0 0 20px rgba(0, 174, 171, 0.355); /* Slightly more prominent shadow on hover */
    border-color: var(--accent); /* Highlight border on hover, as seen in image */
}

/* --- NEW STYLES FOR IMAGE OVERLAY CONTAINER --- */
.project-media {
    position: relative; /* Container for absolute icons */
    overflow: hidden;
}

.project-icons-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 15px; /* Space between the two icons */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
    z-index: 10; /* Ensures icons are above the image */
}

.project-card:hover .project-icons-overlay {
    opacity: 1; /* Show icons on card hover */
}

.overlay-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    /* Translucent white background from image */
    background-color: rgba(255, 255, 255, 0.682);
    color: #333; /* Dark icon color */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.2s;
    cursor: pointer; /* **Cursor Pointer Added** */
}

.overlay-icon:hover {
    /* Subtle accent highlight on hover */
    background-color: #667dffb4;
    color: #fff;
    transform: scale(1.1);
}
/* --- END NEW STYLES --- */

/* Project Image/Media Area */
.project-card img {
    width: 100%;
    height: 160px; /* Consistent height for images */
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1; /* Fully opaque by default, no overlay for this design */
}

.project-card:hover img {
    transform: scale(1.10); /* Slight zoom for a dynamic effect */
    opacity: 0.8; /* Slight dimming of image to highlight icons */
}

/* Project Info Content Area */
.project-info {
    padding: 1.5rem; /* Consistent padding */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem; /* Space between title/icon and description */
}

.project-info h3 {
    font-family: 'Playfair Display', serif; /* Keep the elegant font */
    font-size: 1.5rem; /* Matches the image's title size more closely */
    margin: 0;
    color: var(--text-primary); /* Primary text color for title */
}
/* The Overlap State */
.project-card.is-expanded {
    position: relative; /* Changed from absolute */
    z-index: 10; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    /* Remove width: 100% if it was there; let the grid handle width */
}
/* 2. Fix the description height */
.project-description {
    line-clamp: 1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease; /* Smooth expansion */
}

.project-card.is-expanded .project-description {
    line-clamp: unset;
    display: block; /* Shows full text */
    -webkit-line-clamp: unset;
    overflow: visible;
}
.projects-grid.image-grid {
    align-items: start; /* Prevents other cards in the row from stretching */
}

/* 3. Style for the button */
.read-more-btn {
    background: none;
    border: none;
    color: var(--accent, #00aeab);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 5px 0;
    margin-bottom: 10px;
    text-align: left;
}
.read-more-btn:hover {
    text-decoration: underline;
    opacity: 0.8;
    margin-left: 5px;
    color: var(--color-text-faded);
}

/* Technology Tags Styling */
.project-tags {
    margin-top: 10px; /* Space above tags */
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between tags, adjusted for image */
}

.tag {
    display: inline-block;
    padding: 5px 12px; /* Adjusted padding for pill shape */
    border-radius: 25px; /* More rounded pill shape */
    font-size: 0.7rem; /* Smaller font size for tags as in image */
    font-weight: 500; /* Slightly lighter weight for tags */
    color: var(--bg-primary); /* Dark text on tag background */
    background-color: var(--text-secondary); /* Default muted background */
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Lighter shadow for tags */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border for tags */
}

/* Custom Tag Colors - Optimized to match the image's vibrant, clear tags */
.tag.streamlit {
    background-color: #f0da4f9f; /* Brighter yellow */
    color: #000000;
    border-color: #ffdd00;
}
.tag.sql {
    background-color: #2965f17b; /* Stronger blue */
    color: #fff;
    border-color: #004cff;
}
.tag.python {
    background-color: #e44c26a1; /* Brighter orange */
    color: #fff;
    border-color: #ff3300;
}
.tag.pandas{
    background-color: #26e47fa1; /* Brighter orange */
    color: #fff;
    border-color: #00ff9d;
}
.tag.matplotlib{
    background-color: #e426dea1; /* Brighter orange */
    color: #fff;
    border-color: #ff00f2;
}
.tag.Numpy {
    background-color: #ff00907b; /* Gray, slightly darker than text-secondary */
    color: #ffffff;
    border-color: #a7a7a7;
}
.tag.css {
    background-color: #a7a7a7; /* Gray, slightly darker than text-secondary */
    color: #333;
    border-color: #a7a7a7;
}
.tag.html {
    background-color: #3572a5; /* Python blue */
    color: #ffda4e; /* Python yellow for text */
    border-color: #3572a5;
}
.tag.Bi{
    background-color: #a44eff67; /* Python blue */
    color: #ffffff; /* Python yellow for text */
    border-color: #a44eff;

}
.tag.Machine_learning{
    background-color: #ff834e79; /* Python blue */
    color: #ffffff; /* Python yellow for text */
    border-color: #ff834e;

}
.tag.skit-learn{
    background-color: var(--accent); /* Uses your defined accent */
    color: var(--bg-primary);
    border-color: var(--accent);
}
.tag.data-analysis {
    background-color: var(--color); /* Uses your defined primary color */
    color: var(--text-primary);
    border-color: var(--color);
}
/* -------------------------
Resume Section 
----------------------------*/
/* --- RESUME AND CODING PROFILES SECTION STYLES (NEW) --- */

/* Base container for the resume section content */
#resume {
    text-align: center;
    /* Background with two radial gradients (NEW) */
    background-image: radial-gradient(circle at 85% 30%, rgba(0, 174, 172, 0.1) 0%, transparent 60%),
                      radial-gradient(circle at 15% 70%, rgba(102, 125, 255, 0.1) 0%, transparent 60%);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.section-title.reveal {
    /* Need to override the title margin for the 'Resume' section specifically */
    margin-bottom: 2rem;
}

/* Resume Download Card */
.resume-download-card {
    max-width: 650px;
    margin: 40px auto 50px;
    padding: 30px;
    background-color: var(--color-background); /* Use a slightly different background for the card */
    border: 1px solid var(--color-border-dark); 
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--shadow);
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}
.resume-download-card:hover {
    box-shadow: 0 0 20px rgba(0, 174, 172, 0.2);
    transform: translateY(-5px);
}

.resume-download-card h3 {
    margin-top: 10px;
    margin-bottom: 5px;
    color: var(--accent); /* Blue accent color */
    font-size: 1.5rem;
}

.resume-download-card p {
    color: var(--color-text-light); /* Lighter gray text */
    max-width: 450px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

.file-icon {
    color: var(--accent);
    margin-bottom: 10px;
}

.download-button {
    /* Inherits from cta-button but ensure the icon display */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    margin-bottom: 15px;
    text-decoration: none;
    border: none; /* Make sure it doesn't inherit default button border */
    font-size: 1rem;
}

.file-meta {
    font-size: 0.85rem;
    color: var(--color-text-faded);
}

/* Resume Highlights Grid */
.resume-highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 40px auto 80px;
}

.highlight-card {
    padding: 20px;
    border: 1px solid var(--color-border-dark);
    border-radius: 10px;
    background-color: var(--color-background);
    transition: transform 0.3s, border-color 0.3s;
}

.highlight-card:hover {
    box-shadow: 0 0 20px rgba(0, 174, 172, 0.2);
    transform: translateY(-5px);
}

.highlight-card h4 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--accent);
}

.highlight-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Coding Profiles Section */
.section-subtitle-codes {
    margin-bottom: 30px;
    color: var(--color-text-light);
    font-size: 1.1rem;
}
.coding-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 10px;
}

.profile-card {
    padding: 25px;
    border: 1px solid var(--color-border-dark);
    border-radius: 12px;
    background-color: var(--color-background);
    text-align: left;
    transition: box-shadow 0.3s, transform 0.3s;
}

.profile-card:hover {
    box-shadow: 0 0 20px rgba(0, 174, 172, 0.2); /* Soft glow with accent color */
    transform: translateY(-5px);
}

.card-icon {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.card-icon span {
    font-size: 1.8rem;
    margin-right: 10px;
}

.profile-card h4 {
    font-size: 1.3rem;
    margin: 0;
    color: var(--color-heading);
    font-family: 'Playfair Display', serif;
}

.profile-handle {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.profile-description {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 15px;
    min-height: 40px; 
}

.visit-profile-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: margin-left 0.2s;
}

.visit-profile-link:hover {
    margin-left: 5px;
    color: var(--color-text-faded);
}
/*---------------------------
Certificates Section (4-Column Layout)
----------------------------*/
#certificates {
    
    /* Adding subtle background gradient for visual interest (Optional, based on overall theme) */
    background-image: radial-gradient(circle at 80% 70%, rgba(102, 125, 255, 0.11) 0%, transparent 70%);
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 10px;
}

/* Force 4 columns on screens wider than 1200px */
@media (min-width: 1200px) {
    .certificates-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.certificate-card {
    padding: 10px;
    border: 1px solid var(--color-border-dark);
    border-radius: 12px;
    background-color: var(--color-background);
    text-align: center;
    transition: box-shadow 0.3s, transform 0.3s;
}

.certificate-card:hover {
    box-shadow: 0 0 20px rgba(0, 174, 172, 0.2); /* Soft glow with accent color */
    transform: translateY(-5px);
}

.cert-icon {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.cert-info h4 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--color-heading);
    font-family: 'Playfair Display', serif;
}


.cert-issuer {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.cert-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.view-cert-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: margin-left 0.2s;
}

.view-cert-link:hover {
    margin-left: 5px;
    color: var(--color-text-faded);
}
/* --- END RESUME AND CODING PROFILES SECTION STYLES (NEW) --- */

/* -------------------------
Contact Section 
----------------------------*/
/* Contact Section NEW STYLES */
#contact {
    /* Background with two radial gradients for a soft, glowing effect */
    background-image: radial-gradient(circle at 70% 20%, rgba(102, 125, 255, 0.1) 0%, transparent 60%),
                      radial-gradient(circle at 20% 80%, rgba(0, 174, 172, 0.1) 0%, transparent 60%);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.contact-intro-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1.3fr; /* Two columns: form takes more space (approx 60/40 split) */
    gap: 2rem;
    align-items: flex-start;
    position: relative; 
    z-index: 1;
    margin-bottom: 2rem;
}

.contact-form-container,
.contact-info-block,
.lets-work-together-block {
    /* Card styles for contact content */
    /* --- MOBILE PERFORMANCE FIX: Increased opacity to 0.9 for desktop/powerful devices --- */
    background-color: rgba(26, 26, 26, 0.9); /* Semi-transparent dark background */
    backdrop-filter: blur(10px); /* Frosted glass effect (Desktop/Powerful devices) */
    /* -------------------------------------------------------------------------------------- */
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow);
    height: fit-content; /* Ensure the card doesn't stretch */
    position: relative;
    z-index: 1;
}

[data-theme="light"] .contact-form-container,
[data-theme="light"] .contact-info-block,
[data-theme="light"] .lets-work-together-block {
background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent white in light mode (Increased opacity) */
}


.contact-form-container h3,
.contact-info-block h3,
.lets-work-together-block h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem; 
}

.contact-form .form-row {
    display: flex;
    gap: 1rem;
}

.contact-form .form-row input {
    flex: 1; /* Inputs in the row take equal space */
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 0.7rem; 
    border: 1px solid var(--border-color);
    border-radius: 10px; 
    background-color: rgba(0, 0, 0, 0.2); /* Darker, slightly transparent input fields */
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
[data-theme="light"] .contact-form input,
[data-theme="light"] .contact-form textarea {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--text-primary); 
}


.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background-color: rgba(0, 0, 0, 0.4); 
}
[data-theme="light"] .contact-form input:focus,
[data-theme="light"] .contact-form textarea:focus {
    background-color: rgba(255, 255, 255, 0.8);
}


.contact-form textarea {
    resize: vertical; /* Changed from 'none' to 'vertical' for better user experience */
}
.contact-form button.cta-button {
    border: none;
    cursor: pointer;
    align-self: center; /* Center the button in the form */
    width: auto;
    max-width: none;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    margin-top: 1rem;
}


.contact-info-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; 
}

.contact-info-card .info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left; 
}

.info-icon {
    width: 45px;
    height: 45px;
    min-width: 45px; /* Prevent shrinking */
    min-height: 45px; 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.info-icon svg {
    width: 20px;
    height: 20px;
}

.contact-info-card .info-label {
    font-weight: 500;
    font-size: 0.9rem; 
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.contact-info-card .info-value {
    color: var(--text-primary);
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-all;
}

.contact-info-card .info-value:hover {
    color: var(--accent);
}
/* -------------------------
Footer Section 
---------------------------*/
footer {
    padding: 2rem 0;
    background-color: var(--bg-primary);
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Media Queries (Responsiveness) */
@media(max-width: 1080px){
    .hero-img{
        height: 100%;
    }
}

@media(max-width: 992px) {
    /* About section stacks vertically */
    .about-content {
        flex-direction: column;
        gap: 3rem;
    }
    /* Stats grid remains as two columns on tablet, but takes full width */
    .about-stats {
        width: 100%;
        /* The grid-template-columns: repeat(2, 1fr); rule handles the 2-column layout */
    }
    /* Contact grid stacks on tablets/large phones */
    .contact-grid {
        grid-template-columns: 1fr; /* Single column layout */
    }
    /* Contact form row inputs stack vertically */
    .contact-form .form-row {
        flex-direction: column;
        gap: 1.2rem;
    }
}

@media(max-width: 768px){
    /* Hide desktop navigation and show mobile menu toggle */
    .nav-links{
        display: none;
    }
    .menu-toggle{
        display: flex;
    }
    /* Remove custom cursors for touch devices */
    .cursor, .cursor-follower{
        display: none;
    }
    /* Hero section adapts for mobile (content above image) */
    .hero{
        display: flex;
        flex-direction: column-reverse;
        justify-content: space-evenly;
        height: auto;
        min-height: 100vh;
    }
     .hero-img {
        order: 1; /* Move image up */
        height: 350px;
        width: 80%;
        margin-left: auto;
        margin-right: auto;
        object-fit: contain;
    }
    .hero-content {
        padding-top: 2rem;
    }
    /* The hero-3d-model is handled by the JS fix below, but we ensure it doesn't take space */
    .hero-3d-model {
        display: none;
    }
    .social-links {
        margin-top: 1.5rem;
    }
    .section-padding {
        padding: 5rem 0;
    }
    /* About stats wrap on small screens */
    .about-stats {
        padding: 0; /* Keep padding at 0 as it's a grid now */
        grid-template-columns: 1fr; /* Stack vertically for small phones */
    }
    /* Contact card padding and heading size adjusted for mobile */
    .contact-form-container,
    .contact-info-block,
    .lets-work-together-block {
        padding: 1.5rem; 
        /* === MOBILE PERFORMANCE FIX: Remove backdrop-filter === */
        backdrop-filter: none;
        background-color: rgba(26, 26, 26, 0.95); /* Adjusted opacity for dark mode */
    }
    [data-theme="light"] .contact-form-container,
    [data-theme="light"] .contact-info-block,
    [data-theme="light"] .lets-work-together-block {
        backdrop-filter: none;
        background-color: rgba(255, 255, 255, 0.95); /* Adjusted opacity for light mode */
    }
    /* ======================================================= */


    .contact-form-container h3,
    .contact-info-block h3,
    .lets-work-together-block h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    .info-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    /* Resume Section Responsiveness */
    .resume-highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .coding-profiles-grid {
        gap: 20px;
    }

    .coding-stats-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .stat-box {
        width: 100%;
        max-width: 250px;
    }
    
    /* === MOBILE CONTRAST FIX: Set better background for inputs in light mode === */
    [data-theme="light"] .contact-form input,
    [data-theme="light"] .contact-form textarea {
        background-color: var(--bg-secondary); /* Use light gray background for contrast */
        color: var(--text-primary); 
    }
    /* =========================================================================== */
    
    /* Project Section Mobile Fixes */
    .projects-grid {
        grid-template-columns: 1fr; /* Stack all projects vertically on mobile */
        gap: 2rem;
    }
    .projects-grid.image-grid {
        grid-template-columns: 1fr; /* Stacks vertically on smaller screens */
        gap: 1.5rem;
    }
    .project-card img {
        height: 180px; /* Slightly shorter image height on small screens */
    }
}

@media (max-width: 600px) {
    .coding-profiles-grid {
        /* On small phones, stack the coding profiles */
        grid-template-columns: 1fr;
    }
    /* Soft Skills Grid */
    .soft-skills-circles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .circle-progress-container {
        width: 90px;
        height: 90px;
    }
} 

/*project section filter
/* Mobile Specific: Even more compact */
@media (max-width: 480px) {
  .filter-controls {
    gap: 6px;
  }
  
  .filter-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-width: 1px;
  }
}
/* Stack project cards on mobile */
@media (max-width: 992px) {
  .projects-grid.image-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
  }
}

@media (max-width: 600px) {
  .projects-grid.image-grid, 
  .projects-grid {
    grid-template-columns: 1fr; /* 1 column for phones */
    gap: 1.5rem;
  }
}
/* Mobile: Horizontal Pill Scroll */
@media (max-width: 600px) {
  .filter-controls {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 5px 10px 15px 10px; /* Bottom padding accounts for invisible scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
  }

  .filter-controls::-webkit-scrollbar {
    display: none; /* Chrome/Safari: Hide scrollbar for clean look */
  }

  .filter-btn {
    flex: 0 0 auto; /* Prevents tabs from squishing */
    font-size: 0.75rem;
    padding: 3px 10px;
  }
}
    