:root {
  --bg: #12070b;
  --text: #fff4dd;
  --muted: #d7b994;
  --red: #e83d3d;
  --deep-red: #8e1721;
  --gold: #ffc75a;
  --blue: #4ca3ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  --radius: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(232, 61, 61, 0.32), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(255, 199, 90, 0.22), transparent 26%),
    linear-gradient(135deg, #13070a 0%, #23080f 45%, #091d15 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.12;
  background-image: repeating-radial-gradient(circle at 0 0, #fff 0 1px, transparent 1px 5px);
  mix-blend-mode: overlay;
}

.table-glow {
  position: fixed;
  width: 760px;
  height: 760px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(31, 133, 86, 0.35), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 7vw;
  background: rgba(18, 7, 11, 0.72);
  border-bottom: 1px solid rgba(255, 199, 90, 0.22);
  backdrop-filter: blur(14px);
}

.logo,
nav a,
.project-card a,
.contact-row a,
.back-link {
  text-decoration: none;
}

.logo {
  color: var(--text);
  font-family: "Space Mono", monospace;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo span,
h1 span,
h2 span {
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--deep-red), 0 0 35px rgba(255, 199, 90, 0.35);
}

nav {
  display: flex;
  gap: 26px;
}

nav a {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

nav a:hover {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 199, 90, 0.65);
}

.section {
  position: relative;
  z-index: 2;
  width: min(1120px, 88vw);
  margin: 0 auto;
  padding: 110px 0;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
  padding-top: 140px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 199, 90, 0.38);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.24);
  font-family: "Space Mono", monospace;
  font-size: 13px;
}

h1 {
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1.1;
  letter-spacing: -4px;
  font-weight: 900;
}

.hero-desc {
  max-width: 620px;
  margin: 26px 0 34px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(3, 150px);
  gap: 16px;
  width: max-content;
  align-items: center;
}

.btn {
  width: 150px;
  min-width: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 22px;
  border-radius: 16px;
  font-weight: 900;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 0 rgba(0,0,0,0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 0 14px 0 rgba(0,0,0,0.42);
}

.primary {
  color: var(--text);
  background: linear-gradient(135deg, var(--gold), #fff0a8);
}

.secondary {
  color: var(--text);
  background: linear-gradient(135deg, var(--deep-red), var(--red));
}

.summary-btn {
  color: var(--text);
  background: linear-gradient(135deg, #1d4ed8, #4ca3ff);
}

.contact-btn {
  grid-column: 2;
  color: var(--text);
  background: linear-gradient(135deg, #2bb673, #8ef0b2);
}

.hero-card {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.joker-card,
.floating-card,
.project-card,
.about-card,
.panel {
  border: 3px solid rgba(255, 244, 221, 0.18);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255,255,255,0.05);
}

.main-card {
  position: relative;
  width: min(360px, 78vw);
  aspect-ratio: 0.68;
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(232,61,61,0.18), transparent 42%),
    linear-gradient(145deg, #fff6dd, #d9bd8b);
  color: #1a0d0d;
  transform: rotate(5deg);
  animation: float 5s ease-in-out infinite;
}

.corner {
  position: absolute;
  font-family: "Space Mono", monospace;
  font-weight: 900;
  font-size: 34px;
  color: var(--deep-red);
}

.corner.top {
  top: 22px;
  left: 24px;
}

.corner.bottom {
  bottom: 22px;
  right: 24px;
  transform: rotate(180deg);
}

.card-center {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 15px;
  text-align: center;
}

.chip-img {
  width: 185px;
  height: 185px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 12px solid #211010;
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.25);
}

.card-center h2 {
  font-size: 34px;
  letter-spacing: -1px;
}

.card-center p {
  font-family: "Space Mono", monospace;
  color: var(--deep-red);
  font-weight: 700;
}

.floating-card {
  position: absolute;
  width: 90px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fff0ce;
  color: #1d1010;
  font-family: "Space Mono", monospace;
  font-size: 28px;
  font-weight: 900;
}

.floating-card.red {
  top: 65px;
  left: 10px;
  color: var(--red);
  transform: rotate(-17deg);
}

.floating-card.blue {
  right: 0;
  top: 125px;
  color: #a86d00;
  transform: rotate(16deg);
}

.floating-card.gold {
  left: 20px;
  bottom: 45px;
  color: var(--blue);
  transform: rotate(14deg);
}

.panel {
  padding: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,244,221,0.1), rgba(232,61,61,0.08));
  backdrop-filter: blur(12px);
  margin-bottom: 40px;
}

.section-title {
  display: flex;
  align-items: end;
  gap: 18px;
  margin-bottom: 28px;
}

.section-title p {
  font-family: "Space Mono", monospace;
  color: var(--gold);
  font-size: 18px;
  font-weight: 700;
}

.section-title h2 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -2px;
}

.panel > p,
.contact > p,
.detail-content p,
.detail-content li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.glow-panel {
  transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.glow-panel:hover {
  border-color: rgba(255, 199, 90, 0.65);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 38px rgba(255, 199, 90, 0.24),
    inset 0 0 0 2px rgba(255, 199, 90, 0.08);
  background:
    radial-gradient(circle at top left, rgba(255, 199, 90, 0.14), transparent 35%),
    linear-gradient(135deg, rgba(255,244,221,0.12), rgba(232,61,61,0.09));
}

.glow-panel:hover h2 {
  text-shadow: 4px 4px 0 var(--deep-red), 0 0 30px rgba(255, 199, 90, 0.55);
}

.about-details-panel {
  margin-top: -10px;
}

.about-card-grid,
.project-grid {
  display: grid;
  gap: 18px;
}

.about-card-grid {
  grid-template-columns: repeat(4, 1fr);
}

.about-card {
  padding: 24px;
  border-radius: 20px;
  background: rgba(10, 8, 9, 0.58);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.about-card:hover,
.project-card:hover {
  border-color: rgba(255, 199, 90, 0.62);
  box-shadow: 0 0 26px rgba(255, 199, 90, 0.16), var(--shadow);
  background:
    radial-gradient(circle at top right, rgba(255, 199, 90, 0.14), transparent 36%),
    rgba(19, 13, 14, 0.72);
}

.about-card span {
  display: inline-block;
  margin-bottom: 14px;
  font-family: "Space Mono", monospace;
  color: var(--gold);
  font-weight: 900;
}

.about-card h3 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 20px;
}

.about-card p,
.project-card p {
  color: var(--muted);
  line-height: 1.7;
}

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

.project-card {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: 22px;
  background: rgba(19, 13, 14, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at top right, rgba(255,199,90,0.22), transparent 34%);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.project-card:hover {
  transform: translateY(-8px) rotate(-1deg);
}

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

.project-card.featured1 {
  background:
    radial-gradient(circle at top right, rgba(255, 199, 90, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(78, 52, 24, 0.72), rgba(19, 13, 14, 0.9));
  border-color: rgba(255, 199, 90, 0.42);
}

.project-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-bottom: 34px;
}

.rank {
  font-family: "Space Mono", monospace;
  color: var(--gold);
  font-weight: 900;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  color: #23090f;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.project-card h3 {
  position: relative;
  margin-bottom: 14px;
  font-size: 26px;
}

.project-card a {
  position: relative;
  margin-top: auto;
  color: var(--gold);
  font-weight: 900;
}

.project-card a:hover,
.back-link:hover {
  color: var(--text);
  text-shadow: 0 0 18px rgba(255, 199, 90, 0.65);
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.contact-row a {
  padding: 13px 16px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255, 199, 90, 0.32);
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.contact-row a:hover {
  color: var(--gold);
  background: rgba(255, 199, 90, 0.12);
  border-color: rgba(255, 199, 90, 0.75);
  box-shadow: 0 0 24px rgba(255, 199, 90, 0.28);
}

.detail-page {
  padding-top: 120px;
}

.detail-content {
  max-width: 820px;
}

.detail-content ul {
  margin: 18px 0 0 22px;
}

.back-link {
  display: inline-block;
  margin-top: 28px;
  color: var(--gold);
  font-weight: 900;
}

footer {
  position: relative;
  z-index: 2;
  padding: 42px 20px 48px;
  text-align: center;
  color: var(--muted);
  background:
    radial-gradient(circle at center, rgba(255, 199, 90, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(18, 7, 11, 0.3), rgba(8, 5, 6, 0.85));
  border-top: 1px solid rgba(255, 199, 90, 0.22);
}

footer h3 {
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  text-shadow: 3px 3px 0 var(--deep-red);
  margin-bottom: 12px;
}

footer p {
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 14px;
  line-height: 1.8;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: 0.7s ease;
}

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

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(5deg); }
  50% { transform: translateY(-18px) rotate(2deg); }
}

@media (max-width: 900px) {
  .navbar {
    padding: 18px 5vw;
  }

  nav {
    gap: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    margin: 0 auto;
  }

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

@media (max-width: 620px) {
  nav {
    display: none;
  }

  .section {
    width: min(92vw, 1120px);
    padding: 78px 0;
  }

  h1 {
    letter-spacing: -2px;
  }

  .hero-actions,
  .about-card-grid,
  .project-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .btn,
  .hero-actions .btn {
    width: 100%;
  }

  .contact-btn {
    grid-column: auto;
  }

  .panel {
    padding: 28px;
  }

  .floating-card {
    display: none;
  }
}

.summary-section {
  padding: 38px 46px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.summary-card {
  padding: 24px 28px;
  border-radius: 20px;
  background: rgba(19, 13, 14, 0.58);
  border: 1px solid rgba(255, 199, 90, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.summary-card h3 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 900;
}

.summary-card p,
.summary-card li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.summary-card ul {
  padding-left: 20px;
}

.summary-card li + li {
  margin-top: 6px;
}


.summary-card:hover {
  border-color: rgba(255, 199, 90, 0.65);
  box-shadow:
    0 0 30px rgba(255, 199, 90, 0.22),
    inset 0 0 0 1px rgba(255, 199, 90, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 199, 90, 0.14), transparent 36%),
    rgba(19, 13, 14, 0.72);
}

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

/* bt6 */
.assignment-intro {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 28px;
}

.assignment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.assignment-card,
.principle-section {
  padding: 24px;
  border-radius: 20px;
  background: rgba(19, 13, 14, 0.58);
  border: 1px solid rgba(255, 199, 90, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.assignment-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: 22px;
}

.assignment-card:hover,
.principle-section:hover {
  border-color: rgba(255, 199, 90, 0.65);
  box-shadow: 0 0 28px rgba(255, 199, 90, 0.2);
  background:
    radial-gradient(circle at top right, rgba(255, 199, 90, 0.12), transparent 36%),
    rgba(19, 13, 14, 0.72);
}

.assignment-card h3,
.principle-section h3 {
  color: var(--text);
  font-size: 23px;
  margin-bottom: 14px;
}

.assignment-card p,
.principle-section p,
.principle-section li {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
}

.principle-section {
  margin-top: 24px;
}

.principle-section ul {
  padding-left: 22px;
}

.principle-section li + li {
  margin-top: 8px;
}

.assignment-page {
  padding-top: 120px;
}

.download-section {
  margin-top: 24px;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 13px 18px;
  border-radius: 14px;
  color: #23090f;
  background: linear-gradient(135deg, var(--gold), #fff0a8);
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35);
  transition:
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.download-link:hover {
  box-shadow:
    0 0 24px rgba(255, 199, 90, 0.35),
    0 8px 0 rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, #fff0a8, var(--gold));
}

@media (max-width: 900px) {
  .assignment-grid {
    grid-template-columns: 1fr;
  }
}
/* bt1 */
.step-image {
  margin-top: auto;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 199, 90, 0.22);
  background: rgba(0, 0, 0, 0.28);
}

.step-image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  object-position: center;
  background: rgba(0, 0, 0, 0.35);
}

.step-image figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  border-top: 1px solid rgba(255, 199, 90, 0.16);
}
/* b2 */
.source-grid {
  margin-top: 24px;
  margin-bottom: 24px;
}

.small-card {
  min-height: 260px;
}

.reference-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.reference-card {
  padding: 22px;
  border-radius: 18px;
  background: rgba(19, 13, 14, 0.58);
  border: 1px solid rgba(255, 199, 90, 0.22);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.reference-card:hover {
  border-color: rgba(255, 199, 90, 0.65);
  box-shadow: 0 0 28px rgba(255, 199, 90, 0.2);
  background:
    radial-gradient(circle at top right, rgba(255, 199, 90, 0.12), transparent 36%),
    rgba(19, 13, 14, 0.72);
}

.reference-card span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--gold);
  font-family: "Space Mono", monospace;
  font-weight: 900;
}

.reference-card h4 {
  color: var(--text);
  font-size: 20px;
  margin-bottom: 12px;
}

.reference-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .reference-list {
    grid-template-columns: 1fr;
  }
}
.source-table-wrap {
  margin-top: 24px;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 199, 90, 0.22);
}

.source-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  background: rgba(19, 13, 14, 0.58);
}

.source-table th,
.source-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 199, 90, 0.16);
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  vertical-align: top;
}

.source-table th {
  color: var(--gold);
  text-align: left;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.28);
}

.source-table td:first-child,
.source-table td:last-child {
  color: var(--gold);
  font-family: "Space Mono", monospace;
  font-weight: 900;
  white-space: nowrap;
}

.source-table tr:hover td {
  background: rgba(255, 199, 90, 0.07);
}

.credits-section ul {
  padding-left: 22px;
}

.credits-section li {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
}

.credits-section li + li {
  margin-top: 8px;
}

/* b4 */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 18px;
}

.table-wrap table {
  width: 100%;
  min-width: 900px;
}

.table-wrap th,
.table-wrap td {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  color: #ffe259;
  background: rgba(255, 226, 89, 0.12);
}

.table-wrap td {
  color: rgba(255, 255, 255, 0.78);
}

th,
td {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  vertical-align: top;
}

th {
  color: #ffe259;
  background: rgba(255, 226, 89, 0.12);
}

td {
  color: rgba(255, 255, 255, 0.78);
}
.detail-page .detail-content {
  max-width: 1150px;
  width: min(1150px, 92vw);
}

.section-4-card {
  min-height: auto;
  padding: 34px 38px;
}

.section-4-card h3 {
  margin-bottom: 24px;
  font-size: 28px;
  line-height: 1.3;
}

.problem-block {
  margin-top: 22px;
}

.problem-block:first-of-type {
  margin-top: 0;
}

.problem-block h4 {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 18px;
  line-height: 1.45;
}

.problem-block p {
  margin-bottom: 12px;
  max-width: 980px;
  font-size: 16.5px;
  line-height: 1.9;
  letter-spacing: 0.2px;
  word-spacing: 1.5px;
}

.problem-block strong {
  color: var(--text);
}
