@font-face {
  font-family: "Gamer";
  src: url("assets/fonts/Gamer.ttf") format("truetype");
}

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

body {
  position: relative;

  background:
    radial-gradient(
      circle at top,
      rgba(61,217,197,0.10),
      transparent 36%
    ),
    #07070b;

  color: white;

  overflow-x: hidden;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    sans-serif;

  padding: 24px;
}

/* =========================
   FLOATING PARTICLES
========================= */

body::before,
body::after {
  content: "";

  position: fixed;

  inset: 0;

  pointer-events: none;

  z-index: 0;
}

/* 小粒 */
body::before {

  width: 3px;
  height: 3px;

  border-radius: 50%;

  background: rgba(116,198,186,0.95);

  box-shadow:
    2vw 102vh 0 rgba(116,198,186,0.16),
    7vw 74vh 0 rgba(116,198,186,0.72),
    11vw 91vh 0 rgba(220,255,250,0.28),
    16vw 58vh 0 rgba(116,198,186,0.48),
    21vw 112vh 0 rgba(116,198,186,0.10),
    27vw 79vh 0 rgba(220,255,250,0.62),
    33vw 95vh 0 rgba(116,198,186,0.20),
    39vw 66vh 0 rgba(116,198,186,0.84),
    44vw 104vh 0 rgba(220,255,250,0.16),
    51vw 83vh 0 rgba(116,198,186,0.38),
    57vw 119vh 0 rgba(220,255,250,0.12),
    63vw 71vh 0 rgba(116,198,186,0.56),
    68vw 97vh 0 rgba(220,255,250,0.20),
    74vw 61vh 0 rgba(116,198,186,0.78),
    81vw 108vh 0 rgba(116,198,186,0.24),
    87vw 88vh 0 rgba(220,255,250,0.36),
    93vw 117vh 0 rgba(116,198,186,0.14),

    5vw 138vh 0 rgba(116,198,186,0.42),
    14vw 148vh 0 rgba(220,255,250,0.22),
    29vw 131vh 0 rgba(116,198,186,0.68),
    46vw 142vh 0 rgba(220,255,250,0.12),
    61vw 152vh 0 rgba(116,198,186,0.34),
    78vw 137vh 0 rgba(220,255,250,0.44);

  filter: blur(2px);

  opacity: 0.9;

  animation: particleRiseA 18s linear infinite;
}

/* 大粒ぼけ */
body::after {

  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: rgba(116,198,186,0.24);

  box-shadow:
    8vw 126vh 0 4px rgba(116,198,186,0.12),
    19vw 82vh 0 8px rgba(116,198,186,0.22),
    31vw 141vh 0 3px rgba(220,255,250,0.14),
    43vw 97vh 0 10px rgba(116,198,186,0.08),
    57vw 118vh 0 5px rgba(220,255,250,0.18),
    71vw 76vh 0 8px rgba(116,198,186,0.10),
    84vw 133vh 0 4px rgba(220,255,250,0.12);

  filter: blur(12px);

  opacity: 0.65;

  animation: particleRiseB 29s linear infinite;
}

@keyframes particleRiseA {

  from {
    transform:
      translate3d(0, 0, 0);
  }

  to {
    transform:
      translate3d(-18px, -180vh, 0);
  }
}

@keyframes particleRiseB {

  from {
    transform:
      translate3d(0, 0, 0);
  }

  to {
    transform:
      translate3d(24px, -220vh, 0);
  }
}

/* =========================
   MAIN
========================= */

main {
  position: relative;

  z-index: 2;

  display: grid;

  grid-template-columns: 1fr;

  gap: 18px;

  max-width: 1180px;

  margin: 0 auto 80px;
}

.clickable-card {
  cursor: pointer;
}

/* =========================
   HERO
========================= */

.hero-card {
  position: relative;

  z-index: 2;

  display: grid;

  grid-template-columns: auto 1fr auto;

  align-items: center;

  gap: 22px;

  max-width: 1180px;

  min-height: 104px;

  margin: 48px auto 24px;

  padding: 22px 26px;

  border-radius: 28px;

  border: 1px solid rgba(255,255,255,0.10);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.08),
      rgba(255,255,255,0.03)
    );

  backdrop-filter: blur(10px);

  box-shadow:
    0 20px 60px rgba(0,0,0,0.30);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.hero-card:hover,
.hero-card.is-tapped {

  transform: translateY(-4px);

  border-color: rgba(116,198,186,0.45);

  background:
    linear-gradient(
      180deg,
      rgba(116,198,186,0.10),
      rgba(255,255,255,0.03)
    );

  box-shadow:
    0 24px 72px rgba(0,0,0,0.34),
    0 0 28px rgba(116,198,186,0.08);
}

.hero-logo {
  width: 44px;
  height: 44px;

  object-fit: contain;

  animation: logoSpinElastic 24s linear infinite;

  transform-origin: center center;

  will-change: transform;
}

.hero-tagline {
  color: #d9fff9;

  font-size: 14px;

  letter-spacing: 0.18em;

  text-transform: uppercase;
}

/* =========================
   CARD
========================= */

.project-card {
  position: relative;

  overflow: hidden;

  min-height: 245px;

  padding: 22px;

  border-radius: 24px;

  border: 1px solid rgba(255,255,255,0.10);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.07),
      rgba(255,255,255,0.025)
    );

  backdrop-filter: blur(10px);

  box-shadow:
    0 20px 60px rgba(0,0,0,0.28);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.project-card:hover,
.project-card.is-tapped {

  transform: translateY(-6px);

  border-color: rgba(116,198,186,0.45);

  background:
    linear-gradient(
      180deg,
      rgba(116,198,186,0.10),
      rgba(255,255,255,0.03)
    );

  box-shadow:
    0 24px 72px rgba(0,0,0,0.34),
    0 0 28px rgba(116,198,186,0.08);
}

.project-card::after {
  content: "";

  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      90deg,
      rgba(7,7,11,0.98) 0%,
      rgba(7,7,11,0.82) 42%,
      rgba(7,7,11,0.02) 100%
    );

  z-index: 1;
}

.card-content {
  position: relative;

  z-index: 2;

  width: 58%;

  display: flex;

  flex-direction: column;

  height: 100%;
}

/* =========================
   TITLES
========================= */

.project-card h2 {

  font-family: "Gamer", sans-serif;

  font-size: 64px;

  line-height: 0.9;

  margin-bottom: 18px;

  color: white;
}

.project-card p {

  color: #c0c0cf;

  font-size: 14px;

  line-height: 1.55;

  margin-bottom: 18px;

  max-width: 250px;
}

/* =========================
   BUTTON AREA
========================= */

.link-group {

  display: flex;

  align-items: center;

  gap: 10px;

  margin-top: auto;
}

/* =========================
   BUTTON
========================= */

.icon-btn {

  display: flex;

  align-items: center;

  justify-content: center;

  width: 52px;

  height: 42px;

  border-radius: 12px;

  border: 1px solid rgba(180,255,244,0.18);

  background:
    linear-gradient(
      180deg,
      rgba(116,198,186,0.18) 0%,
      rgba(116,198,186,0.42) 45%,
      rgba(116,198,186,0.82) 100%
    );

  backdrop-filter: blur(6px);

  box-shadow:
    0 10px 24px rgba(0,0,0,0.20);

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;

  text-decoration: none;
}

.icon-btn:hover {

  transform: translateY(-2px);

  background:
    linear-gradient(
      180deg,
      rgba(116,198,186,0.28) 0%,
      rgba(116,198,186,0.58) 45%,
      rgba(116,198,186,0.96) 100%
    );

  box-shadow:
    0 12px 28px rgba(0,0,0,0.26),
    0 0 18px rgba(116,198,186,0.18);
}

.icon-btn img {

  width: 60px;

  height: 60px;

  object-fit: contain;

  display: block;
}

/* =========================
   HERO BUTTON
========================= */

.hero-x-btn {
  width: 48px;
  height: 42px;
}

.hero-x-btn img {
  width: 60px;
  height: 60px;
}

/* =========================
   IMAGES
========================= */

.card-image {

  position: absolute;

  right: 18px;

  bottom: 0;

  width: 240px;

  max-width: 65%;

  opacity: 0.28;

  object-fit: contain;

  pointer-events: none;

  z-index: 0;

  transform-origin: bottom center;

  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}

.project-card:hover .card-image,
.project-card.is-tapped .card-image {

  opacity: 1;

  transform: scale(1.12);
}

/* =========================
   LOGO ANIMATION
========================= */

@keyframes logoSpinElastic {

  0%, 26% {

    transform:
      rotateY(0deg)
      scaleX(1);
  }

  27% {

    transform:
      rotateY(240deg)
      scaleX(1.28);
  }

  28% {

    transform:
      rotateY(520deg)
      scaleX(1.42);
  }

  29% {

    transform:
      rotateY(820deg)
      scaleX(1.22);
  }

  30% {

    transform:
      rotateY(1080deg)
      scaleX(0.82);
  }

  31% {

    transform:
      rotateY(1080deg)
      scaleX(1.12);
  }

  32% {

    transform:
      rotateY(1080deg)
      scaleX(0.96);
  }

  33% {

    transform:
      rotateY(1080deg)
      scaleX(1);
  }

  62% {

    transform:
      rotateY(1080deg)
      scaleX(1);
  }

  63% {

    transform:
      rotateY(1320deg)
      scaleX(1.26);
  }

  64% {

    transform:
      rotateY(1600deg)
      scaleX(0.84);
  }

  65% {

    transform:
      rotateY(1800deg)
      scaleX(1.08);
  }

  66% {

    transform:
      rotateY(1800deg)
      scaleX(1);
  }

  100% {

    transform:
      rotateY(1800deg)
      scaleX(1);
  }
}

/* =========================
   RESPONSIVE
========================= */

@media (min-width: 768px) {

  main {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {

  main {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {

  body {
    padding: 14px 18px 18px;
  }

  .hero-card {

    gap: 14px;

    padding: 18px;

    margin: 22px auto 18px;
  }

  .hero-logo {
    width: 40px;
    height: 40px;
  }

  .hero-tagline {

    font-size: 10px;

    letter-spacing: 0.1em;
  }

  .project-card {
    min-height: 220px;
  }

  .project-card h2 {
    font-size: 52px;
  }

  .project-card p {
    font-size: 13px;
  }

  .card-content {
    width: 60%;
  }

  .card-image {

    width: 215px;

    right: 12px;

    opacity: 0.42;
  }

  .project-card.is-tapped .card-image {

    opacity: 1;

    transform: scale(1.10);
  }
}