body {
    min-height: 100vh;
    margin: 0;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #f2fefe;
    transition: background 0.1s ease-out;
    background-image: linear-gradient(45deg, #ffffff, #f2fefe); /* Initial gradient */
    animation: moveGradient 10s ease infinite; /* Animated background gradient */
}

main {
    padding-left: 30px;
    padding-right: 30px;
    scroll-behavior: smooth; /* Smooth scrolling */
}


header {
    background-color: rgba(242, 254, 254, 0.95);
    position: relative;
    z-index: 10;
    padding-left: 30px;
    padding-right: 30px;
    scroll-behavior: smooth;
}


h1, h2, h3, h4, h5, h6, p {
    font-family: 'fenwick', sans-serif;
    margin: 0;
}

h1 {    
    font-size: 64px;
    font-weight: 700;
}

h2 {
    font-size: 28px;
    font-weight: 400;
}

h3 {    
    font-size: 20px;
    font-weight: 300;
}

h4 {    
    font-size: 24px;
    font-weight: 700;
}

h5 {
    font-size: 16px;
    font-weight: 300;
    margin: 0;
    pointer-events: auto; /* Allow interaction on the text */
}

h6 {    
    font-size: 13px;
    font-weight: 300;
}

p { 
    font-size: 12px;
    font-weight: 300;
}

a {
    text-decoration: none; /* Removes underline from links */
}



/* Fullscreen Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #BBF9FF, #f2fefe, #d8f3f3);
    background-size: 300% 300%;
    animation: moveGradient 8s infinite ease-in-out;
    z-index: 9999;
    transition: opacity 1s ease-out, transform 0.8s ease-out;
}

/* Gradient Animation */
@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Logo */
.loading-logo {
    width: 120px;
    height: 120px;
    opacity: 0.9;
    animation: fadeIn 1.5s ease-in-out infinite alternate;
}

/* Logo Fade Animation */
@keyframes fadeIn {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Fade Out Effect */
.hide {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

/*nav Bar*/
.navlogo {
    height: 50px;
    display: inline-block;
    background-color: transparent;
}

/* Sticky Navbar */
.navbar {
    backdrop-filter: blur(8px);
    width: 100%;
    padding-top: 20px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 2px;
    background-color: #070A11;
    z-index: -1;
}

/* Animations */
.nav-link {
    font-size: 1.25rem;
    color:  #070A11;
    text-decoration: none;
    font-weight: 400;
}


/* About link underline effect */
#about-link {
    position: relative;
    text-decoration: none;
    display: inline-block;
}

#about-link::after {
    content: "";
    position: absolute;
    left: 10%; /* Starts slightly from the left */
    bottom: -3px; /* Adjusts the spacing below the text */
    width: 0;
    height: 2px;
    background-color:  #070A11;
    transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}

#about-link:hover::after {
    width: 100%; /* Expands fully */
    left: 0; /* Moves back to align with text */
}






/*background hover*/
#toggle-bg {
  position: fixed;
  top: 50%;
  right: -40px;
  transform: translateY(-50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-color: #070A11; /* nav button bg color */
  color: #fff;               /* nav button text color */
  border: 2px solid #1A1F2A; /* nav button border color */
  font-size: 0.75rem;

  font-family: 'fenwick', sans-serif;
  font-weight: 600;
  cursor: pointer;
  z-index: 1000;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.1;
  padding-left: 20px;
  padding-right: 10px;
  
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Normal light mode toggle button with haze */
body.light-mode #toggle-bg {
  background-color: rgba(164, 195, 200, 0.7); /* semi-transparent blue */
  backdrop-filter: blur(10px); /* haze effect */
  color: #000;
  border: 2px solid rgba(179, 229, 252, 0.6);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* When toggle overlaps footer in light mode, remove haze and use solid color */
body.light-mode #toggle-bg.over-footer {
  background-color: #A4C3C8;  /* solid soft blue */
  backdrop-filter: none;      /* remove haze */
  color: #070A11;             /* darker text for contrast */
  border: 2px solid rgba(179, 229, 252, 0.6);
}


body.light-mode #toggle-bg:hover {
  background-color: #D3FBFF;  /* lighter blue on hover */
  color: #070A11;             /* dark text on hover */
}


/* Dark mode border override */
body:not(.light-mode) #toggle-bg {
  border: 2px solid rgba(179, 229, 252, 0.6); /* soft blue, matches light mode border */
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #toggle-bg {
    width: 90px;
    height: 90px;
    font-size: 0.65rem;
    padding-left: 15px;
    padding-right: 8px;
    right: -25px;
  }
}

#toggle-bg:hover {
  right: -20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.toggle-button {
    background-color: #A4C3C8;
    color:  #070A11;
    border: none;
    padding: 10px 20px;
    font-family: 'fenwick', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transition: background 0.3s ease, color 0.3s ease;
}

.toggle-button:hover {
    background-color: #D3FBFF;
    color: #070A11;
}

a:hover, .toggle-button:hover {
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.light-mode {
    background: linear-gradient(45deg, #ffffff, #e6f7f7);
    color:  #070A11;
}

/* Default: main content visible */
#main-content {
  position: relative;
  transition: filter 0.3s ease;
}

body.dark-mode #main-content {
  position: relative;
  overflow: hidden;
  mask-image: radial-gradient(circle 150px at var(--mouse-x) var(--mouse-y), transparent 0%, rgba(0, 0, 0, 0.99) 100%);
  -webkit-mask-image: radial-gradient(circle 150px at var(--mouse-x) var(--mouse-y), transparent 0%, rgba(0, 0, 0, 0.99) 100%);
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  transition: mask-image 0.1s ease, -webkit-mask-image 0.1s ease;
}


/* The spotlight circle is created by a radial-gradient mask */
body.dark-mode.spotlight {
  mask-image: radial-gradient(circle 150px at var(--mouse-x) var(--mouse-y), rgba(0,0,0,1) 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle 150px at var(--mouse-x) var(--mouse-y), rgba(0,0,0,1) 0%, transparent 80%);
}







/*About*/
.about-container {
  display: flex;
  flex-direction: column; /* Mobile: stack image and text */
  align-items: left;     /* Center items on mobile */
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 10rem;
  text-align: left;      /* Optional: center text */
}


.info {
  flex: 1;
  padding: 0;
  font-size: 18px; /* or your preferred base size */
}

.faceem {
  border-radius: 5%;
  overflow: hidden;
  width: 80vw;            /* Responsive width */
  max-width: 300px;
  height: auto;
  aspect-ratio: 1 / 1;    /* Keep it square */
  margin: 0 auto;
}

.face {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5%;
}



/* Keep your other styles below, e.g. */

.highlight {
    font-weight: bold;
}

.dark-mode .face {
  -webkit-mask-image: radial-gradient(circle var(--mask-radius, 0px) at var(--mouse-x, 0px) var(--mouse-y, 0px), white 0%, transparent 100%);
  mask-image: radial-gradient(circle var(--mask-radius, 0px) at var(--mouse-x, 0px) var(--mouse-y, 0px), white 0%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: mask-position 0.1s ease, mask-radius 0.3s ease;
}

.light-mode .face {
  opacity: 1;
  mask-image: none;
  -webkit-mask-image: none;
}

#spotlight-image {
    position: relative; /* or as needed */
    background-repeat: no-repeat;
    background-position: left;
    transition: background 0.2s ease-out; /* smooth changes */
}







/*Contact*/
/* LinkedIn Styling with Glow Effect */
.linkedin {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 50px;
    padding-bottom: 10px;
    font-family: 'fenwick', sans-serif; /* Matching the footer font */
    font-size: 1.5rem; /* Adjusted size */
    font-weight: 700;
    color: rgb(0, 0, 0); /* Ensure text color matches the footer */
    text-decoration: none;
    /* Remove any padding or margin from the parent container that affects hover space */
    width: fit-content;
}

.linkedin a {
    display: flex;
    align-items: center;
    color: inherit; /* Inherit color from parent for consistency */
    text-decoration: none; /* Remove underline */
    /* Ensure hover effect only applies when hovering over the link */
    display: inline-flex; /* This will prevent hover from affecting the whole block */
}

.linkedin svg {
    padding-right: 30px;
    width: 40px;
    height: 40px;
    fill: rgb(0, 0, 0); /* Match glowing effect */
}

.linkedin-text h4, .linkedin-text p {
    margin: 0;
}

.linkedin-text h4 {
    font-size: 1.25rem;
    font-weight: bold;
}

.linkedin-text p {
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.8); /* Slightly dim text for subtlety */
}

.linkedin:hover, .linkedin a:hover {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8),
                 0 0 20px rgba(0, 0, 0, 0.6),
                 0 0 30px rgba(0, 0, 0, 0.4); /* Black Glowing effect */
    color:  #070A11; /* Ensure text color stays black on hover */
}

.linkedin svg:hover {
    fill:  #070A11; /* Ensure the SVG also has the black glow effect */
}

/* Email Styling with Glow Effect */
.em {
    display: flex;
    padding-top: 10px;
    padding-bottom: 40px;
    text-decoration: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    width: fit-content; /* Prevents the parent div from taking more space than needed */
}

.em a {
    display: flex;
    color:  #070A11; /* Default email icon color */
    text-decoration: none;
    transition: text-shadow 0.3s ease, color 0.3s ease;
}

.em svg {
    width: 40px;
    height: 40px;
    padding-right: 30px;
    fill:  #070A11; /* Color of the email icon */
}

.em-text h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: bold;
}

.em-text p {
    margin: 0;
    font-size: 1rem;
    color:  #070A11;
}

.em:hover svg {
    fill:  #070A11; /* Optional: Add a slight change to the icon color on hover */
}

.em:hover .em-text h4,
.em:hover .em-text p {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 
                 0 0 20px rgba(0, 0, 0, 0.6), 
                 0 0 30px rgba(0, 0, 0, 0.4); /* Glowing effect for text */
    color:  #070A11; /* Slight color change for emphasis */
}





/*footer*/
footer {
    background-color: #000000;
    color: white; /* Ensures all text inside the footer is white */
    margin: 0;
    padding-left: 30px;
    padding-right: 30px;
    padding-top: 4rem;
}

.footer {
    padding-bottom: 20rem; /* Adds 30rem space at the bottom of the .footer class */
    font-family: 'fenwick', sans-serif;
    font-size: 48px;
    font-weight: 700;
}

.linkdin {  
    padding-bottom: 20px;
    transition: text-shadow 0.3s ease, color 0.3s ease; /* Smooth transition for glow effect */
}

.lindkin :hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
    0 0 20px rgba(255, 255, 255, 0.6), 
    0 0 30px rgba(255, 255, 255, 0.4); /* Create a glowing effect */
    color: #f2fefe; /* Optional: Slightly change text color for more emphasis */
}

.email {    
    padding-bottom: 3rem;
    transition: text-shadow 0.3s ease, color 0.3s ease; /* Smooth transition for glow effect */
}

footer a {
    color: white; /* Ensures links are white */
    text-decoration: none; /* Remove default underline */
    transition: text-shadow 0.3s ease, color 0.3s ease; /* Smooth transition for glow effect */
}   

footer a:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
                 0 0 20px rgba(255, 255, 255, 0.6), 
                 0 0 30px rgba(255, 255, 255, 0.4); /* Create a glowing effect */
    color: #f2fefe; /* Optional: Slightly change text color for more emphasis */
}

/* Parent container to center the .ed element */
.center-container {
    display: flex; /* Enables Flexbox */
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    text-align: center; /* Centers text within the container */
}

/* Styling for the .ed element */
.ed {    
    font-family: 'fenwick', sans-serif;
    font-weight: 300;
    font-size: 12px;
    color: #ccdede71;
    max-width: 85rem;
    margin: 0 auto; /* Ensures proper alignment */
    padding-bottom: 2rem;
}









/* Desktop: from 1098px and up */
@media (min-width: 1098px) {
  .about {
    font-size: 24px;
  }

  .about-container {
    display: flex;
    flex-direction: row;      /* Side by side */
    align-items: left;
    justify-content: space-between;
    text-align: left;
    padding-top: 5rem
  }

  .info {
    flex: 1;
    padding-right: 2rem;
    order: 1;
  }

  .faceem {
    width: 300px;
    height: 300px;
    margin: 0;
    order: 2;
  }
}


@media screen and (min-width: 769px) and (max-width: 1097px) {
  .about-container {
    flex-direction: column !important; /* Override desktop row layout */
    text-align: left;
    align-items: left;
  }

  .faceem {
    margin: 0 auto;
    width: 60vw;
    max-width: 300px;
  }

  .info {
    padding: 0 1rem;
    text-align: left;
  }
}



@media (max-width: 768px) {
  #toggle-bg {
    width: 90px;
    height: 90px;
    font-size: 0.65rem;
    padding-left: 15px;
    padding-right: 8px;
    right: -25px;  /* current position */
  }
  
}



/* Media query for desktop view */
@media screen and (min-width: 769px) {
    main {
        padding-left: 150px;
        padding-right: 150px;
        scroll-behavior: smooth; /* Smooth scrolling */
    }

    h1 {    
        font-size: 128px;
        font-weight: 700;
    }
    
    h2 {
        font-size: 64px;
        font-weight: 400;
    }
    
    h3 {    
        font-size: 48px;
        font-weight: 300;
    }
    
    h4 {    
        font-size: 36px;
        font-weight: 700;
    }
    
    h5 {    
        font-size: 28px;
        font-weight: 300;
    }
    
    h6 {    
        font-size: 20px;
        font-weight: 400;
    }
    
    p { 
        font-size: 18px;
        font-weight: 300;
    }


    /*about*/
  .about-container {
    flex-direction: row;      /* Side by side on desktop */
    align-items: left;
    justify-content: space-between;
    text-align: left;         /* Reset from mobile */
  }

  .info {
    flex: 1;
    padding-right: 2rem;
  }


  .faceem {
    width: 300px;
    height: 300px;
    margin: 0;
  }



    .linkdin h4.footerh4, .email h4.footerh4 {     
        font-size: 24px;
        font-weight: 700;
        margin: 0;
        color: rgb(255, 255, 255);
    }

    .linkdin {  
        padding-bottom: 20px;
    }
    
    .linkdin p.footerp, .email p.footerp {   
        font-size: 12px;
        font-weight: 300;
        margin: 0;
        color: rgb(255, 255, 255);
    }

}