/* Modern Color Palette & Font Setup */
:root {
    --bg-color: #f4f4f9; /* Light mode background */
    --text-color: #333;
    --card-bg: #ffffff;
    --primary-color: #007BFF;
    --border-color: #e0e0e0;
    --header-bg: rgba(255, 255, 255, 0.85); /* Slightly transparent header */
    --typed-color1: #01010d; /* light-mode */
  --typed-color2: #030629;
  --typed-color3: #080d4f;
  --typed-color4: #080d4f;
}

/* This is the dark mode theme */
body.dark-mode {
    --bg-color: #121212; /* Dark mode background */
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --primary-color: #00A6FF; /* A brighter blue for dark backgrounds */
    --border-color: #333;
    --header-bg: rgba(30, 30, 30, 0.85);
    --typed-color1: #00ffff; /* dark-mode colors */
  --typed-color2: #00ff99;
  --typed-color3: #00ccff;
  --typed-color4: #99ccff;
}
.typed-color1 { color: var(--typed-color1); }
.typed-color2 { color: var(--typed-color2); }
.typed-color3 { color: var(--typed-color3); }
.typed-color4 { color: var(--typed-color4); }
/* General Body Styles */
body {
    /* Font updated to Lato */
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: var(--bg-color); /* Use variable */
    color: var(--text-color); /* Use variable */
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Headings font updated to Montserrat */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif; /* Bold, modern headings */
}

.container {
    max-width: 960px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: var(--header-bg); /* Use variable */
    backdrop-filter: blur(10px); /* Frosted glass effect for the header */
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s, border-color 0.3s;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo a {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif; /* Ensure logo also uses heading font */
}

header nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1; /* CRITICAL: This places it behind all other content */
    background-color: var(--bg-color); /* Fallback background */
}

/* Hero Section */
#hero {
    background: var(--card-bg);
    padding: 4rem 0;
    text-align: left;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero-content .subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 20px;
    min-height: 28px; /* Give space for typed text to appear */
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #0056b3; /* Keeping a distinct hover color for light mode */
}

body.dark-mode .btn:hover {
    opacity: 0.8;
}

/* Sections */
section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
    border-bottom: none;
}

section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}


/* General Styling for the Section */
/* ======================================= */
/* EDUCATION SECTION (USING CSS VARIABLES) */
/* ======================================= */

#education {
  padding-top: 4rem;
  text-align: center;
}

/* Titles will now use your theme's text color */
#education .section__text__p1 {
  font-size: 1.25rem;
  color: var(--text-color);
  opacity: 0.7; /* Makes it slightly dimmer, like a subtitle */
}
#education .title {
  font-size: 3rem;
  color: var(--text-color);
}

.education-details-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  text-align: left;
}

/* The main card uses your card background and border */
.details-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 800px;
}

.education-entry {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color); /* Uses theme border */
}
.education-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.education-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Icon uses your theme's primary accent color */
.icon-container {
  font-size: 2.25rem;
  color: var(--primary-color);
}

/* All text inside the card uses your theme's text color */
.education-header h3,
.details-card h4 {
  font-size: 1.35rem;
  margin: 0;
  color: var(--text-color);
}
.details-card h4 {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0.5rem 0;
}
.degree-info {
  margin: 0.2rem 0 0 0;
  font-size: 1rem;
  color: var(--text-color);
  opacity: 0.8; /* Slightly dimmer for secondary info */
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Tags use your theme's main background and border for a nice contrast */
.course-tags span {
  background-color: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}


/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    text-align: center;
}

.skill-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.skill-card img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.skill-card h3 {
    margin: 0;
    font-size: 1rem;
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 600px;
    margin: auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 10px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--bg-color);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    left: 4px;
    top: 24px;
    z-index: 1;
}

.company {
    font-weight: bold;
    color: var(--text-color);
    opacity: 0.9;
}

.date {
    font-style: italic;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 10px;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-color);
}

.project-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

/* Contact & Footer */
/* ======================================= */
/* CONTACT SECTION                         */
/* ======================================= */

#contact .container h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Two columns, right one is larger */
    gap: 3rem;
    align-items: flex-start;
}

/* --- Left Column: Info & Socials --- */
.contact-info h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
}

.contact-details {
    margin: 2rem 0;
}

.contact-details a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* --- Right Column: Contact Form --- */
.contact-form form {
    /* This ensures the form itself uses all available space */
    width: 100%; 
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex; /* Aligns items (First/Last Name) in a row */
    gap: 1.5rem;   /* Creates space between them */
}

.form-group {
    flex: 1; /* CRITICAL: This tells First Name & Last Name to share space equally */
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    /* Ensures inputs don't overflow their containers */
    width: 100%; 
    box-sizing: border-box; /* Prevents padding/border from breaking the layout */
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15); /* Use a subtle glow from your primary color */
}

.contact-form .btn {
    align-self: flex-start; /* Aligns button to the left */
    cursor: pointer;
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr; /* Stack columns on top of each other */
        gap: 4rem;
    }
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column; /* Stack name fields on mobile */
    }
}

footer {
    text-align: center;
    padding: 2rem 0;
    background: var(--card-bg); /* Use a theme variable */
    color: var(--text-color);    /* Use a theme variable */
    border-top: 1px solid var(--border-color); /* Adds nice separation */
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--card-bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        opacity: 0;
        margin-left: 0;
        padding: 20px 0;
    }

    .hamburger {
        display: block;
    }
    
    .nav-active {
        transform: translateX(0%);
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }
    
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .toggle .line2 {
        opacity: 0;
    }
    
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* Styles for Hero Section with Image */
/* Styles for Hero Section with Image */
.hero-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-content {
    flex: 2;
    text-align: left;
}

/* NEW: Wrapper for the profile image to create the square background and depth */
.profile-image-wrapper {
    position: relative;
    width: 250px;
    height: 307px;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--card-bg);
    box-shadow: 
        5px 5px 10px rgba(0,0,0,0.1),
        -5px -5px 10px rgba(255,255,255,0.05);
    transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
    border: 1px solid var(--border-color);
    z-index: 1;
}

/* Pseudo-elements for the depth effect (inner shadow/highlight) */
.profile-image-wrapper::before,
.profile-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-sizing: border-box;
}

.profile-image-wrapper::before {
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.2), inset -2px -2px 4px rgba(255,255,255,0.1);
    z-index: 2;
}

.profile-image-wrapper::after {
    box-shadow: inset 0 0 0 2px var(--primary-color);
    opacity: 0.1;
    z-index: 3;
}

/* Adjust Hero Image Styles for the desired look */
.hero-image {
    flex: 1;
    display: flex; /* Use flexbox to center content */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    padding: 10px; /* Padding inside the card, adjust as needed */
    background-color: var(--card-bg); /* Use card background for the 'card' effect */
    border-radius: 8px; /* Smoother rounded corners */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* More prominent shadow */
    transition: background-color 0.3s, box-shadow 0.3s;
    min-width: 280px; /* Ensure card has a minimum width on larger screens */
}

.hero-image img {
    width: 100%; /* Image fills the card width */
    max-width: 250px; /* Limit max size for image within the card */
    height: 307px; /* Maintain aspect ratio */
    border-radius: 10px; /* Slightly less rounded than the card itself */
    object-fit: cover; /* Ensures image covers the area, cropping if necessary */
    display: block; /* Removes extra space below image */
    /* Removed border and previous box-shadow from img itself, as the card handles it */
}

/* Keep your existing media query for mobile stacking if it's there */
@media screen and (max-width: 768px) {
    .hero-container {
        flex-direction: column-reverse; /* Stacks text below image */
        text-align: center;
    }

    .hero-content {
        text-align: center;
    }

    .hero-image {
        margin-bottom: 2rem;
        min-width: unset; /* Remove min-width on small screens */
        width: 90%; /* Adjust width for mobile */
        padding: 15px; /* Adjust padding for mobile */
    }
}

/* === Theme Toggle Button === */
#theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.2rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

#theme-toggle:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--primary-color);
}



