:root {
  --background-color-base: bisque;
  --background-color-selected: burlywood;
  --body-background-color: #292929;
  --font-size-base: 16px;
}

body {
  align-items: center;
  display: flex;
  flex-direction: column;
  font-size: var(--font-size-base);
  gap: .5rem;
  background-color: var(--body-background-color);
  color: #f1f1f1;
  font-family: system-ui;
  margin: 0;
  min-height: 100vh;
  width: 100%;
}

a {
  color: wheat;

  &:visited {
    color: wheat;
  }

  &:hover {
    color: #ff6347;
  }
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-140%);
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  color: #111;
  border-radius: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  z-index: 1001;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0.75rem);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #7b94f4;
  outline-offset: 3px;
}

header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  background-color: #30307D;
  width: 100%;
  min-height: 4rem;
  box-sizing: border-box;
  gap: 0.75rem 1rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  border-radius: 5px;

  &>* {
    padding: 0;
  }

  .logo-and-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    text-decoration: none;

    .title {
      font-family: sans-serif;
      font-size: clamp(0.85rem, 2vw, 1rem);
      line-height: 1.2;
      white-space: nowrap;

      @media (max-width: 420px) {
        display: none;
      }
    }
  }

  nav {
    justify-self: center;

    .nav-list {
      list-style: none;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.5rem;
      margin: 0;
      padding: 0;
    }

    a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 2.75rem;
      min-width: 5.75rem;
      padding: 0.45rem 0.85rem;
      border-radius: 999px;
      text-decoration: none;
    }

    a.active,
    a[aria-current="page"] {
      color: aquamarine;
      background: rgba(255, 255, 255, 0.12);
    }
  }

  .github-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    flex-shrink: 0;
  }

  .profile-pic {
    height: 2.5rem;
    border-radius: 50%;
  }

  @media (max-width: 760px) {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.5rem;

    nav {
      grid-column: auto;
      justify-self: center;
      min-width: 0;
    }

    .nav-list {
      flex-wrap: nowrap;
      gap: 0.25rem;
    }

    nav a {
      min-width: 0;
      padding: 0.45rem 0.7rem;
    }
  }

  @media (max-width: 500px) {
    gap: 0.4rem;
    padding: 0.75rem;

    .logo-and-title {
      gap: 0.4rem;

      .title {
        font-size: 0.9rem;
      }
    }

    nav {
      justify-self: stretch;
    }

    .nav-list {
      gap: 0.125rem;
    }

    nav a {
      min-height: 2.5rem;
      padding: 0.4rem 0.45rem;
      font-size: 0.95rem;
    }

    .github-icon {
      width: 2.5rem;
      height: 2.5rem;
    }

    .profile-pic {
      height: 2.25rem;
    }
  }

  @media (max-width: 460px) {
    .logo-and-title {
      .title {
        display: none;
      }
    }

    nav a {
      padding: 0.4rem 0.35rem;
      font-size: 0.9rem;
    }
  }

  @media (max-width: 420px) {
    padding: 0.75rem;
  }
}

.home {
  position: relative;
  min-height: calc(100vh - 1rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) 1rem 2.5rem;
  overflow: hidden;

  .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(48, 48, 125, 0.05) 0%,
        rgba(41, 163, 236, 0.08) 50%,
        rgba(250, 162, 158, 0.05) 100%);
    z-index: 0;
  }

  .geometric-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;

    .shape {
      position: absolute;
      background: linear-gradient(135deg,
          rgba(116, 148, 244, 0.1) 0%,
          rgba(41, 163, 236, 0.1) 100%);
      animation: floatShape 20s ease-in-out infinite;

      &.shape-1 {
        width: 200px;
        height: 200px;
        top: 10%;
        left: -5%;
        border-radius: 38% 62% 55% 45% / 42% 34% 66% 58%;
        transform: rotate(12deg);
        animation-delay: 0s;
      }

      &.shape-2 {
        width: 150px;
        height: 150px;
        top: 60%;
        right: -3%;
        border-radius: 1.25rem;
        transform: rotate(18deg);
        animation-delay: 7s;
      }

      &.shape-3 {
        width: 100px;
        height: 100px;
        top: 30%;
        right: 15%;
        clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
        transform: rotate(-8deg);
        animation-delay: 14s;
      }

      &.shape-4 {
        width: 130px;
        height: 130px;
        top: 18%;
        left: 28%;
        clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
        transform: rotate(10deg);
        animation-delay: 3s;
      }

      &.shape-5 {
        width: 90px;
        height: 90px;
        top: 72%;
        left: 18%;
        clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
        transform: rotate(-12deg);
        animation-delay: 9s;
      }

      &.shape-6 {
        width: 170px;
        height: 170px;
        top: 8%;
        right: 32%;
        border-radius: 50%;
        transform: rotate(24deg);
        box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.05);
        animation-delay: 12s;
      }

      &.shape-7 {
        width: 115px;
        height: 115px;
        top: 48%;
        left: 52%;
        clip-path: polygon(50% 0%, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 39% 64%, 0% 50%, 39% 36%);
        transform: rotate(20deg);
        animation-delay: 16s;
      }

      &.shape-8 {
        width: 140px;
        height: 140px;
        top: 78%;
        right: 12%;
        border-radius: 32% 68% 24% 76% / 62% 36% 64% 38%;
        transform: rotate(-18deg);
        animation-delay: 5s;
      }
    }
  }

  .hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;

    @media (min-width: 1024px) {
      grid-template-columns: 1fr 1.2fr;
      gap: 4rem;
      align-items: start;
    }
  }

  .hero-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    width: min(100%, 42rem);
    margin: 0 auto;

    @media (min-width: 1024px) {
      width: auto;
      margin: 0;
      text-align: left;
    }
  }

  .profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;

    @media (min-width: 1024px) {
      align-items: flex-start;
    }
  }

  .profile-frame {
    position: relative;
    display: inline-block;

    .profile-pic.enhanced {
      width: 12rem;
      height: 12rem;
      border-radius: 50%;
      border: 4px solid rgba(116, 148, 244, 0.3);
      box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 8px rgba(116, 148, 244, 0.1),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

      @media (max-width: 768px) {
        width: 10rem;
        height: 10rem;
        border-width: 3px;
      }

      &:hover,
      &:focus {
        transform: scale(1.05);
        border-color: rgba(116, 148, 244, 0.5);
        box-shadow:
          0 12px 48px rgba(0, 0, 0, 0.4),
          0 0 0 8px rgba(116, 148, 244, 0.2),
          inset 0 0 0 2px rgba(255, 255, 255, 0.2);
        outline: 2px solid rgba(116, 148, 244, 0.8);
        outline-offset: 4px;
      }
    }

    .profile-glow {
      position: absolute;
      top: -8px;
      left: -8px;
      right: -8px;
      bottom: -8px;
      border-radius: 50%;
      background: linear-gradient(45deg,
          rgba(116, 148, 244, 0.2) 0%,
          rgba(41, 163, 236, 0.2) 50%,
          rgba(250, 162, 158, 0.2) 100%);
      opacity: 0;
      animation: pulseGlow 4s ease-in-out infinite;
      z-index: -1;
    }
  }

  .intro-content {
    .name-heading {
      font-size: clamp(2.5rem, 5vw, 3.5rem);
      font-weight: 800;
      margin: 0 0 0.5rem 0;
      line-height: 1.1;
    }

    .gradient-text {
      background: linear-gradient(135deg,
          #7b94f4 0%,
          #29A3EC 50%,
          #FAA29E 100%);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: gradientShift 6s ease-in-out infinite;
    }

    .tagline {
      font-size: clamp(1.1rem, 2.5vw, 1.3rem);
      color: #cbd5e0;
      margin: 0 0 1.5rem 0;
      font-weight: 500;
    }

    .typewriter-text {
      display: inline-block;
      border-right: 2px solid #7b94f4;
      padding-right: 2px;
      animation: blink 1s infinite;
    }
  }

  .haiku-section {
    display: flex;
    justify-content: center;

    @media (min-width: 1024px) {
      justify-content: flex-start;
    }

    .an-unfortunate-haiku {
      display: inline-block;
      width: fit-content;
      max-width: min(100%, 23rem);
      font-family: FangSong, sans-serif;
      font-size: 1.1rem;
      line-height: 1.6;
      color: #a0aec0;
      padding: 1.25rem 1.5rem;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 1rem;
      border: 1px solid rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);

      &.floating {
        animation: float 6s ease-in-out infinite;
      }
    }
  }

  .hero-right {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: min(100%, 48rem);
    margin: 0 auto;

    @media (max-width: 768px) {
      gap: 2rem;
    }

    @media (min-width: 1024px) {
      width: auto;
      margin: 0;
    }
  }

  .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f8f9fa;
    margin: 0 0 1.5rem 0;
    text-align: center;

    @media (min-width: 1024px) {
      text-align: left;
    }
  }

  .expertise-section {
    .expertise-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1rem;

      @media (min-width: 640px) {
        grid-template-columns: repeat(2, 1fr);
      }

      .expertise-card {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
        background: linear-gradient(135deg,
            rgba(42, 45, 62, 0.6) 0%,
            rgba(39, 39, 52, 0.6) 100%);
        border-radius: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        opacity: 0;
        transform: translateY(30px);

        &.animate-in {
          animation: cardSlideIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }

        &:hover,
        &:focus-within {
          transform: translateY(-4px);
          background: linear-gradient(135deg,
              rgba(42, 45, 62, 0.8) 0%,
              rgba(39, 39, 52, 0.8) 100%);
          border-color: rgba(116, 148, 244, 0.3);
          box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
        }

        @media (hover: none) and (pointer: coarse) {
          &:hover {
            transform: none;
          }

          &:active {
            transform: scale(0.98);
          }
        }

        @media (max-width: 768px) {
          padding: 1rem;
          gap: 0.875rem;
        }

        .card-icon {
          font-size: 1.5rem;
          filter: grayscale(0.3);
          transition: all 0.3s ease;
        }

        &:hover .card-icon {
          filter: grayscale(0);
          transform: scale(1.1);
        }

        .card-content {
          flex: 1;

          h3 {
            font-size: 1rem;
            font-weight: 600;
            color: #f8f9fa;
            margin: 0 0 0.5rem 0;
            line-height: 1.3;
          }

          p {
            font-size: 0.875rem;
            color: #a0aec0;
            margin: 0;
            line-height: 1.4;
          }
        }
      }
    }
  }

  .social-section {
    .social-links.enhanced {
      display: flex;
      justify-content: center;
      gap: 1rem;
      flex-wrap: nowrap;

      @media (min-width: 1024px) {
        justify-content: flex-start;
      }

      .social-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.375rem;
        flex: 1 1 0;
        min-width: 0;
        min-height: 6rem;
        padding: 0.75rem;
        text-align: center;
        background: linear-gradient(135deg,
            rgba(42, 45, 62, 0.6) 0%,
            rgba(39, 39, 52, 0.6) 100%);
        border-radius: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        position: relative;

        &.floating {
          animation: float 6s ease-in-out infinite;

          &:nth-child(2) {
            animation-delay: 2s;
          }

          &:nth-child(3) {
            animation-delay: 4s;
          }
        }

        &:hover,
        &:focus {
          transform: translateY(-4px);
          background: linear-gradient(135deg,
              rgba(42, 45, 62, 0.8) 0%,
              rgba(39, 39, 52, 0.8) 100%);
          border-color: rgba(116, 148, 244, 0.4);
          box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
          outline: 2px solid rgba(116, 148, 244, 0.6);
          outline-offset: 2px;
        }

        @media (hover: none) and (pointer: coarse) {
          &:hover {
            transform: none;
          }

          &:active {
            transform: scale(0.95);
            background: linear-gradient(135deg,
                rgba(42, 45, 62, 0.9) 0%,
                rgba(39, 39, 52, 0.9) 100%);
          }
        }

        @media (max-width: 480px) {
          padding: 0.625rem;
          gap: 0.25rem;
          min-height: 5.5rem;

          .social-icon {
            width: 2.25rem;
            height: 2.25rem;
          }

          .social-label {
            font-size: 0.8rem;
            line-height: 1.2;
          }
        }

        .social-icon {
          width: 2.875rem;
          height: 2.875rem;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: all 0.3s ease;

          svg {
            width: 100%;
            height: 100%;
          }
        }

        &:hover .social-icon {
          transform: rotate(10deg) scale(1.1);
        }

        .social-label {
          font-size: 0.875rem;
          font-weight: 500;
          color: #a0aec0;
          transition: color 0.3s ease;
        }

        &:hover .social-label {
          color: #f8f9fa;
        }

        &[data-tooltip]:hover::before {
          content: attr(data-tooltip);
          position: absolute;
          bottom: 100%;
          left: 50%;
          transform: translateX(-50%);
          background: rgba(0, 0, 0, 0.9);
          color: white;
          padding: 0.5rem 0.75rem;
          border-radius: 0.5rem;
          font-size: 0.75rem;
          white-space: nowrap;
          z-index: 1000;
          margin-bottom: 0.5rem;
          opacity: 0;
          animation: fadeInTooltip 0.3s ease forwards;
        }
      }
    }
  }
}

#projects {
  padding: 2rem 1rem;

  h2 {
    text-align: center;
    margin: 0 0 2rem 0;
    font-size: 2rem;
    color: #f8f9fa;
  }

  .content {
    padding: 1rem;
    overflow-y: hidden;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;

    @media (max-width: 600px) {
      gap: 1rem;
      grid-template-columns: 1fr;
      padding: 0.5rem;
    }

    @media (min-width: 601px) and (max-width: 950px) {
      grid-template-columns: repeat(2, 1fr);
    }

    @media (min-width: 951px) and (max-width: 1400px) {
      grid-template-columns: repeat(3, 1fr);
    }

    @media (min-width: 1401px) {
      grid-template-columns: repeat(4, 1fr);
    }

    .item {
      display: flex;
      box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
      flex-direction: column;
      justify-content: space-between;
      padding: 1.5rem;
      width: 100%;
      max-width: 320px;
      align-items: center;
      gap: 1rem;
      min-height: 18rem;
      margin: 0;
      background: linear-gradient(135deg,
          #2a2d3e 0%,
          #272734 50%,
          #252433 100%);
      border-radius: 1.5rem;
      text-align: center;
      position: relative;
      overflow: hidden;
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      border: 1px solid rgba(255, 255, 255, 0.1);
      opacity: 0;
      transform: translateY(30px) scale(0.95);

      &.animate-in {
        animation: cardEnter 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
      }

      @media (max-width: 600px) {
        min-height: 16rem;
        padding: 1rem;
        max-width: 100%;
      }

      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg,
            rgba(116, 148, 244, 0.05) 0%,
            rgba(41, 163, 236, 0.05) 50%,
            rgba(250, 162, 158, 0.05) 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
      }

      &:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow:
          0 12px 24px rgba(0, 0, 0, 0.4),
          0 6px 12px rgba(0, 0, 0, 0.3),
          0 0 0 1px rgba(116, 148, 244, 0.2);
        z-index: 10;
      }

      &:hover::before {
        opacity: 1;
      }

      &:hover .item-img,
      &:focus-within .item-img {
        transform: scale(1.1) rotate(var(--item-img-rotation, 5deg));
      }

      &:hover .item-header {
        color: #7b94f4;
        transform: translateY(-2px);
      }

      .item-header {
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        margin-bottom: 0.5rem;
        transition: all 0.3s ease;
        color: #f8f9fa;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
      }

      .item-img {
        min-width: 90px;
        min-height: 90px;
        width: 90px;
        height: 90px;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
      }

      .item-description {
        font-size: 0.95rem;
        line-height: 1.5;
        color: #cbd5e0;
        margin: 0.5rem 0;
        font-weight: 400;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
      }

      .item-languages {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin: 0.5rem 0;
        min-height: 2.25rem;
        align-items: center;
      }

      .item-language {
        font-weight: 600;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 0.25rem 0.75rem;
        border-radius: 1rem;
        margin: 0.5rem 0;
      }

      .item > .item-language {
        min-height: 2.25rem;
        display: inline-flex;
        align-items: center;
      }

      .item-languages .item-language {
        margin: 0;
      }

      .item-language-javascript {
        color: #f7df1e;
        background: rgba(247, 223, 30, 0.14);
        border: 1px solid rgba(247, 223, 30, 0.4);
      }

      .item-language-html {
        color: #ff8b5e;
        background: rgba(255, 139, 94, 0.12);
        border: 1px solid rgba(255, 139, 94, 0.35);
      }

      .item-language-python {
        color: #8ad0ff;
        background: rgba(138, 208, 255, 0.12);
        border: 1px solid rgba(138, 208, 255, 0.35);
      }

      .item-language-vue {
        color: #63d9a0;
        background: rgba(99, 217, 160, 0.12);
        border: 1px solid rgba(99, 217, 160, 0.35);
      }

      .item-links {
        margin-top: auto;
        padding-top: 1rem;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 0.75rem;

        a {
          display: inline-flex;
          align-items: center;
          min-height: 2.25rem;
          color: #a0aec0;
          text-decoration: none;
          font-weight: 500;
          transition: color 0.2s ease;

          &:hover {
            color: #7b94f4;
          }
        }
      }
    }
  }
}

.project-link {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
}

#articles {
  padding: 2rem 1rem;

  h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #f8f9fa;
  }

  #articles-heading {
    margin: 0 0 2rem 0;
  }

  .published-work {
    list-style-type: none;
    padding-left: 0;
    max-width: 1100px;
    margin: 0 auto;

    a {
      text-decoration: none;
      font-size: larger;
      font-weight: 600;
      color: #f8f9fa;
      transition: color 0.3s ease;
    }

    li {
      background: linear-gradient(135deg,
          rgba(42, 45, 62, 0.6) 0%,
          rgba(39, 39, 52, 0.6) 50%,
          rgba(37, 36, 51, 0.6) 100%);
      border-radius: 1rem;
      border: 1px solid rgba(255, 255, 255, 0.1);
      position: relative;
      padding: 1.5rem 2rem 1.5rem 3.5rem;
      margin-bottom: .5rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
      transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 1px 4px rgba(0, 0, 0, 0.1);

      &:hover {
        transform: translateY(-3px);
        background: linear-gradient(135deg,
            rgba(42, 45, 62, 0.8) 0%,
            rgba(39, 39, 52, 0.8) 50%,
            rgba(37, 36, 51, 0.8) 100%);
        box-shadow:
          0 8px 16px rgba(0, 0, 0, 0.3),
          0 4px 8px rgba(0, 0, 0, 0.2),
          0 0 0 1px rgba(116, 148, 244, 0.2);
        border-color: rgba(255, 255, 255, 0.2);
        z-index: 5;

        a {
          color: #7b94f4;
        }

        .topic {
          color: #3cdef6;

          &::before {
            color: #7dd87d;
          }
        }

        &::before {
          transform: scale(1.1);
        }
      }

      &::before {
        content: url('data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTggMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgZmlsbD0iI2ZmZmZmZiIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjAuMDAwMTgiPjxwYXRoIGZpbGw9IiNkMWQ0ZDYiIGQ9Ik0xMi4xLjZhLjk0NC45NDQgMCAwIDAgLjIgMS4wNGwxLjM1MiAxLjM1M0wxMC4yOCA2LjM3YS45NTYuOTU2IDAgMCAwIDEuMzUgMS4zNWwzLjM4Mi0zLjM4IDEuMzUyIDEuMzUyYS45NDQuOTQ0IDAgMCAwIDEuMDQuMi45NTguOTU4IDAgMCAwIC41OTYtLjg3NVYuOTZhLjk2NC45NjQgMCAwIDAtLjk2LS45NmgtNC4wNTdhLjk1OC45NTggMCAwIDAtLjg4My42eiIvPjxwYXRoIGZpbGw9IiNkMWQ0ZDYiIGQ9Ik0xNCAxMXY1YTIuMDA2IDIuMDA2IDAgMCAxLTIgMkgyYTIuMDA2IDIuMDA2IDAgMCAxLTItMlY2YTIuMDA2IDIuMDA2IDAgMCAxIDItMmg1YTEgMSAwIDAgMSAwIDJIMnYxMGgxMHYtNWExIDEgMCAwIDEgMiAweiIvPjwvc3ZnPg==');
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1.5rem;
        opacity: 0.8;
        transition: all 0.3s ease;
      }

      .topic {
        display: inline-block;
        margin-right: 1rem;
        color: #29A3EC;
        font-size: 0.85rem;
        font-weight: 500;
        padding: 0.2rem 0.6rem;
        background: rgba(41, 163, 236, 0.15);
        border-radius: 0.5rem;
        border: 1px solid rgba(41, 163, 236, 0.3);
        transition: all 0.3s ease;

        &::before {
          content: "#";
          color: #55f63c;
          margin-right: 0.2rem;
          transition: color 0.3s ease;
        }
      }

      .tags {
        margin-top: 0.75rem;
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        overflow-x: auto;
        scrollbar-width: thin;
      }

      .article-summary {
        margin: 0.75rem 0 0;
        max-width: 62ch;
        color: #d6d6d6;
        font-size: 0.98rem;
        line-height: 1.55;
      }

      .article-date {
        margin: 0.55rem 0 0;
        color: #a0aec0;
        font-size: 0.82rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
      }

      @media (max-width: 600px) {
        padding: 1rem 1.5rem 1rem 2.5rem;
        margin-bottom: 1rem;

        &::before {
          left: 0.5rem;
          width: 1.2rem;
        }

        .tags {
          flex-wrap: wrap;
        }

        .topic {
          font-size: 0.75rem;
          padding: 0.15rem 0.4rem;
          margin-right: 0.5rem;
        }

        .article-summary {
          font-size: 0.92rem;
        }

        .article-date {
          font-size: 0.78rem;
        }
      }
    }
  }
}

.article-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.article-note {
  color: #a0aec0;
  font-size: 0.9rem;
  font-style: italic;
}

#404 {
  padding: 3rem 1rem;
  text-align: center;

  h2 {
    margin: 0 0 1rem 0;
    font-size: 2rem;
    color: #f8f9fa;
  }

  p {
    max-width: 32rem;
    margin: 0.5rem auto;
    color: #cbd5e0;
  }
}

.hide {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes cardEnter {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatShape {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  33% {
    transform: translateY(-30px) rotate(120deg);
  }

  66% {
    transform: translateY(15px) rotate(240deg);
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    opacity: 0;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(1.05);
  }
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes blink {

  0%,
  50% {
    border-color: #7b94f4;
  }

  51%,
  100% {
    border-color: transparent;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes cardSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInTooltip {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(5px);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .item {
    animation: none !important;
    transition: none !important;
  }

  .item.animate-in {
    opacity: 1;
    transform: none;
  }

  #articles .published-work li {
    transition: none !important;
  }

  #articles .published-work li:hover {
    transform: none !important;
  }

  .home .shape,
  .home .profile-glow,
  .home .gradient-text,
  .home .typewriter-text,
  .home .floating,
  .home .expertise-card,
  .home .social-link {
    animation: none !important;
  }

  .home .expertise-card.animate-in,
  .home .expertise-card {
    opacity: 1 !important;
    transform: none !important;
  }

  .home .typewriter-text {
    border-right: none !important;
  }
}
