/**
 * Architect UI — contemporary IT professional shell & portfolio surfaces.
 * Loads after styles.css; extends tokens without breaking lesson content.
 */

/* Tokens: see design-tokens.css */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
}

.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(34, 211, 238, 0.09), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(99, 102, 241, 0.07), transparent 45%),
    linear-gradient(180deg, #eef1f6 0%, #e8edf4 100%);
}

.mesh-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black 0%, transparent 85%);
}

.app-shell {
  position: relative;
  z-index: 1;
  grid-template-columns: var(--sidebar-w) 1fr;
}

.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 1.35rem 1rem 2rem;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--glow), var(--accent), transparent 70%);
  opacity: 0.85;
}

.sidebar {
  position: sticky;
  top: 0;
}

.brand-link--compact {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
}

.brand-link--compact:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--sidebar-border);
  text-decoration: none;
}

.brand-monogram {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
  background: linear-gradient(145deg, var(--glow), #67e8f9);
  box-shadow: 0 2px 12px var(--glow-dim);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.brand-name {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sidebar-text-active);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-role {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--sidebar-text);
  line-height: 1.2;
}

.sidebar-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sidebar-text-active);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.sidebar-home-btn:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: var(--glow);
  color: #fff;
  text-decoration: none;
}

.sidebar-home-icon {
  font-size: 1rem;
  line-height: 1;
}

.nav-home-link {
  font-weight: 600;
}

.main-topbar {
  display: flex;
  align-items: center;
  padding: 0.85rem 2.5rem 0;
  max-width: 1200px;
  margin: 0 auto;
}

.topbar-home {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.topbar-home:hover {
  color: var(--accent);
  border-color: rgba(8, 145, 178, 0.35);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

body.mode-intro .topbar-home {
  color: var(--accent);
  border-color: rgba(8, 145, 178, 0.4);
  background: var(--accent-soft);
}

.daily-cartoon-source {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.daily-cartoon-source a {
  font-weight: 600;
}

.bento-grid .daily-cartoon-img {
  max-height: 200px;
  width: 100%;
  object-fit: contain;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem 0.5rem;
  padding: 0.35rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86efac;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 999px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.subtitle {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--sidebar-text);
  padding: 0 0.5rem;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0.5rem 0.35rem;
}

.progress-fill {
  background: linear-gradient(90deg, var(--accent), var(--glow));
  box-shadow: 0 0 12px var(--glow-dim);
}

#progress-label {
  color: var(--sidebar-text) !important;
  font-family: var(--mono);
  font-size: 0.68rem !important;
}

.nav-section {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.65);
  margin: 1.25rem 0 0.5rem;
  padding-left: 0.5rem;
}

.nav-link {
  color: var(--sidebar-text);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 500;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sidebar-text-active);
  box-shadow: none;
}

.nav-link.active {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.25);
  color: var(--glow);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}

.nav-link.nav-locked {
  color: #fcd34d;
  border-color: rgba(252, 211, 77, 0.2);
}

.main-wrap {
  min-width: 0;
}

.main {
  padding: 2rem 2.5rem 4rem;
  max-width: none;
}

.main.main--intro,
.main.main--dashboard {
  max-width: 1200px;
  margin: 0 auto;
}

/* —— Buttons —— */
.btn {
  font-family: var(--font);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:not(.secondary):not(.btn-light):not(.btn-outline-light):not(.success) {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.35);
}

.btn:not(.secondary):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.4);
}

.btn.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-light {
  background: #fff;
  color: #0f172a;
  border: none;
  box-shadow: var(--shadow-md);
}

.btn-outline-light {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #f8fafc;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* —— Architect hero —— */
.intro-page {
  animation: arch-fade 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes arch-fade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.arch-hero {
  position: relative;
  margin-bottom: 2.5rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}

.arch-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: stretch;
}

.arch-hero-panel {
  position: relative;
  padding: 2.25rem 2.5rem;
  border-radius: 20px;
  background: linear-gradient(145deg, #0a0e14 0%, #111827 45%, #0f172a 100%);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: visible;
}

.arch-hero-panel::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.15), transparent 65%);
  pointer-events: none;
}

.arch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--glow);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
}

.arch-badge::before {
  content: "//";
  opacity: 0.6;
}

.intro-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  font-size: 1.35rem;
  background: linear-gradient(135deg, #0891b2, #6366f1);
  box-shadow: 0 8px 32px rgba(8, 145, 178, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.intro-avatar-row {
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.intro-name {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #f8fafc;
  line-height: 1.15;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.intro-name .port-name-first,
.intro-name .port-name-mid,
.intro-name .port-name-last {
  color: inherit;
}

.intro-headline {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
}

.intro-detail,
.intro-loc {
  font-size: 0.88rem;
  color: #94a3b8;
}

.intro-hook {
  margin: 0 0 1.75rem;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  font-style: normal;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #cbd5e1;
  max-width: 54ch;
}

.intro-hook::before {
  content: "▸ ";
  color: var(--glow);
  font-family: var(--mono);
}

.arch-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Systems console */
.arch-console {
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.5rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.arch-console-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.arch-console-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.arch-console-title span {
  color: var(--accent);
}

.arch-console-live {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #16a34a;
  font-weight: 600;
}

.arch-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.arch-metric {
  padding: 0.75rem 0.85rem;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.arch-metric-value {
  display: block;
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.arch-metric-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.3;
}

.arch-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.arch-stack-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.82rem;
}

.arch-stack-item:last-child {
  border-bottom: none;
}

.arch-stack-code {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 1.5rem;
}

.arch-stack-label {
  color: var(--text-soft);
  font-weight: 500;
}

/* Section headers */
.section-block {
  margin-bottom: 2.75rem;
}

.section-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.section-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 56ch;
  line-height: 1.6;
}

/* Bento daily grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.bento-cell {
  min-height: 0;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: visible;
  transition: box-shadow 0.2s, transform 0.2s;
}

.bento-cell:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.bento-cell > .daily-loading {
  padding: 2rem 1.25rem;
}

.bento-grid .intro-tip-card,
.bento-grid .quiz-of-day-card,
.bento-grid .daily-card {
  margin: 0;
  height: auto;
  min-height: 100%;
  border: none;
  border-radius: 16px;
  box-shadow: none;
  overflow: visible;
  padding-bottom: 1.1rem;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.bento-grid .intro-tip-card {
  background: linear-gradient(160deg, #f0f9ff 0%, #fff 100%);
}

.bento-grid .quiz-of-day-card {
  background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%);
}

.bento-grid .quiz-of-day-card::before,
.bento-grid .intro-tip-card::before,
.bento-grid .daily-card::before {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.bento-grid .daily-card--humor {
  background: linear-gradient(160deg, #fffbeb 0%, #fff 100%);
}

.bento-grid .daily-card--take {
  background: linear-gradient(160deg, #fdf4ff 0%, #fff 100%);
}

.bento-grid .daily-card--fact {
  background: linear-gradient(160deg, #fff7ed 0%, #fff 100%);
}

.bento-grid .daily-card--relatable {
  background: linear-gradient(160deg, #f8fafc 0%, #fff 100%);
}

.bento-grid .daily-card--word {
  background: linear-gradient(160deg, #eff6ff 0%, #fff 100%);
}

.bento-grid .daily-card--history {
  background: linear-gradient(160deg, #fafaf9 0%, #fff 100%);
  border-top: 3px solid #1c1917;
}

.bento-grid .daily-card--weekly {
  background: linear-gradient(160deg, #f0fdfa 0%, #fff 100%);
}

.bento-grid .daily-card--cartoon {
  background: #fff;
}

/* ERP timeline */
.arch-timeline,
.arch-timeline.erp-deliverables-grid {
  display: block;
  grid-template-columns: unset;
  gap: 0;
  position: relative;
  padding-left: 2.25rem;
  margin-left: 0.35rem;
  border-left: 2px solid rgba(8, 145, 178, 0.35);
  max-width: 100%;
}

.erp-deliverable-card {
  position: relative;
  padding: 1.15rem 1.35rem 1.15rem 1.5rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: none;
  box-shadow: var(--shadow);
}

.erp-deliverable-card::before {
  content: "";
  position: absolute;
  left: -2.35rem;
  top: 1.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.erp-emoji {
  font-size: 1.35rem;
  display: block;
  margin-bottom: 0.35rem;
}

.intro-why-emoji {
  font-size: 1.25rem;
  display: block;
  margin-bottom: 0.25rem;
}

.erp-deliverable-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

/* Stats strip (if used) */
.intro-stats {
  display: none;
}

/* Why cards — glass tiles */
.intro-why-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.intro-why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.intro-why-num {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.75rem;
}

.intro-section--soft {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.intro-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.skill-tag,
.port-skill-tags span {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.port-exp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro-cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 2.25rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-md);
}

.intro-cta-eyebrow {
  font-family: var(--mono);
  color: var(--glow);
}

.intro-cta-title {
  color: #fff;
  font-weight: 800;
}

.intro-cta-text {
  color: #94a3b8;
}

/* Learning hub */
.learn-hub .learn-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.learn-hub .learn-eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.learn-hub .learn-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.learn-hub .dash-ring {
  --ring-color: var(--accent);
}

.dash-track {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dash-track:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.dash-quick {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.access-gate-page {
  max-width: 440px;
}

.access-gate-form.content-panel {
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
}

.content-panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.content h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.content h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.content pre,
.content code {
  font-family: var(--mono);
}

.cards .card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.2s, box-shadow 0.2s;
}

.cards .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 960px) {
  .arch-hero-grid {
    grid-template-columns: 1fr;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .learn-hub .learn-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .main {
    padding: 1.25rem 1rem 3rem;
  }

  .main-topbar {
    padding: 0.65rem 1rem 0;
  }
}

/* —— Option C: single-column portfolio layout —— */
.portfolio-shell {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.portfolio-topbar {
  position: sticky;
  top: 0.6rem;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  margin: 0.75rem 0 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.portfolio-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.topbar-breadcrumb {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-topbar-center {
  display: flex;
  justify-content: center;
}

.topbar-menu-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
}

.topbar-menu-btn:hover {
  color: var(--accent);
  border-color: rgba(8, 145, 178, 0.35);
  box-shadow: var(--shadow);
}

.portfolio-topbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  grid-column: 3;
  justify-self: end;
}

.topbar-contact-mail {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-decoration: none;
}

.topbar-contact-mail:hover {
  color: var(--accent);
}

.topbar-progress {
  width: 220px;
}

.topbar-progress-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  margin: -0.25rem 0 1.25rem;
}

.topbar-nav .nav-link {
  display: inline-flex;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-soft);
}

.topbar-nav .nav-link:hover {
  color: var(--accent);
  border-color: rgba(8, 145, 178, 0.35);
}

.topbar-nav .nav-link.active {
  background: rgba(8, 145, 178, 0.1);
  border-color: rgba(8, 145, 178, 0.35);
  color: var(--accent);
}

.portfolio-shell .main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.5rem 0 4rem;
  overflow-x: hidden;
}

.portfolio-shell .main.main--intro {
  max-width: 920px;
}

/* —— Profile photo upload —— */
.intro-identity-row {
  display: flex;
  gap: 1.35rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.intro-identity-text {
  flex: 1;
  min-width: 200px;
}

.profile-photo-wrap {
  flex-shrink: 0;
  text-align: center;
}

.profile-photo-frame {
  width: 148px;
  height: 148px;
  border-radius: 20px;
  border: 2px dashed rgba(34, 211, 238, 0.45);
  background: rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  margin: 0 auto 0.6rem;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-photo.is-hidden {
  display: none;
}

.profile-photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.65rem;
  text-align: center;
}

.profile-photo-fallback[hidden] {
  display: none;
}

.profile-photo-emoji {
  font-size: 2rem;
}

.profile-photo-hint {
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e8f0;
}

.profile-photo-sub {
  font-size: 0.62rem;
  line-height: 1.35;
  color: #94a3b8;
}

.profile-photo-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  cursor: pointer;
}

.profile-photo-upload:hover {
  border-color: var(--glow);
  color: #fff;
}

.intro-pun {
  margin: 0 0 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.intro-pun em {
  font-style: normal;
  color: #f1f5f9;
}

/* —— Floating IT sketch emojis —— */
.intro-sketches {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.intro-page {
  position: relative;
}

.intro-page > *:not(.intro-sketches) {
  position: relative;
  z-index: 1;
}

.sketch-float {
  position: absolute;
  font-size: 1.75rem;
  opacity: 0.12;
  animation: sketch-drift 8s ease-in-out infinite;
}

.sketch-float:nth-child(1) { top: 4%; right: 6%; animation-delay: 0s; }
.sketch-float:nth-child(2) { top: 28%; left: 2%; animation-delay: 1.5s; }
.sketch-float:nth-child(3) { bottom: 35%; right: 4%; animation-delay: 3s; }
.sketch-float:nth-child(4) { bottom: 8%; left: 8%; animation-delay: 4.5s; }

@keyframes sketch-drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(6deg); }
}

.bento-cell--tip { border-top: 3px solid #38bdf8; }
.bento-cell--quiz { border-top: 3px solid #6366f1; }
.bento-cell--humor { border-top: 3px solid #fbbf24; }
.bento-cell--cartoon { border-top: 3px solid #34d399; }

.arch-stack-label,
.arch-metric-label,
.intro-tip-text,
.quiz-of-day-question,
.daily-humor-setup {
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.topbar-breadcrumb {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: 280px;
  line-height: 1.3;
}

.arch-console {
  overflow: visible;
}

.quiz-option-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .portfolio-topbar {
    grid-template-columns: 1fr;
    top: 0;
    padding: 0.75rem 0.7rem;
  }

  .portfolio-topbar-right {
    align-items: flex-start;
  }

  .topbar-progress {
    width: 100%;
  }
}
