/* =========================================================
   cards.css — Per-style card themes: credit / metro / playing
   ========================================================= */

/* ══════════════════════════════════════════════════════════
   CREDIT CARD STYLE (default)
   ══════════════════════════════════════════════════════════ */

body.style-credit .card-3d {
  width: 380px;
  height: 240px;
  border-radius: var(--card-radius-credit);
}

body.style-credit .card-face {
  border-radius: var(--card-radius-credit);
  padding: 22px 24px 18px;
}

/* Front — rich blue gradient with mesh */
body.style-credit .card-front {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(56,189,248,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(129,140,248,0.15) 0%, transparent 50%),
    linear-gradient(135deg, #0a1f4d 0%, #0d3060 40%, #1048a0 100%);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.1),
    inset 0 1px 0 rgba(255,255,255,0.15);
  justify-content: space-between;
}

/* Layout: photo top-right, identity bottom-left style */
body.style-credit .front-photo-wrap {
  position: absolute;
  top: 16px;
  right: 20px;
}

body.style-credit .front-photo {
  width: 72px;
  height: 72px;
}

body.style-credit .front-identity {
  margin-top: 8px;
}

body.style-credit .front-contact {
  display: none; /* not shown on credit front — show bottom row */
}

body.style-credit .front-socials {
  display: none;
}

body.style-credit .front-chip-row {
  margin-top: auto;
}

body.style-credit .flip-hint {
  position: absolute;
  bottom: 12px;
  right: 20px;
}

/* Credit card decorative elements */
body.style-credit .deco-top-left {
  position: absolute;
  top: -30px;
  left: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,0.15) 0%, transparent 70%);
  pointer-events: none;
}

body.style-credit .deco-bottom-right {
  position: absolute;
  bottom: -40px;
  right: -20px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129,140,248,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ── CREDIT CARD BACK ──────────────────────────────────── */
body.style-credit .card-back {
  background: linear-gradient(135deg, #071428 0%, #0d3060 100%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.1);
  padding: 0;
  gap: 0;
  overflow: hidden;
  flex-direction: column;
}

/* Black magnetic stripe — authentic credit card */
body.style-credit .back-stripe {
  height: 44px;
  background: #111;
  width: 100%;
  flex-shrink: 0;
  margin: 14px 0 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5), inset 0 -1px 2px rgba(255,255,255,0.05);
}

/* Signature strip below stripe */
body.style-credit .back-sig-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 20px;
  flex-shrink: 0;
}

body.style-credit .back-sig-strip::before {
  content: '';
  flex: 1;
  height: 24px;
  background: repeating-linear-gradient(
    -55deg,
    rgba(255,255,255,0.04) 0px,
    rgba(255,255,255,0.04) 1px,
    rgba(255,255,255,0.01) 1px,
    rgba(255,255,255,0.01) 6px
  );
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
}

body.style-credit .back-sig-strip::after {
  content: 'CVV';
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
  width: 32px;
  height: 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 24px;
  padding: 0 4px;
}

/* Two-column landscape content */
body.style-credit .back-scroll-inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 8px;
  padding: 6px 20px 10px;
  overflow-y: auto;
  scrollbar-width: none;
  align-content: start;
}

body.style-credit .back-scroll-inner::-webkit-scrollbar { display: none; }

/* Skills takes left column, Projects right top, Certs right bottom */
body.style-credit #backSkills   { grid-column: 1; grid-row: 1 / 3; }
body.style-credit #backProjects { grid-column: 2; grid-row: 1; }
body.style-credit #backCerts    { grid-column: 2; grid-row: 2; }

body.style-credit .back-section {
  gap: 5px;
}

body.style-credit .project-card-item {
  padding: 5px 8px;
}

body.style-credit .back-flip-hint {
  padding: 4px 20px 10px;
  flex-shrink: 0;
}

/* Hide unused new elements in credit back */
body.style-credit .back-corner,
body.style-credit .back-left-panel { display: none; }


/* ══════════════════════════════════════════════════════════
   METRO CARD STYLE
   ══════════════════════════════════════════════════════════ */

body.style-metro .card-3d {
  width: 420px;
  height: 260px;
  border-radius: var(--card-radius-metro);
}

body.style-metro .card-face {
  border-radius: var(--card-radius-metro);
}

body.style-metro .card-front {
  background: linear-gradient(100deg, #1248a8 0%, #1a62d4 45%, #0ea5e9 100%);
  box-shadow:
    0 28px 70px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.12),
    inset 0 1px 0 rgba(255,255,255,0.2);
  flex-direction: row;
  padding: 0;
  overflow: hidden;
  align-items: stretch;
}

/* Metro: left band (photo) + right content */
body.style-metro .card-front::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 120px;
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(4px);
  z-index: 1;
}

body.style-metro .front-photo-wrap {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.style-metro .front-photo {
  width: 76px;
  height: 76px;
}

body.style-metro .front-identity {
  position: absolute;
  left: 130px;
  top: 14px;
  right: 12px;
  z-index: 2;
}

body.style-metro .front-identity .front-name { font-size: 1.3rem; }

body.style-metro .front-contact {
  position: absolute;
  left: 130px;
  top: 92px;
  right: 12px;
  z-index: 2;
  gap: 5px;
}

body.style-metro .front-socials {
  position: absolute;
  bottom: 30px;
  left: 130px;
  right: 12px;
  z-index: 2;
}

body.style-metro .front-chip-row {
  display: none;
}

body.style-metro .deco-top-left,
body.style-metro .deco-bottom-right {
  display: none;
}

body.style-metro .flip-hint {
  position: absolute;
  bottom: 10px;
  right: 14px;
  z-index: 2;
}

/* Metro magnetic strip band on left */
body.style-metro .card-front::after {
  content: 'METRO';
  position: absolute;
  left: 0;
  bottom: 10px;
  width: 120px;
  text-align: center;
  font-size: 0.55rem;
  font-family: var(--font-mono);
  letter-spacing: 3px;
  color: rgba(255,255,255,0.5);
  z-index: 2;
}

/* ── METRO CARD BACK ────────────────────────────────────── */
body.style-metro .card-back {
  background: linear-gradient(100deg, #071428 0%, #0d2a5c 100%);
  box-shadow: 0 28px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.1);
  padding: 0;
  gap: 0;
  overflow: hidden;
  flex-direction: row;   /* row layout — mirror the front */
  align-items: stretch;
}

/* Left dark vertical panel — mirrors front left band */
body.style-metro .back-left-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  padding: 18px 0 12px;
  position: relative;
  z-index: 2;
}

body.style-metro .back-left-panel::before {
  content: '⬡';
  font-size: 2.2rem;
  color: rgba(56,189,248,0.25);
  line-height: 1;
}

body.style-metro .back-left-panel::after {
  content: 'METRO';
  font-size: 0.48rem;
  font-family: var(--font-mono);
  letter-spacing: 3px;
  color: rgba(255,255,255,0.4);
  writing-mode: horizontal-tb;
}

/* Right scroll area — same width as front right content */
body.style-metro .back-scroll-inner {
  flex: 1;
  padding: 14px 14px 8px 14px;
  min-width: 0;
}

body.style-metro .back-section {
  gap: 5px;
}

body.style-metro .back-flip-hint {
  padding: 0 14px 8px;
  flex-shrink: 0;
}

/* Hide the magnetic stripe on metro back */
body.style-metro .back-stripe,
body.style-metro .back-sig-strip,
body.style-metro .back-corner { display: none; }

body.style-metro .contact-chip {
  padding: 4px 8px;
  font-size: 0.65rem;
}


/* ══════════════════════════════════════════════════════════
   PLAYING CARD STYLE
   ══════════════════════════════════════════════════════════ */

body.style-playing .card-3d {
  width: 280px;
  height: 420px;
  border-radius: var(--card-radius-playing);
}

body.style-playing .card-face {
  border-radius: var(--card-radius-playing);
  padding: 18px 18px 16px;
}

body.style-playing .card-front {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(56,189,248,0.2) 0%, transparent 60%),
    linear-gradient(175deg, #0a1f4d 0%, #0d3060 50%, #0a1f4d 100%);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.65),
    0 0 0 1px rgba(255,255,255,0.1),
    inset 0 1px 0 rgba(255,255,255,0.15);
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}

/* Corner rank markers (playing card style) */
body.style-playing .deco-top-left {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
}

body.style-playing .deco-top-left::before { content: 'AJ'; }
body.style-playing .deco-top-left::after  {
  content: '♠';
  font-size: 0.7rem;
  color: var(--accent);
}

body.style-playing .deco-bottom-right {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
  transform: rotate(180deg);
}

body.style-playing .deco-bottom-right::before { content: 'AJ'; }
body.style-playing .deco-bottom-right::after  {
  content: '♠';
  font-size: 0.7rem;
  color: var(--accent);
}

body.style-playing .front-photo-wrap {
  align-self: center;
  margin-top: 20px;
}

body.style-playing .front-photo {
  width: 88px;
  height: 88px;
}

body.style-playing .front-identity {
  width: 100%;
  text-align: center;
}

body.style-playing .front-location {
  justify-content: center;
}

body.style-playing .front-contact {
  width: 100%;
}

body.style-playing .front-socials {
  width: 100%;
}

body.style-playing .front-chip-row {
  width: 100%;
  justify-content: center;
  margin-top: 2px;
}

body.style-playing .flip-hint {
  margin-top: auto;
  justify-content: center;
}

/* Card suit watermark */
body.style-playing .card-front::before {
  content: '♠';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12rem;
  color: rgba(56,189,248,0.04);
  pointer-events: none;
  line-height: 1;
  z-index: 0;
}

/* ── PLAYING CARD BACK ──────────────────────────────────── */
body.style-playing .card-back {
  background: linear-gradient(175deg, #040d1a 0%, #071428 50%, #040d1a 100%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.1);
  padding: 0;
  gap: 0;
  overflow: hidden;
  flex-direction: column;
}

/* Diamond crosshatch pattern — playing card back texture */
body.style-playing .card-back::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg,  rgba(56,189,248,0.04) 0, rgba(56,189,248,0.04) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(-45deg, rgba(56,189,248,0.04) 0, rgba(56,189,248,0.04) 1px, transparent 1px, transparent 20px);
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

/* ── AJ corner markers (top-left) */
body.style-playing .back-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  z-index: 5;
  pointer-events: none;
}

body.style-playing .back-corner::before {
  content: 'AJ';
  font-size: 0.85rem;
}

body.style-playing .back-corner::after {
  content: '\2660';   /* ♠ */
  font-size: 0.7rem;
}

body.style-playing .bc-tl {
  top: 10px;
  left: 12px;
}

body.style-playing .bc-br {
  bottom: 10px;
  right: 12px;
  transform: rotate(180deg);
}

/* Hide magnetic stripe and other non-playing elements */
body.style-playing .back-stripe,
body.style-playing .back-sig-strip,
body.style-playing .back-left-panel { display: none; }

body.style-playing .back-scroll-inner {
  flex: 1;
  padding: 28px 16px 8px;   /* extra top pad for corner marker clearance */
}

body.style-playing .back-section {
  gap: 6px;
}

body.style-playing .back-flip-hint {
  padding: 0 16px 8px;
  flex-shrink: 0;
  justify-content: center;
}

body.style-playing .contact-chip {
  padding: 4px 8px;
  font-size: 0.63rem;
}

body.style-playing .skill-tag {
  font-size: 0.6rem;
  padding: 2px 7px;
}

body.style-playing .project-name { font-size: 0.72rem; }
body.style-playing .project-desc { font-size: 0.58rem; }
body.style-playing .cert-text    { font-size: 0.6rem; }


/* ── Style switch transition ─────────────────────────────── */
.card-3d {
  transition: width 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              height 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-radius 0.45s ease;
}
