@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #06080c;
  --bg-2: #0b1117;
  --theme-progress: 0;
  --page-bg-top: rgb(6, 8, 12);
  --page-bg-bottom: rgb(11, 17, 23);
  --page-text: rgb(248, 251, 251);
  --hero-heading-color: rgb(248, 251, 251);
  --header-bg: rgba(6, 8, 12, 0.45);
  --nav-border: rgba(225, 244, 243, 0.14);
  --nav-bg: rgba(255, 255, 255, 0.03);
  --nav-link-color: rgb(200, 211, 210);
  --nav-link-active-color: rgb(255, 255, 255);
  --nav-link-active-bg: rgba(225, 244, 243, 0.1);
  --hero-label-color: rgb(225, 244, 243);
  --hero-subtitle-color: rgb(200, 211, 210);
  --hero-glow-opacity: 1;
  --hero-glow-blur: 80px;
  --hero-line-opacity: 0.2;
  --nav-rainbow-width: 0px;
  --cursor-dot-color: rgba(225, 244, 243, 0.95);
  --cursor-ring-color: rgba(225, 244, 243, 0.72);
  --cursor-ring-hover-color: rgba(225, 244, 243, 0.95);
  --section-label-color: rgb(190, 201, 210);
  --section-title-color: rgb(236, 242, 247);
  --section-body-color: rgb(200, 211, 218);
  --surface-bg: rgba(17, 20, 24, 0.82);
  --surface-border: rgba(225, 244, 243, 0.14);
  --surface-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  --chip-bg: rgba(255, 255, 255, 0.03);
  --chip-border: rgba(225, 244, 243, 0.14);
  --card: rgba(17, 20, 24, 0.82);
  --text: #f8fbfb;
  --muted: #c8d3d2;
  --border: rgba(225, 244, 243, 0.14);

  --accent: #E1F4F3;
  --accent-2: #cfe9e8;
  --accent-dark: #7e9e9b;
  --glow: rgba(225, 244, 243, 0.18);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none;
}

html {
  scroll-behavior: smooth;
  background-color: #06080c;
  color-scheme: dark;
}

body {
  font-family: "Inter", Arial, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 14%, rgba(56, 189, 248, 0.09), transparent 34%),
    radial-gradient(circle at 86% 20%, rgba(139, 92, 246, 0.1), transparent 38%),
    linear-gradient(180deg, #03060b 0%, #060b14 44%, #050912 100%);
  color: var(--page-text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: color 0.2s linear;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: -10% -8%;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 76%, rgba(16, 185, 129, 0.08), transparent 34%),
    radial-gradient(circle at 82% 66%, rgba(59, 130, 246, 0.08), transparent 36%),
    radial-gradient(circle at 52% 8%, rgba(14, 165, 233, 0.06), transparent 30%);
  filter: blur(12px);
  animation: ambient-shift 24s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.34) 0%, rgba(2, 6, 23, 0.12) 22%, rgba(2, 6, 23, 0.44) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(148, 163, 184, 0.02) 0,
      rgba(148, 163, 184, 0.02) 1px,
      transparent 1px,
      transparent 120px
    );
}

.fixed-cube-scene {
  position: fixed;
  top: 53%;
  left: 74%;
  width: min(34vw, 360px);
  height: min(34vw, 360px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  perspective: 900px;
  filter: drop-shadow(0 0 50px rgba(56, 189, 248, 0.16)) drop-shadow(0 0 70px rgba(139, 92, 246, 0.14));
}

.fixed-cube {
  position: absolute;
  inset: 24%;
  transform-style: preserve-3d;
  animation: cube-spin 20s linear infinite;
}

.cube-face {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(171, 212, 230, 0.34);
  background:
    linear-gradient(135deg, rgba(224, 242, 254, 0.12), rgba(139, 92, 246, 0.08)),
    repeating-linear-gradient(90deg, rgba(171, 212, 230, 0.08) 0 1px, transparent 1px 18px);
  box-shadow: inset 0 0 22px rgba(56, 189, 248, 0.12);
  backdrop-filter: blur(2px);
}

.face-front { transform: translateZ(56px); }
.face-back { transform: rotateY(180deg) translateZ(56px); }
.face-right { transform: rotateY(90deg) translateZ(56px); }
.face-left { transform: rotateY(-90deg) translateZ(56px); }
.face-top { transform: rotateX(90deg) translateZ(56px); }
.face-bottom { transform: rotateX(-90deg) translateZ(56px); }

.cube-dust {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(224, 242, 254, 0.9);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.7);
}

.dust-1 { top: 18%; left: 16%; animation: dust-float-1 9s ease-in-out infinite; }
.dust-2 { top: 72%; left: 78%; animation: dust-float-2 11s ease-in-out infinite; }
.dust-3 { top: 34%; left: 86%; animation: dust-float-3 8s ease-in-out infinite; }

@keyframes cube-spin {
  0% { transform: rotateX(-18deg) rotateY(6deg) rotateZ(0deg); }
  50% { transform: rotateX(-10deg) rotateY(186deg) rotateZ(3deg); }
  100% { transform: rotateX(-18deg) rotateY(366deg) rotateZ(0deg); }
}

@keyframes dust-float-1 {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.65; }
  50% { transform: translate3d(8px, -10px, 0); opacity: 1; }
}

@keyframes dust-float-2 {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.55; }
  50% { transform: translate3d(-10px, 8px, 0); opacity: 0.95; }
}

@keyframes dust-float-3 {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.58; }
  50% { transform: translate3d(-8px, -8px, 0); opacity: 1; }
}

@keyframes ambient-shift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(0, -12px, 0) scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fixed-cube {
    animation: none;
  }

  .cube-dust {
    animation: none;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

/* custom cursor */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 10px;
  height: 10px;
  background: var(--cursor-dot-color);
  border-radius: 50%;
  transition: background-color 0.2s linear;
}

.cursor-ring {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--cursor-ring-color);
  border-radius: 50%;
  transition: width 0.18s ease, height 0.18s ease, border-color 0.2s linear;
}

.cursor-ring.hover {
  width: 40px;
  height: 40px;
  border-color: var(--cursor-ring-hover-color);
}

.cursor-dot.hover {
  transform: translate(-50%, -50%) scale(0.9);
}

/* header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 24px 7%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 2px;
}

.logo-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(225, 244, 243, 0.35);
}

.nav-pill {
  display: flex;
  gap: 8px;
  padding: 8px 8px 24px;
  border: 1px solid var(--nav-border);
  border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: visible;
}

.nav-link {
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--nav-link-color);
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--nav-link-active-color);
  background: var(--nav-link-active-bg);
}

.nav-nyan {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 38px;
  height: 22px;
  transform: translate3d(0, 0, 0);
  transition: transform 0.56s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(2, 6, 23, 0.35));
  will-change: transform;
}

.nav-nyan img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.nav-rainbow-track {
  position: absolute;
  left: 22px;
  bottom: 11px;
  height: 4px;
  width: var(--nav-rainbow-width);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #ff0033 0%,
    #ff7a00 18%,
    #fff000 36%,
    #21d53a 54%,
    #29a8ff 72%,
    #7d3cff 100%
  );
  box-shadow: 0 0 10px rgba(125, 60, 255, 0.35);
  transition: width 0.56s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 1;
}

/* hero */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0 7%;
  position: relative;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  position: relative;
  z-index: 2;
  transform: translateY(-48px);
}

.hero-label {
  color: var(--hero-label-color);
  font-size: 0.95rem;
  letter-spacing: 3px;
  margin-bottom: 14px;
}

.section-label {
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 3px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.05;
  margin-bottom: 20px;
  font-weight: 800;
  color: var(--hero-heading-color);
}

.hero h1 span {
  color: var(--accent);
  text-shadow: 0 0 20px var(--glow);
}

.hero-subtitle {
  color: var(--hero-subtitle-color);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  max-width: none;
  white-space: nowrap;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1117;
  box-shadow: 0 12px 26px var(--glow);
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: -140%;
  left: -70%;
  width: 44%;
  height: 380%;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 35%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(255, 255, 255, 0.25) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-180%) rotate(14deg);
  animation: button-shine 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.btn-primary > * {
  position: relative;
  z-index: 2;
}

@keyframes button-shine {
  0%,
  62% {
    transform: translateX(-180%) rotate(14deg);
    opacity: 0;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateX(420%) rotate(14deg);
    opacity: 0;
  }
}

.btn-secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.hero-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--hero-glow-blur));
  opacity: var(--hero-glow-opacity);
  z-index: 1;
  transition: opacity 0.2s linear, filter 0.2s linear;
}

.glow-1 {
  width: 320px;
  height: 320px;
  background: rgba(225, 244, 243, 0.11);
  top: 14%;
  left: 8%;
}

.glow-2 {
  width: 280px;
  height: 280px;
  background: rgba(225, 244, 243, 0.08);
  right: 10%;
  bottom: 12%;
}

/* section themes */
.dark-section {
  background:
    radial-gradient(circle at top left, rgba(225, 244, 243, 0.06), transparent 28%),
    linear-gradient(to bottom, #06080c, #0b1117);
  color: #f8fbfb;
}

.light-section {
  background: transparent;
  color: var(--page-text);
}

/* Let hero follow global scroll background */
.hero.dark-section {
  background: transparent;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: repeating-linear-gradient(
    to right,
    rgba(225, 244, 243, var(--hero-line-opacity)) 0px,
    rgba(225, 244, 243, var(--hero-line-opacity)) 1px,
    transparent 1px,
    transparent 124px
  );
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 92%);
}

.hero-line-pulses {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-line-pulse {
  position: absolute;
  top: -8%;
  bottom: -8%;
  width: 2px;
  opacity: 0;
  background: linear-gradient(
    to bottom,
    rgba(225, 244, 243, 0),
    rgba(225, 244, 243, 0.94) 18%,
    rgba(225, 244, 243, 0.9) 56%,
    rgba(225, 244, 243, 0.56) 82%,
    rgba(225, 244, 243, 0)
  );
  filter: blur(0.9px);
  transform: scaleY(0.82);
}

.hero-line-pulse::before,
.hero-line-pulse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 4%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-line-pulse::before {
  width: 18px;
  height: 92%;
  background: linear-gradient(
    to bottom,
    rgba(225, 244, 243, 0),
    rgba(225, 244, 243, 0.54) 24%,
    rgba(225, 244, 243, 0.44) 56%,
    rgba(225, 244, 243, 0.28) 84%,
    rgba(225, 244, 243, 0)
  );
  filter: blur(8px);
  opacity: 0.8;
}

.hero-line-pulse::after {
  width: 34px;
  height: 74%;
  top: 13%;
  background: radial-gradient(
    ellipse at center,
    rgba(225, 244, 243, 0.52) 0%,
    rgba(225, 244, 243, 0.24) 48%,
    rgba(225, 244, 243, 0) 78%
  );
  filter: blur(13px);
  opacity: 0.7;
}

.hero-line-pulse.active {
  animation: hero-line-pulse 4s cubic-bezier(0.2, 0.8, 0.28, 1);
}

@keyframes hero-line-pulse {
  0% {
    opacity: 0;
    transform: scaleY(0.78);
  }
  35% {
    opacity: 0.96;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform: scaleY(1.08);
  }
}

/* About keeps content readable while page background transitions globally */
#about.light-section {
  background: transparent;
}

#projects.light-section,
#skills.light-section {
  background: transparent;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

#contact.dark-section {
  background: transparent;
}

.light-section .section-label {
  color: var(--section-label-color);
}

.light-section .section-title {
  color: var(--section-title-color);
}

.light-section .card,
.light-section .skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.light-section .project-card {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.light-section .about-text p,
.light-section .skill-card p,
.light-section .tool-badge,
.light-section .project-desc,
.light-section .project-tag,
.light-section .contact-links a {
  color: var(--section-body-color);
}

.light-section .tool-badge,
.light-section .project-tag {
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
}

.light-section .tool-badge:hover {
  border-color: rgba(126, 158, 155, 0.32);
  background: rgba(225, 244, 243, 0.65);
}

.light-section .project-link.secondary {
  border-color: var(--chip-border);
  color: var(--section-title-color);
  background: var(--chip-bg);
}

/* sections */
.section {
  padding: 100px 7%;
}

#about.section {
  padding-bottom: 44px;
}

#skills.section {
  padding-top: 44px;
  padding-bottom: 24px;
}

#projects.section {
  padding-top: 24px;
  padding-bottom: 28px;
}

#contact.section {
  padding-top: 28px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 34px;
}

.card,
.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.project-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

/* about */
.about-grid {
  display: grid;
  grid-template-columns: 0.38fr 1.62fr;
  gap: 24px;
  align-items: start;
}

.about-text {
  padding: 0;
  padding-left: 10px;
  width: 100%;
  justify-self: stretch;
}

.about-text p {
  color: var(--section-body-color);
  font-family: "Inter", Arial, sans-serif;
  font-size: 1.06rem;
  font-weight: 500;
  line-height: 1.8;
  margin-bottom: 8px;
  max-width: none;
}

.about-image {
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  max-width: 235px;
  aspect-ratio: 1 / 1;
  justify-self: start;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(185px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.about-meta-card {
  border-radius: 16px;
  padding: 16px;
  min-height: 170px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.about-meta-icon {
  font-size: 1.28rem;
  color: var(--section-label-color);
  margin-bottom: 10px;
}

.about-meta-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--section-title-color);
}

.about-meta-card p {
  margin: 0;
  color: var(--section-body-color);
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.6;
}

.about-meta-card:hover {
  transform: translate(-4px, -4px);
  border-color: rgba(137, 188, 184, 0.92);
  background: #e1f4f3;
  box-shadow: 5px 5px 0 #4a908b;
}

.about-meta-card:hover .about-meta-icon,
.about-meta-card:hover h3,
.about-meta-card:hover p {
  color: #111827;
}

/* projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 28px;
}

.project-header {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.project-header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 16px;
  min-width: 0;
}

.project-image-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 340px;
  border-radius: 18px;
  border: 1px solid rgba(225, 244, 243, 0.14);
  background: rgba(8, 12, 18, 0.92);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  transition: border-color 0.3s ease, box-shadow 0.35s ease;
}

.project-card:hover .project-image-wrap {
  border-color: rgba(225, 244, 243, 0.28);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(225, 244, 243, 0.06);
}

.project-media-inner {
  position: absolute;
  inset: 0;
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}

.project-card:hover .project-media-inner {
  transform: scale(1.075);
}

.project-media-video,
.project-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.project-media-video {
  background: #0a0f16;
  pointer-events: none;
}

.project-title {
  font-size: clamp(1.1rem, 1.6vw, 1.42rem);
  font-weight: 700;
  color: #e1f4f3;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.project-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  overflow-wrap: break-word;
}

.project-title a:hover {
  color: #9fd9d4;
}

.project-year {
  color: var(--accent);
  font-size: 0.92rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.project-desc {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  min-width: 0;
  overflow-wrap: break-word;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.project-tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.project-tag:hover,
.project-tag:active {
  border-color: rgba(137, 188, 184, 0.92);
  background: #e1f4f3;
  color: #0b1117;
  box-shadow: 0 8px 18px rgba(73, 128, 123, 0.22);
}

.project-arrow-link {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(225, 244, 243, 0.28);
  background: rgba(225, 244, 243, 0.08);
  color: #e1f4f3;
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-arrow-link:hover {
  transform: translateY(-2px);
  border-color: rgba(137, 188, 184, 0.92);
  background: #e1f4f3;
  color: #0b1117;
  box-shadow: 0 10px 24px rgba(73, 128, 123, 0.34);
}

.project-arrow-link:active,
.project-arrow-link:focus-visible {
  border-color: rgba(137, 188, 184, 0.92);
  background: #e1f4f3;
  color: #0b1117;
  box-shadow: 0 8px 18px rgba(73, 128, 123, 0.3);
}

/* skills */
.tech-marquee {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}

.tech-row {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(69, 146, 175, 0.28);
  background: transparent;
  box-shadow: none;
}

.tech-row::before,
.tech-row::after {
  content: "";
  position: absolute;
  top: 0;
  width: 64px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.tech-row::before {
  left: 0;
  background: linear-gradient(to right, rgba(6, 8, 12, 0.98), rgba(6, 8, 12, 0));
}

.tech-row::after {
  right: 0;
  background: linear-gradient(to left, rgba(6, 8, 12, 0.98), rgba(6, 8, 12, 0));
}

.tech-track {
  display: flex;
  width: max-content;
}

.tech-segment {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px 30px;
}

.tech-row-left .tech-track {
  animation: marquee-right 20s linear infinite;
}

.tech-row-right .tech-track {
  animation: marquee-left 20s linear infinite;
}

.tech-row:hover .tech-track {
  animation-play-state: paused;
}

.tech-logo-card {
  width: 112px;
  height: 70px;
  border-radius: 16px;
  background: rgba(69, 146, 175, 0.1);
  border: 1px solid rgba(69, 146, 175, 0.28);
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.tech-logo-card:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: rgba(69, 146, 175, 0.62);
  background: rgba(69, 146, 175, 0.2);
}

.tech-logo-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.42));
}

@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

/* contact */
.contact-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.05), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.05), transparent 35%),
    linear-gradient(180deg, #03060d, #07101a);
  min-height: 280px;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.3);
}

.contact-curves {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.contact-curves svg {
  width: 100%;
  height: 100%;
}

.curve {
  fill: none;
  stroke: rgba(255, 255, 255, 0.055);
  stroke-width: 1;
}

.curve.glow {
  stroke: rgba(255, 255, 255, 0.025);
  stroke-width: 2.2;
  filter: blur(2px);
}

.contact-inner {
  position: relative;
  z-index: 2;
  padding: 34px 12px 20px 32px;
  width: 100%;
  max-width: none;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: stretch;
}

.contact-main {
  min-width: 0;
}

.contact-side {
  border-left: 1px solid rgba(214, 223, 222, 0.22);
  padding-left: 32px;
  padding-right: 2px;
  padding-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px 0px;
  align-content: start;
  justify-items: start;
  justify-content: start;
  margin-left: 0;
}

.contact-side-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 150px;
}

.contact-side-col:first-child {
  width: 100px;
}

.contact-side-col h4 {
  margin: 0 0 6px;
  color: #d7e0e6;
  font-size: 0.98rem;
  line-height: 1.25;
  font-weight: 700;
}

.contact-side-col a {
  color: #9baab3;
  font-size: 0.78rem;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.22s ease;
}

.contact-side-col a:hover {
  color: #ffffff;
}

.contact-heading {
  font-size: clamp(1.1rem, 2.25vw, 2rem);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 22px;
  color: #f8fafc;
}

.contact-heading span {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 8px;
}

.contact-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  padding: 16px 24px;
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0b1117;
  background: rgba(225, 244, 243, 0.92);
  border: 1px solid rgba(225, 244, 243, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.contact-cta::before {
  content: "";
  position: absolute;
  top: -140%;
  left: -70%;
  width: 44%;
  height: 380%;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 35%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(255, 255, 255, 0.25) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-180%) rotate(14deg);
  animation: button-shine 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.contact-cta > * {
  position: relative;
  z-index: 2;
}

.contact-mail-icon {
  font-size: 0.95rem;
  opacity: 0.9;
}

.contact-cta:hover {
  transform: translateY(-2px);
  background: #ffffff;
}

.contact-links {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  justify-content: space-between;
  width: min(380px, 100%);
  margin-left: auto;
  text-align: right;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d6dfde;
  font-weight: 700;
  transition: color 0.25s ease;
}

.contact-links a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.contact-links a:hover {
  color: var(--accent);
}

.contact-copyright {
  position: absolute;
  right: 10px;
  bottom: 6px;
  margin: 0;
  font-size: 0.78rem;
  color: rgba(183, 196, 203, 0.82);
  letter-spacing: 0.02em;
  z-index: 2;
}

.contact-curves {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.contact-curves svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.curve {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.curve.glow {
  fill: none;
  stroke: rgba(255, 255, 255, 0.028);
  stroke-width: 2.4;
  filter: blur(2px);
}

.star-svg {
  rx: 999;
  ry: 999;
  opacity: 0.95;
}

.contact-inner {
  position: relative;
  z-index: 2;
  padding: 34px 12px 20px 32px;
  width: 100%;
  max-width: none;
}
/* scroll top */
#scrollTopBtn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border: 1.5px solid #111827;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1117;
  font-size: 1.3rem;
  display: none;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

#scrollTopBtn:hover {
  transform: translateY(-3px);
}

/* reveal */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  will-change: opacity, transform;
}

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

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }

/* responsive */
@media (max-width: 1100px) {
  .project-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-meta-grid {
    grid-template-columns: 1fr;
  }

  .tech-segment {
    gap: 14px;
    padding: 18px 20px;
  }

  .tech-logo-card {
    width: 94px;
    height: 60px;
  }

  .tech-logo-card img {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 820px) {
  * {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  .header {
    padding: 18px 5%;
    flex-direction: column;
    gap: 14px;
  }

  .nav-pill {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-nyan {
    display: none;
  }

  .nav-rainbow-track {
    display: none;
  }

  .section,
  .hero {
    padding-left: 5%;
    padding-right: 5%;
  }

  .hero-subtitle {
    white-space: normal;
  }

  .hero-content {
    transform: translateY(-28px);
  }

  .contact-inner {
    position: relative;
    z-index: 2;
    padding: 34px 24px 34px;
    width: 100%;
    max-width: none;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .contact-side {
    border-left: 0;
    border-top: 1px solid rgba(214, 223, 222, 0.22);
    padding-left: 0;
    padding-top: 18px;
  }

  .contact-copyright {
    position: static;
    margin-top: 8px;
    font-size: 0.68rem;
  }

  .contact-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .contact-links {
    margin-left: 0;
  }

  .contact-cta {
    font-size: 1rem;
    word-break: break-all;
  }
}

@media (max-width: 560px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-header-top {
    align-items: flex-start;
  }

  .project-year {
    padding-top: 2px;
  }

  .project-tags {
    gap: 6px;
  }

  .project-tag {
    font-size: 0.78rem;
    padding: 5px 9px;
  }

  .project-image-wrap {
    height: 280px;
  }

  .project-links,
  .hero-actions,
  .contact-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    align-items: center;
  }
}