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

:root {
  color-scheme: light;
  --bg: #f3efe8;
  --ink: #1f1b16;
  --muted: #5a534c;
  --accent: #0f766e;
  --accent-strong: #0b4f4a;
  --panel: #ffffff;
  --line: rgba(31, 27, 22, 0.12);
  --shadow: rgba(31, 27, 22, 0.08);
  --radius: 20px;
  --title-font: "Fraunces", "Times New Roman", serif;
  --body-font: "Space Grotesk", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at top left, #ffffff 0%, #f7f2ea 42%, #efe7dc 100%),
    linear-gradient(120deg, rgba(15, 118, 110, 0.08), transparent 45%),
    linear-gradient(90deg, rgba(31, 27, 22, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(31, 27, 22, 0.04) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.hero {
  padding: 28px 32px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  font-family: var(--title-font);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4.6vw, 48px);
}

.subtitle {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 24px 0 40px;
}

.about-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 22px 0 24px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 24px var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.about-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(31, 27, 22, 0.12);
}

.about-cta-title {
  font-family: var(--title-font);
  font-size: 16px;
}

.about-cta-role {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  flex: 1 1 360px;
}

.about-cta-links {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 14px 32px var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 40px rgba(31, 27, 22, 0.12);
}

.thumb {
  position: relative;
  min-height: 120px;
  border-radius: 16px;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #374151);
  overflow: hidden;
}

.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

.thumb span {
  position: relative;
  z-index: 1;
}

.thumb-sudoku {
  background: linear-gradient(135deg, #0f766e, #34d399);
}

.thumb-guess {
  background: linear-gradient(135deg, #0f172a, #0ea5e9);
}

.thumb-demo {
  background: linear-gradient(135deg, #2f2a25, #a16207);
}

.thumb-orderbook {
  background: linear-gradient(135deg, #111827, #f97316);
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.card-body p {
  margin: 0 0 16px;
  line-height: 1.6;
  color: var(--muted);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-cta {
  font-weight: 600;
  color: var(--accent);
}

.note {
  padding: 20px 24px;
  border-radius: var(--radius);
  background: #fff7eb;
  border: 1px solid rgba(161, 98, 7, 0.2);
}

.note h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.note p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.top-nav {
  margin-bottom: 24px;
}

.back-link {
  text-decoration: none;
  color: var(--accent-strong);
  font-weight: 600;
}

.detail-hero {
  margin-bottom: 28px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent-strong);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
}

.detail-media {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-thumb {
  position: relative;
  min-height: 220px;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: #ffffff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow: hidden;
}

.about-photo {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.about-photo img {
  object-position: center;
}

.detail-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}

.detail-thumb span {
  position: relative;
  z-index: 1;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.primary-btn:hover {
  background: var(--accent-strong);
}

.primary-btn.is-disabled {
  background: #d6d1c8;
  color: #6b635c;
  cursor: not-allowed;
  pointer-events: none;
}

.detail-copy h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.detail-copy h3 {
  margin: 20px 0 8px;
  font-size: 20px;
}

.detail-copy p,
.detail-copy li {
  line-height: 1.7;
  color: var(--muted);
}

.detail-copy ul {
  padding-left: 18px;
  margin: 0;
}

.subtle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

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

@media (max-width: 600px) {
  .shell {
    padding: 40px 18px 64px;
  }

  .hero {
    padding: 24px;
  }

  .thumb {
    min-height: 140px;
  }
}
