/* =========================================================
   Faizan Mir — Personal Portfolio
   Light, minimal, professional. Single static stylesheet.
   ========================================================= */

:root {
  --bg: #fbf8f2;
  --surface: #fffdf9;
  --surface-soft: #f3ecdf;
  --ink: #1a1714;
  --text: #2e2823;
  --muted: #6e675e;
  --subtle: #9a9286;
  --line: rgba(26, 23, 20, 0.12);
  --line-soft: rgba(26, 23, 20, 0.07);
  --accent: #11675e;
  --accent-soft: rgba(17, 103, 94, 0.10);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(26, 23, 20, 0.04), 0 2px 8px rgba(26, 23, 20, 0.05);
  --shadow-md: 0 14px 44px rgba(26, 23, 20, 0.09);

  --maxw: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

h4 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ----------------------------- Layout ----------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--accent);
}

.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
}

.section-head p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ----------------------------- Header ----------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.brand-name {
  font-size: 1rem;
  color: var(--ink);
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-list a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-list a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

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

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.nav-cta {
  margin-left: 0.4rem;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle span {
  top: 50%;
  margin-top: -1px;
}

.menu-toggle span::before {
  content: "";
  top: -6px;
}

.menu-toggle span::after {
  content: "";
  top: 6px;
}

.menu-toggle[aria-expanded="true"] span {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] span::before {
  transform: translateX(-50%) translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span::after {
  transform: translateX(-50%) translateY(-6px) rotate(-45deg);
}

/* ----------------------------- Hero ----------------------------- */

.hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 1.75rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.hero-lead {
  margin-top: 1.5rem;
  max-width: 30rem;
  font-size: 1.12rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}

.hero-meta div {
  display: flex;
  flex-direction: column;
}

.hero-meta dt {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.hero-meta dd {
  margin: 0.25rem 0 0;
  font-weight: 600;
  color: var(--ink);
}

.hero-visual {
  position: relative;
  justify-self: center;
}

.portrait {
  position: relative;
  width: min(360px, 80vw);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-soft);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line-soft);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------------------- Logos / marquee ----------------------------- */

.affil {
  border-block: 1px solid var(--line-soft);
  background: var(--surface);
}

.affil .wrap {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  flex-wrap: wrap;
  padding-block: 1.75rem;
}

.affil-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  white-space: nowrap;
}

.affil-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}

.affil-list li {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ----------------------------- About ----------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}

.about-body p + p {
  margin-top: 1.1rem;
}

.about-body p {
  font-size: 1.1rem;
  color: var(--text);
}

.skills {
  display: grid;
  gap: 1.5rem;
}

.skill-group h4 {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 0.75rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags li {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

/* ----------------------------- Ventures ----------------------------- */

.ventures-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.venture {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.venture:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line);
}

.venture-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.venture-role {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.venture-year {
  font-size: 0.85rem;
  color: var(--subtle);
}

.venture h3 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.venture p {
  color: var(--muted);
  font-size: 0.98rem;
  flex-grow: 1;
}

.venture-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.venture-link .arrow {
  transition: transform 0.2s ease;
}

.venture:hover .venture-link .arrow {
  transform: translateX(4px);
}

/* ----------------------------- Experience timeline ----------------------------- */

.timeline {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.tl-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.tl-item:hover {
  background: var(--surface);
}

.tl-when {
  font-size: 0.9rem;
  color: var(--subtle);
  font-weight: 500;
  padding-top: 0.15rem;
}

.tl-body h3 {
  font-size: 1.25rem;
}

.tl-org {
  display: block;
  margin-top: 0.2rem;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}

.tl-body p {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 52ch;
}

/* ----------------------------- Press ----------------------------- */

.press-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.press-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.press-card.featured {
  grid-column: span 1;
}

.press-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-soft);
}

.press-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.press-card:hover .press-media img {
  transform: scale(1.04);
}

.press-logo {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 1.75rem;
  background: #ffffff;
  border-bottom: 1px solid var(--line-soft);
}

.press-logo img {
  max-width: 68%;
  max-height: 78%;
  width: auto;
  object-fit: contain;
}

.press-placeholder {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 1.4rem;
  background: linear-gradient(135deg, #1a1714, #11675e);
  color: #fff;
}

.press-placeholder[data-variant="1"] {
  background: linear-gradient(135deg, #14201d, #1c8f81);
}

.press-placeholder[data-variant="2"] {
  background: linear-gradient(135deg, #20302c, #0e5249);
}

.press-placeholder span {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

.press-placeholder strong {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.press-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1.25rem;
}

.press-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--subtle);
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

.press-meta span:first-child {
  font-weight: 600;
  color: var(--accent);
}

.press-body h3 {
  font-size: 1.05rem;
  line-height: 1.3;
}

.press-body p {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
  flex-grow: 1;
}

.press-link {
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ----------------------------- Awards ----------------------------- */

.awards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.award {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.award .medal {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--accent-soft);
}

.medal-ico {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.award strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
}

.award span {
  font-size: 0.85rem;
  color: var(--subtle);
}

/* ----------------------------- Contact ----------------------------- */

.contact {
  background: linear-gradient(150deg, #15786d 0%, #0f5950 100%);
  color: #fbf8f2;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  box-shadow: var(--shadow-md);
}

.contact .eyebrow {
  color: #a9d6cd;
}

.contact .eyebrow::before {
  background: #a9d6cd;
}

.contact h2 {
  color: #fbf8f2;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
}

.contact p {
  margin-top: 1rem;
  color: rgba(251, 248, 242, 0.78);
  max-width: 34ch;
}

.contact .btn-primary {
  background: #fbf8f2;
  color: #0f5950;
}

.contact .btn-ghost {
  color: #fbf8f2;
  border-color: rgba(251, 248, 242, 0.32);
}

.contact .btn-ghost:hover {
  border-color: #fbf8f2;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.contact-links {
  display: grid;
  gap: 0.75rem;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.35rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateX(4px);
}

.contact-link span {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(251, 248, 242, 0.62);
}

.contact-link strong {
  display: block;
  margin-top: 0.15rem;
  color: #fbf8f2;
}

.contact-link .arrow {
  color: rgba(251, 248, 242, 0.65);
}

/* ----------------------------- Footer ----------------------------- */

.site-footer {
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.site-footer small {
  color: var(--subtle);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

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

.footer-links a:hover {
  color: var(--ink);
}

/* ----------------------------- Reveal animation ----------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ----------------------------- Responsive ----------------------------- */

@media (max-width: 880px) {
  .hero-grid,
  .about-grid,
  .ventures-grid,
  .press-grid,
  .awards,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .press-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tl-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 4.5rem 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1.25rem var(--gutter) 1.75rem;
    background: rgba(250, 250, 247, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
  }

  .nav.is-open {
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .nav-list a {
    padding: 0.85rem 1rem;
    font-size: 1rem;
  }

  .nav-cta {
    margin: 0.5rem 0 0;
  }
}

@media (max-width: 560px) {
  .press-grid,
  .awards {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Radial Hub — desktop progressive enhancement.
   Hidden by default; activated by body.hub-on (added by JS
   on wide viewports). The normal scrolling page is the
   fallback for mobile, no-JS, and crawlers.
   ========================================================= */

.hub {
  display: none;
}

.hub-close {
  display: none;
}

body.hub-on {
  height: 100vh;
  overflow: hidden;
}

body.hub-on .site-header,
body.hub-on .affil,
body.hub-on .site-footer,
body.hub-on .hero {
  display: none;
}

/* Reveal animations are handled by the panel transition in hub mode. */
body.hub-on .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Soft depth behind the hub */
body.hub-on::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58vw 58vw at 31% 44%, var(--accent-soft), transparent 60%),
    radial-gradient(46vw 46vw at 74% 70%, rgba(17, 103, 94, 0.06), transparent 58%);
  animation: hub-fade 0.9s ease both;
}

/* ---- Hub container (overlay) ---- */
body.hub-on .hub {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

body.hub-on .hub-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  pointer-events: none;
  animation: hub-fade 0.5s ease both;
  transition: inset 0.55s cubic-bezier(0.66, 0, 0.34, 1),
    width 0.55s cubic-bezier(0.66, 0, 0.34, 1);
}

body.hub-on .hub-stage,
body.hub-on .hub-home,
body.hub-on .hub-close {
  pointer-events: auto;
}

/* Open state: wheel docks to the left */
body.hub-on.hub-open .hub-inner {
  inset: 0 auto 0 0;
  width: min(42vw, 560px);
  gap: 0;
}

body.hub-on.hub-open .hub-home {
  opacity: 0;
  visibility: hidden;
  position: absolute;
}

/* ---- Stage (portrait + ring + nodes) ---- */
.hub-stage {
  --ring-r: clamp(150px, 16.5vw, 215px);
  position: relative;
  width: clamp(340px, 34vw, 470px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transition: transform 0.55s cubic-bezier(0.66, 0, 0.34, 1);
}

body.hub-on.hub-open .hub-stage {
  transform: scale(0.78);
}

.hub-ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
}

/* Faint outer track carrying a single orbiting accent dot (subtle scanner) */
.hub-ring--spin {
  inset: -1%;
  border: 1px solid transparent;
  animation: hub-spin 16s linear infinite;
}

.hub-ring--spin::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.hub-ring--inner {
  inset: 22%;
  border-color: var(--line-soft);
}

@keyframes hub-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hub-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hub-center {
  position: relative;
  width: 40%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--surface);
  padding: 0;
  cursor: pointer;
  background: var(--surface-soft);
  box-shadow: var(--shadow-md);
  z-index: 3;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hub-center img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-center:hover,
.hub-center:focus-visible {
  transform: scale(1.05);
  box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow-md);
  outline: none;
}

/* ---- Nodes positioned radially ---- */
.hub-nodes {
  position: absolute;
  inset: 0;
}

.hub-node {
  --radius: var(--ring-r);
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  z-index: 4;
  text-decoration: none;
  transform: translate(-50%, -50%)
    rotate(calc(var(--i) * 72deg))
    translateY(calc(-1 * var(--radius)))
    rotate(calc(var(--i) * -72deg));
  animation: hub-fade 0.5s ease both;
  animation-delay: calc(0.18s + var(--i) * 0.08s);
}

.hub-node-btn {
  display: grid;
  place-items: center;
  width: clamp(50px, 5vw, 62px);
  height: clamp(50px, 5vw, 62px);
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1),
    background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.hub-node-text {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
  transition: color 0.25s ease;
}

.hub-ico {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s ease;
}

.hub-node:hover .hub-node-btn,
.hub-node:focus-visible .hub-node-btn {
  transform: translateY(-4px) scale(1.08);
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
  outline: none;
}

.hub-node:hover .hub-ico,
.hub-node:focus-visible .hub-ico {
  stroke: #fff;
}

.hub-node:hover .hub-node-text,
.hub-node:focus-visible .hub-node-text {
  color: var(--ink);
}

.hub-node.is-active .hub-node-btn {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(17, 103, 94, 0.32);
}

.hub-node.is-active .hub-ico {
  stroke: #fff;
}

.hub-node.is-active .hub-node-text {
  color: var(--accent);
}

/* Rotating selector that aims at the hovered / active node */
.hub-pointer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: var(--ring-r);
  background: linear-gradient(to top, transparent, var(--accent));
  border-radius: 2px;
  transform-origin: bottom center;
  transform: translate(-50%, -100%) rotate(var(--aim, 0deg));
  opacity: 0;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1),
    opacity 0.25s ease;
}

.hub-pointer::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.hub-stage.is-aiming .hub-pointer {
  opacity: 1;
}

.hub-stage.is-aiming .hub-center {
  box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow-md);
}

/* ---- Home copy ---- */
.hub-home {
  max-width: 32rem;
  text-align: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.hub-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hub-title {
  margin-top: 0.55rem;
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 3.8vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.04;
}

.hub-sub {
  margin-top: 0.6rem;
  font-size: 1.05rem;
  color: var(--muted);
}

.hub-sub em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
}

.hub-keys {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 1.6rem;
  font-size: 0.8rem;
  color: var(--subtle);
}

.hub-keys kbd {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.1rem 0.42rem;
}

/* ---- Close button ---- */
body.hub-on.hub-open .hub-close {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  padding: 0.6rem 1.05rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

body.hub-on.hub-open .hub-close:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

/* ---- Panels (right side) ---- */
body.hub-on main {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

body.hub-on main > section {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: min(42vw, 560px);
  width: auto;
  max-width: none;
  margin: 0;
  padding: clamp(3.5rem, 7vh, 6rem) clamp(2.5rem, 5vw, 5rem);
  overflow-y: auto;
  background: var(--bg);
  border-left: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
}

body.hub-on main > section.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

body.hub-on main > section.is-active:focus {
  outline: none;
}

/* Section content sits in a comfortable column inside the panel */
body.hub-on main > section > * {
  max-width: 820px;
}

/* Grids breathe better at two columns inside the narrower panel */
body.hub-on .press-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* Panel content animates in with a stagger when a section opens */
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.hub-on main > section.is-active > *,
body.hub-on main > section.is-active
  :is(.ventures-grid, .timeline, .press-grid, .awards, .about-grid) > * {
  animation: panel-in 0.5s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

/* Grid containers themselves don't animate — their children stagger instead */
body.hub-on main > section.is-active
  :is(.ventures-grid, .timeline, .press-grid, .awards, .about-grid) {
  animation: none;
}

body.hub-on main > section.is-active > *:nth-child(2) { animation-delay: 0.06s; }
body.hub-on main > section.is-active > *:nth-child(3) { animation-delay: 0.1s; }
body.hub-on main > section.is-active > *:nth-child(n + 4) { animation-delay: 0.14s; }

body.hub-on main > section.is-active
  :is(.ventures-grid, .timeline, .press-grid, .awards, .about-grid)
  > *:nth-child(1) { animation-delay: 0.12s; }
body.hub-on main > section.is-active
  :is(.ventures-grid, .timeline, .press-grid, .awards, .about-grid)
  > *:nth-child(2) { animation-delay: 0.18s; }
body.hub-on main > section.is-active
  :is(.ventures-grid, .timeline, .press-grid, .awards, .about-grid)
  > *:nth-child(3) { animation-delay: 0.24s; }
body.hub-on main > section.is-active
  :is(.ventures-grid, .timeline, .press-grid, .awards, .about-grid)
  > *:nth-child(4) { animation-delay: 0.3s; }
body.hub-on main > section.is-active
  :is(.ventures-grid, .timeline, .press-grid, .awards, .about-grid)
  > *:nth-child(5) { animation-delay: 0.36s; }
body.hub-on main > section.is-active
  :is(.ventures-grid, .timeline, .press-grid, .awards, .about-grid)
  > *:nth-child(6) { animation-delay: 0.42s; }
body.hub-on main > section.is-active
  :is(.ventures-grid, .timeline, .press-grid, .awards, .about-grid)
  > *:nth-child(n + 7) { animation-delay: 0.48s; }

/* Thin, subtle scrollbar inside panels + container context */
body.hub-on main > section {
  container-type: inline-size;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

body.hub-on main > section::-webkit-scrollbar {
  width: 11px;
}

body.hub-on main > section::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
  border: 3.5px solid var(--bg);
}

body.hub-on main > section::-webkit-scrollbar-thumb:hover {
  background: var(--subtle);
}

/* Graceful stacking when the panel itself gets narrow */
@container (max-width: 680px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ventures-grid,
  .press-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-ring--spin,
  body.hub-on::before,
  body.hub-on .hub-inner,
  body.hub-on .hub-node {
    animation: none;
  }
  body.hub-on .hub-inner,
  body.hub-on .hub-stage,
  body.hub-on .hub-pointer,
  body.hub-on .hub-node,
  body.hub-on main > section {
    transition: none;
  }
  body.hub-on main > section.is-active > *,
  body.hub-on main > section.is-active
    :is(.ventures-grid, .timeline, .press-grid, .awards, .about-grid) > * {
    animation: none;
  }
}
