/* ── CERT PAGE EXTRA VARIABLES ── */
:root {
  --brand: #ff9900;           /* swap this per cert: aws=#ff9900, gcp=#4285f4, alteryx=#007CC3, etc. */
  --brand-dim: rgba(255,153,0,0.12);
  --brand-border: rgba(255,153,0,0.3);
}

/* ── NAV BACK BUTTON ── */
.nav-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text2);
  text-decoration: none;
  border: 1px solid var(--border2);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  transition: all 0.2s;
}
.nav-back:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,212,255,0.05); }

/* ── CERT HERO ── */
.cert-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 5% 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,153,0,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,153,0,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}

.hero-glow-brand {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,153,0,0.07) 0%, transparent 70%);
  top: -150px; right: -150px;
  pointer-events: none;
}

.hero-glow-blue {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.05) 0%, transparent 70%);
  bottom: 0; left: -80px;
  pointer-events: none;
}

.cert-hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 4rem;
  align-items: center;
}

/* ── LEFT CONTENT ── */
.cert-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.cert-label::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--brand);
}

.cert-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin-bottom: 1rem;
}
.cert-title em { font-style: normal; color: var(--brand); }

.cert-subtitle {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 540px;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.cert-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.meta-item { display: flex; flex-direction: column; gap: 0.2rem; }

.meta-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}

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

.meta-value.active {
  color: var(--accent3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.meta-value.active::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent3);
  box-shadow: 0 0 8px var(--accent3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.cert-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── BTN OVERRIDES (brand colour) ── */
.btn-primary {
  background: var(--brand);
  color: #000;
  box-shadow: 0 0 24px rgba(255,153,0,0.3);
}
.btn-primary:hover {
  background: #ffb833;
  box-shadow: 0 0 40px rgba(255,153,0,0.5);
  transform: translateY(-2px);
  color: #000;
}

/* ── RIGHT CARD ── */
.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), #ffcc66, transparent);
}

.cert-card-badge {
  width: 80px; height: 80px;
  border-radius: 16px;
  background: var(--brand-dim);
  border: 1px solid var(--brand-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 2.2rem;
}

.cert-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.cert-card .card-issuer {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.5rem;
}

.cert-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  border: 1px solid;
}
.tag-brand  { border-color: var(--brand-border); color: var(--brand); background: var(--brand-dim); }
.tag-cloud  { border-color: rgba(66,133,244,0.5); color: #4285f4; background: rgba(66,133,244,0.08); }
.tag-accent { border-color: rgba(0,212,255,0.5); color: var(--accent); background: rgba(0,212,255,0.08); }
.tag-green  { border-color: rgba(0,255,136,0.5); color: var(--accent3); background: rgba(0,255,136,0.08); }

.cert-validity {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.validity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.validity-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 0.3rem;
}

.validity-date { color: var(--text); font-weight: 500; }

.validity-arrow { color: var(--text3); font-size: 0.8rem; padding: 0 0.75rem; }

.validity-bar {
  margin-top: 0.75rem;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.validity-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #ffcc66);
  border-radius: 2px;
}

.cert-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.cert-id-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 0.2rem;
}

.cert-id-value {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--text2);
  word-break: break-all;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: 6px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 0.75rem;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { border-color: var(--accent3); color: var(--accent3); }

/* ── ABOUT SECTION ── */
#about { background: var(--bg2); }

.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text2);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 1.2rem;
}

/* ── DOMAINS SECTION ── */
#domains { background: var(--bg); }

.domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.domain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.domain-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.domain-card:hover {
  border-color: var(--brand-border);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,153,0,0.08);
}
.domain-card:hover::after { opacity: 1; }

.domain-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--brand-dim);
  border: 1px solid var(--brand-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.domain-weight {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-dim);
  border: 1px solid var(--brand-border);
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.domain-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.domain-card p { font-size: 0.85rem; color: var(--text2); line-height: 1.7; }

/* ── SKILLS SECTION ── */
#skills { background: var(--bg2); }
.skill-chip i { font-size: 0.85rem; color: var(--brand); }

/* ── VERIFICATION SECTION ── */
#verify { background: var(--bg); }

.verify-box {
  max-width: 700px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.verify-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent3), transparent);
}
.verify-box p { color: var(--text2); font-size: 0.95rem; line-height: 1.8; margin-bottom: 1.5rem; }

.verify-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .cert-hero-inner { grid-template-columns: 1fr; }
  .about-cols { grid-template-columns: 1fr; gap: 2rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .verify-details { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .skills-grid { grid-template-columns: 1fr; }
  .cert-meta-row { gap: 1.25rem; }
  .cert-btns { flex-direction: column; }
}

/* =========================================
   CERT PAGE MOBILE FIXES
========================================= */

html,
body {
  width: 100%;
  overflow-x: hidden;
}

/* Prevent overflow globally */
* {
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Images responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Long text/link fixes */
a,
.detail-value,
.cert-id-value,
.meta-value,
.cert-subtitle,
.domain-card p,
.about-text p {
  word-break: break-word;
}

/* Verification URL fix */
.detail-value a {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  line-height: 1.6;
}

/* Prevent cards from exceeding width */
.cert-card,
.verify-box,
.domain-card,
.skill-category {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* =========================
   TABLET + MOBILE
========================= */
@media (max-width: 900px) {

  .cert-hero {
    padding: 90px 20px 60px;
  }

  .cert-hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cert-card {
    width: 100%;
  }

  .about-cols {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .domains-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .verify-details {
    grid-template-columns: 1fr;
  }

  .cert-btns {
    width: 100%;
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .cert-meta-row {
    gap: 1.2rem;
  }
}

/* =========================
   MOBILE DEVICES
========================= */
@media (max-width: 600px) {

  .cert-title {
    font-size: 2rem;
    line-height: 1.15;
  }

  .cert-subtitle {
    font-size: 0.95rem;
    line-height: 1.8;
  }

  .cert-card {
    padding: 1.3rem;
    border-radius: 18px;
  }

  .verify-box {
    padding: 1.4rem;
  }

  .domain-card {
    padding: 1.3rem;
  }

  .cert-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .validity-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .validity-arrow {
    display: none;
  }

  .cert-id {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .copy-btn {
    margin-left: 0;
  }

  .cert-tags,
  .skill-items {
    gap: 0.45rem;
  }

  .tag,
  .skill-chip {
    font-size: 0.72rem;
  }

  .nav-back {
    font-size: 0.65rem;
    padding: 0.45rem 0.75rem;
  }
}

/* =========================
   SMALL PHONES
========================= */
@media (max-width: 420px) {

  .cert-title {
    font-size: 1.7rem;
  }

  .cert-subtitle,
  .about-text p,
  .domain-card p,
  .verify-box p {
    font-size: 0.88rem;
  }

  .meta-value,
  .detail-value,
  .validity-date {
    font-size: 0.85rem;
  }

  .btn-primary,
  .btn-ghost {
    font-size: 0.68rem;
    padding: 0.8rem 1rem;
  }
}
