:root {
  --bg: #0a0d12;
  --bg-soft: #10151d;
  --panel: #131a24;
  --panel-2: #18212d;
  --border: #273244;
  --text: #e8edf4;
  --muted: #93a0b2;
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --success: #86efac;
  --warning: #fde68a;
  --danger: #fda4af;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(125, 211, 252, 0.08), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(167, 139, 250, 0.07), transparent 30rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #bae6fd;
}

.navbar {
  background: rgba(10, 13, 18, 0.86) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(39, 50, 68, 0.75);
}

.navbar-brand {
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--text) !important;
}

.nav-link {
  color: #aeb9c8 !important;
}

.nav-link:hover,
.nav-link.active {
  color: #fff !important;
}

.navbar-toggler {
  border-color: var(--border);
}

.hero {
  padding: 7rem 0 4rem;
}

.hero-kicker,
.section-kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  font-size: 0.78rem;
}

.display-title {
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.gradient-text {
  background: linear-gradient(90deg, #f8fafc 0%, #cbd5e1 45%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead-muted {
  color: var(--muted);
  max-width: 48rem;
}

.btn-accent {
  background: var(--text);
  color: #0a0d12;
  border: 1px solid var(--text);
  font-weight: 700;
}

.btn-accent:hover {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #05070a;
}

.btn-outline-soft {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(19, 26, 36, 0.6);
}

.btn-outline-soft:hover {
  color: #fff;
  border-color: #475569;
  background: var(--panel-2);
}

.section {
  padding: 4.5rem 0;
}

.section-border {
  border-top: 1px solid rgba(39, 50, 68, 0.7);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.card-dark {
  background: linear-gradient(180deg, rgba(24, 33, 45, 0.96), rgba(16, 21, 29, 0.96));
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.project-card {
  height: 100%;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: #475569;
  background: linear-gradient(180deg, #1a2532, #111821);
}

.project-index {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #64748b;
  font-size: 0.8rem;
}

.badge-tech {
  background: #0f1722;
  border: 1px solid #2d3b4f;
  color: #b7c4d4;
  font-weight: 500;
  padding: 0.5rem 0.65rem;
}

.metric {
  border-left: 2px solid var(--border);
  padding-left: 1rem;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.metric-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 2.25rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.35rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(125, 211, 252, 0.09);
}

.muted {
  color: var(--muted) !important;
}

.code-window {
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  overflow: hidden;
  background: #070a0f;
}

.code-window-bar {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: #0e131b;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
}

pre {
  margin: 0;
  padding: 1.2rem;
  color: #cbd5e1;
  overflow-x: auto;
  font-size: 0.88rem;
}

code {
  color: #cbd5e1;
}

.architecture-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
  overflow-x: auto;
  background: #080b10;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.4rem;
  color: #b6c2d1;
  line-height: 1.6;
}

.cv-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.4rem;
  margin-bottom: 2rem;
}

.form-control,
.form-select {
  background: #0d1219;
  border: 1px solid var(--border);
  color: var(--text);
}

.form-control:focus,
.form-select:focus {
  background: #0d1219;
  color: var(--text);
  border-color: #4b617d;
  box-shadow: 0 0 0 0.2rem rgba(125, 211, 252, 0.08);
}

.form-control::placeholder {
  color: #5f6c7e;
}

.footer {
  border-top: 1px solid rgba(39, 50, 68, 0.8);
  color: var(--muted);
  padding: 2rem 0;
}

.sticky-side {
  position: sticky;
  top: 6rem;
}

.small-rule {
  width: 3rem;
  height: 2px;
  background: var(--accent);
  opacity: 0.7;
}

.list-clean {
  padding-left: 1.15rem;
}

.list-clean li {
  margin-bottom: 0.6rem;
  color: #b6c0ce;
}

@media (max-width: 991.98px) {
  .hero {
    padding-top: 5rem;
  }

  .sticky-side {
    position: static;
  }
}

@media print {
  .navbar,
  .footer,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111827;
  }

  .muted,
  .text-secondary {
    color: #4b5563 !important;
  }

  .card-dark {
    background: #fff;
    color: #111827;
    box-shadow: none;
    border-color: #d1d5db;
  }
}

/* Certificates ------------------------------------------------------ */
.certificate-card {
  position: relative;
  overflow: hidden;
}

.certificate-card::after {
  content: "";
  position: absolute;
  width: 12rem;
  height: 12rem;
  right: -7rem;
  top: -7rem;
  border: 1px solid rgba(125, 211, 252, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 2rem rgba(125, 211, 252, 0.025),
              0 0 0 4rem rgba(167, 139, 250, 0.02);
  pointer-events: none;
}

.certificate-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid #344258;
  border-radius: 0.85rem;
  background: #0d131b;
  color: #dbe7f3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
}

.certificate-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.6rem;
  border: 1px solid rgba(134, 239, 172, 0.18);
  border-radius: 999px;
  background: rgba(134, 239, 172, 0.055);
  color: #bbf7d0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.certificate-status-neutral {
  border-color: #344258;
  background: #101720;
  color: #9eacbd;
}

.status-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0.2rem rgba(134, 239, 172, 0.08);
}

.certificate-meta {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.certificate-meta > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
}

.certificate-meta span {
  color: var(--muted);
  font-size: 0.83rem;
}

.certificate-meta strong {
  color: #d9e2ec;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: right;
}

.certificate-link {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  font-weight: 700;
}

.certificate-card-add {
  display: flex;
  align-items: center;
  border-style: dashed;
  background: rgba(13, 18, 25, 0.58);
  box-shadow: none;
}

.certificate-summary {
  box-shadow: none;
}

@media (max-width: 575.98px) {
  .certificate-meta > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
  }

  .certificate-meta strong {
    text-align: left;
  }
}

/* Media & News ------------------------------------------------------- */
.media-feature {
  position: relative;
  overflow: hidden;
  border-color: #334155;
}

.media-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 100% 0%, rgba(125, 211, 252, 0.08), transparent 34%),
              radial-gradient(circle at 78% 100%, rgba(167, 139, 250, 0.06), transparent 30%);
}

.media-feature > * {
  position: relative;
  z-index: 1;
}

.media-type {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.6rem;
  border: 1px solid #344258;
  border-radius: 999px;
  background: #101720;
  color: #c6d2df;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.media-placeholder {
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid #2f3b4f;
  border-radius: 1rem;
  background: linear-gradient(145deg, #0c1118, #111923);
  color: #7dd3fc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.18em;
}

.media-placeholder small {
  color: var(--muted);
  font-family: inherit;
  letter-spacing: 0.02em;
}

.media-card {
  display: flex;
  flex-direction: column;
}

.media-card .media-link {
  margin-top: auto;
}

.media-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}

.media-card-add {
  border-style: dashed;
  background: rgba(13, 18, 25, 0.58);
  box-shadow: none;
}

.media-timeline {
  border-top: 1px solid var(--border);
}

.media-timeline-item {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.media-timeline-date {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 700;
}

@media (max-width: 575.98px) {
  .media-timeline-item {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .media-placeholder {
    min-height: 11rem;
  }
}

/* .certificate-card img {
  width: 100%;
  height: auto;
  display: block;
} */