/* ========== AI tutorial collection — restrained portfolio refinement ========== */

.cc-shell {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--pad);
}

.cc-skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--bg-black);
  color: var(--text-white);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(calc(-100% - 20px));
  transition: transform 0.2s ease;
}

.cc-skip:focus {
  transform: translateY(0);
}

/* ===== Top navigation ===== */
.cc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: var(--pad);
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cc-back {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-black);
  color: var(--text-white);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.cc-back svg {
  width: 14px;
  height: 14px;
}

.cc-top-meta {
  min-width: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: right;
}

.cc-top-current {
  color: var(--text-black);
  font-weight: 700;
}

/* ===== Hero ===== */
.cc-hero {
  margin-bottom: var(--pad);
  padding: clamp(36px, 4.5vw, 60px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-xl);
  background: var(--accent-blue);
  color: var(--text-white);
}

.cc-hero-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--text-black);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.cc-hero-title {
  max-width: 900px;
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.cc-hero-desc {
  max-width: 640px;
  margin: 0 0 30px;
  color: var(--text-white);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.7;
}

.cc-hero-stats {
  display: grid;
  grid-template-columns: minmax(74px, 0.5fr) minmax(130px, 1fr);
  max-width: 360px;
  gap: clamp(24px, 5vw, 52px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.cc-stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.cc-stat-num {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.cc-stat-label {
  color: var(--text-white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ===== Uniform tutorial cards ===== */
.cc-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--gap);
}

.cc-card {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: clamp(22px, 2vw, 32px);
  background: var(--bg-white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.cc-card-link {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  border-radius: inherit;
}

.cc-cover {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  background: var(--bg-cream);
}

.cc-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.cc-meta {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: clamp(22px, 2.4vw, 32px);
}

.cc-index {
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cc-title {
  display: -webkit-box;
  min-height: 2.3em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--text-black);
  font-family: var(--font-display);
  font-size: clamp(23px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.cc-desc {
  display: -webkit-box;
  min-height: 4.95em;
  margin: 0 0 17px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.cc-tags {
  display: flex;
  min-height: 3.2em;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0;
  margin: 0 0 18px;
  padding: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.02em;
  list-style: none;
}

.cc-tag {
  display: inline-flex;
  align-items: center;
}

.cc-tag + .cc-tag::before {
  content: "·";
  margin-inline: 8px;
  color: rgba(0, 0, 0, 0.38);
}

.cc-cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 7px;
  margin-top: auto;
  color: var(--text-black);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cc-cta::after {
  content: "↗";
  transition: transform 0.3s var(--ease);
}

/* ===== Footer ===== */
.cc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.cc-back-foot {
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  color: var(--text-black);
}

.cc-foot-meta {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* Keyboard focus is intentionally stronger than hover. */
.cc-back:focus-visible,
.cc-skip:focus-visible {
  outline: 3px solid #0759c7;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--bg-white);
}

.cc-card-link:focus-visible {
  outline: 3px solid #0759c7;
  outline-offset: -3px;
}

@media (hover: hover) and (pointer: fine) {
  .cc-back:hover {
    background: var(--accent-blue);
    color: var(--text-white);
    transform: translateX(-3px);
  }

  .cc-card:hover {
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
  }

  .cc-card:hover .cc-cover img {
    transform: scale(1.025);
  }

  .cc-card:hover .cc-cta::after {
    transform: translate(3px, -2px);
  }

  .cc-back-foot:hover {
    background: var(--bg-black);
    color: var(--text-white);
  }
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .cc-shell {
    padding: clamp(16px, 4vw, 24px);
  }

  .cc-top {
    align-items: flex-start;
  }

  .cc-hero {
    margin-block: 24px 28px;
    padding: 28px 0 30px;
    border-width: 4px 0 1px;
    border-color: var(--accent-blue) transparent rgba(0, 0, 0, 0.1);
    border-radius: 0;
    background: transparent;
    color: var(--text-black);
  }

  .cc-hero-eyebrow {
    margin-bottom: 14px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #005ebd;
    letter-spacing: 0.16em;
  }

  .cc-hero-title {
    margin-bottom: 16px;
    color: var(--text-black);
    font-size: clamp(38px, 12vw, 52px);
    line-height: 1.08;
  }

  .cc-hero-desc {
    margin-bottom: 24px;
    color: var(--text-black);
    font-size: 15px;
    line-height: 1.65;
  }

  .cc-hero-stats {
    gap: 22px;
    padding-top: 19px;
    border-color: rgba(0, 0, 0, 0.16);
  }

  .cc-stat-label {
    color: var(--text-black);
  }

  .cc-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-card {
    border-radius: 22px;
  }

  .cc-meta {
    padding: 22px;
  }

  .cc-title {
    min-height: 0;
    font-size: 24px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .cc-tags {
    min-height: 0;
  }

  .cc-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .cc-top {
    flex-direction: column;
    gap: 14px;
  }

  .cc-top-meta {
    text-align: left;
  }

  .cc-hero-stats {
    grid-template-columns: 74px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  .cc-skip,
  .cc-back,
  .cc-card,
  .cc-cover img,
  .cc-cta::after {
    transition: none;
  }

  .cc-back:hover,
  .cc-card:hover,
  .cc-card:hover .cc-cover img,
  .cc-card:hover .cc-cta::after {
    transform: none;
  }
}
