:root {
  --bg: #080d16;
  --bg-soft: #0d1420;
  --card: #111b2b;
  --card-hover: #162338;

  --text: #f8fafc;
  --muted: #94a3b8;

  --accent: #3b82f6;
  --accent-2: #38bdf8;
  --accent-soft: rgba(59, 130, 246, 0.12);

  --line: rgba(148, 163, 184, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(37, 99, 235, 0.12),
      transparent 32%
    ),
    radial-gradient(
      circle at 85% 20%,
      rgba(56, 189, 248, 0.06),
      transparent 28%
    ),
    var(--bg);

  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;

  background: rgba(8, 13, 22, 0.88);
  backdrop-filter: blur(18px);

  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: 1120px;
  margin: auto;
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  width: 48px;
  height: 48px;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.20);
}

.logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}
.nav-links a:hover { color: var(--text); }
.hero {
  max-width: 1120px;
  margin: auto;
  padding: 86px 22px 54px;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 32px;
  align-items: center;
}
.eyebrow, .section-title p {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
}
h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.95;
  margin: 0 0 22px;
}
.hero-text {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.btn {
  padding: 13px 18px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
}
.primary {
  background: linear-gradient(
    135deg,
    #2563eb,
    #38bdf8
  );

  color: #ffffff;

  box-shadow:
    0 10px 30px rgba(37, 99, 235, 0.25);
}
.secondary { color: var(--text); }

.hero-card { padding: 24px; }
.profile-img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 1 / 1.12;
  object-fit: cover;
  margin-bottom: 18px;
  border: 1px solid var(--line);
}
.hero-card h2 {
  margin: 14px 0 0;
  font-size: 30px;
}
.hero-card p {
  margin: 4px 0 12px;
  color: var(--muted);
}
.section {
  max-width: 1120px;
  margin: auto;
  padding: 48px 22px;
}
.section-title { margin-bottom: 22px; }
.section-title h2 {
  font-size: 34px;
  margin: 0;
}
.card { padding: 24px; }
.card p, .card li, .project-body p, .timeline-item li, .muted { color: var(--muted); }
.wide p { font-size: 17px; }
.grid {
  display: grid;
  gap: 18px;
}
.skills-grid { grid-template-columns: repeat(4, 1fr); }
.two-col { grid-template-columns: repeat(2, 1fr); }
.card h3, .project-card h3, .timeline-item h3 { margin-top: 0; }
ul {
  padding-left: 18px;
  margin-bottom: 0;
}
.projects-grid { grid-template-columns: repeat(2, 1fr); }
.project-card { overflow: hidden; }
.project-image {
  width: 100%;
  min-height: 230px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  object-fit: cover;
}
.placeholder {
  background: linear-gradient(135deg, rgba(75,179,253,0.18), rgba(114,228,209,0.12));
  color: var(--muted);
  font-weight: 700;
}
.project-body { padding: 22px; }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.tags span {
  font-size: 12px;
  padding: 7px 9px;
  background: rgba(75,179,253,0.12);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d8f2ff;
}
.project-link {
  color: var(--accent-2);
  font-weight: 700;
}
.timeline {
  display: grid;
  gap: 18px;
}
.timeline-item {
  padding: 24px;
  border-left: 4px solid var(--accent);
}
.contact-section { padding-bottom: 78px; }
.contact-card {
  padding: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.contact-card a, .contact-card p {
  padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  margin: 0;
  color: var(--text);
}
footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  padding: 28px 18px;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .skills-grid, .projects-grid, .two-col { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero-card { max-width: 420px; }
}

.card,
.project-card,
.timeline-item {
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.card:hover,
.project-card:hover,
.timeline-item:hover {
  transform: translateY(-4px);

  border-color:
    rgba(59, 130, 246, 0.35);

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.34);
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-2);
}
.case-study-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 20px 0;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.case-study-image:hover {
  transform: scale(1.01);
  transition: transform 0.25s ease;
}

.section .wide {
  margin-bottom: 28px;
}
/* Smooth scroll reveal animation */

.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.reveal-left {
  transform: translateX(-42px);
}

.reveal.reveal-right {
  transform: translateX(42px);
}

.reveal.reveal-scale {
  transform: scale(0.94);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
}

/* حركة متدرجة للكروت */

.reveal-delay-1 {
  transition-delay: 0.08s;
}

.reveal-delay-2 {
  transition-delay: 0.16s;
}

.reveal-delay-3 {
  transition-delay: 0.24s;
}

.reveal-delay-4 {
  transition-delay: 0.32s;
}

/* حركة الأزرار */

.btn {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

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

/* حركة صور المشاريع */

.project-image,
.case-study-image {
  transition:
    transform 0.45s ease,
    filter 0.45s ease;
}

.project-card:hover .project-image {
  transform: scale(1.025);
}

.case-study-image:hover {
  transform: scale(1.01);
}

/* احترام إعدادات تقليل الحركة */

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

  .reveal,
  .reveal.reveal-left,
  .reveal.reveal-right,
  .reveal.reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========================================
   ADVANCED PORTFOLIO ANIMATIONS
======================================== */

/* Page loading screen */

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition:
    opacity 0.55s ease,
    visibility 0.55s ease;
}

.site-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  width: min(280px, 75vw);
  text-align: center;
}

.loader-logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 20px;
  object-fit: cover;
  animation: loaderPulse 1.4s ease-in-out infinite;
}

.loader-name {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.loader-track {
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.loader-bar {
  width: 45%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-2)
  );
  animation: loaderMove 1.1s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.18);
  }

  50% {
    transform: scale(1.07);
    box-shadow: 0 16px 42px rgba(59, 130, 246, 0.36);
  }
}

@keyframes loaderMove {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(240%);
  }
}

/* Scroll progress bar */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-2)
  );
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
  transition: width 0.08s linear;
}

/* Back to top button */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;

  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  color: #ffffff;
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--accent-2)
  );

  border: 0;
  border-radius: 15px;
  cursor: pointer;

  font-size: 21px;
  font-weight: 700;

  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);

  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.3);

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 17px 42px rgba(37, 99, 235, 0.45);
}

/* Page entry and exit */

body {
  opacity: 1;
  transition: opacity 0.35s ease;
}

body.page-exit {
  opacity: 0;
}

/* Navigation logo */

.logo {
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.logo:hover {
  transform: scale(1.08) rotate(-2deg);
  filter: brightness(1.08);
}

/* Project cards */

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card .project-image {
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.4s ease;
}

.project-card:hover .project-image {
  transform: scale(1.045);
  filter: brightness(0.82);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    180deg,
    transparent 25%,
    rgba(5, 10, 18, 0.32) 55%,
    rgba(5, 10, 18, 0.7) 100%
  );

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.4s ease;
}

.project-card:hover::after {
  opacity: 1;
}

.project-card .project-body {
  position: relative;
  z-index: 2;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.project-link::after {
  content: "→";
  transition: transform 0.3s ease;
}

.project-link:hover {
  transform: translateY(-2px);
}

.project-link:hover::after {
  transform: translateX(5px);
}

/* Download buttons */

a[download] {
  position: relative;
  overflow: hidden;
}

a[download]::after {
  content: "↓";
  margin-left: 8px;
  display: inline-block;
  transition: transform 0.3s ease;
}

a[download]:hover::after {
  animation: downloadArrow 0.7s ease infinite;
}

@keyframes downloadArrow {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

/* Alternating dashboard image animation */

.case-study-image.reveal-from-left {
  opacity: 0;
  transform: translateX(-50px) scale(0.97);
}

.case-study-image.reveal-from-right {
  opacity: 0;
  transform: translateX(50px) scale(0.97);
}

.case-study-image.reveal-from-left.is-visible,
.case-study-image.reveal-from-right.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.case-study-image {
  transition:
    opacity 0.85s ease,
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}

.case-study-image:hover {
  transform: scale(1.012);
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.35);
}

/* Counter animation */

.counter-number {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* Mobile adjustments */

@media (max-width: 700px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }

  .case-study-image.reveal-from-left,
  .case-study-image.reveal-from-right {
    transform: translateY(35px) scale(0.97);
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  .site-loader {
    display: none;
  }

  body {
    opacity: 1;
    transition: none;
  }

  .scroll-progress {
    transition: none;
  }

  .case-study-image,
  .case-study-image.reveal-from-left,
  .case-study-image.reveal-from-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========================================
   LIGHT / DARK THEME
======================================== */
:root {
  color-scheme: dark;
  --header-bg: rgba(8, 13, 22, 0.88);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --tag-text: #d8f2ff;
  --shadow: rgba(0, 0, 0, 0.34);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-soft: #eef3f9;
  --card: #ffffff;
  --card-hover: #f8fbff;
  --text: #0f172a;
  --muted: #536176;
  --accent: #2563eb;
  --accent-2: #0369a1;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --line: rgba(15, 23, 42, 0.12);
  --header-bg: rgba(245, 247, 251, 0.88);
  --surface-soft: rgba(15, 23, 42, 0.05);
  --tag-text: #075985;
  --shadow: rgba(15, 23, 42, 0.14);
}

body,
.site-header,
.card,
.project-card,
.timeline-item,
.contact-card,
.theme-toggle {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header {
  background: var(--header-bg);
}

.card,
.project-card,
.timeline-item,
.contact-card {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.contact-card a,
.contact-card p {
  background: var(--surface-soft);
}

.tags span {
  color: var(--tag-text);
}

.card:hover,
.project-card:hover,
.timeline-item:hover {
  background-color: var(--card-hover);
  box-shadow: 0 24px 70px var(--shadow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 10px 25px var(--shadow);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
}

.theme-toggle-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
  transform: rotate(18deg);
}

@media (max-width: 900px) {
  .nav-actions {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .site-header,
  .card,
  .project-card,
  .timeline-item,
  .contact-card,
  .theme-toggle,
  .theme-toggle-icon {
    transition: none;
  }
}

/* ========================================
   FIX: KEEP REVEAL ANIMATIONS WITH THEME TRANSITIONS
======================================== */
.reveal.card,
.reveal.project-card,
.reveal.timeline-item,
.reveal.contact-card {
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .reveal.card,
  .reveal.project-card,
  .reveal.timeline-item,
  .reveal.contact-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========================================
   LIGHT MODE: DISTINCT REVEAL ANIMATION
   Dark mode keeps the original slide animation.
======================================== */
html[data-theme="light"] .reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(24px) scale(0.985);
  transition:
    opacity 0.72s ease,
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.72s ease;
}

html[data-theme="light"] .reveal.reveal-left {
  transform: translate(-18px, 20px) rotate(-0.5deg) scale(0.985);
}

html[data-theme="light"] .reveal.reveal-right {
  transform: translate(18px, 20px) rotate(0.5deg) scale(0.985);
}

html[data-theme="light"] .reveal.reveal-scale {
  transform: translateY(18px) scale(0.94);
}

html[data-theme="light"] .reveal.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translate(0, 0) rotate(0) scale(1);
}

/* Preserve theme color transitions on reveal cards in light mode. */
html[data-theme="light"] .reveal.card,
html[data-theme="light"] .reveal.project-card,
html[data-theme="light"] .reveal.timeline-item,
html[data-theme="light"] .reveal.contact-card {
  transition:
    opacity 0.72s ease,
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.72s ease,
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Dashboard images use a soft reveal/wipe in light mode. */
html[data-theme="light"] .case-study-image.reveal-from-left,
html[data-theme="light"] .case-study-image.reveal-from-right {
  opacity: 0;
  filter: blur(7px);
  transform: translateY(22px) scale(0.975);
  clip-path: inset(0 0 18% 0 round 18px);
  transition:
    opacity 0.75s ease,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.75s ease,
    clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="light"] .case-study-image.reveal-from-left.is-visible,
html[data-theme="light"] .case-study-image.reveal-from-right.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
  clip-path: inset(0 0 0 0 round 18px);
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="light"] .reveal,
  html[data-theme="light"] .case-study-image.reveal-from-left,
  html[data-theme="light"] .case-study-image.reveal-from-right {
    opacity: 1;
    filter: none;
    transform: none;
    clip-path: none;
    transition: none;
  }
}

/* ========================================
   PREMIUM HERO SECTION
======================================== */
.hero-premium {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 81px);
  padding-top: 72px;
  padding-bottom: 92px;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: clamp(42px, 6vw, 78px);
  overflow: hidden;
}

.hero-premium::before {
  content: "";
  position: absolute;
  inset: 18px 8px;
  z-index: -3;
  border-radius: 48px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.055), transparent 42%),
    linear-gradient(315deg, rgba(56, 189, 248, 0.035), transparent 48%);
  border: 1px solid rgba(148, 163, 184, 0.09);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  z-index: -2;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
  animation: heroOrbFloat 9s ease-in-out infinite;
}

.hero-orb-one {
  width: 260px;
  height: 260px;
  top: 8%;
  left: -80px;
  background: rgba(37, 99, 235, 0.13);
}

.hero-orb-two {
  width: 210px;
  height: 210px;
  right: 0;
  bottom: 7%;
  background: rgba(56, 189, 248, 0.09);
  animation-delay: -4.5s;
}

.hero-status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  padding: 8px 12px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.07);
  color: #c8f2ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
  animation: statusPulse 2s ease-out infinite;
}

.hero-premium .eyebrow {
  margin-bottom: 12px;
  font-size: clamp(15px, 1.65vw, 20px);
}

.hero-premium .hero-content {
  padding-left: clamp(18px, 2.2vw, 34px);
}

.hero-premium h1 {
  max-width: 680px;
  margin-bottom: 30px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -2.2px;
}

.hero-gradient-text {
  display: block;
  width: fit-content;
  padding-bottom: 5px;
  color: transparent;
  background: linear-gradient(100deg, #60a5fa 4%, #38bdf8 45%, #a5f3fc 72%, #60a5fa 96%);
  background-size: 220% auto;
  background-clip: text;
  -webkit-background-clip: text;
  animation: heroGradient 6s linear infinite;
}

.hero-premium .hero-text {
  max-width: 640px;
  margin: 0;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.85;
}

.hero-primary-btn,
.hero-secondary-btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-inline: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.hero-primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.38);
}

.hero-primary-btn span {
  font-size: 20px;
  transition: transform 0.25s ease;
}

.hero-primary-btn:hover span { transform: translateX(4px); }

.hero-secondary-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.07);
}

.hero-proof {
  display: flex;
  align-items: stretch;
  gap: 18px;
  margin-top: 38px;
}

.hero-proof-item {
  min-width: 105px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-proof-item strong {
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.hero-proof-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.hero-proof-divider {
  width: 1px;
  background: var(--line);
}

.hero-visual {
  position: relative;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-visual:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.hero-image-shell {
  position: relative;
  max-width: 440px;
  margin-inline: auto;
  padding: 13px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.015));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
}

.hero-image-shell::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.24), transparent 45%, rgba(56, 189, 248, 0.16));
  filter: blur(18px);
  opacity: 0.75;
}

.hero-image-glow {
  position: absolute;
  inset: 18% 12% 5%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.25);
  filter: blur(55px);
}

.hero-premium .profile-img {
  width: 100%;
  min-height: 480px;
  margin: 0;
  aspect-ratio: 0.84 / 1;
  border-radius: 24px;
  object-position: center top;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.hero-floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 220px;
  padding: 12px 15px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(13, 20, 32, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
  animation: floatingCard 4.8s ease-in-out infinite;
}

.hero-floating-card-top { top: 11%; left: 10px; }
.hero-floating-card-bottom { right: 10px; bottom: 11%; animation-delay: -2.4s; }

.floating-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-weight: 900;
}

.hero-floating-card div { min-width: 0; }
.hero-floating-card strong,
.hero-floating-card span { display: block; }
.hero-floating-card strong { font-size: 13px; color: var(--text); white-space: nowrap; }
.hero-floating-card span { margin-top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; }

.hero-tool-strip {
  max-width: 440px;
  margin: 18px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tool-strip span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.025);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

html[data-theme="light"] .hero-premium::before {
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.045), transparent 45%),
    linear-gradient(315deg, rgba(14, 165, 233, 0.035), transparent 50%),
    rgba(255, 255, 255, 0.28);
  border-color: rgba(15, 23, 42, 0.075);
}

html[data-theme="light"] .hero-status {
  background: rgba(14, 165, 233, 0.075);
  border-color: rgba(14, 165, 233, 0.2);
  color: #075985;
}

html[data-theme="light"] .hero-gradient-text {
  background-image: linear-gradient(100deg, #1d4ed8, #0284c7 48%, #0f766e 72%, #1d4ed8);
}

html[data-theme="light"] .hero-image-shell {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(37, 99, 235, 0.16);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .hero-floating-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.09);
  box-shadow: 0 13px 30px rgba(15, 23, 42, 0.11);
}

html[data-theme="light"] .hero-tool-strip span {
  background: rgba(255, 255, 255, 0.7);
}

@keyframes heroGradient {
  to { background-position: 220% center; }
}

@keyframes heroOrbFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -16px, 0) scale(1.08); }
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.32); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes floatingCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@media (max-width: 1040px) {
  .hero-premium {
    grid-template-columns: minmax(0, 1fr) minmax(315px, 0.72fr);
    gap: 38px;
  }
  .hero-premium h1 { letter-spacing: -2.4px; }
  .hero-floating-card-top { left: 8px; }
  .hero-floating-card-bottom { right: 8px; }
}

@media (max-width: 900px) {
  .hero-premium {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 58px;
    text-align: center;
  }
  .hero-premium::before { inset-inline: 12px; }
  .hero-content { display: flex; flex-direction: column; align-items: center; }
  .hero-premium .hero-content { padding-left: 0; }
  .hero-gradient-text { margin-inline: auto; }
  .hero-premium .hero-text { max-width: 700px; }
  .hero-proof { justify-content: center; }
  .hero-visual { max-width: 480px; width: 100%; margin-inline: auto; }
}

@media (max-width: 560px) {
  .hero-premium { padding-inline: 16px; padding-top: 42px; gap: 42px; }
  .hero-premium h1 { font-size: clamp(39px, 12vw, 54px); letter-spacing: -2px; }
  .hero-status { font-size: 11px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .hero-proof { width: 100%; gap: 10px; }
  .hero-proof-item { min-width: 0; flex: 1; }
  .hero-proof-item strong { font-size: 21px; }
  .hero-proof-item span { font-size: 10px; }
  .hero-premium .profile-img { min-height: 400px; }
  .hero-floating-card { max-width: 175px; padding: 10px 11px; }
  .hero-floating-card-top { left: 6px; top: 8%; }
  .hero-floating-card-bottom { right: 6px; bottom: 8%; }
  .hero-floating-card strong { font-size: 11px; }
  .hero-floating-card span { font-size: 9px; }
  .floating-icon { width: 29px; height: 29px; flex-basis: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb,
  .status-dot,
  .hero-gradient-text,
  .hero-floating-card {
    animation: none;
  }
}


/* ========================================
   FINAL HERO ENTRANCE SEQUENCE
======================================== */
.hero-premium .hero-content > *,
.hero-premium .hero-visual .hero-image-shell,
.hero-premium .hero-visual .hero-tool-strip {
  opacity: 0;
  transform: translateY(18px);
}

.hero-premium .hero-content.is-visible > *,
.hero-premium .hero-visual.is-visible .hero-image-shell,
.hero-premium .hero-visual.is-visible .hero-tool-strip {
  animation: heroElementIn 0.72s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-premium .hero-content.is-visible .hero-status { animation-delay: 0.05s; }
.hero-premium .hero-content.is-visible .eyebrow { animation-delay: 0.14s; }
.hero-premium .hero-content.is-visible h1 { animation-delay: 0.23s; }
.hero-premium .hero-content.is-visible .hero-text { animation-delay: 0.34s; }
.hero-premium .hero-content.is-visible .hero-actions { animation-delay: 0.44s; }
.hero-premium .hero-content.is-visible .hero-proof { animation-delay: 0.54s; }
.hero-premium .hero-visual.is-visible .hero-image-shell { animation-delay: 0.28s; }
.hero-premium .hero-visual.is-visible .hero-tool-strip { animation-delay: 0.48s; }

@keyframes heroElementIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html[data-theme="light"] .hero-premium .hero-content > *,
html[data-theme="light"] .hero-premium .hero-visual .hero-image-shell,
html[data-theme="light"] .hero-premium .hero-visual .hero-tool-strip {
  filter: blur(5px);
}

html[data-theme="light"] .hero-premium .hero-content.is-visible > *,
html[data-theme="light"] .hero-premium .hero-visual.is-visible .hero-image-shell,
html[data-theme="light"] .hero-premium .hero-visual.is-visible .hero-tool-strip {
  animation-name: heroElementInLight;
}

@keyframes heroElementInLight {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(14px) scale(0.992);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .hero-premium::before {
    inset: 12px;
    border-radius: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-premium .hero-content > *,
  .hero-premium .hero-visual .hero-image-shell,
  .hero-premium .hero-visual .hero-tool-strip {
    opacity: 1;
    filter: none;
    transform: none;
    animation: none !important;
  }
}

/* ========================================
   PREMIUM PROJECT CARDS — OPTION A
   Equal cards, scalable for future projects
======================================== */

#projects {
  position: relative;
  isolation: isolate;
}

#projects::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.10), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.projects-grid {
  gap: 28px;
  align-items: stretch;
}

.project-card {
  --project-card-border: rgba(96, 165, 250, 0.28);
  --project-card-border-hover: rgba(56, 189, 248, 0.78);
  --project-card-surface: linear-gradient(155deg, rgba(17, 27, 43, 0.96), rgba(10, 17, 29, 0.94));
  --project-card-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  --project-card-shadow-hover: 0 34px 90px rgba(0, 0, 0, 0.46), 0 0 34px rgba(37, 99, 235, 0.15);
  --project-tag-bg: rgba(56, 189, 248, 0.08);
  --project-tag-border: rgba(125, 211, 252, 0.20);
  --project-tag-hover: rgba(56, 189, 248, 0.16);

  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--project-card-border);
  border-radius: 26px;
  background: var(--project-card-surface);
  box-shadow: var(--project-card-shadow);
  isolation: isolate;
  transform: translateZ(0);
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s ease,
    box-shadow 0.45s ease,
    background-color 0.3s ease;
}

/* Animated gradient rim */
.project-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 4;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(
    from 180deg at 50% 50%,
    transparent 0deg,
    rgba(56, 189, 248, 0.75) 72deg,
    transparent 145deg,
    rgba(99, 102, 241, 0.62) 238deg,
    transparent 315deg
  );
  opacity: 0;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 0.4s ease;
}

/* Image overlay — limited to the visual area */
.project-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 260px;
  background:
    linear-gradient(180deg, rgba(3, 7, 18, 0.02) 25%, rgba(3, 7, 18, 0.18) 64%, rgba(3, 7, 18, 0.72) 100%),
    linear-gradient(110deg, transparent 24%, rgba(255, 255, 255, 0.18) 45%, transparent 64%);
  background-size: 100% 100%, 240% 100%;
  background-position: center, 170% 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, background-position 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-9px);
  border-color: var(--project-card-border-hover);
  box-shadow: var(--project-card-shadow-hover);
}

.project-card:hover::before,
.project-card:focus-within::before {
  opacity: 1;
}

.project-card:hover::after,
.project-card:focus-within::after {
  opacity: 1;
  background-position: center, -80% 0;
}

.project-card .project-image {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 260px;
  min-height: 260px;
  display: block;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  filter: saturate(0.94) contrast(1.02);
  transform: scale(1.001);
  transition:
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.45s ease;
}

.project-card:hover .project-image,
.project-card:focus-within .project-image {
  transform: scale(1.065);
  filter: saturate(1.08) contrast(1.05) brightness(0.86);
}

.project-card .project-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px;
}

.project-card .project-body h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  transition: color 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-body h3,
.project-card:focus-within .project-body h3 {
  color: var(--accent-2);
  transform: translateY(-3px);
}

.project-card .project-body > p {
  margin: 0 0 16px;
  line-height: 1.72;
}

.project-card .project-body > p:first-of-type {
  font-size: 15.5px;
}

.project-card .project-body strong {
  color: var(--text);
  font-weight: 750;
}

.project-card .tags {
  margin: 4px 0 20px;
  gap: 9px;
}

.project-card .tags span {
  position: relative;
  overflow: hidden;
  padding: 7px 11px;
  color: var(--tag-text);
  background: var(--project-tag-bg);
  border: 1px solid var(--project-tag-border);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    background-color 0.28s ease,
    box-shadow 0.28s ease;
}

.project-card .tags span:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.55);
  background: var(--project-tag-hover);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.13);
}

.project-card .project-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: flex-start;
  min-height: 46px;
  margin-top: auto;
  padding: 12px 18px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: 1px solid rgba(125, 211, 252, 0.42);
  border-radius: 13px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition:
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.32s ease,
    filter 0.32s ease;
}

.project-card .project-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.28) 46%, transparent 70%);
  transform: translateX(-140%);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card .project-link::after {
  content: "→";
  position: relative;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card .project-link:hover,
.project-card .project-link:focus-visible {
  transform: translateY(-3px);
  filter: brightness(1.06);
  box-shadow: 0 17px 38px rgba(37, 99, 235, 0.36);
}

.project-card .project-link:hover::before,
.project-card .project-link:focus-visible::before {
  transform: translateX(140%);
}

.project-card .project-link:hover::after,
.project-card .project-link:focus-visible::after {
  transform: translateX(5px);
}

.project-card .project-link:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.26);
  outline-offset: 4px;
}

/* Light mode gets a clean, editorial surface rather than dark glow. */
html[data-theme="light"] #projects::before {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.07), transparent 68%);
}

html[data-theme="light"] .project-card {
  --project-card-border: rgba(15, 23, 42, 0.10);
  --project-card-border-hover: rgba(37, 99, 235, 0.48);
  --project-card-surface: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
  --project-card-shadow: 0 14px 42px rgba(15, 23, 42, 0.09);
  --project-card-shadow-hover: 0 28px 64px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.08);
  --project-tag-bg: rgba(37, 99, 235, 0.055);
  --project-tag-border: rgba(37, 99, 235, 0.14);
  --project-tag-hover: rgba(37, 99, 235, 0.10);
}

html[data-theme="light"] .project-card::before {
  background: conic-gradient(
    from 180deg at 50% 50%,
    transparent 0deg,
    rgba(37, 99, 235, 0.52) 76deg,
    transparent 155deg,
    rgba(14, 165, 233, 0.42) 245deg,
    transparent 320deg
  );
}

html[data-theme="light"] .project-card::after {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0) 28%, rgba(15, 23, 42, 0.08) 68%, rgba(15, 23, 42, 0.34) 100%),
    linear-gradient(110deg, transparent 24%, rgba(255, 255, 255, 0.44) 45%, transparent 64%);
  background-size: 100% 100%, 240% 100%;
  background-position: center, 170% 0;
}

html[data-theme="light"] .project-card:hover::after,
html[data-theme="light"] .project-card:focus-within::after {
  background-position: center, -80% 0;
}

html[data-theme="light"] .project-card:hover .project-image,
html[data-theme="light"] .project-card:focus-within .project-image {
  filter: saturate(1.04) contrast(1.025) brightness(0.96);
}

html[data-theme="light"] .project-card .project-link {
  box-shadow: 0 11px 25px rgba(37, 99, 235, 0.19);
}

/* Six-card stagger now scales to future cards through an inline CSS variable. */
.project-card.reveal {
  transition-delay: var(--project-reveal-delay, 0ms);
}

@media (max-width: 900px) {
  .projects-grid {
    gap: 22px;
  }

  .project-card .project-image {
    height: 240px;
    min-height: 240px;
  }

  .project-card::after {
    height: 240px;
  }
}

@media (max-width: 560px) {
  .project-card {
    border-radius: 21px;
  }

  .project-card .project-image {
    height: 210px;
    min-height: 210px;
  }

  .project-card::after {
    height: 210px;
  }

  .project-card .project-body {
    padding: 22px 19px;
  }

  .project-card .project-body h3 {
    font-size: 21px;
  }

  .project-card .project-link {
    width: 100%;
  }
}

@media (hover: none) {
  .project-card:hover {
    transform: none;
  }

  .project-card::before,
  .project-card::after {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card::before,
  .project-card::after,
  .project-card .project-image,
  .project-card .project-body h3,
  .project-card .tags span,
  .project-card .project-link,
  .project-card .project-link::before,
  .project-card .project-link::after {
    transition: none !important;
    animation: none !important;
  }

  .project-card:hover,
  .project-card:focus-within,
  .project-card:hover .project-image,
  .project-card:focus-within .project-image,
  .project-card:hover .project-body h3,
  .project-card:focus-within .project-body h3 {
    transform: none;
  }
}

/* ========================================
   PREMIUM CERTIFICATE CARDS
======================================== */

.cert-grid {
  gap: 28px;
  align-items: stretch;
}

.cert-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.cert-card:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

/* Golden A+ Badge */
.cert-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #1a1300;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.cert-image-shell {
  position: relative;
  width: 100%;
  height: 220px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease, filter 0.3s ease;
}

.cert-card:hover .cert-preview-img {
  transform: scale(1.05);
  filter: brightness(1.03);
}

.cert-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cert-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
}

.cert-issuer {
  color: var(--accent-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cert-id {
  color: var(--muted);
  font-family: monospace;
  background: var(--surface-soft);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.cert-title {
  margin: 0 0 16px;
  font-size: 21px;
  line-height: 1.3;
  color: var(--text);
}

/* Specs Row */
.cert-specs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.spec-item strong {
  font-size: 16px;
  color: var(--text);
  line-height: 1.1;
}

.spec-item span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.spec-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.cert-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 18px;
}

/* Accreditations tags */
.cert-accreditations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.cert-accreditations span {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-2);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Buttons */
.cert-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.cert-btn {
  flex: 1;
  padding: 11px 14px;
  font-size: 13px;
  text-align: center;
  justify-content: center;
}

/* Academic Card Bottom Row */
.academic-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
}

.academic-icon {
  font-size: 38px;
  line-height: 1;
  padding: 16px;
  background: var(--accent-soft);
  border-radius: 18px;
  border: 1px solid var(--line);
}

@media (max-width: 700px) {
  .cert-specs { padding: 10px 8px; }
  .spec-item strong { font-size: 14px; }
  .cert-actions { flex-direction: column; }
  .academic-card { flex-direction: column; text-align: center; }
}
