/* CloudSome-inspired minimal dark theme */

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #161616;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #fafafa;
  --muted: #9b9ba3;
  --muted-2: #6a6a72;
  --accent: #a78bfa;
  --accent-2: #c4b5fd;
  --accent-glow: rgba(167, 139, 250, 0.35);
  --tech-cyan: #66d9ff;
  --tech-cyan-soft: rgba(102, 217, 255, 0.38);
  --tech-blue-soft: rgba(82, 166, 255, 0.34);
  --ok: #86efac;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Plus Jakarta Sans", "Inter", "Space Grotesk", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --max-w: 880px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; }

/* Subtle ambient purple glow at top */
.bg-grid { display: none; }
.bg-glow { display: none; }

body::before {
  content: "";
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 600px;
  background: radial-gradient(closest-side, rgba(167, 139, 250, 0.18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 0;
}

.brand-mark {
  width: 24px;
  height: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  flex: 0 0 auto;
}

.brand-mark span:nth-child(1) { background: #f1511b; }
.brand-mark span:nth-child(2) { background: #80cc28; }
.brand-mark span:nth-child(3) { background: #00adef; }
.brand-mark span:nth-child(4) { background: #fbbc09; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.brand-label {
  margin: 0;
  color: var(--text);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-title {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--display);
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  padding: 4px 9px;
  min-width: 26px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.lang-btn:hover { color: var(--text); }

.lang-btn.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.menu-toggle:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.menu-icon {
  position: relative;
  width: 16px;
  height: 12px;
  display: inline-block;
}

.menu-icon span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.menu-icon span:nth-child(1) { top: 1px; }
.menu-icon span:nth-child(2) { top: 6px; }
.menu-icon span:nth-child(3) { top: 11px; }

.site-header.is-open .menu-icon span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.site-header.is-open .menu-icon span:nth-child(2) { opacity: 0; }
.site-header.is-open .menu-icon span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

.primary-nav {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 24px 10px;
}

.primary-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.primary-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

/* ---------- Layout ---------- */
main {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 38px 28px 80px;
}

.section {
  margin-top: 72px;
  scroll-margin-top: 96px;
}

.section:first-of-type { margin-top: 0; }

.section-head { margin-bottom: 28px; }

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--text);
  letter-spacing: -0.02em;
}

.section-head h2 {
  margin: 12px 0 12px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.15;
}

.section-intro {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 720px;
}

.section-subtitle {
  margin: 36px 0 16px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 26px;
  text-align: center;
}

.hero-copy {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero #overview-title {
  max-width: 840px;
  margin: 12px auto 12px;
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 730;
  line-height: 1.06;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #ffffff 0%, #caf0ff 35%, #9ad7ff 70%, #d9f7ff 100%);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleHueFloat 8s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(115, 214, 255, 0.22));
}

.hero #overview-description {
  font-size: 16px;
  color: #b9c4cf;
  max-width: 760px;
  margin: 0 auto 26px;
  line-height: 1.65;
}

.hero .eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent-2);
  font-size: 11px;
}

.hero-cta {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 11px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--text);
  color: #0a0a0a;
  border-color: var(--text);
}

.btn-primary:hover { transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
}

.engine-loop {
  position: relative;
  margin: 10px auto 24px;
  width: 100%;
  max-width: 860px;
  min-height: 0;
  padding: 30px 22px 22px;
  overflow: hidden;
  border-color: rgba(102, 217, 255, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 44%, rgba(102, 217, 255, 0.18), rgba(82, 166, 255, 0.08) 35%, transparent 70%),
    linear-gradient(165deg, rgba(8, 28, 42, 0.58), rgba(11, 18, 29, 0.92));
}

.engine-canvas {
  position: relative;
  width: min(100%, 760px);
  height: 520px;
  margin: 0 auto;
}

.engine-loop::before,
.engine-loop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.engine-loop::before {
  background-image:
    linear-gradient(rgba(102, 217, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 217, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.7;
  mask-image: radial-gradient(circle at center, black 42%, transparent 88%);
}

.engine-loop::after {
  border: 1px solid rgba(102, 217, 255, 0.24);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.engine-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(102, 217, 255, 0.42);
  box-shadow:
    0 0 0 10px rgba(102, 217, 255, 0.06),
    0 0 62px rgba(102, 217, 255, 0.24);
  animation: orbitPulse 4s ease-in-out infinite;
}

.engine-connections {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 520px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  overflow: visible;
}

.engine-connections polygon,
.engine-connections line {
  fill: none;
  stroke: rgba(135, 235, 255, 0.62);
  stroke-width: 0.42;
  filter: drop-shadow(0 0 10px rgba(102, 217, 255, 0.4));
}

.engine-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 332px;
  transform: translate(-50%, -50%);
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid rgba(127, 232, 255, 0.38);
  background: linear-gradient(175deg, rgba(10, 27, 39, 0.86), rgba(5, 14, 23, 0.92));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(6px);
}

.engine-core-eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ddfff;
}

.engine-core h3 {
  margin: 8px 0 0;
  font-size: clamp(17px, 2.1vw, 24px);
  line-height: 1.3;
  font-weight: 650;
  color: #eaf9ff;
}

.engine-node-grid {
  position: relative;
}

.engine-node {
  position: absolute;
  width: 176px;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(127, 232, 255, 0.34);
  background: linear-gradient(165deg, rgba(16, 38, 54, 0.92), rgba(8, 18, 28, 0.92));
  box-shadow: 0 0 30px rgba(102, 217, 255, 0.22);
  display: grid;
  place-items: center;
  animation: nodeFloat 4.2s ease-in-out infinite;
}

.engine-node p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: #e1f7ff;
  font-weight: 550;
  letter-spacing: 0.01em;
}

.node-1 { left: 292px; top: 6px; animation-delay: 0s; }
.node-2 { left: 548px; top: 95px; animation-delay: 0.6s; }
.node-3 { left: 548px; top: 300px; animation-delay: 1.1s; }
.node-4 { left: 292px; top: 448px; animation-delay: 1.8s; }
.node-5 { left: 36px; top: 300px; animation-delay: 2.4s; }
.node-6 { left: 36px; top: 95px; animation-delay: 3s; }

.engine-caption {
  width: min(94%, 740px);
  margin: 14px auto 10px;
  font-size: 13px;
  color: rgba(230, 245, 255, 0.82);
  line-height: 1.55;
  text-align: center;
}

/* Hero metrics strip */
.hero-metrics {
  margin: 16px auto 0;
  max-width: 720px;
  padding: 22px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
}

.hero-metrics h3 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-strip {
  list-style: none;
  margin: 0;
  padding: 22px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
}

/* When metric-strip lives inside .hero-metrics card, drop its own wrapper */
.hero-metrics > .metric-strip {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.metric-strip li,
.metric-card {
  padding: 12px 18px;
  border-right: 1px solid var(--line);
}

.metric-strip > li:first-child,
.metric-strip > .metric-card:first-child { padding-left: 0; }
.metric-strip > li:last-child,
.metric-strip > .metric-card:last-child { padding-right: 0; border-right: 0; }

.metric-strip li span,
.metric-card span {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
}

.metric-strip li p,
.metric-card p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

@keyframes orbitPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow:
      0 0 0 10px rgba(102, 217, 255, 0.05),
      0 0 48px rgba(102, 217, 255, 0.18);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.02);
    box-shadow:
      0 0 0 16px rgba(102, 217, 255, 0.035),
      0 0 68px rgba(102, 217, 255, 0.22);
  }
}

@keyframes nodeFloat {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes titleHueFloat {
  0%,
  100% {
    background-position: 0% 50%;
    filter: drop-shadow(0 0 10px rgba(115, 214, 255, 0.20));
  }
  50% {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 16px rgba(115, 214, 255, 0.36));
  }
}

/* ---------- Cards (flat dark) ---------- */
.cards {
  display: grid;
  gap: 14px;
}

.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-spacer { margin-top: 16px; }

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.card:hover {
  border-color: var(--line-strong);
  background: var(--bg-3);
}

.project,
.cert-card,
.activity-card,
.next-card { display: flex; flex-direction: column; }

.tag {
  display: inline-flex;
  align-self: flex-start;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(167, 139, 250, 0.06);
}

.project h3,
.cert-card h3,
.activity-card h3,
.next-card h3 {
  margin: 12px 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.project p,
.cert-card p,
.activity-card p,
.next-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.cert-dates {
  margin: 4px 0 8px;
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: 0.01em;
}

.cert-cred {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cert-cred code {
  font-family: var(--mono);
  color: var(--accent-2);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
}

.cert-link {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-2);
  text-decoration: none;
}

.cert-link:hover { color: var(--text); }

.kv {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 13px;
}

.kv span { color: var(--muted-2); }
.kv strong { color: var(--text); font-weight: 600; }

/* ---------- PMX workbook ---------- */
.workbook-card { padding: 0; overflow: hidden; }

.workbook-head {
  padding: 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workbook-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.workbook-head p { margin: 0; color: var(--muted); font-size: 14px; }

.workbook-frame-shell {
  background: #c9d1de;
  padding: 0;
}

.workbook-frame-shell iframe {
  width: 100%;
  min-height: 720px;
  border: 0;
  display: block;
  background: #c9d1de;
}

.detail-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted-2);
}

/* ---------- Profile ---------- */
.profile-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
  padding: 24px;
}

.profile-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.profile-avatar-shell {
  position: relative;
  width: 160px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg-3);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  font-family: var(--display);
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(135deg, #1f1f24, #2a2336);
}

.profile-content h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
  flex-wrap: wrap;
}

.profile-company-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.profile-name {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.cert-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.cert-head .tag {
  margin: 0;
}

.cert-logo {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 5px;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-2);
  text-decoration: none;
}

.linkedin-link:hover { color: var(--text); }

/* ---------- Reveal animation (subtle) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 28px 56px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .four-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .engine-loop {
    padding: 24px 14px 18px;
  }

  .engine-canvas {
    width: min(100%, 640px);
    height: 470px;
  }

  .engine-node {
    width: 152px;
    min-height: 58px;
    padding: 10px 12px;
  }

  .engine-orbit,
  .engine-connections {
    width: 460px;
  }

  .engine-core {
    width: 300px;
  }

  .node-1 { left: 244px; top: 10px; }
  .node-2 { left: 482px; top: 90px; }
  .node-3 { left: 482px; top: 274px; }
  .node-4 { left: 244px; top: 402px; }
  .node-5 { left: 6px; top: 274px; }
  .node-6 { left: 6px; top: 90px; }
}

@media (max-width: 820px) {
  .header-inner { padding: 12px 18px; }
  .primary-nav { padding: 0 14px 10px; }

  .menu-toggle { display: inline-flex; }

  .primary-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 14px 16px;
    border-top: 1px solid var(--line);
  }

  .site-header.is-open .primary-nav {
    display: flex;
    animation: drawerSlide 0.22s ease;
  }

  .primary-nav a {
    padding: 12px 14px;
    font-size: 14px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .primary-nav a:last-child { border-bottom: 0; }

  main { padding: 24px 18px 64px; }
  .section { margin-top: 56px; }
  .hero { padding: 34px 0 16px; }

  .hero #overview-title {
    margin: 12px auto 10px;
    font-size: clamp(26px, 7.2vw, 38px);
    line-height: 1.08;
  }

  .hero #overview-description {
    margin-bottom: 18px;
    font-size: 14.5px;
  }

  .two-col,
  .three-col,
  .four-col,
  .profile-card { grid-template-columns: 1fr; }

  .profile-card { text-align: center; }
  .profile-avatar-shell { margin: 0 auto; width: 140px; }

  .hero-cta { flex-direction: column; align-items: stretch; width: 100%; }
  .btn-primary, .btn-secondary { justify-content: center; }

  .engine-loop {
    padding: 16px 10px 14px;
  }

  .engine-canvas {
    width: min(100%, 480px);
    height: 390px;
  }

  .engine-orbit,
  .engine-connections {
    width: 360px;
  }

  .engine-core {
    width: 244px;
    padding: 14px 14px;
  }

  .engine-node {
    width: 116px;
    min-height: 52px;
    padding: 8px 8px;
  }

  .engine-node p {
    font-size: 10.5px;
  }

  .node-1 { left: 182px; top: 4px; }
  .node-2 { left: 350px; top: 70px; }
  .node-3 { left: 350px; top: 214px; }
  .node-4 { left: 182px; top: 334px; }
  .node-5 { left: 14px; top: 214px; }
  .node-6 { left: 14px; top: 70px; }

  .engine-caption {
    font-size: 12px;
    margin-top: 8px;
  }

  .metric-strip { grid-template-columns: 1fr 1fr; padding: 16px; }
  .metric-strip li,
  .metric-card { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 0; }
  .metric-strip > li:nth-child(odd),
  .metric-strip > .metric-card:nth-child(odd) { padding-right: 12px; border-right: 1px solid var(--line); }
  .metric-strip > li:last-child,
  .metric-strip > .metric-card:last-child { border-bottom: 0; }
  .metric-strip > li:nth-last-child(2):nth-child(odd),
  .metric-strip > .metric-card:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}

@media (max-width: 620px) {
  .engine-loop {
    min-height: auto;
    padding: 14px 10px 14px;
    margin-top: 12px;
  }

  .engine-canvas {
    width: 100%;
    height: 330px;
  }

  .engine-orbit,
  .engine-connections {
    display: none;
  }

  .engine-core {
    position: relative;
    inset: auto;
    transform: none;
    width: 100%;
    max-width: none;
    margin-bottom: 12px;
  }

  .engine-node-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .engine-node {
    position: relative;
    inset: auto;
    width: auto;
    min-height: 52px;
    padding: 10px;
    animation: none;
  }

  .node-1,
  .node-2,
  .node-3,
  .node-4,
  .node-5,
  .node-6 {
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
  }

  .engine-caption {
    width: 100%;
    margin-top: 10px;
    text-align: left;
  }
}

@keyframes drawerSlide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Partner Enablement page === */
.event-list { display: flex; flex-direction: column; gap: 28px; }

.event-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px;
}

.event-head { display: flex; flex-direction: column; gap: 4px; }
.event-index {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.event-card h3 {
  margin: 2px 0 0;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.event-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--accent-2);
  font-weight: 500;
}

.event-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .event-photos { grid-template-columns: 1fr; }
}
.event-photo {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-3);
  aspect-ratio: 4 / 3;
}
.event-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.event-photo:hover img { transform: scale(1.03); }

.event-metrics.metric-strip {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(167, 139, 250, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 0;
}
.event-metrics.metric-strip .metric-card {
  padding: 0 18px;
  border-right: 1px solid var(--line);
  text-align: left;
}
.event-metrics.metric-strip .metric-card:last-child { border-right: 0; }
.event-metrics.metric-strip .metric-card span {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
}
.event-metrics.metric-strip .metric-card span small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
.event-metrics.metric-strip .metric-card p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.event-block { display: flex; flex-direction: column; gap: 6px; }
.event-block-title {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
}
.event-block p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.event-block ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.event-block ul li {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

.back-link {
  color: var(--accent-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.back-link:hover { border-bottom-color: var(--accent-2); }

.view-all-row { text-align: right; }

.primary-nav a.is-current {
  color: var(--text);
  background: rgba(167, 139, 250, 0.10);
}

@media (max-width: 720px) {
  .event-metrics.metric-strip { grid-template-columns: repeat(3, 1fr); padding: 10px 0; }
  .event-metrics.metric-strip .metric-card { padding: 0 10px; }
  .event-metrics.metric-strip .metric-card span { font-size: 17px; }
}

/* Solution Build detail page */
.subsection-title { margin-top: 56px; }
.offer-table-wrap { display: grid; gap: 14px; }
.offer-row {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color .2s ease, transform .2s ease;
}
.offer-row:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.offer-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.offer-index {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.06em;
}
.offer-date { font-family: 'JetBrains Mono', monospace; color: var(--muted-2); }
.offer-partner { color: var(--text); font-weight: 600; font-size: 13px; }
.offer-type {
  font-size: 11px;
  color: var(--muted);
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.offer-status-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.offer-status-badge.status-oa {
  background: rgba(167, 139, 250, 0.18);
  color: var(--accent-2);
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.offer-status-badge.status-ov {
  background: rgba(155, 155, 163, 0.10);
  color: var(--muted);
  border: 1px solid var(--line-strong);
}
.offer-name {
  margin: 4px 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.offer-achievement {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.offer-marketplace {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.offer-marketplace-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(167, 139, 250, 0.14);
  color: var(--accent-2);
  margin-right: 6px;
  text-transform: uppercase;
}
.offer-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 18px;
  margin: 14px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.015);
}
.offer-meta div { display: flex; flex-direction: column; gap: 2px; }
.offer-meta dt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.offer-meta dd { margin: 0; font-size: 13px; color: var(--text); line-height: 1.45; }
.offer-phases {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}
.offer-phase {
  padding: 14px 16px;
  border-left: 2px solid var(--accent);
  background: rgba(167, 139, 250, 0.04);
  border-radius: 0 10px 10px 0;
}
.offer-phase h5 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: 0.03em;
}
.offer-phase p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.offer-team { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.offer-team li { font-size: 13px; color: var(--text); }
.offer-team span { color: var(--muted); font-weight: 500; }

@media (max-width: 640px) {
  .offer-row-head { font-size: 11px; gap: 6px 10px; }
  .offer-status-badge { margin-left: 0; }
}

/* Back to top floating button */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, border-color .2s ease, background .2s ease;
  z-index: 60;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  background: rgba(167, 139, 250, 0.12);
}
.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .back-to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; }
}

/* Experience block on profile page */
.experience-block { margin-top: 28px; }
.experience-heading { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.experience-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.experience-item { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; transition: border-color 0.2s ease, background 0.2s ease; }
.experience-item:hover { border-color: var(--line-strong); background: var(--bg-3); }
.experience-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 6px; flex-wrap: wrap; }
.experience-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.experience-logo { width: 28px; height: 28px; flex-shrink: 0; border-radius: 6px; background: #ffffff; padding: 3px; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.experience-role { margin: 0; font-size: 1.02rem; font-weight: 600; color: var(--text); }
.experience-date { margin: 0; font-size: 0.8rem; color: var(--muted); font-family: 'JetBrains Mono', monospace; letter-spacing: -0.03em; white-space: nowrap; }
.experience-company { margin: 0; font-size: 0.92rem; color: var(--text); }
.experience-location { margin: 4px 0 0; font-size: 0.82rem; color: var(--muted-2); }
@media (max-width: 640px) { .experience-row { flex-direction: column; gap: 4px; } .experience-date { font-size: 0.78rem; } }

.contact-grid { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0 0; }
.contact-item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; background: rgba(255,255,255,0.04); padding: 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); }
.contact-qr { width: 120px; height: 120px; display: block; background: #ffffff; padding: 6px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.25); box-sizing: border-box; }
.contact-label { font-size: 0.78rem; color: var(--text); font-weight: 600; letter-spacing: 0.02em; }
.contact-info { list-style: none; padding: 0; margin: 4px 0 0; width: 100%; display: flex; flex-direction: column; gap: 8px; font-size: 0.75rem; color: var(--muted); text-align: center; }
.contact-info li { display: flex; flex-direction: column; gap: 2px; word-break: break-word; }
.contact-info-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-2); font-weight: 600; }
.contact-info-value { color: var(--text); font-size: 0.8rem; line-height: 1.35; }
.contact-info-value a { color: var(--text); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.15); }
.contact-info-value a:hover { border-bottom-color: var(--text); }
@media (max-width: 640px) { .contact-qr { max-width: 120px; } }
