/**
 * Additions on top of the vCard theme.
 *
 * Nothing here overrides the template's own layout — these are new components
 * (stats, publications, certifications, the project modal) built from the same
 * variables the theme already defines, so they inherit its palette and depth.
 */

/* ── Sidebar extras ───────────────────────────────────────── */

.contact-link-static {
  color: var(--white-2);
  font-size: var(--fs-7);
  line-height: 1.4;
}

.sidebar-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--border-gradient-onyx);
  border-radius: 12px;
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
}

.sidebar-cta:hover {
  background: var(--bg-gradient-yellow-1);
  color: var(--smoky-black);
}

.sidebar-cta ion-icon {
  font-size: 16px;
}

/* ── About hero ───────────────────────────────────────────── */

/* flow-root contains the floated portrait, so the stats below never wrap
   around it. */
.about-hero {
  display: flow-root;
  margin-bottom: 30px;
}

.about-portrait {
  position: relative;
  float: none;
  width: 100%;
  max-width: 180px;
  margin: 0 auto 20px;
}

.about-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--jet);
  box-shadow: var(--shadow-4);
}

.about-portrait figcaption {
  margin-top: 8px;
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  line-height: 1.4;
  text-align: center;
}

.about-text strong {
  color: var(--white-2);
  font-weight: var(--fw-500);
}

/* ── Headline stats ───────────────────────────────────────── */

.stat-section {
  margin-bottom: 35px;
}

.stat-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.stat-item {
  padding: 18px 15px;
  text-align: center;
}

.stat-value {
  background: var(--text-gradient-yellow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 32px;
  font-weight: var(--fw-600);
  line-height: 1;
}

.stat-label {
  margin-top: 6px;
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Ionicons standing in for the template's raster service icons. */
.service-ion {
  font-size: 34px;
  color: var(--orange-yellow-crayola);
}

/* ── Publications ─────────────────────────────────────────── */

.pub-list {
  display: grid;
  gap: 15px;
}

.pub-item {
  padding: 22px;
}

.pub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pub-head time {
  color: var(--light-gray-70);
  font-size: var(--fs-7);
}

.pub-badge {
  padding: 4px 12px;
  background: var(--bg-gradient-yellow-1);
  border-radius: 999px;
  color: var(--smoky-black);
  font-size: var(--fs-8);
  font-weight: var(--fw-600);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pub-title {
  color: var(--white-2);
  line-height: 1.4;
}

.pub-venue {
  margin-top: 8px;
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-7);
  line-height: 1.6;
}

.pub-text {
  margin-top: 12px;
  color: var(--light-gray);
  font-size: var(--fs-6);
  line-height: 1.7;
}

.pub-authors {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--jet);
  color: var(--light-gray-70);
  font-size: var(--fs-7);
  line-height: 1.6;
}

.pub-authors strong {
  color: var(--white-2);
  font-weight: var(--fw-500);
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
}

.pub-link:hover {
  text-decoration: underline;
}

/* ── Toolkit pills ────────────────────────────────────────── */

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
}

.tool-list li {
  padding: 7px 14px;
  background: var(--border-gradient-onyx);
  border-radius: 999px;
  color: var(--light-gray);
  font-size: var(--fs-8);
  box-shadow: var(--shadow-2);
}

/* ── Credentials ──────────────────────────────────────────── */

.cred-section {
  margin-bottom: 40px;
}

.cred-heading {
  position: relative;
  margin-bottom: 22px;
  padding-bottom: 10px;
  color: var(--white-2);
}

.cred-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--text-gradient-yellow);
  border-radius: 3px;
}

/* Award cards reuse the theme's blog-post visuals but are not links. */
.cred-card {
  position: relative;
  background: var(--border-gradient-onyx);
  height: 100%;
  box-shadow: var(--shadow-4);
  border-radius: 16px;
  z-index: 1;
  transition: var(--transition-1);
}

.cred-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--eerie-black-1);
  z-index: -1;
}

.cred-card:hover {
  transform: translateY(-4px);
}

/* Certificate scans are documents — contain them, so nothing is cropped away. */
.cred-card .blog-banner-box img {
  object-fit: contain;
  background: var(--eerie-black-2);
  padding: 6px;
}

/* Photographs fill their frame. Everything under /gallery/ is a scan;
   the .jpg files in /images/ are event photography. */
.cred-card .blog-banner-box img[src$=".jpg"] {
  object-fit: cover;
  padding: 0;
}

.cred-card .blog-banner-box img[src*="award-icrcct-stage"] {
  object-fit: cover;
  padding: 0;
}

/* The lead award gets a full-width gold band above the grid. */
.cred-feature {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
  padding: 22px;
  background: linear-gradient(135deg, hsla(45, 100%, 72%, 0.14), hsla(36, 100%, 69%, 0.03));
  border: 1px solid hsla(45, 100%, 72%, 0.28);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
}

.cred-feature-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-gradient-yellow-1);
  color: var(--smoky-black);
  font-size: 26px;
}

.cred-feature-kicker {
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-8);
  font-weight: var(--fw-600);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cred-feature-title {
  margin-top: 6px;
  color: var(--white-2);
}

.cred-feature-text {
  margin-top: 8px;
  color: var(--light-gray);
  font-size: var(--fs-6);
  line-height: 1.7;
}

/* Paper scan on a publication card. */
.pub-figure {
  margin: -6px -6px 16px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  aspect-ratio: 16 / 9;
}

.pub-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* Awards with no certificate scan get a gold crest instead of a photo,
   so the grid stays even rather than showing an empty frame. */
.cred-crest {
  display: grid;
  place-items: center;
  height: 150px;
  background: linear-gradient(150deg, hsla(45, 100%, 72%, 0.16), hsla(36, 100%, 69%, 0.04));
  border-bottom: 1px solid var(--jet);
  border-radius: 16px 16px 0 0;
  font-size: 52px;
  color: var(--orange-yellow-crayola);
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.cert-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 18px;
  background: var(--border-gradient-onyx);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
}

.cert-card:hover {
  background: var(--bg-gradient-yellow-1);
  transform: translateY(-3px);
}

.cert-card:hover .cert-issuer,
.cert-card:hover .cert-name,
.cert-card:hover .cert-meta {
  color: var(--smoky-black);
}

/* Certificate thumbnail — a small proof chip beside the text, not a banner.
   Contained rather than cropped, since a cropped certificate loses the part
   that proves anything. */
.cert-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 14px;
  align-items: start;
}

.cert-thumb {
  grid-row: 1 / 4;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
}

.cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

/* Cards with no scan let the text run the full width. */
.cert-card:not(:has(.cert-thumb)) {
  grid-template-columns: 1fr;
}

.cert-issuer {
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-8);
  font-weight: var(--fw-500);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cert-name {
  color: var(--white-2);
  font-size: var(--fs-6);
  font-weight: var(--fw-500);
  line-height: 1.45;
}

.cert-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  color: var(--light-gray-70);
  font-size: var(--fs-8);
}

.cred-list {
  display: grid;
  gap: 12px;
}

.cred-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  transition: var(--transition-1);
}

.cred-row-thumb {
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
}

.cred-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.cred-row:hover {
  transform: translateY(-3px);
}

.cred-row-main h4 {
  color: var(--white-2);
  margin-bottom: 6px;
}

.cred-row-main p {
  color: var(--light-gray);
  font-size: var(--fs-6);
  line-height: 1.7;
}

.cred-row-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--light-gray-70);
  font-size: var(--fs-7);
}

.cred-tag {
  padding: 4px 12px;
  background: var(--bg-gradient-yellow-1);
  border-radius: 999px;
  color: var(--smoky-black);
  font-size: var(--fs-8);
  font-weight: var(--fw-600);
}

/* ── Contact ──────────────────────────────────────────────── */

.contact-intro p {
  margin-bottom: 30px;
  color: var(--light-gray);
  font-size: var(--fs-6);
  line-height: 1.7;
}

.contact-method-list {
  display: grid;
  gap: 14px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  transition: var(--transition-1);
}

.contact-method:hover {
  transform: translateY(-3px);
}

.contact-method .icon-box {
  position: relative;
  background: var(--border-gradient-onyx);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--orange-yellow-crayola);
  box-shadow: var(--shadow-1);
  z-index: 1;
  flex-shrink: 0;
}

.contact-method .icon-box::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--eerie-black-1);
  z-index: -1;
}

.contact-method-value {
  color: var(--white-2);
  font-size: var(--fs-6);
  word-break: break-word;
}

.contact-cta-section {
  margin-top: 28px;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  background: var(--bg-gradient-yellow-1);
  border-radius: 999px;
  color: var(--smoky-black);
  font-size: var(--fs-6);
  font-weight: var(--fw-600);
  box-shadow: var(--shadow-3);
  transition: var(--transition-1);
}

.contact-cta:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-5);
}

/* ── Project modal ────────────────────────────────────────── */

.project-modal-container {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 15px;
  z-index: 20;
  pointer-events: none;
  visibility: hidden;
}

.project-modal-container.active {
  pointer-events: all;
  visibility: visible;
}

.project-modal-container .overlay {
  position: fixed;
  inset: 0;
  background: hsl(0, 0%, 5%);
  opacity: 0;
  transition: var(--transition-1);
}

.project-modal-container.active .overlay {
  opacity: 0.85;
}

.project-modal {
  position: relative;
  background: var(--eerie-black-2);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--jet);
  border-radius: 16px;
  box-shadow: var(--shadow-5);
  transform: scale(1.1);
  opacity: 0;
  z-index: 2;
  transition: var(--transition-1);
  scrollbar-width: thin;
}

.project-modal::-webkit-scrollbar {
  width: 6px;
}

.project-modal::-webkit-scrollbar-thumb {
  background: var(--onyx);
  border-radius: 6px;
}

.project-modal-container.active .project-modal {
  transform: scale(1);
  opacity: 1;
}

.project-modal .modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--onyx);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--white-2);
  font-size: 18px;
  z-index: 3;
  opacity: 0.9;
}

.project-modal .modal-close-btn:hover {
  opacity: 1;
  background: var(--orange-yellow-crayola);
  color: var(--smoky-black);
}

.project-modal-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
}

.project-modal-body {
  padding: 26px;
}

.project-modal-kicker {
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-8);
  font-weight: var(--fw-500);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-modal-title {
  margin-top: 8px;
  color: var(--white-2);
}

.project-modal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 22px;
}

.project-modal-stack li {
  padding: 5px 12px;
  background: var(--border-gradient-onyx);
  border-radius: 999px;
  color: var(--light-gray);
  font-size: var(--fs-8);
}

.project-modal h4 {
  margin: 22px 0 10px;
  color: var(--white-2);
  font-size: var(--fs-6);
  font-weight: var(--fw-600);
}

.project-modal h4:first-of-type {
  margin-top: 0;
}

.project-modal p,
.project-modal li {
  color: var(--light-gray);
  font-size: var(--fs-6);
  line-height: 1.7;
}

.project-modal ol,
.project-modal ul.modal-points {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.project-modal ol li,
.project-modal ul.modal-points li {
  list-style: decimal;
}

.project-modal ul.modal-points li {
  list-style: disc;
}

.modal-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 4px 0 8px;
  padding-left: 0 !important;
}

.modal-metrics li {
  list-style: none !important;
  padding: 14px;
  background: var(--border-gradient-onyx);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
}

.modal-metric-value {
  display: block;
  background: var(--text-gradient-yellow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 20px;
  font-weight: var(--fw-600);
}

.modal-metric-label {
  display: block;
  margin-top: 4px;
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  line-height: 1.4;
}

.modal-metric-against {
  display: block;
  margin-top: 4px;
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  text-decoration: line-through;
  opacity: 0.75;
}

.modal-note {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 2px solid var(--jet);
  color: var(--light-gray-70) !important;
  font-size: var(--fs-7) !important;
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.modal-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--border-gradient-onyx);
  border-radius: 999px;
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
  box-shadow: var(--shadow-2);
}

.modal-links a:hover {
  background: var(--bg-gradient-yellow-1);
  color: var(--smoky-black);
}

/* ── Responsive ───────────────────────────────────────────── */

@media (min-width: 580px) {
  .stat-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .cred-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cred-row-thumb {
    width: 110px;
    aspect-ratio: 4 / 3;
  }

  .cred-row-main {
    flex: 1;
  }

  .about-portrait {
    float: left;
    max-width: 165px;
    margin: 4px 22px 12px 0;
  }

  .about-portrait figcaption {
    text-align: left;
  }

  .cred-row-side {
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    text-align: right;
  }

  .project-modal-img {
    height: 260px;
  }
}

@media (min-width: 768px) {
  .cert-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .pub-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1250px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
