html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Roboto", sans-serif;
  background-color: #0f0f0f;
  scroll-behavior: smooth;
  --glow-color: rgba(255, 255, 255, 0.05);
  transition: --glow-color 0.2s ease-out;
}

@property --glow-color {
  syntax: "<color>";
  initial-value: rgba(255, 255, 255, 0.05);
  inherits: true;
}

#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  pointer-events: none;
  z-index: 99;
  background: radial-gradient(circle, var(--glow-color), transparent 80%);
  transition: background 0.1s ease;
  transform: translate3d(var(--mouse-x, 50vw), var(--mouse-y, 50vh), 0)
    translate(-50%, -50%);
  will-change: transform;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 5px;
  border: 2px solid #0f0f0f;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

/* Entry Animations via Scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.4s ease-out,
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-fade {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.reveal-fade.visible {
  opacity: 1;
}

.profile {
  --section-glow: rgba(255, 255, 255, 0.08);
  margin: 0;
  min-height: 88vh;
  padding-top: 80px;
  padding-bottom: 100px;
  text-align: center;
  color: white;
  background: radial-gradient(circle at top, #1e1e1e 0%, #0f0f0f 60%);
  position: relative;
}

.pfp {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
}

.profile h1 {
  font-size: 72px;
  margin: 0 0 8px 0;
  font-weight: 800;
}

.profile h3 {
  margin: 0 0 24px 0;
  font-weight: 400;
  font-size: 24px;
  color: #a0a0a0;
}

#cursor {
  animation: blink 1s step-start infinite;
  color: #a0a0a0;
}

#word {
  font-weight: 300;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 64px;
}

.links a {
  display: block;
  line-height: 0;
}

.links img {
  width: 34px;
  height: 34px;
  opacity: 0.6;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

.links img:hover {
  opacity: 1;
  transform: translateY(-1px);
  transform: scale(1.1);
}

h2 {
  font-weight: 600;
  font-size: 28px;
  margin: 0 0 24px 0;
  text-align: center;
  color: white;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.carousel {
  display: flex;
  gap: 20px;
  width: fit-content;
  margin: 0 auto;
  padding-bottom: 40px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  height: 140px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  text-decoration: none;
  border-radius: 16px;
  flex-shrink: 0;
  /* Separate transition for hover to make it snappy */
  transition:
    transform 0.15s cubic-bezier(0.2, 0, 0, 1),
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-12px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Reveal transition only handles the initial entry */
.card.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.4s ease-out,
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.card.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.card h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.card p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: #888;
}

/* Staggered delays for items in a row */
.reveal:nth-child(1) {
  transition-delay: 0.1s;
}
.reveal:nth-child(2) {
  transition-delay: 0.2s;
}
.reveal:nth-child(3) {
  transition-delay: 0.3s;
}
.reveal:nth-child(4) {
  transition-delay: 0.4s;
}

.hypr {
  --section-glow: rgba(56, 189, 248, 0.12);
  margin: 0;
  min-height: 100vh;
  position: relative;
  margin-top: -15vh;
  padding-top: 22vh;
  padding-bottom: 32px;
  color: white;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  -webkit-mask-image: linear-gradient(
    176deg,
    transparent 0,
    transparent 70px,
    black 130px
  );
  mask-image: linear-gradient(
    176deg,
    transparent 0,
    transparent 70px,
    black 130px
  );
}

.hypr-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 60px;
  display: flex;
  align-items: center;
  gap: 80px;
}

.hypr-content {
  flex: 1;
  text-align: left;
}

.hypr-content h1 {
  font-size: 72px;
  line-height: 1.1;
  margin-bottom: 32px;
  font-weight: 800;
}

.hypr-content .description {
  font-size: 22px;
  line-height: 1.6;
  color: #a0a0a0;
  margin-bottom: 40px;
}

.tech-tags {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.tech-tags span {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 16px;
  color: #8892b0;
}

.project-github {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: -16px;
  margin-bottom: 32px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  color: #a0a0a0;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.project-github:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
  transform: scale(1.05);
}

.project-github img {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.hypr-image {
  flex: 1.2;
}

.screenshot-frame {
  background: #1e1e1e;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  line-height: 0;
}

.screenshot {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.dwm {
  --section-glow: rgba(192, 132, 252, 0.12);
  background: linear-gradient(180deg, #1a1625 0%, #0c0a0f 100%);
  min-height: 100vh;
  margin-top: -15vh;
  padding-top: 22vh;
  padding-bottom: 32px;
  color: white;
  position: relative;
  -webkit-mask-image: linear-gradient(
    176deg,
    transparent 0,
    transparent 70px,
    black 130px
  );
  mask-image: linear-gradient(
    176deg,
    transparent 0,
    transparent 70px,
    black 130px
  );
}

.dwm-container .tech-tags span {
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.2);
  background: rgba(192, 132, 252, 0.05);
}

.dwm-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 60px;
  text-align: left;
}

.dwm-container h1 {
  font-size: 64px;
  margin-bottom: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.dwm-container .description {
  font-size: 24px;
  line-height: 1.6;
  color: #e0e0e0;
  margin-bottom: 40px;
  font-weight: 500;
}

.dwm-container .learning {
  font-size: 18px;
  line-height: 1.8;
  color: #a0a0a0;
  margin-bottom: 48px;
}

/* Balatro Section */
.balatro {
  --section-glow: rgba(251, 113, 133, 0.12);
  background: linear-gradient(180deg, #1c0a0a 0%, #080202 100%);
  min-height: 100vh;
  margin-top: -15vh;
  padding-top: 22vh;
  padding-bottom: 32px;
  color: white;
  position: relative;
  -webkit-mask-image: linear-gradient(
    176deg,
    transparent 0,
    transparent 70px,
    black 130px
  );
  mask-image: linear-gradient(
    176deg,
    transparent 0,
    transparent 70px,
    black 130px
  );
}

.balatro-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 60px;
  display: flex;
  align-items: center;
  gap: 80px;
}

.balatro-content {
  flex: 1;
  text-align: left;
}

.balatro-content h1 {
  font-size: 72px;
  line-height: 1.1;
  margin-bottom: 32px;
  font-weight: 800;
}

.contribution-item {
  margin-bottom: 32px;
}

.contribution-item h3 {
  font-size: 18px;
  color: #fb7185;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contribution-item p {
  font-size: 18px;
  line-height: 1.6;
  color: #d1d5db;
  margin: 0;
}

.balatro-container .tech-tags span {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.2);
  background: rgba(251, 113, 133, 0.05);
}

.balatro-image {
  flex: 1.2;
}

.footer {
  --section-glow: rgba(251, 113, 133, 0.08);
  padding: 80px 0;
  text-align: center;
  background-color: #080202; /* Match the Balatro section bottom */
  color: #666;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 10;
}

.footer p {
  margin-bottom: 16px;
  font-size: 14px;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-links img {
  width: 24px;
  height: 24px;
  opacity: 0.5;
  transition: all 0.15s ease;
}

.footer-links a:hover img {
  opacity: 1;
  transform: translateY(-1px);
  transform: scale(1.1);
}

.quote-container {
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.copyright {
  margin-bottom: 16px;
}

#quote-text {
  font-style: italic;
  font-size: 16px;
  color: #888;
  margin-bottom: 8px;
  line-height: 1.5;
}

#quote-author {
  font-size: 13px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
  .hypr-container,
  .balatro-container {
    flex-direction: column;
    text-align: center;
    gap: 48px;
  }
  .hypr-content,
  .balatro-content {
    text-align: center;
  }
  .tech-tags {
    justify-content: center;
  }
  .hypr-content h1,
  .balatro-content h1 {
    font-size: 36px;
  }
  .profile h1 {
    font-size: 48px;
  }
  .pfp {
    width: 200px;
    height: 200px;
  }
  .dwm-container {
    text-align: center;
    padding: 0 40px;
  }
  .dwm-container h1 {
    font-size: 36px;
  }
}

a {
  text-decoration: none;
}
