/* =========================================================
   Tasaddaq Hussain — Kinetic Dossier
   Cool slate · copper signal · geometric type
   ========================================================= */

:root {
  --bg: #e8eef2;
  --bg-deep: #d5e0e8;
  --ink: #101820;
  --ink-soft: #3a4a56;
  --muted: #6a7a86;
  --line: rgba(16, 24, 32, 0.12);
  --copper: #c6531e;
  --copper-deep: #9e3f12;
  --teal: #1f5f6b;
  --teal-soft: #2f7d8a;
  --paper: #f5f8fa;
  --shadow: 0 24px 60px rgba(16, 24, 32, 0.08);
  --rail: 88px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47, 125, 138, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 5%, rgba(198, 83, 30, 0.12), transparent 50%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-deep) 48%, #e3ebe8 100%);
  background-attachment: fixed;
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(16, 24, 32, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 32, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 85%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

strong {
  font-weight: 600;
}

/* Custom cursor */
.cursor,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(198, 83, 30, 0.55);
  mix-blend-mode: multiply;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--copper);
}

body.has-cursor .cursor,
body.has-cursor .cursor-dot {
  opacity: 1;
}

body.has-cursor,
body.has-cursor a,
body.has-cursor button {
  cursor: none;
}

/* Rail */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rail);
  height: 100vh;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.4rem 0;
  border-right: 1px solid var(--line);
  background: rgba(245, 248, 250, 0.88);
  backdrop-filter: blur(12px);
}

.rail__bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.rail__toggle {
  display: none;
  appearance: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ink);
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.rail__toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.rail.is-open .rail__toggle span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.rail.is-open .rail__toggle span:nth-child(2) {
  opacity: 0;
}

.rail.is-open .rail__toggle span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.rail__menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 0;
  padding-top: 1.5rem;
}

.rail__foot {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
}

.rail__foot--bar {
  display: none;
}

.rail__mark,
.rail__cv,
.rail__in {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}

.rail__mark:hover,
.rail__cv:hover,
.rail__in:hover {
  background: var(--ink);
  color: var(--paper);
}

.rail__cv {
  border-color: var(--copper);
  color: var(--copper);
}

.rail__cv:hover {
  background: var(--copper);
  color: #fff;
  border-color: var(--copper);
}

.rail__in {
  border-color: var(--teal);
  color: var(--teal);
  font-size: 0.9rem;
}

.rail__in:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.rail__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  width: 100%;
  padding: 0 0.35rem;
}

.rail__nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 100%;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s ease;
}

.rail__nav a span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--teal);
  line-height: 1;
}

.rail__nav a em {
  font-style: normal;
  font-weight: 500;
  line-height: 1.2;
  max-width: 4.5rem;
}

.rail__nav a.is-active,
.rail__nav a:hover {
  color: var(--ink);
}

.rail__nav a.is-active span,
.rail__nav a:hover span {
  color: var(--copper);
}

main {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 5vw, 5rem) 4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__mesh {
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background:
    conic-gradient(from 210deg at 60% 40%, rgba(31, 95, 107, 0.2), transparent 40%, rgba(198, 83, 30, 0.16), transparent 70%),
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.55), transparent 45%);
  animation: drift 18s ease-in-out infinite alternate;
}

.hero__portrait {
  position: absolute;
  width: min(42vw, 420px);
  aspect-ratio: 1;
  right: 5%;
  top: 16%;
  z-index: 3;
  pointer-events: none;
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: min(620px, 52vw);
}

.hero__orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(31, 95, 107, 0.28);
  border-radius: 50%;
  animation: spin 48s linear infinite;
}

.hero__orbit::before,
.hero__orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.hero__orbit::before {
  inset: 8%;
  border: 1px dashed rgba(198, 83, 30, 0.4);
}

.hero__orbit::after {
  width: 12px;
  height: 12px;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--copper);
  box-shadow: 0 0 0 7px rgba(198, 83, 30, 0.14);
}

.hero__photo {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(213, 224, 232, 0.85));
  border: 3px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 18px 40px rgba(16, 24, 32, 0.14),
    inset 0 0 0 1px rgba(31, 95, 107, 0.12);
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  filter: saturate(0.96) contrast(1.02);
  transform: scale(1.04);
}

.hero__skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(140px, 22vh, 240px);
  fill: rgba(16, 24, 32, 0.06);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 500;
}

.hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 9.5vw, 7.2rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.hero__line {
  display: block;
  overflow: hidden;
}

.hero__line--accent {
  color: var(--copper);
  -webkit-text-stroke: 1px rgba(198, 83, 30, 0.25);
}

.hero__role {
  margin: 1.5rem 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero__lede {
  max-width: 34rem;
  margin: 0 0 2rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 300;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.about__stats {
  list-style: none;
  margin: 2rem 0 0;
  padding: 1.25rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  border-top: 1px solid var(--line);
  max-width: 420px;
}

.about__stats li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.about__stats strong {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.about__stats span {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.35rem;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  transition: transform 0.35s var(--ease), background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn--primary {
  background: var(--ink);
  color: #f3f6f8;
  border-color: var(--ink);
}

.btn--primary:hover {
  background: var(--copper);
  border-color: var(--copper);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(16, 24, 32, 0.28);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
}

.btn--lg {
  padding: 1.1rem 1.6rem;
}

/* Sections */
.section {
  padding: clamp(4rem, 9vw, 7.5rem) clamp(1.5rem, 5vw, 5rem);
  position: relative;
}

.section__index {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__index span {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--copper);
  letter-spacing: 0.08em;
}

.section__title {
  margin: 0 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about__copy p {
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.about__intent {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-weight: 500;
  color: var(--ink) !important;
}

/* Timeline */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: calc(clamp(6.5rem, 14vw, 9.5rem) + 1rem);
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 8%, var(--line) 92%, transparent);
}

.chapter {
  display: grid;
  grid-template-columns: clamp(6.5rem, 14vw, 9.5rem) 1fr;
  gap: 2rem;
  padding: 1.6rem 0 1.6rem 0;
  opacity: 0.72;
  transform: translateX(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  align-items: start;
}

.chapter.is-active,
.chapter.is-near {
  opacity: 1;
  transform: none;
}

.chapter.is-active .chapter__year {
  color: var(--copper);
}

.chapter__year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
  padding-top: 0;
  position: relative;
  color: var(--muted);
}

.chapter__org {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 500;
  line-height: 1.35;
  position: relative;
}

/* Dot sits on the rail, optically centered with the org line */
.chapter__org::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper);
  border: 2px solid var(--teal);
  box-shadow: 0 0 0 4px rgba(31, 95, 107, 0.1);
}

.chapter.is-active .chapter__org::before {
  background: var(--copper);
  border-color: var(--copper);
}

.chapter__body h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}

.chapter__body p {
  margin: 0 0 1rem;
  color: #24313a;
  max-width: 58ch;
}

.chapter__link {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--copper);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.chapter__link:hover {
  border-color: var(--copper);
}

.tags {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tags li {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* Ventures */
.ventures__stage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.venture {
  position: relative;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: rgba(245, 248, 250, 0.78);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.35s ease;
}

.venture::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 83, 30, 0.14), transparent 70%);
  pointer-events: none;
}

.venture--lead {
  grid-column: 1 / -1;
  min-height: 320px;
  background:
    linear-gradient(145deg, #101820 0%, #16343c 55%, #1a4a54 100%);
  color: #f3f7f9;
  border-color: transparent;
}

.venture--lead::before {
  background: radial-gradient(circle, rgba(198, 83, 30, 0.35), transparent 70%);
}

.venture--lead .venture__label {
  color: rgba(243, 247, 249, 0.72);
}

.venture--lead .btn--primary {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff;
}

.venture--lead .btn--primary:hover {
  background: #e06a30;
  border-color: #e06a30;
}

.venture--lead > * {
  position: relative;
  z-index: 1;
}

.venture:hover {
  transform: translateY(-4px);
}

.venture__label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.venture h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.035em;
  font-weight: 800;
}

.venture__tagline {
  margin: 0.4rem 0 1.25rem;
  font-weight: 500;
  color: var(--teal);
}

.venture p {
  margin: 0 0 1.35rem;
  max-width: 48ch;
  color: var(--ink-soft);
}

.venture .tags {
  margin-bottom: 1.35rem;
}

.venture--side .tags li {
  background: rgba(255, 255, 255, 0.65);
}

.venture--next {
  border-style: dashed;
  border-color: rgba(16, 24, 32, 0.22);
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(245, 248, 250, 0.9),
      rgba(245, 248, 250, 0.9) 12px,
      rgba(31, 95, 107, 0.04) 12px,
      rgba(31, 95, 107, 0.04) 24px
    );
}

.venture--next h3 {
  color: var(--ink);
}

.venture--next .venture__tagline {
  color: var(--copper);
}

.venture__skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1.25rem 0 1rem;
}

.venture__skeleton .sk {
  display: block;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(16, 24, 32, 0.08), rgba(16, 24, 32, 0.14), rgba(16, 24, 32, 0.08));
  background-size: 200% 100%;
  animation: shimmer 2.2s ease-in-out infinite;
}

.sk--title {
  width: 55%;
  height: 1.35rem;
}

.sk--line {
  width: 92%;
  height: 0.7rem;
}

.sk--short {
  width: 68%;
}

.sk--pills {
  display: flex;
  gap: 0.45rem;
  background: none !important;
  animation: none !important;
  margin-top: 0.25rem;
}

.sk--pills i {
  display: block;
  width: 4.2rem;
  height: 1.45rem;
  border: 1px dashed rgba(16, 24, 32, 0.2);
  background: rgba(255, 255, 255, 0.55);
}

.venture__soon {
  margin: 0 !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper) !important;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* High-contrast text on the dark Sooqz panel (must follow .venture p) */
.venture.venture--lead,
.venture.venture--lead h3 {
  color: #f5f8fa;
}

.venture.venture--lead .venture__label {
  color: rgba(245, 248, 250, 0.75);
}

.venture.venture--lead .venture__tagline {
  color: #ffb07a;
}

.venture.venture--lead p {
  color: #edf2f5;
}

/* Skills */
.skills__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.skills__head .section__title {
  margin-bottom: 0;
}

.skills__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skills__filters button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-soft);
  padding: 0.55rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.skills__filters button.is-active,
.skills__filters button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.skills__cloud {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skills__cloud li {
  position: relative;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  background: rgba(245, 248, 250, 0.8);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  transition: opacity 0.35s ease, transform 0.35s var(--ease), border-color 0.3s ease, background 0.3s ease;
}

.skills__cloud li::after {
  content: attr(data-level);
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.skills__cloud li:hover {
  border-color: var(--copper);
  transform: translateY(-3px);
  background: #fff;
}

.skills__cloud li.is-dim {
  opacity: 0.18;
  transform: scale(0.97);
}

.skills__teaching {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  max-width: 70ch;
}

.skills__teaching a {
  color: var(--copper);
  border-bottom: 1px solid rgba(198, 83, 30, 0.35);
}

.skills__langs {
  margin-top: 0.75rem;
  font-weight: 500;
  color: var(--ink);
}

/* Work */
.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.work__item {
  background: rgba(245, 248, 250, 0.88);
  padding: 1.75rem 1.5rem 1.6rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  transition: background 0.35s ease, transform 0.45s var(--ease);
}

.work__item:hover {
  background: #fff;
  transform: scale(1.01);
  z-index: 2;
}

.work__num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--copper);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.work__item h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.work__item p {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex: 1;
}

.work__item a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--teal);
  border-bottom: 1px solid rgba(31, 95, 107, 0.3);
  align-self: flex-start;
}

/* Reading shelf */
.shelf__head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.shelf__head .section__title {
  margin-bottom: 0;
  grid-column: 1;
}

.shelf__lede {
  grid-column: 1;
  margin: 0.75rem 0 0;
  max-width: 36rem;
  color: var(--ink-soft);
}

.shelf__filters {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.shelf__filters button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-soft);
  padding: 0.55rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.shelf__filters button.is-active,
.shelf__filters button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.bookshelf {
  --shelf-h: 210px;
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  min-height: var(--shelf-h);
  padding: 1.5rem 1.25rem 0;
  border-bottom: 10px solid #2a343c;
  box-shadow: 0 14px 0 -6px rgba(16, 24, 32, 0.08);
  overflow-x: auto;
  scrollbar-width: thin;
}

.book {
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: calc(var(--shelf-h) - 28px);
  transform-origin: bottom center;
  transition: width 0.35s var(--ease), transform 0.35s var(--ease), opacity 0.35s ease, filter 0.35s ease;
  cursor: pointer;
}

.book.is-dim {
  opacity: 0.18;
  filter: grayscale(0.4);
  pointer-events: none;
}

.book__spine {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.18)),
    var(--spine, var(--teal));
  color: #f4f7f8;
  border-radius: 3px 3px 0 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.book__spine span {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0.75;
}

.book__spine em {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-height: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book__face {
  position: absolute;
  left: calc(100% + 0.65rem);
  bottom: 0.5rem;
  width: 220px;
  padding: 1rem 1.05rem;
  background: rgba(245, 248, 250, 0.96);
  border: 1px solid var(--line);
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
  z-index: 5;
  box-shadow: var(--shadow);
}

.book__status {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  font-weight: 600;
}

.book--done .book__status {
  color: var(--teal);
}

.book__face h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.book__face p:last-child {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.book:hover,
.book:focus-within,
.book.is-open {
  width: 64px;
  transform: translateY(-8px);
  z-index: 4;
}

.book:hover .book__face,
.book:focus-within .book__face,
.book.is-open .book__face {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.book:nth-last-child(-n+3) .book__face {
  left: auto;
  right: calc(100% + 0.65rem);
}

.book--done .book__spine::after {
  content: "✓";
  position: absolute;
  top: 0.45rem;
  font-size: 0.7rem;
  opacity: 0.85;
  writing-mode: horizontal-tb;
  transform: none;
}

.shelf__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.shelf__legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.dot--done { background: var(--teal); }
.dot--queue { background: var(--copper); }
.dot--general { background: #5a6b74; }
.dot--business { background: #0f3d4a; }

.book[data-cat="business"] .book__status {
  color: #0f3d4a;
}

.book[data-cat="business"].book--done .book__status,
.book[data-cat="general"].book--done .book__status {
  color: var(--teal);
}

/* Education */
.edu__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.edu__list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.edu__item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.edu__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.edu__score {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 0.05rem;
  padding: 0.85rem 0.4rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  text-align: center;
  line-height: 1;
}

.edu__score strong {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--copper);
}

.edu__score span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--copper);
}

.edu__score em {
  flex-basis: 100%;
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.edu__score--soft strong {
  color: var(--teal);
}

.edu__body h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.edu__body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.edu__note {
  margin-top: 0.45rem !important;
  font-size: 0.88rem !important;
}

/* Connect */
.connect {
  padding-bottom: 3rem;
}

.connect__panel {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background:
    linear-gradient(135deg, rgba(16, 24, 32, 0.96), rgba(20, 55, 64, 0.95));
  color: #eef4f6;
  overflow: hidden;
}

.connect__panel::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  top: -120px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: spin 60s linear infinite;
}

.connect__panel::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: 40px;
  top: -20px;
  border-radius: 50%;
  border: 1px dashed rgba(198, 83, 30, 0.35);
}

.connect__title,
.connect__lede,
.connect__channels,
.connect__actions,
.connect__footnote {
  position: relative;
  z-index: 2;
}

.connect__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.connect__lede {
  max-width: 38rem;
  margin: 0 0 2.25rem;
  color: rgba(238, 244, 246, 0.78);
  font-weight: 300;
  font-size: 1.05rem;
}

.connect__channels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

.connect__channels a {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.3s ease;
}

.connect__channels a:hover {
  background: rgba(198, 83, 30, 0.18);
}

.connect__channels span {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(238, 244, 246, 0.55);
}

.connect__channels strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.connect__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.connect .btn--ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: #eef4f6;
}

.connect .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
}

.connect .btn--primary {
  background: var(--copper);
  border-color: var(--copper);
}

.connect .btn--primary:hover {
  background: #e06a30;
  border-color: #e06a30;
}

.connect__footnote {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(238, 244, 246, 0.55);
}

.connect__footnote a {
  color: #f0a06e;
  border-bottom: 1px solid rgba(240, 160, 110, 0.35);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.5rem clamp(1.5rem, 5vw, 5rem) 2.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.hero__line [data-char] {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
}

.hero__line.is-in [data-char] {
  opacity: 1;
  transform: none;
}

/* Animations */
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-3%, 4%, 0) scale(1.05); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1100px) {
  .hero__copy {
    max-width: min(540px, 48vw);
  }

  .hero__portrait {
    width: min(38vw, 340px);
    right: 3%;
    top: 12%;
  }

  .hero__name {
    font-size: clamp(2.8rem, 8vw, 5.8rem);
  }
}

@media (max-width: 980px) {
  .about__grid,
  .ventures__stage,
  .edu__grid,
  .shelf__head {
    grid-template-columns: 1fr;
  }

  .shelf__filters {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .book__face {
    left: auto;
    right: 0;
    bottom: calc(100% + 0.55rem);
    width: min(220px, 70vw);
  }

  .connect__channels {
    grid-template-columns: 1fr 1fr;
  }

  .edu__item {
    grid-template-columns: 4.75rem 1fr;
    gap: 1rem;
  }

  .work__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  :root { --rail: 0px; }

  body.nav-open {
    overflow: hidden;
  }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 100dvh;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    background: rgba(245, 248, 250, 0.96);
  }

  .rail.is-open {
    overflow: auto;
    box-shadow: 0 18px 40px rgba(20, 32, 40, 0.12);
  }

  .rail__bar {
    flex-direction: row;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    min-height: 64px;
  }

  .rail__toggle {
    display: flex;
    order: 3;
  }

  .rail__foot--bar {
    display: flex;
    flex-direction: row;
    margin-left: auto;
    order: 2;
  }

  .rail__mark,
  .rail__cv,
  .rail__in,
  .rail__toggle {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
  }

  .rail__menu {
    display: none;
    flex: none;
    width: 100%;
    padding: 0.35rem 0.9rem 1rem;
    border-top: 1px solid var(--line);
    background: rgba(245, 248, 250, 0.98);
  }

  .rail.is-open .rail__menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .rail__nav {
    align-items: stretch;
    gap: 0.15rem;
    padding: 0;
  }

  .rail__nav a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.85rem;
    width: 100%;
    padding: 0.85rem 0.35rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.8rem;
    text-align: left;
  }

  .rail__nav a:last-child {
    border-bottom: 0;
  }

  .rail__nav a span {
    font-size: 0.85rem;
    min-width: 1.6rem;
  }

  .rail__nav a em {
    display: inline;
    max-width: none;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
  }

  .rail__foot--menu {
    display: none;
  }

  main {
    margin-left: 0;
  }

  .hero {
    min-height: auto;
    justify-content: flex-start;
    padding: 5.5rem 1.15rem 2.75rem;
    gap: 1.25rem;
  }

  .hero__portrait {
    position: relative;
    width: min(58vw, 220px);
    right: auto;
    top: auto;
    margin: 0 auto;
    opacity: 1;
    pointer-events: auto;
  }

  .hero__copy {
    max-width: 100%;
  }

  .hero__meta {
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .hero__name {
    font-size: clamp(2.6rem, 14vw, 4.2rem);
  }

  .hero__role {
    margin-top: 1rem;
    font-size: 1.15rem;
  }

  .hero__lede {
    font-size: 0.98rem;
    margin-bottom: 1.4rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    justify-content: center;
  }

  .hero__skyline {
    height: 100px;
    opacity: 0.7;
  }

  .section {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .timeline::before {
    left: 0.45rem;
  }

  .chapter {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding-left: 1.6rem;
  }

  .chapter__org::before {
    left: -1.15rem;
  }

  .about__stats {
    grid-template-columns: 1fr 1fr;
    max-width: none;
  }

  .work__grid {
    grid-template-columns: 1fr;
  }

  .connect__channels {
    grid-template-columns: 1fr;
  }

  .connect__panel {
    padding: 1.75rem 1.15rem;
  }

  .footer {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .cursor,
  .cursor-dot {
    display: none;
  }

  body.has-cursor,
  body.has-cursor a,
  body.has-cursor button {
    cursor: auto;
  }
}

@media (max-width: 480px) {
  .hero__portrait {
    width: min(52vw, 180px);
  }

  .about__stats {
    grid-template-columns: 1fr;
  }

  .edu__item {
    grid-template-columns: 1fr;
  }

  .edu__score {
    width: 100%;
    justify-content: flex-start;
    gap: 0.35rem;
  }

  .edu__score em {
    flex-basis: auto;
    margin-top: 0;
  }

  .bookshelf {
    --shelf-h: 170px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
