* {
  box-sizing: border-box;
}

html,
body {
  scroll-behavior: smooth;
  overscroll-behavior: none;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(circle at 20% 20%, #1d1a20, #0d0d0d 55%) fixed;
  color: #f5f5f5;
  line-height: 1.55;
  font-size: 15px;
  min-height: 100vh;
}

::selection {
  background: #ffffff20;
}

a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #ffffff33;
  transition:
    color 0.2s,
    border-color 0.2s;
}

a:hover {
  border-color: #fff;
}

.layout {
  display: flex;
  align-items: flex-start;
  max-width: 1800px;
  margin: 0 auto;
  padding: 48px clamp(32px, 4vw, 80px);
  gap: 80px;
}

.sidebar {
  width: 320px;
  max-width: 100%;
  position: sticky;
  top: 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-self: flex-start;
}

main.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 72px;
  min-width: 0;
}

.social-icons {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.social-icons li {
  line-height: 1;
}

.social-icons img,
.social-icons svg {
  width: 22px;
  height: 22px;
  display: block;
  opacity: 0.85;
  transition:
    opacity 0.15s,
    transform 0.2s,
    filter 0.25s;
  filter: brightness(0) invert(1);
}

.social-icons svg,
.social-icons svg * {
  fill: #fff !important;
  stroke: #fff !important;
}

.social-icons a:hover img,
.social-icons a:hover svg,
.social-icons a:focus img,
.social-icons a:focus svg {
  opacity: 1;
  transform: translateY(-2px);
  filter: brightness(1) invert(0) drop-shadow(0 0 4px #ffffff55);
}

.social-icons a {
  position: relative;
}

.social-icons a::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%) translateY(4px);
  background: #1e1b21;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.22s ease;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 0 1px #2a262e;
  letter-spacing: 0.3px;
}

.social-icons a:hover::after,
.social-icons a:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.profile {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
}

.profile h1 {
  font-size: 2.4rem;
  margin: 0;
  letter-spacing: 0.5px;
}

.tagline {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  opacity: 0.7;
}

.intro {
  margin: 0;
  max-width: 45ch;
  opacity: 0.8;
}

.links-inline a {
  font-weight: 500;
}

.section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
  opacity: 0.6;
}

.section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section li {
  max-width: 68ch;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.section li strong {
  font-weight: 600;
}

.proj-icon {
  width: 25px;
  height: 25px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  margin-right: 6px;
  object-fit: contain;
  border-radius: 4px;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.inline-list a {
  border: none;
  position: relative;
}

.inline-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.25s;
}

.inline-list a:hover::after {
  width: 100%;
}

@media (max-width: 1100px) {
  .layout {
    gap: 56px;
  }
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
    padding: 40px 28px 96px;
  }

  .sidebar {
    position: relative;
    top: 0;
    width: 100%;
    flex-direction: column;
    gap: 32px;
  }

  .social-icons {
    order: 1;
  }
}

@media (max-width: 520px) {
  .profile h1 {
    font-size: 2rem;
  }

  .layout {
    padding: 32px 22px 80px;
  }
}

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

.profile-card:hover .profile-image {
  transform: rotate(5deg) scale(1.1);
}

a:focus,
a:active {
  color: #fff;
  outline: none;
}

.projects {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px auto;
  max-width: 1400px;
}

.project-cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  width: 100%;
  max-width: 1400px;
  margin: 40px auto;
  padding: 0;
  box-sizing: border-box;
}

.project-cards-container:hover>.project-card::after {
  opacity: 1;
}

.project-card {
  background-color: var(--bg-card);
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: left;
  box-shadow: 0 10px 30px var(--shadow-color);
  position: relative;
  overflow: hidden;
  margin: 0;
  cursor: pointer;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  border: 1px solid var(--border-color);
  box-sizing: border-box;
}

.project-card::before,
.project-card::after {
  border-radius: inherit;
  content: "";
  height: 100%;
  left: 0px;
  opacity: 0;
  position: absolute;
  top: 0px;
  transition: opacity 500ms;
  width: 100%;
  pointer-events: none;
}

.project-card::before {
  background: radial-gradient(1500px circle at var(--mouse-x) var(--mouse-y),
      rgba(var(--accent-primary-rgb), 0.1),
      transparent 40%);
  z-index: 3;
}

.project-card::after {
  background: radial-gradient(1500px circle at var(--mouse-x) var(--mouse-y),
      rgba(var(--accent-primary-rgb), 0.15),
      transparent 40%);
  z-index: 1;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card>.card-content {
  background-color: transparent;
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  inset: 1px;
  padding: 10px;
  position: relative;
  z-index: 2;
}

.project-card img {
  width: 100%;
  border-radius: 15px;
  opacity: 1;
  height: auto;
  transition: transform 0.5s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: scale(1);
  object-fit: cover;
}

.project-card:hover img {
  transform: scale(1.03);
}

.project-card h3 {
  margin: 25px 0 15px;
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
  font-size: 1.6rem;
}

.project-card p {
  color: var(--text-secondary);
  margin: 15px 0;
  left: 0px;
  line-height: 1.7;
  flex-grow: 1;
  font-size: 1.05rem;
}

.project-card a {
  background: linear-gradient(90deg,
      rgba(157, 129, 199, 0.15),
      rgba(122, 108, 168, 0.15));
  border: 1px solid var(--border-color);
  border-radius: 15px;
  display: block;
  margin-top: 25px;
  width: 100%;
  padding: 15px;
  color: var(--text-primary);
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  align-self: center;
  font-weight: 500;
}

.project-card a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  transition: all 0.6s ease;
}

.project-card a:hover {
  background: linear-gradient(90deg,
      rgba(157, 129, 199, 0.25),
      rgba(122, 108, 168, 0.25));
  box-shadow: 0 5px 15px var(--shadow-color);
  transform: translateY(-3px);
}

.project-card a:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-hover);
  border: 1px solid var(--border-hover);
  z-index: 1;
}

.project-card:hover::before {
  left: 100%;
  opacity: 1;
}

.about {
  margin: 50px auto;
  max-width: 800px;
  padding: 35px;
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 100%;
  position: relative;
  cursor: pointer;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  box-sizing: border-box;
}

.about::before,
.about::after {
  border-radius: inherit;
  content: "";
  height: 100%;
  left: 0px;
  opacity: 0;
  position: absolute;
  top: 0px;
  transition: opacity 500ms;
  width: 100%;
  pointer-events: none;
}

.about::before {
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y),
      rgba(var(--accent-primary-rgb), 0.1),
      transparent 40%);
  z-index: 3;
}

.about::after {
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
      rgba(var(--accent-primary-rgb), 0.15),
      transparent 40%);
  z-index: 1;
}

.about:hover::before {
  opacity: 1;
}

.about:hover::after {
  opacity: 1;
}

.about>.card-content {
  background-color: transparent;
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  inset: 1px;
  padding: 10px;
  position: relative;
  z-index: 2;
}

.about h2 {
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 25px;
}

.about p {
  line-height: 1.8;
  color: var(--text-secondary);
}

h1,
h2 {
  position: relative;
  display: inline-block;
  margin: 30px 0;
  width: auto;
  color: var(--text-primary);
}

h1::after,
h2::after {
  content: "";
  position: absolute;
  width: 50%;
  height: 3px;
  bottom: -10px;
  left: 25%;
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-secondary));
  border-radius: 3px;
}

#tilt {
  border: 3px solid var(--border-color);
  box-shadow: 0 15px 35px var(--shadow-color);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: float 6s ease-in-out infinite;
  margin: 30px auto;
  display: block;
}

#tilt:hover {
  border-color: var(--border-hover);
}

#profileCards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  row-gap: 30px;
  width: 100%;
  max-width: 1400px;
  margin: 40px auto;
  padding: 0;
  box-sizing: border-box;
}

.content>h1,
.content>h2,
.projects>h2 {
  width: 100%;
  text-align: center;
  margin-top: 70px;
  margin-bottom: 40px;
  font-size: 2.2rem;
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .project-cards-container {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 20px;
  }

  #profileCards {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .project-cards-container {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  #profileCards {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  .content {
    padding: 20px;
  }
}

.theme-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 5px 15px var(--shadow-color);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px var(--shadow-hover);
  border-color: var(--accent-primary);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--text-primary);
  transition: all 0.3s ease;
}

.card-highlight {
  display: none;
}

.project-cards-container,
#profileCards {
  padding-bottom: 20px;
  box-sizing: border-box;
}

* {
  box-sizing: border-box;
}

.project-card a {
  width: 100%;
  margin: 25px 0 0 0;
}

.project-card,
.profile-card,
.about {
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
}

.profile-card>.card-content {
  background-color: transparent;
  border-radius: inherit;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.profile-card .profile-image {
  flex-shrink: 0;
  position: relative;
  z-index: 3;
}

.profile-card h2 {
  position: relative;
  z-index: 3;
}

.project-card a {
  position: relative;
  z-index: 3;
}

.hover-simulation {
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  z-index: -999 !important;
  opacity: 0 !important;
}

.project-card>.card-content>* {
  position: relative;
  z-index: 3;
}

.about>.card-content>* {
  position: relative;
  z-index: 3;
}

.footer-spacer {
  height: 50px;
  width: 100%;
  margin-top: auto;
}

#root,
#__next {
  background: inherit;
}

.typing-text {
  position: relative;
  display: inline-block;
  color: var(--accent-primary);
}

.typing-cursor {
  display: inline-block;
  animation: blink 1s infinite;
  color: var(--accent-primary);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.stats-container {
  display: flex;
  justify-content: space-around;
  margin: 30px 0;
  flex-wrap: wrap;
  background: rgba(var(--accent-primary-rgb), 0.05);
  padding: 20px;
  border-radius: 15px;
}

.stat-item {
  text-align: center;
  margin: 10px;
  flex: 1;
  min-width: 120px;
}

.stat-count {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 5px;
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1rem;
}

.skills-section {
  margin: 60px auto;
  max-width: 800px;
  width: 100%;
}

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.skill-item {
  width: 100%;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

.skill-name::after {
  content: attr(data-progress) "%";
}

.skill-bar {
  height: 10px;
  background-color: var(--bg-overlay);
  border-radius: 5px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-secondary));
  border-radius: 5px;
  width: 0;
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 20px;
  border-radius: 30px;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(90deg,
      rgba(157, 129, 199, 0.2),
      rgba(122, 108, 168, 0.2));
  color: var(--text-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

.project-card.fade-in {
  animation: fadeIn 0.5s forwards;
}

.project-card.fade-out {
  animation: fadeOut 0.5s forwards;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

.contact-section {
  margin: 60px auto;
  max-width: 800px;
  width: 100%;
}

.contact-form {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px var(--shadow-color);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.form-group {
  position: relative;
  margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: none;
  border-bottom: 2px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group .focus-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-secondary));
  transition: all 0.3s ease;
}

.form-group.focused .focus-border {
  width: 100%;
}

.submit-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(90deg,
      rgba(157, 129, 199, 0.8),
      rgba(122, 108, 168, 0.8));
  color: white;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px var(--shadow-color);
}

.submit-btn .send-icon {
  margin-left: 10px;
  fill: white;
  transition: all 0.3s ease;
}

.submit-btn.sending {
  background: linear-gradient(90deg,
      rgba(157, 129, 199, 0.5),
      rgba(122, 108, 168, 0.5));
}

.submit-btn.sending .send-icon {
  animation: sendIcon 1.5s infinite;
}

.submit-btn.sent {
  background: linear-gradient(90deg,
      rgba(100, 200, 100, 0.8),
      rgba(80, 180, 80, 0.8));
}

@keyframes sendIcon {
  0% {
    transform: translateX(0);
    opacity: 1;
  }

  50% {
    transform: translateX(150%);
    opacity: 0;
  }

  51% {
    transform: translateX(-150%);
    opacity: 0;
  }

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.github-badge {
  margin-top: 20px;
  padding: 10px 15px;
  background: linear-gradient(90deg,
      rgba(157, 129, 199, 0.15),
      rgba(122, 108, 168, 0.15));
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.github-badge span {
  color: var(--text-secondary);
  margin-right: 8px;
}

.github-badge a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.github-badge a:hover {
  text-decoration: underline;
}

.github-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--shadow-color);
  border-color: var(--accent-primary);
}

.side-projects {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px auto;
  max-width: 1400px;
}

.side-projects-container {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 30px;
  width: 100%;
  max-width: 800px;
  margin: 40px auto;
  padding: 0;
  box-sizing: border-box;
}

.side-project-card {
  background-color: var(--bg-card);
  border-radius: 20px;
  padding: 25px;
  width: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: left;
  box-shadow: 0 10px 30px var(--shadow-color);
  position: relative;
  overflow: hidden;
  margin: 0;
  cursor: pointer;
  transform: translateZ(0);
  will-change: transform, box-shadow;
  border: 1px solid var(--border-color);
  box-sizing: border-box;
}

.side-project-card::before,
.side-project-card::after {
  border-radius: inherit;
  content: "";
  height: 100%;
  left: 0px;
  opacity: 0;
  position: absolute;
  top: 0px;
  transition: opacity 500ms;
  width: 100%;
  pointer-events: none;
}

.side-project-card::before {
  background: radial-gradient(1200px circle at var(--mouse-x) var(--mouse-y),
      rgba(var(--accent-primary-rgb), 0.1),
      transparent 40%);
  z-index: 3;
}

.side-project-card::after {
  background: radial-gradient(1200px circle at var(--mouse-x) var(--mouse-y),
      rgba(var(--accent-primary-rgb), 0.15),
      transparent 40%);
  z-index: 1;
}

.side-project-card:hover::before {
  opacity: 1;
}

.side-projects-container:hover>.side-project-card::after {
  opacity: 1;
}

.side-project-card>.card-content {
  background-color: transparent;
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  inset: 1px;
  padding: 10px;
  position: relative;
  z-index: 2;
}

.side-project-card h3 {
  margin: 0 0 15px;
  background: linear-gradient(90deg,
      var(--accent-primary),
      var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
  font-size: 1.4rem;
}

.side-project-card p {
  color: var(--text-secondary);
  margin: 0 0 20px;
  left: 0px;
  line-height: 1.6;
  flex-grow: 1;
  font-size: 1rem;
}

.side-project-card a {
  background: linear-gradient(90deg,
      rgba(157, 129, 199, 0.15),
      rgba(122, 108, 168, 0.15));
  border: 1px solid var(--border-color);
  border-radius: 15px;
  display: block;
  margin-top: auto;
  width: 100%;
  padding: 12px;
  color: var(--text-primary);
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  align-self: center;
  font-weight: 500;
}

.side-project-card a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  transition: all 0.6s ease;
}

.side-project-card a:hover {
  background: linear-gradient(90deg,
      rgba(157, 129, 199, 0.25),
      rgba(122, 108, 168, 0.25));
  box-shadow: 0 5px 15px var(--shadow-color);
  transform: translateY(-3px);
}

.side-project-card a:hover::before {
  left: 100%;
}

.side-project-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 15px 35px var(--shadow-hover);
  border: 1px solid var(--border-hover);
  z-index: 1;
}

@media (max-width: 900px) {
  .side-projects-container {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .side-projects-container {
    padding: 0 20px;
  }
}

.code-preview {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  overflow-x: auto;
}

.code-preview pre {
  margin: 0;
}

.code-preview code {
  font-family: "Fira Code", "Courier New", monospace;
  color: #e0e0e0;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre;
  display: block;
}

[data-theme="dark"] .code-preview {
  background: rgba(40, 40, 40, 0.7);
}

html {
  scrollbar-width: thin;
  scrollbar-color: #5a5566 #141216;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #38333f, #242127);
  border-radius: 20px;
  border: 2px solid #0d0d0d;
  box-shadow:
    0 0 0 1px #151218,
    0 2px 4px #00000070 inset;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #47414f, #2f2a32);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body::-webkit-scrollbar-thumb {
  transition:
    background 0.25s,
    opacity 0.35s;
}

body::-webkit-scrollbar-thumb {
  opacity: 0.65;
}

body:hover::-webkit-scrollbar-thumb {
  opacity: 1;
}

.hide-scrollbar {
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.readme-preview {
  width: 450px;
  max-width: 100%;
  max-height: calc(100vh - 96px);
  overflow: scroll;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-self: flex-start;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.readme-preview.visible {
  opacity: 1;
  pointer-events: auto;
}

.readme-close {
  background: none;
  border: none;
  color: #888;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  align-self: flex-end;
}

.readme-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.readme-title {
  font-size: 2.4rem;
  font-weight: 400;
  color: #fff;
  margin: 0;
  letter-spacing: 0.5px;
}

.readme-content {
  font-size: 15px;
  line-height: 1.55;
}

.readme-content h1,
.readme-content h2,
.readme-content h3,
.readme-content h4 {
  color: #fff;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.readme-content h1 {
  font-size: 1.5rem;
  margin-top: 0;
}

.readme-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 2em;
}

.readme-content h3 {
  font-size: 1rem;
}

.readme-content h4 {
  font-size: 0.9rem;
}

.readme-content p {
  margin: 0 0 0.8rem 0;
  max-width: 45ch;
  opacity: 0.8;
}

.readme-content code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
  color: #e0e0e0;
}

.readme-content pre {
  background: rgba(0, 0, 0, 0.5);
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1em 0;
  border: 1px solid #2a262e;
}

.readme-content pre code {
  background: none;
  padding: 0;
  font-size: 0.85em;
}

.readme-content ul,
.readme-content ol {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.readme-content li {
  max-width: 68ch;
  line-height: 1.6;
  opacity: 0.8;
}

.readme-content a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #ffffff33;
  transition: color 0.2s, border-color 0.2s;
}

.readme-content a:hover {
  border-color: #fff;
}

.readme-content blockquote {
  border-left: 3px solid #9d81c7;
  padding-left: 1em;
  margin-left: 0;
  color: #aaa;
  font-style: italic;
}

.readme-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1em 0;
}

.readme-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.readme-content table th,
.readme-content table td {
  padding: 0.5em;
  border: 1px solid #2a262e;
}

.readme-content table th {
  background: rgba(157, 129, 199, 0.1);
  font-weight: 600;
}

.readme-loading {
  text-align: left;
  color: #888;
  font-style: italic;
  opacity: 0.8;
}

@media (max-width: 1400px) {
  .layout {
    gap: 56px;
  }
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .readme-preview {
    width: 100%;
  }
}