/* ============================================================================
   amirulhisyam.com — Deep Cosmos & Frosted Obsidian Personal Hub
   Base: #0D0D10 Deep Cosmos · rgba(20,20,26,0.78) Frosted Obsidian
         #FFFFFF Headings · #E4E4E7 Body · #B4B4BC Secondary
   Sparing accents: #FF4D42 Vermilion Red · #F97316 / #FB923C Gargantua Orange
   ============================================================================ */

:root {
  --bg: #0d0d10;
  --surface: rgba(20, 20, 26, 0.78);
  --surface-hover: rgba(26, 26, 34, 0.88);
  --footer-bg: rgba(9, 9, 12, 0.82);
  --heading: #ffffff;
  --text: #e4e4e7;
  --muted: #b4b4bc;
  --subtle: #8e8e98;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);
  --accent-red: #ff4d42;
  --accent-orange: #f97316;
  --accent-orange-bright: #fb923c;
  --header-bg: rgba(13, 13, 16, 0.84);
  --hud-bg: rgba(20, 20, 26, 0.92);
  --chip-bg: rgba(255, 255, 255, 0.06);
  --chip-bg-hover: rgba(255, 255, 255, 0.14);
  --tag-bg: #141419;
  --tag-text: #d4d4dc;
  --nav-link: #c8c8d0;
  --intro-bio: #d4d4d8;
  --btn-inv-bg: #ffffff;
  --btn-inv-text: #09090c;
  --card-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.6);
  --max-width: 900px;
  --radius: 14px;
}

:root[data-theme="light"] {
  --bg: #fbfbfd;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-hover: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(245, 245, 247, 0.90);
  --heading: #1d1d1f;
  --text: #424245;
  --muted: #424245;
  --subtle: #6e6e73;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --accent-red: #d92d20;
  --accent-orange: #ea580c;
  --accent-orange-bright: #ea580c;
  --header-bg: rgba(251, 251, 253, 0.78);
  --hud-bg: rgba(251, 251, 253, 0.92);
  --chip-bg: #f5f5f7;
  --chip-bg-hover: #e8e8ed;
  --tag-bg: #f5f5f7;
  --tag-text: #424245;
  --nav-link: #424245;
  --intro-bio: #424245;
  --btn-inv-bg: #1d1d1f;
  --btn-inv-text: #fbfbfd;
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.045), 0 1px 2px rgba(0, 0, 0, 0.03);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  overflow-x: clip;
  max-width: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

strong {
  color: var(--heading);
  font-weight: 600;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--heading);
  color: #09090c;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Cosmos Canvas & Focus Mode */
#cosmosCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

body.cosmos-focus main,
body.cosmos-focus .site-footer {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.99);
}

.cosmos-hud {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom, 0px) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 2rem);
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
  gap: 0.75rem 1rem;
  background: var(--hud-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-size: 0.72rem;
  color: var(--text);
  box-shadow: var(--card-shadow);
}

.cosmos-hud[hidden] {
  display: none !important;
}

.cosmos-hud-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cosmos-hud button {
  background: var(--btn-inv-bg);
  border: 0;
  color: var(--btn-inv-text);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.cosmos-hud button:hover {
  opacity: 0.85;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

/* Header — Apple.com 50px translucent edge-to-edge bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 50px;
  padding: max(0.55rem, env(safe-area-inset-top, 0px)) max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-right, 0px)) 0.55rem max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-left, 0px));
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.brand {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.025em;
  color: var(--heading);
}

.brand-dot {
  color: var(--accent-red);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--nav-link);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--heading);
}

.cosmos-btn {
  background: var(--chip-bg);
  border: 1px solid var(--border-strong);
  color: var(--heading);
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.cosmos-btn:hover,
.cosmos-btn.active {
  background: var(--btn-inv-bg);
  color: var(--btn-inv-text);
  border-color: var(--btn-inv-bg);
  font-weight: 600;
}

/* Apple-style Theme Toggle Button */
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--border-strong);
  color: var(--heading);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.theme-btn:hover {
  background: var(--chip-bg-hover);
  border-color: var(--heading);
}

.theme-btn:active {
  transform: scale(0.94);
}

.theme-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.theme-btn .icon-sun { display: block; }
.theme-btn .icon-moon { display: none; }
:root[data-theme="light"] .theme-btn .icon-sun { display: none; }
:root[data-theme="light"] .theme-btn .icon-moon { display: block; }

/* Intro */
.intro {
  padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(2.5rem, 5vw, 3.5rem);
}

.intro h1 {
  font-size: clamp(2.25rem, 5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--heading);
  margin-bottom: 0.9rem;
}

.intro-bio {
  font-size: clamp(1.05rem, 2vw, 1.18rem);
  color: var(--intro-bio);
  max-width: 56ch;
  line-height: 1.55;
}

/* Scrollable Projects Box */
.project-scroll {
  max-height: clamp(260px, 50dvh, 430px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.project-scroll::-webkit-scrollbar {
  width: 5px;
}

.project-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

/* Sections & Frosted Panels */
.section {
  padding-bottom: clamp(2.25rem, 5vw, 3.25rem);
}

.panel {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--card-shadow);
}

.section-head {
  margin-bottom: 1.1rem;
}

.section-head h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--heading);
}

/* Featured Spotlight */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.featured-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.featured-card:hover {
  border-color: rgba(249, 115, 22, 0.55);
  background: var(--surface-hover);
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.featured-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-orange);
  flex-shrink: 0;
}

.featured-card h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--heading);
  margin-bottom: 0.45rem;
}

.featured-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  padding-top: 0.2rem;
}

.action-primary {
  font-weight: 500;
  color: var(--heading);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 1.5px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.action-primary:hover {
  color: var(--accent-orange-bright);
  text-decoration-color: var(--accent-orange-bright);
}

.action-secondary {
  color: var(--subtle);
  transition: color 0.15s ease;
}

.action-secondary:hover {
  color: var(--heading);
}

/* Self-Branding Hero + Flagship Spotlight */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.25rem 1.75rem;
  align-items: center;
}

.identity-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.7);
  flex-shrink: 0;
}

.hero-name {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  color: var(--heading);
  margin-bottom: 0.65rem;
}

.hero-tagline {
  font-size: clamp(1rem, 1.55vw, 1.15rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--heading);
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.hero-pitch {
  font-size: 0.86rem;
  color: var(--subtle);
  line-height: 1.5;
  max-width: 54ch;
  margin-bottom: 0.95rem;
}

.strength-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.strength-chip {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.strength-chip strong {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.strength-chip span {
  font-size: 0.72rem;
  color: var(--subtle);
}

/* Flagship Card — Highlighting Signature Unique Project */
.flagship-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-color: rgba(249, 115, 22, 0.28);
}

.flagship-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-red));
}

.flagship-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.flagship-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent-orange-bright);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mini-island {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.22rem 0.52rem;
  border-radius: 999px;
  background: #050507;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mini-island-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-orange);
  box-shadow: 0 0 6px var(--accent-orange);
}

.mini-island-bar {
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-red));
}

.flagship-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--heading);
}

.flagship-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.48;
}

.flagship-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.48rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  border: 0;
  box-shadow: 0 4px 16px -4px rgba(249, 115, 22, 0.55);
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}

.btn-accent:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -4px rgba(255, 77, 66, 0.62);
}

.btn-accent:active {
  transform: scale(0.97);
}

.flagship-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}

.flagship-link:hover {
  color: var(--heading);
}

/* Interactive Section Glow on Nav Click */
.site-nav a.is-nav-active {
  color: var(--accent-orange-bright);
}

@keyframes panelGlow {
  0% {
    border-color: rgba(249, 115, 22, 0.88);
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.55), 0 0 28px -4px rgba(255, 77, 66, 0.45);
  }
  50% {
    border-color: rgba(255, 77, 66, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 77, 66, 0.35), 0 0 22px -6px rgba(249, 115, 22, 0.38);
  }
  100% {
    border-color: var(--border);
    box-shadow: var(--card-shadow);
  }
}

.panel.is-highlighted {
  animation: panelGlow 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}

.projects-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--heading);
}

/* Filter Tabs — single-row pill strip */
.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0.35rem;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.72rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.filter-tab:hover {
  color: var(--heading);
  background: var(--chip-bg);
}

.filter-tab.is-active {
  background: var(--btn-inv-bg);
  color: var(--btn-inv-text);
  border-color: var(--btn-inv-bg);
  font-weight: 600;
}

.tab-count {
  font-size: 0.68rem;
  opacity: 0.68;
}

/* Project Index List */
.project-list {
  display: flex;
  flex-direction: column;
}

/* Classic Monochrome + Vermilion Red & Gargantua Orange Icon Styling */
.cat-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}

.filter-tab.is-active {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  color: #ffffff;
  border-color: transparent;
  font-weight: 600;
}

.filter-tab.is-active .cat-ico {
  color: #ffffff;
}

.project-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem 0.9rem;
  padding: 0.78rem 0.65rem;
  border-radius: 10px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.14s ease;
}

.project-row:last-child {
  border-bottom: 0;
}

.project-row:hover {
  background: var(--chip-bg);
}

.project-row:hover .project-type-icon {
  color: var(--accent-orange-bright);
  border-color: rgba(249, 115, 22, 0.42);
  background: rgba(249, 115, 22, 0.10);
}

.project-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.85rem;
}

.journey-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-orange-bright);
  background: rgba(249, 115, 22, 0.10);
  border: 1px solid rgba(249, 115, 22, 0.32);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.journey-link:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  border-color: transparent;
  transform: translateY(-1px);
}

.hero-sub-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}

.hero-sub-link:hover {
  color: var(--heading);
}

.journey-panel {
  scroll-margin-top: 72px;
}

.topbar-atom-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: var(--accent-orange-bright);
  flex-shrink: 0;
}

.topbar-atom-badge svg {
  width: 16px;
  height: 16px;
  display: block;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--muted);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent-orange-bright);
}

/* Dedicated /about/ Working Journey Page — full-width editorial stretch */
.about-page-main {
  max-width: min(1120px, 92vw);
  padding-block: clamp(2rem, 4.5vw, 3.25rem) 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-hero {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.about-page-title {
  font-size: clamp(1.9rem, 3.8vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--heading);
  max-width: none;
}

.about-page-lede {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: none;
}

.impact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  margin-top: 0.4rem;
}

.impact-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.impact-cell strong {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.impact-cell span {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.38;
}

.timeline {
  list-style: none;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border-strong);
  margin-left: 0.35rem;
}

/* Signature company brand accents + ambient brand glow (Dark + Light tuned) */
.co-deriv { --co: #ff444f; --co-soft: rgba(255, 68, 79, 0.14); --co-glow: rgba(255, 68, 79, 0.72); }
.co-gxbank { --co: #c084fc; --co-soft: rgba(168, 85, 247, 0.15); --co-glow: rgba(168, 85, 247, 0.68); }
.co-iserve { --co: #38bdf8; --co-soft: rgba(56, 189, 248, 0.14); --co-glow: rgba(56, 189, 248, 0.65); }
.co-razer { --co: #44d62c; --co-soft: rgba(68, 214, 44, 0.14); --co-glow: rgba(68, 214, 44, 0.68); }

:root[data-theme="light"] .co-deriv { --co: #dc2626; --co-soft: rgba(220, 38, 38, 0.09); --co-glow: rgba(220, 38, 38, 0.32); }
:root[data-theme="light"] .co-gxbank { --co: #7c3aed; --co-soft: rgba(124, 58, 237, 0.09); --co-glow: rgba(124, 58, 237, 0.28); }
:root[data-theme="light"] .co-iserve { --co: #0284c7; --co-soft: rgba(2, 132, 199, 0.09); --co-glow: rgba(2, 132, 199, 0.28); }
:root[data-theme="light"] .co-razer { --co: #15803d; --co-soft: rgba(21, 128, 61, 0.09); --co-glow: rgba(21, 128, 61, 0.28); }

@keyframes coNodeGlow {
  0%, 100% {
    box-shadow: 0 0 8px var(--co-glow), 0 0 18px var(--co-soft);
  }
  50% {
    box-shadow: 0 0 14px var(--co-glow), 0 0 28px var(--co-glow);
  }
}

.timeline-item {
  position: relative;
  padding: 0.95rem 1.15rem;
  border-radius: 12px;
  background: radial-gradient(circle at 0% 0%, var(--co-soft, transparent) 0%, transparent 58%);
  border: 1px solid color-mix(in srgb, var(--co, var(--border)) 24%, transparent);
  box-shadow: 0 0 24px -10px var(--co-glow, transparent);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-item:hover {
  border-color: color-mix(in srgb, var(--co, var(--border-strong)) 55%, transparent);
  box-shadow: 0 0 32px -8px var(--co-glow, transparent);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.86rem;
  top: 1.28rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--co, var(--border-strong));
  border: 2px solid var(--bg);
  animation: coNodeGlow 2.8s ease-in-out infinite;
}

.timeline-item.is-current::before {
  width: 12px;
  height: 12px;
  left: -1.9rem;
  border-color: rgba(255, 255, 255, 0.85);
}

.co-name {
  display: inline-block;
  color: var(--co, var(--heading));
  font-weight: 700;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--co-soft, transparent);
  border: 1px solid color-mix(in srgb, var(--co, var(--border)) 42%, transparent);
  text-shadow: 0 0 12px var(--co-glow, transparent);
  box-shadow: 0 0 14px -4px var(--co-glow, transparent);
  margin-right: 0.25rem;
}

.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 0.45rem;
}

.timeline-role {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--heading);
}

.timeline-company {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.1rem;
}

.timeline-loc {
  font-weight: 400;
  color: var(--subtle);
}

.timeline-date {
  font-size: 0.76rem;
  color: var(--subtle);
  white-space: nowrap;
}

.timeline-award {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-orange-bright);
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.68rem;
  margin-bottom: 0.6rem;
}

.timeline-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.timeline-points li {
  position: relative;
  padding-left: 0.95rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.timeline-points li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--co, var(--accent-orange));
  font-weight: 600;
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.75rem;
}

.craft-item dt {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-orange-bright);
  margin-bottom: 0.25rem;
}

.craft-item dd {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.52;
}

.craft-actions {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.project-type-icon .cat-ico {
  width: 17px;
  height: 17px;
}

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

.project-title-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.1rem;
}

.project-title {
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--heading);
}

.featured-pin {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-orange);
  flex-shrink: 0;
}

.project-tagline {
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.4;
}

.project-links {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* High-contrast monochrome Open / Play CTA */
.row-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.4rem 0.92rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--btn-inv-bg);
  color: var(--btn-inv-text);
  border: 0;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.row-action-btn:hover {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px -4px rgba(249, 115, 22, 0.55);
}

.row-action-btn:active {
  transform: scale(0.97);
}

/* Solar-glowing Play button (hot core + breathing 3-layer corona) */
@keyframes sunGlow {
  0%, 100% {
    box-shadow:
      inset 0 1px 2px rgba(255, 255, 255, 0.85),
      0 0 10px rgba(254, 240, 138, 0.85),
      0 0 24px rgba(251, 146, 60, 0.65),
      0 0 44px rgba(249, 115, 22, 0.42);
  }
  50% {
    box-shadow:
      inset 0 1px 3px rgba(255, 255, 255, 0.95),
      0 0 16px rgba(254, 249, 195, 0.98),
      0 0 36px rgba(251, 146, 60, 0.85),
      0 0 64px rgba(255, 77, 66, 0.55);
  }
}

.row-action-play {
  position: relative;
  background: radial-gradient(circle at 28% 24%, #fffbeb 0%, #fde047 28%, #fb923c 68%, #ea580c 100%);
  color: #1a0b00;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: sunGlow 2.4s ease-in-out infinite;
}

.row-action-play:hover {
  background: radial-gradient(circle at 28% 24%, #ffffff 0%, #fef08a 30%, #fb923c 66%, #ff4d42 100%);
  color: #1a0b00;
  transform: translateY(-1px) scale(1.03);
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 1),
    0 0 20px rgba(254, 249, 195, 1),
    0 0 42px rgba(251, 146, 60, 0.92),
    0 0 72px rgba(255, 77, 66, 0.65);
}

.btn-chevron {
  font-size: 1.05em;
  line-height: 1;
}

.about-label {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--subtle);
  margin-bottom: 0.35rem;
}

.about-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.about-copy-wrap {
  flex: 1;
  min-width: min(100%, 320px);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.stat-item dt {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--subtle);
  margin-bottom: 0.18rem;
}

.stat-item dd {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.4;
}

.stat-item dd strong {
  color: var(--heading);
  font-weight: 600;
}

.state-message {
  padding-block: 1.75rem 0.75rem;
  color: var(--muted);
  font-size: 0.925rem;
}

.state-message button {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 0.35rem;
  font: inherit;
  color: var(--heading);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.state-message button:hover {
  color: var(--accent-orange-bright);
}

.accent-orange {
  color: var(--accent-orange-bright);
  font-weight: 600;
}

.accent-red {
  color: var(--accent-red);
  font-weight: 600;
}

/* Apple-inspired About Bento Section */
.about-apple {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--subtle);
  margin-bottom: 0.4rem;
}

.about-headline {
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.16;
  color: var(--heading);
  margin-bottom: 0.85rem;
}

.about-lede {
  font-size: 0.96rem;
  color: var(--muted);
  max-width: 64ch;
  line-height: 1.62;
}

.about-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.bento-tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.bento-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--subtle);
}

.bento-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--heading);
}

.bento-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

/* About & Contact */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 1.5rem 2.25rem;
  align-items: start;
}

.about-copy p {
  font-size: 0.925rem;
  color: var(--muted);
  max-width: 56ch;
}

.contact-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.contact-links a,
.text-btn {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--heading);
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border-strong);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.contact-links a:hover,
.text-btn:hover {
  color: var(--accent-orange-bright);
  text-decoration-color: var(--accent-orange-bright);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-block: 1.5rem max(2rem, env(safe-area-inset-bottom, 0px) + 1rem);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--subtle);
}

/* 404 Page */
.not-found {
  padding-block: clamp(5rem, 14vw, 8rem);
  text-align: center;
}

.not-found-code {
  font-size: 0.85rem;
  color: var(--accent-orange);
  margin-bottom: 0.75rem;
}

.not-found h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin-bottom: 0.75rem;
}

.not-found p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 1.5rem;
}

/* App Landing Pages (/antigravity-island/, /mac-pulse-island/) */
/* Standardized full-bleed sub-project topbar (matches /numera/, /pcb-calculator/, /reconpulse/) */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 50px;
  padding: max(0.55rem, env(safe-area-inset-top, 0px)) max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-right, 0px)) 0.55rem max(clamp(1rem, 4vw, 2.5rem), env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-right {
  gap: 1.15rem;
}

.topbar-right a {
  font-size: 0.85rem;
  font-weight: 500;
  color: #c8c8d0;
  transition: color 0.15s ease;
}

.topbar-right a:hover {
  color: var(--heading);
}

.back-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.18s ease;
}

.back-link:hover {
  color: var(--heading);
}

.topbar-sep {
  color: var(--border-strong);
  user-select: none;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--heading);
  font-size: 0.95rem;
  white-space: nowrap;
}

.topbar-gem {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #09090c;
  background: #ffffff;
  flex-shrink: 0;
}

img.topbar-gem {
  background: transparent;
  border-radius: 0;
  display: block;
}

.topbar-tag {
  font-size: 0.68rem;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 0.14rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.app-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 1.1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--btn-inv-bg);
  color: var(--btn-inv-text);
  border: 1px solid var(--btn-inv-bg);
  font-weight: 600;
  border-radius: 999px;
}

.btn-primary:hover {
  background: var(--accent-orange-bright);
  border-color: var(--accent-orange-bright);
  color: #ffffff;
}

.btn-secondary {
  background: var(--chip-bg);
  color: var(--heading);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

.btn-secondary:hover {
  border-color: var(--heading);
  background: var(--chip-bg-hover);
}

.install-section {
  scroll-margin-top: 84px;
}

.install-lead {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1.15rem;
  max-width: 62ch;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(9, 9, 12, 0.85);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 0.95rem;
  overflow-x: auto;
}

.code-row code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}

.copy-cmd {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  color: var(--heading);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  padding: 0.28rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.copy-cmd:hover {
  background: var(--heading);
  color: #09090c;
}

.install-note {
  font-size: 0.84rem;
  color: var(--subtle);
  margin-top: 0.9rem;
}

.install-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.15rem;
}

.install-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--text);
}

.step-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  color: var(--accent-orange-bright);
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.changelog-entry {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.changelog-entry:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.changelog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.55rem;
}

.changelog-ver {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--heading);
}

.changelog-date {
  font-size: 0.78rem;
  color: var(--subtle);
}

.changelog-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.changelog-items li {
  padding-left: 0.9rem;
  position: relative;
}

.changelog-items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-orange);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.feature-card h3 {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Interactive macOS Dynamic Island Preview Stage — transparent wallpaper reveals live Cosmos / Endurance */
.island-stage {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Lock macOS display preview to authentic dark hardware tokens while keeping wallpaper see-through */
.mac-screen {
  --heading: #ffffff;
  --text: #e4e4e7;
  --muted: #b4b4bc;
  --subtle: #8e8e98;
  --accent-red: #ff4d42;
  --accent-orange: #f97316;
  position: relative;
  min-height: 280px;
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.mac-menubar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 1rem;
  background: rgba(18, 18, 24, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  color: var(--muted);
  user-select: none;
}

.mac-menubar-left,
.mac-menubar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.mac-menubar-left strong {
  color: var(--heading);
  font-weight: 600;
}

.menubar-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.48rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--heading);
  font-size: 0.68rem;
}

.island-wrap {
  display: flex;
  justify-content: center;
  margin-top: -30px;
  padding-inline: 1rem;
  transition: margin-top 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.island-wrap.is-external {
  margin-top: 14px;
}

.island-pill {
  width: 240px;
  background: #000000;
  color: var(--heading);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  padding: 0.55rem 0.95rem 0.65rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.75);
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              border-radius 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              padding 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.2s ease;
}

.island-wrap.is-external .island-pill {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 0.6rem 1rem;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.island-pill:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.island-pill.is-expanded {
  width: min(410px, 100%);
  border-radius: 0 0 24px 24px;
  padding: 0.75rem 1.15rem 1.05rem;
}

.island-wrap.is-external .island-pill.is-expanded {
  border-radius: 22px;
  padding: 0.85rem 1.15rem 1.05rem;
}

.stage-controls-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
}

.display-switch {
  display: inline-flex;
  align-items: center;
  background: var(--chip-bg);
  border: 1px solid rgba(249, 115, 22, 0.34);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 4px 18px -6px rgba(249, 115, 22, 0.25);
}

.display-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.38rem 0.92rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}

.display-btn:hover {
  color: var(--heading);
}

.display-btn.is-active {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 3px 12px -2px rgba(249, 115, 22, 0.55);
}

.island-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 22px;
}

.island-id {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--heading);
}

.status-orb {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
  flex-shrink: 0;
}

.status-orb.is-warn {
  background: var(--accent-orange);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.8);
}

.status-orb.is-crit {
  background: var(--accent-red);
  box-shadow: 0 0 8px rgba(255, 77, 66, 0.85);
}

.island-readout {
  font-size: 0.74rem;
  color: var(--text);
}

.island-details {
  display: none;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.island-pill.is-expanded .island-details {
  display: block;
}

.metric-rows {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.metric-item-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  margin-bottom: 0.25rem;
}

.metric-item-head span:first-child {
  color: var(--muted);
}

.metric-item-head span:last-child {
  color: var(--heading);
}

.meter-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: #22c55e;
  transition: width 0.3s ease, background-color 0.25s ease;
}

.meter-fill.is-warn {
  background: var(--accent-orange);
}

.meter-fill.is-crit {
  background: var(--accent-red);
}

.island-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  color: var(--subtle);
}

.stage-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.65rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.stage-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.stage-btn {
  background: var(--chip-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.36rem 0.82rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.14s ease;
}

.stage-btn:hover {
  color: var(--heading);
  border-color: rgba(249, 115, 22, 0.45);
  transform: translateY(-1px);
}

.stage-btn.is-active {
  background: var(--chip-bg-hover);
  border-color: var(--accent-orange);
  color: var(--heading);
}

.stage-hint {
  font-size: 0.76rem;
  color: var(--subtle);
}

/* Inner cards inside frosted panels keep clear visual surface separation */
.panel .featured-card {
  background: var(--chip-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.panel .featured-card:hover {
  background: var(--chip-bg-hover);
  border-color: rgba(234, 88, 12, 0.45);
}

/* Base .home-main layout (covers tablets & split-screen 641px–860px cleanly) */
.home-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-block: 1.25rem 2rem;
}

/* Desktop (> 860px): Spacious 1-Page Personal Brand Hero + Full-Width Projects Index */
@media (min-width: 861px) {
  html.home-snap {
    scroll-snap-type: none;
  }

  .home-main {
    max-width: min(1120px, 92vw);
    min-height: calc(100dvh - 96px);
    justify-content: center;
    gap: 1.35rem;
    padding-block: 1.15rem 1.35rem;
  }

  .home-main #hero,
  .home-main #projects {
    min-height: 0;
    padding-block: 0;
  }

  .home-main #projects .panel {
    width: 100%;
    padding: 1.25rem 1.45rem;
  }

  .home-main .flagship-card {
    padding: 1.2rem 1.35rem;
  }

  .home-main .project-scroll {
    max-height: none;
    overflow-y: visible;
  }

  .home-main .project-tagline {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html.home-snap .site-footer {
    padding-block: 0.75rem;
  }
}

/* Short-height laptops (e.g. 1280x720, 1366x768, 13" MacBook Air): keep 1-screen fit crisp */
@media (min-width: 861px) and (max-height: 790px) {
  .home-main {
    gap: 0.85rem;
    padding-block: 0.75rem 0.9rem;
  }

  .hero-name {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    margin-bottom: 0.4rem;
  }

  .hero-pitch {
    font-size: 0.88rem;
    margin-bottom: 0.65rem;
  }

  .strength-strip {
    padding-top: 0.55rem;
  }

  .hero-cta-row {
    margin-top: 0.6rem;
  }

  .home-main .flagship-card {
    padding: 0.95rem 1.15rem;
    gap: 0.45rem;
  }

  .home-main #projects .panel {
    padding: 0.95rem 1.2rem;
  }

  .projects-toolbar {
    padding-bottom: 0.6rem;
    margin-bottom: 0.2rem;
  }

  .project-row {
    padding: 0.56rem 0.6rem;
  }

  .project-tagline {
    font-size: 0.8rem;
  }
}

/* Responsive */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .featured-grid,
  .feature-grid,
  .about-grid,
  .about-stats,
  .craft-grid {
    grid-template-columns: 1fr;
  }

  .impact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile (<= 640px): 2 full-bleed snap views (Brand + Flagship, Projects) */
@media (max-width: 640px) {
  html.home-snap {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 50px;
  }

  .home-main {
    gap: 0;
    padding-block: 0;
  }

  .about-page-main {
    padding-block: 1.25rem 2.25rem;
    gap: 1.1rem;
  }

  .impact-strip {
    padding: 0.95rem;
    gap: 0.8rem;
  }

  .timeline {
    padding-left: 1.15rem;
    margin-left: 0.2rem;
  }

  .timeline-item::before {
    left: -1.52rem;
  }

  .mac-menubar-left span,
  .topbar-sep,
  .topbar-brand,
  .topbar-tag {
    display: none;
  }

  .topbar {
    gap: 0.5rem;
    padding-inline: max(0.85rem, env(safe-area-inset-left, 0px)) max(0.85rem, env(safe-area-inset-right, 0px));
  }

  .topbar-left {
    gap: 0.45rem;
  }

  .topbar-right {
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .back-link {
    font-size: 0.78rem;
  }

  .site-header {
    gap: 0.45rem;
    padding-inline: max(0.85rem, env(safe-area-inset-left, 0px)) max(0.85rem, env(safe-area-inset-right, 0px));
  }

  .site-nav a[href*="github.com"] {
    display: none;
  }

  .snap-section {
    min-height: calc(100dvh - 50px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-block: 0.85rem 0.95rem;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin-top: 50px;
  }

  .hero-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
  }

  .hero-name {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .hero-pitch {
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
  }

  .strength-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .strength-chip strong {
    font-size: 0.8rem;
  }

  .strength-chip span {
    font-size: 0.68rem;
  }

  .flagship-card {
    padding: 1.05rem;
  }

  .snap-section:not(.hero-section) .panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1rem;
  }

  .projects-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding-bottom: 0.7rem;
  }

  .filter-bar {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 0.38rem;
  }

  .filter-tab {
    padding: 0.34rem 0.66rem;
    font-size: 0.74rem;
    gap: 0.3rem;
  }

  .filter-tab .cat-ico {
    width: 13px;
    height: 13px;
  }

  .project-scroll {
    flex: 1;
    max-height: calc(100dvh - 230px);
  }

  .project-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    padding: 0.72rem 0.35rem;
    gap: 0.45rem 0.65rem;
  }

  .project-type-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .project-title {
    font-size: 0.92rem;
  }

  .project-tagline {
    font-size: 0.78rem;
  }

  .row-action-btn {
    padding: 0.36rem 0.78rem;
    font-size: 0.76rem;
  }

  .site-footer {
    scroll-snap-align: end;
    padding-block: 0.9rem max(1.1rem, env(safe-area-inset-bottom, 0px));
  }

  .island-wrap {
    margin-top: 0.65rem;
    padding-inline: 0.65rem;
  }

  .island-wrap.is-external {
    margin-top: 0.85rem;
  }

  .mac-screen {
    min-height: 220px;
    padding-bottom: 1.25rem;
  }

  .island-pill {
    width: min(240px, 100%);
  }

  .island-pill.is-expanded {
    width: 100%;
    padding: 0.75rem 0.95rem 0.95rem;
  }

  .stage-controls {
    padding: 0.9rem 0.85rem;
  }

  .display-switch {
    max-width: 100%;
  }

  .display-btn {
    padding: 0.38rem 0.78rem;
    font-size: 0.75rem;
  }

  .stage-btn {
    padding: 0.36rem 0.72rem;
    font-size: 0.74rem;
  }

  .app-actions {
    gap: 0.6rem;
  }

  .app-actions .btn-primary,
  .app-actions .btn-secondary {
    padding: 0.52rem 1rem;
    font-size: 0.84rem;
  }

  .install-list li {
    font-size: 0.86rem;
    gap: 0.65rem;
  }

  .brand {
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .site-nav {
    gap: 0.5rem;
  }

  .site-nav a {
    font-size: 0.8rem;
  }

  .cosmos-btn {
    padding: 0.26rem 0.58rem;
    font-size: 0.68rem;
  }

  .about-actions .btn-primary,
  .about-actions .btn-secondary {
    font-size: 0.82rem;
    padding: 0.5rem 0.95rem;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
  }
}

/* Small phones (<= 380px, e.g. iPhone SE) */
@media (max-width: 380px) {
  .brand {
    font-size: 0.86rem;
  }

  .site-nav {
    gap: 0.38rem;
  }

  .site-nav a {
    font-size: 0.76rem;
  }

  .hero-name {
    font-size: 1.75rem;
  }

  .strength-strip {
    gap: 0.35rem;
  }

  .project-tagline {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Short landscape phones: disable mandatory snap so scrolling never traps the user */
@media (max-height: 540px) and (max-width: 900px) {
  html.home-snap {
    scroll-snap-type: none;
  }

  .snap-section {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
