:root {
  --background: #0c1c18;
  --dark-teal: #142a25;
  --card: #203a34;
  --card-hover: #29463f;
  --orange: #ec6637;
  --orange-light: #f17445;
  --white: #e7e9de;
  --muted: #aebbb4;
  --border: rgba(231, 233, 222, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 70% 15%, rgba(20, 67, 55, 0.22), transparent 35%),
    var(--background);
  color: var(--white);
  font-family: "Chakra Petch", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

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

.site-header {
  padding: 28px 4.5% 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-header a { color: var(--orange); }
.site-header a:hover { color: var(--orange-light); }

.back-link {
  margin: 32px 4.5% 10px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--orange);
}

.project-hero {
  margin: 0 4.5vw;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(500px, 1.68fr);
  min-height: 560px;
  border-bottom: 1px solid var(--border);
}

.project-info {
  padding: 30px 38px 35px 0;
  border-right: 1px solid var(--border);
}

.project-meta {
  margin-bottom: 17px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.project-info h1 {
  margin: 0;
  font-size: clamp(39px, 4vw, 61px);
  line-height: 0.91;
  letter-spacing: -0.045em;
}

.intro {
  max-width: 360px;
  margin-top: 25px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
}

.project-specs {
  max-width: 360px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.spec-row {
  display: grid;
  grid-template-columns: 105px 1fr;
  margin-bottom: 10px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.spec-row > span:first-child { color: var(--muted); }

.hero-visual {
  position: relative;
  padding: 14px 0 35px 35px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.visual-meta {
  position: absolute;
  top: 15px;
  right: 0;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-image-stage {
  position: relative;
  height: 392px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.glow-orange {
  width: 58%;
  height: 60%;
  left: 21%;
  top: 17%;
  background: radial-gradient(ellipse, rgba(236,102,55,0.38) 0%, rgba(236,102,55,0.16) 40%, transparent 74%);
  filter: blur(40px);
}

.glow-green {
  width: 82%;
  height: 82%;
  left: 9%;
  top: 8%;
  background: radial-gradient(ellipse, rgba(38,91,74,0.34), rgba(38,91,74,0.10) 52%, transparent 76%);
  filter: blur(46px);
}

.hero-image {
  position: relative;
  z-index: 2;
  width: 95%;
  height: 95%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 15px rgba(236,102,55,0.12))
    drop-shadow(0 18px 28px rgba(0,0,0,0.35));
}

.project-label {
  width: min(72%, 590px);
  margin: 4px auto 0;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(110deg, var(--orange), #f05c32);
  color: #101c18;
  border-radius: 6px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.project-label:hover { transform: translateY(-2px); filter: brightness(1.05); }

.project-label span {
  display: block;
  margin-bottom: 4px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.project-label strong { display: block; font-size: 14px; letter-spacing: 0.03em; }
.project-label b { font-size: 18px; }

.story-grid {
  margin: 0 4.5vw;
  padding: 32px 0 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}

.story-block { padding: 0 30px; border-right: 1px solid var(--border); }
.story-block:first-child { padding-left: 0; }
.story-block:last-child { padding-right: 0; border-right: none; }

.story-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.story-heading span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
  font-family: "Space Mono", monospace;
  font-size: 12px;
}

.story-heading h2 { margin: 0; font-size: 15px; letter-spacing: 0.08em; }

.story-block p {
  margin: 0 0 14px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  line-height: 1.75;
  color: #c5cec8;
}

.section-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.section-topline span:last-child { color: var(--orange); }

.prototype-section,
.final-claw-section,
.integration-section,
.competition-section,
.learning-section,
.gallery-section {
  margin: 0 4.5vw;
  padding: 28px 0 34px;
  border-bottom: 1px solid var(--border);
}

.prototype-grid {
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 1.2fr;
  gap: 10px;
}

.prototype-card,
.integration-card,
.team-card,
.toggle-card {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.prototype-card,
.integration-card,
.team-card { padding: 10px; }

.image-stage {
  height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(236,102,55,0.12), transparent 55%),
    #19332d;
}

.image-stage img {
  width: 96%;
  height: 96%;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,0.28));
}

.photo-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.prototype-card figcaption,
.integration-card figcaption,
.team-card figcaption {
  padding: 11px 2px 2px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.toggle-card { padding: 10px; }

.toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 10px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.toggle-header span { color: var(--muted); }

.toggle-header button {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--orange);
  color: #17231f;
  cursor: pointer;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle-header button:hover { transform: translateY(-2px); background: var(--white); }

.toggle-stage {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(236,102,55,0.12), transparent 55%),
    #19332d;
}

.toggle-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s ease;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,0.28));
}

.toggle-image.active { opacity: 1; }
.top-middle .toggle-image { object-position: 50% 0%; }
.top-right .toggle-image { object-position: 100% 0%; }

.toggle-caption {
  margin: 11px 2px 2px;
  color: #c5cec8;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
}

.final-claw-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.85fr;
  gap: 10px;
}

.integration-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.925fr 0.925fr;
  gap: 10px;
}

.integration-copy,
.competition-copy {
  padding: 22px;
  background:
    linear-gradient(140deg, rgba(236,102,55,0.10), transparent 42%),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.competition-copy { background: var(--card); }

.integration-copy h2,
.competition-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 0.97;
}

.competition-copy h2 { font-size: 24px; }

.integration-copy p,
.competition-copy p {
  margin: 0 0 15px;
  color: #c5cec8;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  line-height: 1.75;
}

.tall-stage { height: 390px; }

.competition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.learning-card {
  min-height: 245px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.learning-card > span {
  display: block;
  margin-bottom: 28px;
  color: var(--orange);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.learning-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.learning-card p {
  margin: 0;
  color: #c5cec8;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  line-height: 1.7;
}

.gallery-section { padding-bottom: 46px; }

.team-card {
  width: min(100%, 1100px);
  margin: 0 auto;
}

.team-card img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 6px;
}

footer {
  padding: 28px 4.5% 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
}

footer div { display: flex; gap: 18px; }
footer a { color: var(--orange); }
footer a:hover { color: var(--white); }

@media (max-width: 1100px) {
  .prototype-grid,
  .final-claw-grid,
  .integration-grid {
    grid-template-columns: 1fr 1fr;
  }

  .toggle-card:first-child,
  .integration-copy {
    grid-column: 1 / -1;
  }
}

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

  .project-info {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .hero-visual { padding: 35px 0; }

  .visual-meta {
    position: static;
    margin-bottom: 8px;
    text-align: right;
  }

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

  .story-block {
    padding: 26px 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .story-block:first-child { padding-top: 0; }
  .story-block:last-child { padding-bottom: 0; border-bottom: none; }

  .competition-grid,
  .learning-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .site-header,
  footer { gap: 18px; }

  .project-info h1 {
    font-size: clamp(35px, 10.5vw, 50px);
  }

  .hero-image-stage { height: 310px; }
  .project-label { width: 100%; }

  .prototype-grid,
  .final-claw-grid,
  .integration-grid {
    grid-template-columns: 1fr;
  }

  .toggle-card:first-child,
  .integration-copy {
    grid-column: auto;
  }

  .image-stage,
  .toggle-stage,
  .tall-stage {
    height: auto;
    min-height: 250px;
    max-height: 70vh;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
