/*===============
  global styles
===============*/

* {
    padding: 0;
    margin: 0;
    border: 0;
    outline: 0;
    background-color: inherit;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    box-shadow: none;
    box-sizing: border-box;
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: "Poppins", sans-serif;
    line-height: 1.5;
    color: var(--clr-fg);
    background-color: var(--clr-bg);
    opacity: 0;
    animation: fadeIn 0.8s ease-in-out forwards;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes slideInFromLeft {
    from {
      opacity: 0;
      transform: translateX(-50px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes slideInFromRight {
    from {
      opacity: 0;
      transform: translateX(50px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  .light {
    --clr-bg: #fcfcfc;
    --clr-bg-rgb: 252, 252, 252;
    --clr-bg-alt: #fff;
    --clr-fg: #555;
    --clr-fg-alt: #444;
    --clr-primary: #2978b5;
    --shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  }
  
  .dark {
    --clr-bg: #23283e;
    --clr-bg-rgb: 35, 40, 62;
    --clr-bg-alt: #2a2f4c;
    --clr-fg: #bdbddd;
    --clr-fg-alt: #cdcdff;
    --clr-primary: #90a0d9;
    --shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
      rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  }
  
  ::-moz-selection {
    background: var(--clr-primary);
    color: var(--clr-bg);
  }
  
  ::-webkit-selection,
  ::selection {
    background: var(--clr-primary);
    color: var(--clr-bg);
  }
  
  h1,
  h2,
  h3,
  h4 {
    line-height: 1.2;
    color: var(--clr-fg-alt);
  }
  
  h1 {
    font-size: 4rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  h4 {
    font-size: 1.3rem;
  }
  
  p {
    text-align: justify;
    line-height: 1.6;
  }
  
  ul {
    list-style-type: none;
  }
  
  a {
    text-decoration: none;
  }
  
  button {
    cursor: pointer;
  }
  
  @media (max-width: 900px) {
    h1 {
      font-size: 2.6rem;
    }
  }
  
  /*===================
    buttons and links
  ===================*/
  
  .link {
    color: var(--clr-primary);
    padding: 0 0 0.3em 0;
    position: relative;
  }
  
  .link:hover {
    color: var(--clr-primary);
  }
  
  .link::before {
    content: "";
    display: inline;
    width: 0%;
    height: 0.2em;
    position: absolute;
    bottom: -5px;
    background-color: var(--clr-primary);
    transition: width 0.2s ease-in;
  }
  
  .link:hover::before,
  .link:focus::before {
    width: 100%;
  }
  
  .link--nav {
    color: var(--clr-fg);
    text-transform: lowercase;
    font-weight: 500;
  }
  
  .link--icon {
    color: var(--clr-fg);
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
  }

  .link--icon i {
    font-size: inherit;
    line-height: 1;
  }

  .link--icon svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
  }
  
  .btn {
    display: block;
    padding: 0.8em 1.4em;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: lowercase;
    transition: transform 0.2s ease-in-out;
  }
  
  .btn--outline {
    color: var(--clr-primary);
    border: 2px solid var(--clr-primary);
    position: relative;
    overflow: hidden;
    z-index: 1;
  }
  
  .btn--outline:focus,
  .btn--outline:hover {
    color: var(--clr-bg);
  }
  
  .btn--outline:before {
    content: "";
    position: absolute;
    background-color: var(--clr-primary);
    right: 100%;
    bottom: 0;
    left: 0;
    top: 0;
    z-index: -1;
    transition: right 0.2s ease-in-out;
  }
  
  .btn--outline:hover::before,
  .btn--outline:focus::before {
    right: 0;
  }
  
  .btn--plain {
    text-transform: initial;
    background-color: var(--clr-bg-alt);
    box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 3px 0px;
    border: 0;
  }
  
  .btn--plain:hover {
    transform: translateY(-4px);
  }
  
  .btn--icon {
    padding: 0;
    font-size: 1.2rem;
  }
  
  .btn--icon:hover,
  .btn--icon:focus {
    color: var(--clr-primary);
  }
  
  .btn--icon:active {
    transform: translateY(-5px);
  }
  
  /*========
    layout
  ========*/
  
  .center {
    display: flex;
    align-items: center;
  }
  
  .header {
    height: 8em;
    max-width: 1100px;
    width: 95%;
    margin: 0 auto;
    justify-content: space-between;
    position: relative;
    z-index: 1000;
  }
  
  main {
    max-width: 1100px;
    width: 95%;
    margin: 0 auto;
  }
  
  .section {
    margin-top: 5em;
  }
  
  .section__title {
    text-align: center;
    margin-bottom: 1em;
    text-transform: uppercase;
  }
  
  .nav__list {
    margin-right: 1.5em;
    display: flex;
  }
  
  .nav__list-item {
    margin-left: 1.5em;
  }
  
  .nav__hamburger {
    display: none;
    width: 1em;
  }
  
  .about {
    flex-direction: column;
    margin-top: 3em;
  }

  .about__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3em;
    max-width: 1200px;
    width: 100%;
  }

  .about__text {
    flex: 1;
    max-width: 600px;
  }

  .about__photo {
    flex-shrink: 0;
  }

  .about__photo-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--clr-primary);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .about__photo-img:hover {
    transform: scale(1.05);
  }

  .light .about__photo-img:hover {
    box-shadow: rgba(100, 100, 111, 0.4) 0px 12px 40px 0px;
  }

  .dark .about__photo-img:hover {
    box-shadow: rgba(0, 0, 0, 0.3) 0px 15px 45px 0px,
      rgba(0, 0, 0, 0.1) 0px 0px 0px 1px;
  }
  
  .about__name {
    color: var(--clr-primary);
  }

  .fade-slide-in {
    opacity: 0;
    transform: translateX(-30px);
    animation: fadeSlideIn 1.2s ease-out 0.5s forwards;
  }

  @keyframes fadeSlideIn {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  /* Alternative animations - you can replace fadeSlideIn with any of these */
  
  .glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
  }

  @keyframes glowPulse {
    0%, 100% {
      text-shadow: 0 0 5px var(--clr-primary);
    }
    50% {
      text-shadow: 0 0 20px var(--clr-primary), 0 0 30px var(--clr-primary);
    }
  }

  .bounce-in {
    opacity: 0;
    transform: scale(0.3);
    animation: bounceIn 1s ease-out 0.5s forwards;
  }

  @keyframes bounceIn {
    0% {
      opacity: 0;
      transform: scale(0.3);
    }
    50% {
      opacity: 1;
      transform: scale(1.05);
    }
    70% {
      transform: scale(0.9);
    }
    100% {
      opacity: 1;
      transform: scale(1);
    }
  }

  .gradient-text {
    background: linear-gradient(45deg, var(--clr-primary), #ff6b6b, #4ecdc4, var(--clr-primary));
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
  }

  @keyframes gradientShift {
    0%, 100% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
  }
  
  .about__role {
    margin-top: 1.2em;
  }
  
  .about__desc {
    font-size: 1rem;
    max-width: 600px;
    text-align: justify;
    line-height: 1.6;
  }
  
  .about__desc,
  .about__contact {
    margin-top: 2.4em;
  }
  
  .about .link--icon {
    margin-right: 0.8em;
    transition: color 0.3s ease, transform 0.3s ease;
  }

  .about .link--icon:hover {
    transform: translateY(-2px);
  }

  .social-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8em;
  }
  
  .about .btn--outline {
    margin-right: 1em;
  }
  
  .projects__grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 2em;
  }
  
  .project {
    padding: 2em;
    margin: 0 auto;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s linear;
    background-color: var(--clr-bg-alt);
    border-radius: 8px;
    border-left: 4px solid var(--clr-primary);
  }
  
  .project:hover {
    transform: translateY(-7px);
  }

  .light .project:hover {
    box-shadow: rgba(100, 100, 111, 0.3) 0px 10px 35px 0px;
  }

  .dark .project:hover {
    box-shadow: rgba(0, 0, 0, 0.25) 0px 15px 40px 0px,
      rgba(0, 0, 0, 0.1) 0px 0px 0px 1px;
  }

  .project h3 {
    color: var(--clr-primary);
    font-weight: 600;
    margin-bottom: 0.5em;
    font-size: 1.2rem;
  }

  .project h4 {
    color: var(--clr-fg-alt);
    font-weight: 500;
    margin-bottom: 0.3em;
  }

  .project h5 {
    color: var(--clr-fg);
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 0.2em;
  }

  .project h7 {
    color: var(--clr-primary);
    font-weight: 500;
    font-size: 0.95rem;
  }

  .project h10 {
    color: var(--clr-fg);
    font-size: 0.85rem;
    opacity: 0.7;
  }
  
  .project__description {
    margin-top: 1em;
    color: var(--clr-fg);
    line-height: 1.6;
    font-size: 0.95rem;
    opacity: 0.9;
    text-align: justify;
  }
  
  .project__stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1.2em 0;
  }
  
  .project__stack-item {
    margin: 0.5em;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--clr-fg-alt);
  }
  
  .project .link--icon {
    margin-left: 0.5em;
  }

  /* Achievements Section */
  .achievements__container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5em;
    padding: 1em 0;
  }

  .achievement__item {
    display: flex;
    align-items: flex-start;
    padding: 1.5em;
    background-color: var(--clr-bg-alt);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid var(--clr-primary);
  }

  .achievement__item:hover {
    transform: translateY(-3px);
  }

  .light .achievement__item:hover {
    box-shadow: rgba(100, 100, 111, 0.25) 0px 8px 30px 0px;
  }

  .dark .achievement__item:hover {
    box-shadow: rgba(0, 0, 0, 0.2) 0px 12px 35px 0px,
      rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  }

  .achievement__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--clr-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1em;
    margin-top: 0.2em;
  }

  .achievement__icon i {
    color: white;
    font-size: 1.2rem;
  }

  .achievement__text {
    flex: 1;
    color: var(--clr-fg);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
    text-align: justify;
  }
  
  .skills__container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5em;
    padding: 1em 0;
  }

  .skills__category {
    text-align: center;
  }

  .skills__category-title {
    color: var(--clr-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .skills__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5em;
  }
  
  .skills__list-item {
    margin: 0.3em;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5em;
    white-space: nowrap;
    cursor: pointer;
  }

  .skills__list-item i {
    font-size: 1rem;
    width: 16px;
    text-align: center;
    color: var(--clr-primary);
  }

  .skills__list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .contact {
    flex-direction: column;
    gap: 2em;
    max-width: 800px;
    margin: 8em auto 0;
  }

  .contact__description {
    text-align: justify;
    font-size: 1.1rem;
    color: var(--clr-fg);
    max-width: 600px;
    margin: 0 auto 2em;
    line-height: 1.6;
  }

  .contact__container {
    display: flex;
    flex-direction: column;
    gap: 2em;
    width: 100%;
  }

  .contact__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5em;
  }

  .contact__item {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.5em;
    background-color: var(--clr-bg-alt);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .contact__item:hover {
    transform: translateY(-2px);
    box-shadow: rgba(100, 100, 111, 0.3) 0px 10px 35px 0px;
  }

  .contact__icon {
    font-size: 1.5rem;
    color: var(--clr-primary);
    min-width: 1.5rem;
  }

  .contact__details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3em;
    color: var(--clr-fg-alt);
  }

  .contact__link {
    color: var(--clr-fg);
    transition: color 0.3s ease;
  }

  .contact__link:hover {
    color: var(--clr-primary);
  }

  .contact__cta {
    text-align: center;
  }
  
  .footer {
    padding: 3em 0;
    margin-top: 4em;
    text-align: center;
  }
  
  .footer__link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--clr-fg);
  }
  
  .scroll-top {
    display: none;
    position: fixed;
    bottom: 1em;
    right: 2em;
    background-color: var(--clr-primary);
    color: var(--clr-bg);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    width: 3em;
    height: 3em;
    border-radius: 50%;
    box-shadow: var(--shadow);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }

  .scroll-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: rgba(100, 100, 111, 0.4) 0px 15px 40px 0px;
  }

  @media (max-width: 900px) {
    .about__content {
      flex-direction: column;
      gap: 2.5em;
      text-align: center;
    }

    .about__photo {
      order: -1;
    }

    .about__photo-img {
      width: 220px;
      height: 220px;
    }
  }
  
  @media (max-width: 600px) {
    .header {
      height: 6em;
    }
  
    .section {
      margin-top: 4em;
    }

    .projects__grid {
      grid-template-columns: 1fr;
      grid-gap: 1.5em;
    }

    .achievements__container {
      grid-template-columns: 1fr;
      gap: 1em;
      padding: 0.5em;
    }

    .achievement__item {
      padding: 1.2em;
    }

    .achievement__icon {
      width: 35px;
      height: 35px;
      margin-right: 0.8em;
    }

    .achievement__icon i {
      font-size: 1rem;
    }

    .achievement__text {
      font-size: 0.9rem;
    }
  
    .nav__list {
      flex-direction: column;
      padding: 2em 0;
      position: absolute;
      right: 0;
      left: 0;
      top: 6em;
      background-color: rgba(var(--clr-bg-rgb), 0.95);
      width: 0;
      overflow: hidden;
      transition: width 0.2s ease-in-out;
      z-index: 999;
      box-shadow: var(--shadow);
      border-top: 2px solid var(--clr-primary);
      backdrop-filter: blur(15px) saturate(180%);
      -webkit-backdrop-filter: blur(15px) saturate(180%);
      border-left: 1px solid rgba(var(--clr-primary-rgb, 41, 120, 181), 0.3);
      border-right: 1px solid rgba(var(--clr-primary-rgb, 41, 120, 181), 0.3);
      border-bottom: 1px solid rgba(var(--clr-primary-rgb, 41, 120, 181), 0.3);
    }

    .display-nav-list {
      width: 100%;
    }

    /* Add overlay effect when menu is open */
    .display-nav-list::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(2px);
      -webkit-backdrop-filter: blur(2px);
      z-index: -1;
    }

    /* Blur effect for main content when nav is open */
    .nav-blur {
      filter: blur(3px);
      transition: filter 0.3s ease;
      pointer-events: none;
    }

    .nav__list-item {
      margin: 0.5em 0;
      padding: 0.8em 1.5em;
      border-radius: 8px;
      transition: background-color 0.2s ease;
    }

    .nav__list-item:hover {
      background-color: rgba(var(--clr-bg-rgb), 0.8);
      backdrop-filter: blur(10px);
    }
  
    .nav__hamburger {
      display: flex;
      margin-left: 0.8em;
      z-index: 1001;
      position: relative;
    }
  
    .about {
      align-items: flex-start;
      margin-top: 2em;
    }

    .about__content {
      flex-direction: column;
      gap: 1.5em;
      text-align: center;
      padding: 0 1em;
    }

    .about__photo {
      order: -1;
      margin-bottom: 1em;
    }

    .about__photo-img {
      width: 180px;
      height: 180px;
      border: 3px solid var(--clr-primary);
      box-shadow: rgba(100, 100, 111, 0.3) 0px 8px 25px 0px;
    }

    .about__text {
      max-width: 100%;
    }

    .about__text h1 {
      font-size: 1.8rem;
      margin-bottom: 1em;
    }

    .about__desc {
      font-size: 0.95rem;
      line-height: 1.6;
      margin-bottom: 1.5em;
    }

    .about__contact {
      flex-direction: column;
      gap: 1.5em;
      align-items: center;
    }

    .about__contact .btn--outline {
      margin-right: 0;
      margin-bottom: 0;
    }

    .social-icons {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1.2em;
      flex-wrap: wrap;
    }

    .about .link--icon {
      margin: 0;
    }

    .skills__container {
      grid-template-columns: 1fr;
      gap: 1.5em;
      padding: 0.5em;
    }

    .skills__category-title {
      font-size: 1rem;
      margin-bottom: 1em;
    }

    .skills__list-item {
      font-size: 0.8rem;
      margin: 0.2em;
    }
  
    .contact__info {
      grid-template-columns: 1fr;
      gap: 1em;
    }

    .contact__item {
      padding: 1em;
      flex-direction: column;
      text-align: center;
      gap: 0.5em;
    }

    .contact__description {
      font-size: 1rem;
      margin-bottom: 1.5em;
    }
  
    .footer {
      padding: 2em;
      margin-top: 3em;
    }
  
    .scroll-container {
      display: none;
    }
  }