/* ── t0lkim.dev/teen-tidal — Case Study Page ──────────── */

body { line-height: 1.7; }

.divider { margin: 60px auto; }

/* ── Sections ────────────────────────────────────────── */
section { padding: 0 0 20px; }

section h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.3;
}

section p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

section p strong { color: var(--text); font-weight: 600; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 100px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero.has-icon {
  padding-bottom: 20px;
}

.hero.has-icon .hero-sub {
  margin-bottom: 0;
}

.hero.has-icon + .divider {
  margin-top: 16px;
}

.hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin: 12px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 50% 40%, var(--teal-glow) 0%, transparent 70%),
    radial-gradient(ellipse 400px 200px at 30% 60%, rgba(0, 201, 167, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 .accent { color: var(--teal); }

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Problem Card ────────────────────────────────────── */
.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin: 28px 0;
}

.problem-card .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.problem-card blockquote {
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.7;
  border-left: 3px solid var(--red);
  padding-left: 20px;
  font-style: italic;
}

/* ── Constraint Pills ────────────────────────────────── */
.constraints {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.constraint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--red-dim);
  border: 1px solid rgba(248, 81, 73, 0.25);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.constraint .icon { color: var(--red); font-size: 14px; }

/* ── Solution Layers ─────────────────────────────────── */
.layers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}

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

.layer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.layer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), transparent);
}

.layer-num {
  font-size: 48px;
  font-weight: 700;
  color: var(--teal-dim);
  line-height: 1;
  margin-bottom: 8px;
}

.layer h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.layer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── Screenshot Gallery ──────────────────────────────── */
.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 28px 0 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar { display: none; }

.gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  text-align: center;
}

.gallery-item img {
  width: 200px;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 201, 167, 0.15);
}

.gallery-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

@media (max-width: 600px) {
  .gallery-item img { width: 160px; }
}

/* ── Video Section ───────────────────────────────────── */
.video-wrapper {
  display: flex;
  justify-content: center;
  margin: 28px 0;
}

.phone-frame {
  position: relative;
  width: 220px;
  background: #000;
  border-radius: 28px;
  padding: 12px 8px;
  border: 2px solid var(--border);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #000;
  border-radius: 0 0 12px 12px;
  border: 1px solid #222;
  border-top: none;
  z-index: 2;
}

.phone-frame video {
  width: 100%;
  border-radius: 20px;
  display: block;
}

.video-label {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Timeline ────────────────────────────────────────── */
.timeline { position: relative; margin: 28px 0; }

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--teal), var(--border));
}

.timeline-entry {
  position: relative;
  padding-left: 48px;
  padding-bottom: 36px;
}

.timeline-entry:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 9px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--teal);
}

.timeline-dot.current {
  background: var(--teal);
  box-shadow: 0 0 12px rgba(0, 201, 167, 0.4);
}

.timeline-version {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 4px;
}

.timeline-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* ── Evolution Section ───────────────────────────────── */
.evo-version { margin-bottom: 36px; }
.evo-version:last-child { margin-bottom: 0; }

.evo-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.evo-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 16px;
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid rgba(0, 201, 167, 0.25);
  white-space: nowrap;
}

.evo-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.evo-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  width: 100%;
  margin-top: 2px;
}

.evo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

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

.evo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.evo-card-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.evo-card-label.added { color: var(--green); }
.evo-card-label.changed { color: var(--yellow); }
.evo-card-label.fixed { color: var(--blue); }
.evo-card-label.arch { color: var(--teal); }

.evo-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.evo-screenshots {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.evo-screenshots img {
  height: 280px;
  width: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.evo-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
  margin: 32px 0;
}

/* ── Decision List ───────────────────────────────────── */
.decision-list {
  list-style: none;
  margin: 20px 0;
}

.decision-list li {
  position: relative;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.decision-list li strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.decision-list li span {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── API Detail Blocks ───────────────────────────────── */
.api-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
}

.api-block h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.api-block .subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}

.api-block p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.api-block p:last-child { margin-bottom: 0; }

.api-block ul {
  padding-left: 1.4em;
  margin-bottom: 10px;
}

.api-block li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 4px;
}

/* ── Status Banner ───────────────────────────────────── */
.status-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.status-left { flex: 1; min-width: 200px; }

.status-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.status-value {
  font-size: 1.15rem;
  font-weight: 600;
}

.status-value .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  margin-right: 8px;
  vertical-align: middle;
}

.status-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.meta-item { text-align: right; }

.meta-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
