/*=============== VARIABLES ===============*/
:root {
  --background-color: #111111;
  --text-color: #FFFFFF;
  --accent-color: #00FF41;
  --secondary-text-color: #888888;
  --border-color: #333333;
  --sidebar-bg-color: #1c1c1c;
  
  --font-family: 'Inter', sans-serif;
  --transition-speed: 0.4s;
}

/*=============== BASE & RESET ===============*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}

a {
  color: var(--text-color);
  text-decoration: none;
  cursor: none;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.section {
  padding: 8rem 0;
  border-top: 1px solid var(--border-color);
}
.section:first-of-type {
    border-top: none;
}

.section__title {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--secondary-text-color);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

/*=============== CUSTOM CURSOR ===============*/
.cursor-dot,
.cursor-outline {
  pointer-events: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
}
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
}
.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--accent-color);
}
body:hover .cursor-dot, body:hover .cursor-outline {
    opacity: 1;
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 0;
  z-index: 100;
  transition: transform 0.4s ease-in-out;
}
.header.header--hidden {
    transform: translateY(-100%);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav__logo {
  font-size: 1.25rem;
  font-weight: 600;
  z-index: 101; /* Ensure logo is above sidebar */
}
.nav__list--desktop {
  display: flex;
  gap: 3rem;
}
.nav__link {
  font-weight: 500;
  transition: color var(--transition-speed);
}
.nav__link:hover {
  color: var(--accent-color);
}
.nav__toggle {
    display: none; /* Hidden by default */
}

/*=============== SIDEBAR MOBILE MENU ===============*/
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100%;
    background-color: var(--sidebar-bg-color);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    transition: left 0.4s ease-in-out;
}
.sidebar.show-sidebar {
    left: 0;
}
.sidebar__nav {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.sidebar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}
.sidebar__close {
    font-size: 1.5rem;
    cursor: none;
}
.sidebar__list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
.sidebar__list .nav__link {
    font-size: 1.2rem;
}

/*=============== HOME SECTION ===============*/
.home__container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    gap: 3rem;
    margin-top: 70px;
}
.home__title {
  font-size: clamp(2.0rem, 8vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 2rem;
}
.home__description {
  font-size: 1.25rem;
  max-width: 600px;
  margin-bottom: 3rem;
  color: var(--secondary-text-color);
}
.home__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.home__link {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 30px;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}
.home__link:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--background-color);
}
.home__image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* ADDED: For positioning the glow effects */
}
.home__profile-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    position: relative; /* ADDED: To ensure image is above the glow */
    z-index: 2;
}

/*=============== PROFILE IMAGE GLOW & MIST EFFECT (NEW) ===============*/
.home__image-wrapper::before,
.home__image-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    z-index: 1; /* Places the effects behind the image */
}

/* The "Mist" Layer */
.home__image-wrapper::before {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.15) 0%, rgba(0, 255, 65, 0) 70%);
    transform: translate(-50%, -50%);
    animation: pulse 4s infinite ease-in-out;
}

/* The "Light" Layer */
.home__image-wrapper::after {
    width: 100%;
    height: 100%;
    box-shadow: 0 0 30px 10px rgba(0, 255, 65, 0.3);
    transform: translate(-50%, -50%);
    opacity: 0; /* Start invisible, fade in with animation */
    animation: pulse 4s 1s infinite ease-in-out; /* Delayed animation */
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
}

/*=============== ABOUT SECTION ===============*/
.about__text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--secondary-text-color);
    max-width: 800px;
}

/*=============== SKILLS SECTION ===============*/
.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}
.skills__area h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}
.skills__area ul li {
    padding: 0.75rem 0;
    font-size: 1.1rem;
    color: var(--secondary-text-color);
}

/*=============== PROJECTS SECTION ===============*/
.projects__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.project__card {
    display: block;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: border-color var(--transition-speed), transform var(--transition-speed);
}
.project__card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}
.project__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.project__year {
    color: var(--secondary-text-color);
}
.project__title {
    font-size: 1.5rem;
    font-weight: 600;
}
.project__description {
    color: var(--secondary-text-color);
    line-height: 1.6;
}

/*=============== EDUCATION SECTION ===============*/
.education__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.education__card {
    background-color: #1a1a1a;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.education__card-title {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}
.education__item {
    margin-bottom: 1.5rem;
}
.education__item:last-child {
    margin-bottom: 0;
}
.education__item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.education__item p {
    color: var(--secondary-text-color);
    line-height: 1.6;
    margin-bottom: 0.25rem;
}
.education__item span {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 500;
}

/*=============== CONTACT SECTION ===============*/
.contact {
  text-align: center;
}
.contact .section__title {
    margin-bottom: 1rem;
}
.contact__text {
    font-size: 1.25rem;
    color: var(--secondary-text-color);
    max-width: 600px;
    margin: 0 auto 2rem;
}
.contact__email {
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 600;
    position: relative;
    display: inline-block;
}
.contact__email::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed);
}
.contact__email:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/*=============== FOOTER ===============*/
.footer {
    padding: 3rem 0;
}
.footer .container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
}
.footer__copy {
    color: var(--secondary-text-color);
}
.footer__socials {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
}
.footer__socials a {
    color: var(--secondary-text-color);
    transition: color var(--transition-speed);
}
.footer__socials a:hover {
    color: var(--text-color);
}

/*=============== ON-SCROLL ANIMATIONS ===============*/
.section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s, transform 0.8s;
}
.section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/*=============== RESPONSIVE DESIGN ===============*/
@media (max-width: 992px) {
    .home__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .home__image-wrapper {
        order: -1; /* Move image to the top on smaller screens */
        margin-bottom: 2rem;
    }
    .home__profile-img {
        width: 200px;
        height: 200px;
    }
    .nav__list--desktop {
        display: none;
    }
    .nav__toggle {
        display: block;
        font-size: 1.5rem;
    }
    .nav {
        justify-content: flex-end; /* Push toggle to the right */
        position: relative;
    }
    .nav__logo {
        position: absolute;
        left: 5%;
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (max-width: 768px) {
    .projects__grid, .education__grid {
        grid-template-columns: 1fr;
    }
    .footer .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    .footer__socials {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    .section {
        padding: 6rem 0;
    }
    .home__title {
        font-size: 2rem;
    }
    .home__description {
        font-size: 1rem;
    }
    .sidebar {
        width: 100%;
    }
}