/* Universal Presets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}


/* Global CSS Variables */
:root {
  /* Backgrounds */
  --body-bg: #070A1A;          /* deep space navy */
  --surface: #0D1026;          /* card / panels */
  --surface-2: #141A3A;        /* elevated sections */

  /* Text */
  --body-text: #E6E9FF;        /* soft white-blue */
  --muted-text: #A7AED6;       /* secondary text */

  /* Accent colors */
  --primary: #6C63FF;          /* cosmic purple */
  --primary-glow: #8B7CFF;

  --secondary: #00D4FF;        /* neon blue */
  --secondary-glow: #66E6FF;

  --accent-pink: #FF4FD8;      /* galaxy pink */
  --accent-gold: #FFCC66;      /* star glow */

  --headings: #E6E9FF;
  --header-text: #ffffff;
  --white: #ffffff;
  --primary-shadow: #0d4645;

  /* UI elements */
  --border: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.6);

  /* Typography */
  --font-main: 'Segoe UI', system-ui, sans-serif;

}

#closeIcon {
  display: none;
}


/* BASE STYLES */
body{
  text-align: center;
  background: radial-gradient(circle at top, #141A3A 0%, #070A1A 60%);
  color: var(--body-text);
  font-family: var(--font-main);
  margin: 0;
  padding: 20px;
}

main{
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  background-color: var(--body-bg);
}

section{
  display: flex;
  flex-direction: column;
  max-width: 470px;
  align-items: center; 
  padding: 20px;
  margin-bottom: 3.5rem;
}


h1{
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
}

h2{
  font-size: 2.5rem;
}

h3{
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

li{
  list-style: none;
}

a{
  text-decoration: none;
  color: inherit;
}

/* DRY */

main,
footer{
  margin-inline: 1rem; /* It gives left and right margin.*/
}

h1,
h2{
  margin-bottom: 1rem;
  color: var(--headings);
}

h1,
h2,
h3{
  font-weight: 400;
}

.main-img-bg,
.section-square{
  rotate: 10deg;
}

.my-container p:last-of-type,
.about-container p:last-of-type{
  margin-bottom: 1.5rem;
}

/* UTILITY CLASSES */

.btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(108, 99, 255, 0.3);
  transition: 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.4);
}

.disabled {
  pointer-events: none;  /* blocks clicking */
  opacity: 0.5;          /* visual disabled effect */
  cursor: not-allowed;
}

.section-square{
  width: 10px;
  height: 10px;
  margin-bottom: 3rem;
  background-color: #0d4645;
}

.body-text{
  font-family:serif;
  line-height: 1.5;
  color: var(--body-text);
}

/* CUSTOM STYLES */


/* HEADER */
header{
  position: relative; /* positioned relative to its normal position in the document flow. */
  color: var(--header-text);
  background-color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  z-index: 10;
}

#scrollTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--header-text);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px var(--primary-shadow);
  display: none; /* hidden by default */
  z-index: 1000;
  transition: 
    transform 0.3s ease,
    background-color 0.3s ease,
    opacity 0.3s ease;
}

#scrollTopBtn:hover {
  background-color: var(--secondary);
  transform: translateY(-4px);
}

.menu-btn{
  display: block;
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  cursor: pointer;
  fill: var(--header-text);
  transition: fill 0.3s ease;
}

.menu-btn:hover{
  fill: var(--secondary-shadow);
}

.btn.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

/* MOBILE NAV */

.mobile-nav {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  font-size: 2rem;
  padding: 6rem 1.5rem 2rem;
  width: 100%;
  background: linear-gradient(180deg, rgba(108, 99, 255, 0.96), rgba(7, 10, 26, 0.98));
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease;
  justify-content: flex-start;
  align-items: center;
  gap: 1.5rem;
}

.mobile-nav.open {
  transform: translateX(0%);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.mobile-nav li{
  margin-bottom: 1.5rem;
}

.mobile-nav a,
.desktop-nav a {
  transition: color 0.3s ease ;
}

.desktop-nav {
  display: none;
}

.mobile-nav a:hover,
.desktop-nav a:hover {
  color: var(--secondary);
}

.hidden {
  display: none;
}

/* USER SECTION */
.my-img-container{
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.my-img-container img {
  position: absolute;
  width: 200px;
  height: 200px;
  background-color:var(--body-bg);
}

.main-img-bg{
  position: relative;
  height: 100vh;
  overflow: hidden;
  width: 200px;
  height: 200px;
  background-color: var(--secondary);
}

.project-img-container img{
  width: 100%;
  height: auto;
}

.my-container p{
  font-size: 1.2rem;
  color: var(--secondary);
}

.my-container p:last-of-type{
  font-size: .9rem;
}

/* ABOUT SECTION */

.about-container p{
  font-size: 1.2rem;
}

/* PROJECTS SECTION */

.project-container{
  margin-bottom: 1.5rem;
}

.project-container:last-of-type{
  margin-bottom: 0;
}

.project-img-container{
  width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
}

.project-techs{
  margin-bottom: 0.5rem;
}

.project-techs span{
  color:var(--header-text);
  background-color:var(--primary);
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem ;
  border-radius: 10px;
  box-shadow: 0 1px var(--primary-shadow);
}

.project-text-container p{
  margin-bottom: 1rem;
  line-height: 1.5;
  font-size: 1rem;
}

.project-links a{
  font-size: 1.2rem; 
}

/* CONTACT SECTION */

.contact-container p{
  font-size: 0.9rem;
  color:var(--primary);
  margin-bottom: 0.5rem;
}

.socials-container{
  display: flex;
  gap: 1rem;
  /* margin-bottom: 6rem; */
}

.socials-container svg{
  width: 20px;
  height: 20px;
  fill: var(--secondary);
  transition: transform 0.3s ease, fill 0.3s ease;
}

.socials-container svg:hover{
  transform: scale(1.2);
  fill: white;
}

/* FOOTER */

footer{
  font-size: 1rem;
  color: var(--primary);
}

/* MEDIA QUERIES */

@media (min-width:1024px) {
  .mobile-nav {
    display: none;
  }

  .menu-btn {
    display: none;
  }

  .desktop-nav {
    display: block;
  }

  main,
  header{
    width: 982px;
    padding-inline: 3rem;
    margin-inline: auto;
  }

  section{
    width: 100%;
    max-width: 100%;
  }
  .desktop-nav ul{
    display: flex;
    gap: 3rem ;
  }
  .my-container{
    flex-direction: row-reverse;
    justify-content: space-between;
    text-align: left;
  }
  .project-container{
    display: flex;
    gap: 2rem;
    align-items: center;
    text-align: left;
  }
  .project-container:nth-of-type(even){
    flex-direction: row-reverse;
  }
  .project-img-container,
  .project-text-container{
    flex-basis: 50%; /*   It makes img and text equally spaced i.e 50% */
  }
  .socials-container{
    gap: 2rem;
  }
  .socials-container svg{
    width: 35px;
    height: 35px;
  }
} 