html {
  scroll-behavior: smooth;
}

/* Targeted section highlight */
:target + section {
  animation: highlight 1s ease-out;
}

@keyframes highlight {
  0%   { background-color: rgba(155, 89, 182, 0.3); } /* light purple glow */
  100% { background-color: transparent; }
}


body {
  background-color: #e7dbef;
  margin: 0;
  padding-top: 60px; /* for fixed header */
}

/* HEADER */
header {
  background-color:#49225b;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding: 10px;
  z-index: 1000;
}

.name { font-size: 1.2rem; }

.nav-con {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0 15px;
  display: flex;
  align-items: center;
}

.nav a:hover {
  background-color: #ECEEDF; 
  transition: background-color 0.3s ease;
  color:#333
}

/* PROFILE / HERO SECTION */
.profile-con {
   background: linear-gradient(to left, #f5ebfa, #6e3482);
  display: flex;
  gap: 2rem;
  padding: 2rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 100vh; /* take up full screen height */
}

.profile img {
  width: 300px;
  max-width: 100%;
  border-radius: 5px;
}

.profile-info {
  flex: 1 1 300px;
  font-size: 1.3rem;
  display:flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  color: #e7dbef;
}

.profile-info h2 {
  font-size: 2rem;
  margin: 0;
}

.button {
  border: 2px solid black;
  padding: 10px 20px;
  border-radius: 30px;
}

.button:hover, .button:hover a{
    background-color: #333;
    color: #ECEEDF;

}

.button a {
  text-decoration: none;
  color: #0a0f1e;
  font-weight: bold;
}/* MAIN CONTAINER */
main.container {
  display: flex;
  flex-direction: column; /* stack vertically */
  flex-grow: 1;
}

/* SECTIONS */
section {
  padding: 2rem;
  background: #fff;
  color: #333;
  margin: 1rem;               /* even space around */
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  flex-grow: 1;               /* allow section to grow */
  display: flex;
  flex-direction: column;
  justify-content: center;    /* centers content vertically if taller */
}

section h3 {
  margin-bottom: 1rem;
  border-left: 5px solid #6e3482;
  padding-left: 0.5rem;
  font-size: 1.5rem;
}

section p, 
section ul {
  line-height: 1.6;
  font-size: 1rem;
}


/* Contact links */
.social-links {
  color: #6e3482;
  font-weight: bold;
  text-decoration: none;
}
.social-links:hover {
  text-decoration: underline;
}


/* FOOTER */
footer {
  background: #49225b;
  color: white;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
.name {
  display: none;
  /*
  text-align: center;
  display: block;
  width: 100%;
  margin: 0;*/
}
.nav {
  padding: 0;
}
  
.nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.nav a:hover {
  background-color: #ECEEDF; 
  transition: background-color 0.3s ease;
  color:#333
}


  .profile-con {
    flex-direction: column;
    
  z-index: 1;
    text-align: center;
  }

  .profile-info {
    align-items: center;
  }
}

@media (max-width: 480px) {
  .name { font-size: 1rem; }
  .profile img { width: 180px; }
  .profile-info { font-size: 1rem; }
}

/* leaf animations */

#leaves {
  margin-top: 0;
  position: absolute;
  top: 0;
  left: 70%;
  text-align: right;
}

#leaves i {
  display: inline-block;
  width: 200px;
  height: 150px;
  background: linear-gradient(to bottom right, #6e3482, #a56abd);
  transform: skew(20deg);
  border-radius: 5% 40% 70%;
  box-shadow: inset 0px 0px 1px rgba(0,0,0,0.3);
  border: 1px solid rgba(0,0,0,0.2);
  -webkit-animation: falling 5s 0s infinite;
}

#leaves i:nth-of-type(2n) { -webkit-animation: falling2 5s 0s infinite; }
#leaves i:nth-of-type(3n) { -webkit-animation: falling3 5s 0s infinite; }

#leaves i:before {
  position: absolute;
  content: '';
  top: 117px;
  right: 9px;
  height: 27px;
  width: 32px;
  transform: rotate(49deg);
  border-radius: 0% 15% 15% 0%;
  border: 1px solid rgba(0,0,0,0.2);
  background: linear-gradient(to right, #a56abd, #6e3482);
  z-index: 1;
}

#leaves i:after {
  content: '';
  height: 125px;
  width: 10px;
  background: linear-gradient(to right, rgba(0,0,0,.15), rgba(0,0,0,0));
  display: block;
  transform: rotate(125deg);
  position: absolute;
  left: 85px;
  border-radius:50%;
}

/* Sizes and variations */
#leaves i:nth-of-type(n)    { height:23px; width:30px; }
#leaves i:nth-of-type(n):before { width:7px; height:5px; top:17px; right:1px; }
#leaves i:nth-of-type(n):after { width:2px; height:17px; left: 12px; top:0px; }

#leaves i:nth-of-type(2n+1)    { height:11px; width:16px; }
#leaves i:nth-of-type(2n+1):before { width:4px; height:3px; top:7px; right:0px; }
#leaves i:nth-of-type(2n+1):after { width:2px; height:6px; left: 5px; top:1px; }

#leaves i:nth-of-type(3n+2)  { height:17px; width:23px; }
#leaves i:nth-of-type(3n+2):before  { height:4px; width:4px; top:12px; right:1px; }
#leaves i:nth-of-type(3n+2):after  { height:10px; width:2px; top:1px; left:8px; }

/* Animation delays */
#leaves i:nth-of-type(n)   { -webkit-animation-delay: 1.9s;}
#leaves i:nth-of-type(2n)  { -webkit-animation-delay: 3.9s;}
#leaves i:nth-of-type(3n)  { -webkit-animation-delay: 2.3s;}
#leaves i:nth-of-type(4n)  { -webkit-animation-delay: 4.4s;}
#leaves i:nth-of-type(5n)  { -webkit-animation-delay: 5s;  }
#leaves i:nth-of-type(6n)  { -webkit-animation-delay: 3.5s;}
#leaves i:nth-of-type(7n)  { -webkit-animation-delay: 2.8s;}
#leaves i:nth-of-type(8n)  { -webkit-animation-delay: 1.5s;}
#leaves i:nth-of-type(9n)  { -webkit-animation-delay: 3.3s;}
#leaves i:nth-of-type(10n) { -webkit-animation-delay: 2.5s;}
#leaves i:nth-of-type(11n) { -webkit-animation-delay: 1.2s;}
#leaves i:nth-of-type(12n) { -webkit-animation-delay: 4.1s;}
#leaves i:nth-of-type(13n) { -webkit-animation-delay: 1s;  }
#leaves i:nth-of-type(14n) { -webkit-animation-delay: 4.7s;}
#leaves i:nth-of-type(15n) { -webkit-animation-delay: 3s;  }

/* Purple variations */
#leaves i:nth-of-type(n)    { background: linear-gradient(to bottom right, #6e3482, #a56abd); }
#leaves i:nth-of-type(2n+2)  { background: linear-gradient(to bottom right, #a56abd, #c49cd5); }
#leaves i:nth-of-type(4n+1)  { background: linear-gradient(to bottom right, #5a246e, #6e3482); }

#leaves i:nth-of-type(n)    { opacity: .7;}
#leaves i:nth-of-type(3n+1)  { opacity: .5;}
#leaves i:nth-of-type(3n+2)  { opacity: .3;}

#leaves i:nth-of-type(n)    { transform: rotate(180deg); }
#leaves i:nth-of-type(n) { -webkit-animation-timing-function:ease-in-out; }

/* Keyframes */
@-webkit-keyframes falling {
    0% {
        -webkit-transform: translate3d(300px,0,0) rotate(0deg);
    }
    100% {
        -webkit-transform: translate3d(-350px,700px,0) rotate(90deg);
        opacity: 0;
    }
}

@-webkit-keyframes falling3 {
    0% {
        -webkit-transform: translate3d(0,0,0) rotate(-20deg);
    }
    100% {
        -webkit-transform: translate3d(-230px,640px,0) rotate(-70deg);
        opacity: 0;
    }
}

@-webkit-keyframes falling2 {
    0% {
        -webkit-transform: translate3d(0,0,0) rotate(90deg);
    }
    100% {
        -webkit-transform: translate3d(-400px,680px,0) rotate(0deg);
        opacity: 0;
    }
}
