/* Custom font import (optional, but good for modern look) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
/* --- Global Styles --- */
:root {
    --primary-dark: #1A1A2E; /* Deep almost-black */
    --secondary-dark: #16213E; /* Slightly lighter dark */
    --accent-bright: #E94560; /* Vibrant Red/Pink for accents */
    --text-light: #E0E0E0; /* Light grey for primary text */
    --text-medium: #B0B0B0; /* Medium grey for secondary text */
    --button-hover: #D83C57; /* Slightly darker accent on hover */
    --card-background: #0F3460; /* Dark blue for cards */
    --border-color: #0A1931; /* Even darker for subtle borders */
    --max-width: 1200px;
    --spacing-large: 60px;
    --spacing-medium: 30px;
    --spacing-small: 15px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif; /* A modern, clean sans-serif font */
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-medium);
}

.section {
    padding: var(--spacing-large) 0;
    text-align: center;
}

h1, h2, h3 {
    color: var(--accent-bright);
    margin-bottom: var(--spacing-small);
}

h2 {
    font-size: 2.5em;
    margin-bottom: var(--spacing-large);
    position: relative;
    display: inline-block; /* For the underline effect */
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--accent-bright);
    margin: 10px auto 0;
    border-radius: 2px;
}

p {
    margin-bottom: var(--spacing-small);
    color: var(--text-medium);
}

a {
    color: var(--accent-bright);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--button-hover);
}

.btn {
    display: inline-block;
    background-color: var(--accent-bright);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: var(--spacing-small);
}

.btn:hover {
    background-color: var(--button-hover);
    transform: translateY(-3px);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
}


/* --- Header & Navbar --- */
.hero-section {
    background:linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('./images/Screen 5461 copy2.jpg') no-repeat center center/75%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden; /* Ensure picture doesn't overflow */
}

/* Optional: Add a subtle animation to the background image if you want */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    filter: blur(2px); /* Subtle blur for background image */
    transform: scale(1.05); /* Slight zoom for subtle animation */
    z-index: -1;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(22, 33, 62, 0.9); /* Slightly transparent secondary dark */
    padding: var(--spacing-small) var(--spacing-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
}

.navbar.scrolled { /* Example for future JS-based sticky nav */
    background-color: var(--secondary-dark);
    padding: 10px var(--spacing-medium);
}

.logo a {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--accent-bright);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: var(--button-hover);
}

.navbar nav ul {
    list-style: none;
    display: flex;
}

.navbar nav ul li {
    margin-left: var(--spacing-medium);
}

.navbar nav ul li a {
    color: var(--text-light);
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 5px; /* Space for underline */
}

.navbar nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-bright);
    transition: width 0.3s ease;
}

.navbar nav ul li a:hover::after {
    width: 100%;
}

.hero-content {
    color: white;
    max-width: 800px;
    animation: fadeIn 1.5s ease-out; /* Simple fade-in animation */
    z-index: 1; /* Ensure content is above the blurred background */
}

.hero-content h1 {
    font-size: 4em;
    margin-bottom: 10px;
    color: white; /* Override h1 color for hero */
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.hero-content h2 {
    font-size: 2em;
    color: var(--accent-bright);
    margin-bottom: var(--spacing-small);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: var(--spacing-medium);
    color: var(--text-light);
}

/* --- About Section --- */
.about-section {
    background-color: var(--secondary-dark);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-large);
    align-items: center;
    text-align: left;
}

.about-image img {
    max-width: 70%;
    border-radius: 60px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.02);
}
/* ... (existing CSS up to .about-section) ... */

/* --- Skills Section --- */
.skills-section {
    background-color: var(--primary-dark); /* Or secondary-dark for contrast */
}

.skills-content {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns for categories */
    gap: var(--spacing-large);
    text-align: left;
}

.skills-category h3 {
    color: var(--text-light); /* Or accent-bright if you prefer */
    font-size: 1.8em;
    margin-bottom: var(--spacing-medium);
    text-align: center;
}

.skill-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-medium);
    gap: 15px; /* Space between elements */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* ADD THIS LINE */
    cursor: pointer; /* ADD THIS LINE */
    border-radius: 8px; /* ADD THIS LINE (optional, for the hover shadow to look good) */
    padding: 5px; /* ADD THIS LINE (optional, gives space for shadow) */
}
.skill-item:hover { /* THIS IS A NEW RULE */
    transform: translateY(-3px); /* Lifts the whole item slightly */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 20px var(--accent-bright); /* Adds a shadow and a glowing effect */
}
.skill-item:hover .skill-bar { /* THIS IS A NEW RULE */
    transform: scaleX(1.02); /* Slightly enlarges the bar horizontally */
}

.skill-name {
    flex: 0 0 120px; /* Fixed width for skill name, adjust as needed */
    color: var(--text-light);
    font-weight: bold;
    font-size: 1.1em;
}

.skill-bar-container {
    flex-grow: 1; /* Take remaining space */
    height: 10px; /* Height of the bar */
    background-color: var(--secondary-dark); /* Background of the empty bar */
    border-radius: 5px;
    overflow: hidden; /* Ensure gradient stays within bounds */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3); /* Subtle inner shadow */
}

.skill-bar {
    height: 100%;
    width: 0; /* Initial width for animation */
    background: linear-gradient(to right, #9B59B6, var(--accent-bright)); /* Purple to bright accent gradient */
    border-radius: 5px;
    transition: width 1s ease-out; /* Animation for the bar fill */
}



/* For a more reliable "animation on scroll into view" without JS */
/* This is a bit of a trick: when the page loads, the bars are 0% wide.
   When the skills section is hovered, they expand.
   A true "on scroll into view" animation needs JS.
   For pure CSS, hovering the *section* is the closest we can get to triggering it.
   Alternatively, you can just set fixed widths and remove the transition/hover effect
   if you don't want an animation at all.
*/
/* Let's remove the :hover effect and just set initial widths for simplicity/reliability
   if you don't want to rely on the user hovering the entire section to see bars fill. */
/* REMOVE THE ABOVE :hover BLOCKS AND USE THESE INSTEAD FOR IMMEDIATE DISPLAY: */
.skill-bar[data-skill="95%"] { width: 95%; }
.skill-bar[data-skill="90%"] { width: 90%; }
.skill-bar[data-skill="85%"] { width: 85%; }
.skill-bar[data-skill="80%"] { width: 80%; }
.skill-bar[data-skill="92%"] { width: 92%; }
.skill-bar[data-skill="88%"] { width: 88%; }
.skill-bar[data-skill="70%"] { width: 70%; }
.skill-bar[data-skill="75%"] { width: 75%; }
/* Add all your data-skill percentages here */


.skill-percentage {
    flex: 0 0 50px; /* Fixed width for percentage text */
    text-align: right;
    color: var(--accent-bright); /* Bright color for percentage */
    font-weight: bold;
    font-size: 1.1em;
}

/* ... (existing CSS for services, projects, etc.) ... */


/* --- Responsive Design (Media Queries) --- */
@media (max-width: 768px) {
    /* ... (existing navbar and hero media query styles) ... */

    .skills-content {
        grid-template-columns: 1fr; /* Stack categories on mobile */
        gap: var(--spacing-medium);
    }

    .skills-category h3 {
        margin-top: var(--spacing-medium); /* Add spacing between stacked categories */
    }

    .skill-item {
        flex-direction: column; /* Stack name, bar, percentage */
        align-items: flex-start; /* Align text left */
        gap: 5px;
    }

    .skill-name {
        flex: none; /* Remove fixed width */
        width: 100%; /* Full width for name */
        text-align: left;
        margin-bottom: 5px;
    }

    .skill-bar-container {
        width: 100%; /* Full width for bar */
        flex-grow: 0; /* Remove flex grow */
    }

    .skill-percentage {
        flex: none; /* Remove fixed width */
        width: 100%; /* Full width for percentage */
        text-align: left; /* Align percentage left */
        margin-top: 5px;
    }

    /* ... (rest of your existing media query styles) ... */
}

/* --- Services Section --- */
.services-section {
    background-color: var(--secondary-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-medium);
}

.service-card {
    background-color: var(--card-background);
    padding: var(--spacing-medium);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

/* --- Contact form validation styles --- */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    background-color: rgba(255,255,255,0.02);
    color: var(--text-light);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-bright);
    box-shadow: 0 0 0 3px rgba(233,69,96,0.08);
}

.contact-form input.valid,
.contact-form textarea.valid {
    border-color: #3ddc84; /* green */
    box-shadow: 0 0 0 3px rgba(61,220,132,0.06);
}

.contact-form input.invalid,
.contact-form textarea.invalid {
    border-color: var(--accent-bright);
    box-shadow: 0 0 0 3px rgba(233,69,96,0.06);
}

.contact-form .error-message {
    color: var(--accent-bright);
    font-size: 0.92rem;
    margin-top: 6px;
    margin-bottom: 6px;
}

.contact-form button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.service-card i {
    font-size: 3em;
    color: var(--accent-bright);
    margin-bottom: var(--spacing-small);
}

.service-card h3 {
    color: var(--text-light);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.95em;
    color: var(--text-medium);
}

/* --- Projects Section --- */
.projects-section {
    background-color: var(--primary-dark);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-medium);
}

.project-card {
    background-color: var(--card-background);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left; /* Align text within card */
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.project-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Ensures image covers area without distortion */
    display: block;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card h3 {
    padding: var(--spacing-small);
    color: var(--text-light);
}

.project-card p {
    padding: 0 var(--spacing-small) var(--spacing-small);
    font-size: 0.9em;
    color: var(--text-medium);
}

.project-links {
    padding: 0 var(--spacing-small) var(--spacing-small);
    display: flex;
    gap: 10px;
}

.project-links .btn-small {
    flex-grow: 1; /* Make buttons fill space */
    text-align: center;
}


/* --- Resume Section --- */
.resume-section {
    background-color: var(--secondary-dark);
}

.resume-preview {
    background-color: var(--card-background);
    padding: var(--spacing-medium);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-top: var(--spacing-medium);
    text-align: left;
}

.resume-preview h3 {
    color: var(--accent-bright);
    margin-bottom: 15px;
}

.resume-preview ul {
    list-style: none;
    padding-left: 20px;
    margin-bottom: 20px;
}

.resume-preview ul li {
    margin-bottom: 8px;
    color: var(--text-light);
    position: relative;
}

.resume-preview ul li::before {
    content: '\2022'; /* Bullet point */
    color: var(--accent-bright);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* --- Contact Section --- */
.contact-section {
    background-color: var(--primary-dark);
}

.contact-details {
    margin-bottom: var(--spacing-medium);
}

.contact-details p {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: var(--text-light);
}

.contact-details i {
    color: var(--accent-bright);
    margin-right: 10px;
}

.social-links {
    margin-top: var(--spacing-medium);
    margin-bottom: var(--spacing-medium);
    display: flex;
    justify-content: center;
    gap: var(--spacing-medium);
}

.social-links a {
    color: var(--text-light);
    transition: color 0.3s ease, transform 0.3s ease;
    font-size: 2em; /* Increase icon size */
}

.social-links a:hover {
    color: var(--accent-bright);
    transform: scale(1.2);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-small);
    background-color: var(--card-background);
    padding: var(--spacing-medium);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--secondary-dark);
    color: var(--text-light);
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-bright);
}

.contact-form button {
    align-self: flex-end; /* Align button to the right */
}

/* --- Footer --- */
.footer {
    background-color: var(--secondary-dark);
    padding: var(--spacing-medium) 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-medium);
    font-size: 0.9em;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- Responsive Design (Media Queries) --- */

/* For smaller screens, adjust column layouts */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .navbar nav ul {
        margin-top: 10px;
        flex-wrap: wrap; /* Allow nav items to wrap */
        justify-content: center;
    }

    .navbar nav ul li {
        margin: 5px 10px;
    }

    .hero-content h1 {
        font-size: 3em;
    }

    .hero-content h2 {
        font-size: 1.5em;
    }

    .about-grid {
        grid-template-columns: 1fr; /* Stack on smaller screens */
        text-align: center;
    }

    .about-image {
        order: -1; /* Move image above text on mobile */
        margin-bottom: var(--spacing-medium);
    }

    .about-image img {
        max-width: 70%; /* Adjust size for mobile */
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
    }

    .project-card h3 {
        text-align: center;
    }

    .project-links {
        justify-content: center;
    }

    .social-links {
        flex-wrap: wrap;
        gap: var(--spacing-small);
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-content h2 {
        font-size: 1.2em;
    }

    h2 {
        font-size: 2em;
    }

    .section {
        padding: var(--spacing-medium) 0;
    }

    .contact-form button {
        align-self: stretch; /* Make button full width on small screens */
    }
}

/* --- Burger Menu --- */
.burger-menu {
    display: none; /* shown via media query on small screens */
    font-size: 1.6em;
    color: var(--accent-bright);
    cursor: pointer;
    transition: transform 0.25s ease, color 0.25s ease;
    user-select: none;
    padding: 6px 10px;
    border-radius: 6px;
    background: transparent;
    align-items: center;
    justify-content: center;
    display: inline-flex;
    gap: 6px;
}

.burger-menu.active {
    transform: rotate(90deg);
    color: var(--button-hover);
}

/* Show burger only on smaller viewports (phone). Hide on laptop and wider */
@media (max-width: 768px) {
    .burger-menu {
        display: block;
    }

    /* Make sure burger sits above nav and hero image */
    .navbar .burger-menu {
        z-index: 1100;
    }

    /* Mobile nav: collapsed by default, expands with .show */
    .navbar nav ul {
        display: none;
        flex-direction: column;
        background-color: var(--secondary-dark);
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        text-align: center;
        padding: 0;
        border-top: 1px solid var(--border-color);
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.25s ease;
    }

    .navbar nav ul.show {
        display: flex;
        max-height: 1000px; /* large value to ensure full expansion */
        box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    }

    /* Force vertical stacking and remove spacing */
    .navbar nav ul,
    .navbar nav ul.show {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0;
        gap: 0;
    }

    .navbar nav ul li {
        width: 100%;
        margin: 0; /* remove spacing between items */
    }

    .navbar nav ul li a {
        display: block;
        width: 100%;
        color: var(--text-light);
        padding: 4px 16px; /* minimal tappable area */
        text-align: right; /* keep right-aligned text */
        box-sizing: border-box;
    }

    /* Keep navbar fixed at the top on phones so it stays visible while scrolling */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        padding-right: calc(var(--spacing-medium) + 40px);
        z-index: 1100;
    }

    /* Add page top padding so content isn't hidden behind the fixed navbar */
    body {
        padding-top: 64px; /* approximate navbar height; tweak if needed */
    }

    /* Pin burger to the extreme top-right inside navbar */
    .navbar .burger-menu {
        position: absolute;
        top: 8px;
        right: 12px;
        margin: 0;
    }
}

/* Ensure burger is omitted on laptop/desktop widths (greater than 768px) */
@media (min-width: 769px) {
    .burger-menu {
        display: none !important;
    }
}

/* --- Light/Dark Mode Toggle --- */

/* --- Light/Dark Mode Toggle (Navbar Placement) --- */
#theme-toggle {
  background-color: transparent;
  border: 2px solid var(--accent-bright);
  border-radius: 50px;
  width: 45px;
  height: 24px;
  position: relative;
  cursor: pointer;
  outline: none;
  margin: 0 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* small circle inside */
#theme-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--accent-bright);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

/* move the circle to the right in light mode */
body.light-mode #theme-toggle::before {
  transform: translateX(21px);
  background-color: var(--button-hover);
}

/* optional: change border and background for light mode */
body.light-mode #theme-toggle {
  border-color: var(--button-hover);
}
/* === Light Mode Theme Overrides === */
body.light-mode {
  --primary-dark: #f5f5f5;
  --secondary-dark: #ffffff;
  --accent-bright: #007bff; /* nice blue accent for light mode */
  --text-light: #1a1a1a;
  --text-medium: #555555;
  --card-background: #f0f0f0;
  --border-color: #dddddd;
  background-color: var(--primary-dark);
  color: var(--text-light);
}

body.light-mode .navbar {
  background-color: rgba(255, 255, 255, 0.9);
}

body.light-mode .btn {
  background-color: var(--accent-bright);
  color: white;
}

body.light-mode .btn:hover {
  background-color: #0056b3;
}
