:root {
  --bg: #07122f;
  --panel: rgba(10, 20, 54, 0.72);
  --panel-soft: rgba(12, 24, 62, 0.54);
  --line: rgba(123, 164, 255, 0.18);
  --text: #f2f7ff;
  --muted: #a7b8e9;
  --cyan: #59e3ff;
  --blue: #5d8dff;
  --violet: #c769ff;
  --green: #4dff9d;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  background: url("/assets/backgrounds/mole-cosmic-bg.png") center center / cover no-repeat;
  overflow-x: hidden;
}

body::before {
  content: none;
  pointer-events: none;
}

.page-shell {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0 36px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 18px;
  padding: 0 8px;
}

.status-capsule {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border-radius: 999px;
  background: rgba(9, 19, 52, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.status-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.status-capsule strong {
  display: block;
  color: #f8fbff;
}

.status-divider {
  width: 1px;
  height: 38px;
  background: rgba(145, 175, 255, 0.18);
}

.page-main {
  margin-top: 6px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr);
  min-height: 430px;
  padding: 10px 36px 16px;
  border-radius: 28px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: start;
  max-width: 480px;
  padding-left: 0;
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.hero-kicker {
  margin: 0;
  color: #8fd8ff;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 700;
}

.hero-copy h1 {
  margin: 4px 0 0;
  font-size: clamp(5.4rem, 12vw, 7.6rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #62e6ff 0%, #6aa0ff 52%, #d56dff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-line {
  width: 110px;
  height: 4px;
  margin: 18px 0 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #60e2ff, #bc75ff);
  box-shadow: 0 0 20px rgba(86, 198, 255, 0.5);
}

.hero-description {
  margin: 0;
  color: #d3ddff;
  font-size: 1.55rem;
}

.projects-section {
  margin-top: -46px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 14px;
  padding: 0 8px;
}

.section-head.compact {
  padding: 0;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  color: #97daff;
  font-size: 0.96rem;
  letter-spacing: 0.08em;
}

.section-head h2 {
  margin: 8px 0 0;
  font-size: 2rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  position: relative;
  min-height: 320px;
  padding: 0;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(145, 183, 255, 0.22);
  background: linear-gradient(180deg, rgba(16, 28, 70, 0.78), rgba(10, 20, 52, 0.62));
  --card-glow: rgba(108, 92, 255, 0.18);
  --card-body-accent: rgba(122, 92, 255, 0.18);
  --card-body-top: rgba(20, 35, 94, 0.38);
  --card-body-mid: rgba(18, 28, 80, 0.74);
  --card-body-bottom: rgba(10, 18, 56, 0.92);
  --card-link-top: rgba(31, 52, 132, 0.42);
  --card-link-bottom: rgba(21, 33, 88, 0.3);
  --card-link-border: rgba(138, 176, 255, 0.24);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(138, 180, 255, 0.08) inset,
    0 0 28px var(--card-glow);
  backdrop-filter: blur(18px);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(103, 228, 255, 0.34), rgba(124, 120, 255, 0.18), rgba(214, 103, 255, 0.34));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.8;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(156, 203, 255, 0.34);
  box-shadow:
    0 34px 78px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(145, 189, 255, 0.12) inset,
    0 0 42px var(--card-glow);
}

.project-cover {
  position: relative;
  min-height: 180px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.project-cover::after {
  content: "";
  position: absolute;
  inset: auto -35% -35% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(18px);
}

.project-cover.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 10, 28, 0.02), rgba(7, 10, 28, 0.08) 52%, rgba(7, 10, 28, 0.22) 72%, rgba(7, 10, 28, 0.46) 100%);
}

.project-card[data-theme="purple"] .project-cover {
  background: linear-gradient(135deg, #2b144f, #6d2db2 58%, #a444ff);
}

.project-card[data-theme="blue"] .project-cover {
  background: linear-gradient(135deg, #10214d, #1944a5 58%, #2e7cff);
}

.project-card[data-theme="green"] .project-cover {
  background: linear-gradient(135deg, #123f30, #1f7a49 58%, #67d96c);
}

.project-card[data-theme="orange"] .project-cover {
  background: linear-gradient(135deg, #4a1c19, #ab512d 58%, #ff9d3f);
}

.project-card[data-theme="indigo"] .project-cover {
  background: linear-gradient(135deg, #1a1d4f, #3348af 58%, #687dff);
}

.project-card[data-theme="purple"] {
  --card-glow: rgba(169, 96, 255, 0.24);
  --card-body-accent: rgba(196, 108, 255, 0.2);
  --card-body-top: rgba(72, 30, 110, 0.34);
  --card-body-mid: rgba(46, 22, 88, 0.78);
  --card-body-bottom: rgba(22, 12, 52, 0.94);
  --card-link-top: rgba(84, 38, 138, 0.42);
  --card-link-bottom: rgba(46, 22, 88, 0.32);
  --card-link-border: rgba(182, 122, 255, 0.24);
}

.project-card[data-theme="blue"] {
  --card-glow: rgba(88, 160, 255, 0.24);
  --card-body-accent: rgba(92, 182, 255, 0.18);
  --card-body-top: rgba(32, 74, 146, 0.32);
  --card-body-mid: rgba(23, 52, 110, 0.78);
  --card-body-bottom: rgba(10, 26, 74, 0.94);
  --card-link-top: rgba(34, 78, 156, 0.42);
  --card-link-bottom: rgba(18, 43, 98, 0.32);
  --card-link-border: rgba(116, 176, 255, 0.24);
}

.project-card[data-theme="green"] {
  --card-glow: rgba(108, 224, 136, 0.22);
  --card-body-accent: rgba(132, 244, 166, 0.16);
  --card-body-top: rgba(34, 104, 82, 0.28);
  --card-body-mid: rgba(20, 78, 58, 0.76);
  --card-body-bottom: rgba(10, 48, 38, 0.94);
  --card-link-top: rgba(32, 106, 82, 0.4);
  --card-link-bottom: rgba(16, 62, 48, 0.3);
  --card-link-border: rgba(120, 222, 168, 0.22);
}

.project-card[data-theme="orange"] {
  --card-glow: rgba(255, 170, 98, 0.22);
  --card-body-accent: rgba(255, 184, 110, 0.18);
  --card-body-top: rgba(118, 64, 30, 0.3);
  --card-body-mid: rgba(88, 44, 22, 0.78);
  --card-body-bottom: rgba(50, 24, 12, 0.94);
  --card-link-top: rgba(128, 68, 34, 0.42);
  --card-link-bottom: rgba(76, 37, 18, 0.32);
  --card-link-border: rgba(255, 184, 118, 0.24);
}

.project-card[data-theme="indigo"] {
  --card-glow: rgba(126, 136, 255, 0.22);
  --card-body-accent: rgba(140, 132, 255, 0.18);
  --card-body-top: rgba(52, 66, 140, 0.3);
  --card-body-mid: rgba(36, 44, 106, 0.78);
  --card-body-bottom: rgba(20, 24, 70, 0.94);
  --card-link-top: rgba(54, 70, 150, 0.4);
  --card-link-bottom: rgba(28, 36, 94, 0.3);
  --card-link-border: rgba(142, 154, 255, 0.22);
}

.project-badge,
.project-status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(6, 13, 34, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.project-cover-top {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.project-cover-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.24));
}

.project-cover-logo.is-gobang-logo {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 18px;
}

.project-cover-logo.is-typing-logo {
  width: 124px;
  height: auto;
  max-height: 82px;
  object-fit: contain;
}

.project-cover-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 76px;
  padding: 0 14px;
  border-radius: 18px;
  background: rgba(11, 20, 48, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eaf2ff;
  font-weight: 700;
  letter-spacing: 0.08em;
  backdrop-filter: blur(10px);
}

.project-body {
  position: relative;
  margin-top: -28px;
  padding: 38px 18px 18px;
  display: grid;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(20, 34, 84, 0.05) 18%, rgba(16, 28, 72, 0.18) 42%, rgba(11, 20, 52, 0.46) 74%, rgba(9, 17, 44, 0.68) 100%);
  backdrop-filter: blur(10px) saturate(118%);
}

.project-body::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0 0 30px 30px;
  background:
    radial-gradient(circle at 88% 22%, rgba(255, 255, 255, 0.05), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008) 20%, rgba(255, 255, 255, 0) 40%);
  pointer-events: none;
}

.project-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.08;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
}

.project-meta,
.workspace-card p,
.capability-item p,
.timeline-item p,
.roadmap-item p {
  color: var(--muted);
  line-height: 1.6;
}

.project-footer {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
}

.project-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  width: 100%;
  padding: 0 14px;
  max-width: 100%;
  border-radius: 18px;
  color: #dbe8ff;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, rgba(32, 52, 124, 0.18), rgba(15, 25, 68, 0.16));
  border: 1px solid rgba(170, 204, 255, 0.2);
  font-size: 0.84rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 10px 28px rgba(8, 12, 32, 0.18);
  overflow: hidden;
  backdrop-filter: blur(14px) saturate(135%);
}

.project-link:hover {
  border-color: rgba(188, 224, 255, 0.28);
  transform: translateY(-1px);
}

.project-link.is-disabled {
  opacity: 0.72;
  pointer-events: none;
}

.project-link-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(10, 18, 48, 0.28);
  border: 1px solid rgba(180, 214, 255, 0.16);
  color: #98ddff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  backdrop-filter: blur(10px);
}

.project-link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 500;
}

.project-link-arrow {
  color: #b9c9ff;
  font-size: 1rem;
  line-height: 1;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--text);
  background: rgba(8, 18, 49, 0.92);
  border: 1px solid rgba(130, 167, 255, 0.25);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media (max-width: 1400px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .topbar,
  .hero {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100%, calc(100% - 20px));
  }

  .hero {
    padding: 8px 18px 12px;
    min-height: auto;
  }

  .hero-copy {
    padding-left: 0;
    padding-right: 0;
    border-radius: 0;
    background: transparent;
  }

  .hero-copy h1 {
    font-size: 4.4rem;
  }

  .hero-description {
    font-size: 1.1rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .status-capsule {
    width: 100%;
    justify-content: space-between;
  }

  .project-cover-logo.is-typing-logo {
    width: 112px;
  }
}
