/* PathoStride site styles. Tokens from brand/tokens/palette.css. */

@font-face { font-family: 'PS Display'; src: url('assets/fonts/Montserrat-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: block; }
@font-face { font-family: 'PS Display'; src: url('assets/fonts/Montserrat-Bold.ttf') format('truetype'); font-weight: 700; font-display: block; }
@font-face { font-family: 'PS Text'; src: url('assets/fonts/Inter-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'PS Text'; src: url('assets/fonts/Inter-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'PS Text'; src: url('assets/fonts/Inter-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'PS Mono'; src: url('assets/fonts/JetBrainsMono-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'PS Mono'; src: url('assets/fonts/JetBrainsMono-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }

:root {
  --ps-navy: #253254;
  --ps-navy-deep: #16203A;
  --ps-navy-lift: #41558A;
  --ps-teal: #45A8A7;
  --ps-teal-deep: #1C7B7A;
  --ps-teal-lift: #8FD3D2;
  --ps-ground: #F4F6FA;
  --ps-line-soft: #E9EDF4;
  --ps-line: #DAE0EA;
  --ps-muted: #46526E;
  --ps-body: #2C3852;
  --ps-ink: #0F1829;
  --font-display: 'PS Display', 'Century Gothic', 'Segoe UI', system-ui, sans-serif;
  --font-text: 'PS Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'PS Mono', 'Consolas', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  font-family: var(--font-text);
  color: var(--ps-body);
  background: var(--ps-ground);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--ps-teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--ps-teal) 0%, var(--ps-teal-lift) 100%);
  z-index: 40; pointer-events: none;
  transition: width 0.1s linear;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ps-line);
  position: sticky; top: 0; z-index: 20;
  transition: box-shadow 0.3s ease;
}
header.scrolled { box-shadow: 0 6px 24px rgba(15, 24, 41, 0.08); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.nav-logo img { height: 44px; display: block; }
.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a {
  color: var(--ps-navy); font-weight: 600; font-size: 15px;
  position: relative; padding-bottom: 4px; transition: color 0.25s ease;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--ps-teal);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-links a:hover, .nav-links a.active { color: var(--ps-teal-deep); text-decoration: none; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* Mobile menu */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 9px;
  background: none; border: 1px solid var(--ps-line); border-radius: 8px; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%; background: var(--ps-navy);
  border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--ps-line);
    box-shadow: 0 14px 30px rgba(15, 24, 41, 0.12);
    padding: 8px 24px 16px;
  }
  body.nav-open .nav-links { display: flex; animation: menuDrop 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
  .nav-links li { border-bottom: 1px solid var(--ps-line-soft); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { display: block; padding: 13px 0; }
  .nav-links a::after { display: none; }
}
@keyframes menuDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--ps-navy) 0%, var(--ps-navy-deep) 100%);
  color: #fff;
  padding: 88px 0 96px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 82% 22%, rgba(69, 168, 167, 0.16) 0%, transparent 44%),
    radial-gradient(circle at 12% 88%, rgba(143, 211, 210, 0.10) 0%, transparent 40%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero .wrap { display: flex; align-items: center; gap: 56px; position: relative; z-index: 1; }
.hero-copy > * { animation: heroRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-copy .eyebrow { animation-delay: 0.05s; }
.hero-copy h1 { animation-delay: 0.15s; }
.hero-copy .lede { animation-delay: 0.28s; }
.hero-copy .hero-cta { animation-delay: 0.4s; }
.hero-copy .hero-stats { animation-delay: 0.52s; }
.hero-mark img { animation: heroMark 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both, heroFloat 7s ease-in-out 1.2s infinite; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroMark {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-copy { flex: 1 1 auto; }
.hero-mark { flex: 0 0 260px; text-align: center; }
.hero-mark img { width: 240px; }
@media (max-width: 820px) {
  .hero .wrap { flex-direction: column-reverse; text-align: center; gap: 32px; }
  .hero-mark img { width: 170px; }
}
.eyebrow {
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ps-teal-lift); margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.15; color: #fff;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--ps-teal-lift); }
.hero p.lede { font-size: 19px; color: #DCE4F2; max-width: 560px; }
@media (max-width: 820px) { .hero p.lede { margin: 0 auto; } }
.hero-cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 820px) { .hero-cta { justify-content: center; } }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 8px;
  font-weight: 600; font-size: 15.5px;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-teal { background: var(--ps-teal); color: var(--ps-navy-deep); box-shadow: 0 4px 14px rgba(69, 168, 167, 0.25); }
.btn-teal:hover { background: var(--ps-teal-lift); text-decoration: none; box-shadow: 0 8px 22px rgba(69, 168, 167, 0.35); }
.btn-ghost { border: 1px solid var(--ps-navy-lift); color: #fff; }
.btn-ghost:hover { border-color: var(--ps-teal-lift); color: var(--ps-teal-lift); text-decoration: none; }

/* Hero stats strip */
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 12px 36px;
  list-style: none; margin-top: 42px; padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--font-display); font-weight: 700; font-size: 26px;
  color: var(--ps-teal-lift); line-height: 1.2;
}
.hero-stats span {
  font-size: 13px; color: #AAB6D0; letter-spacing: 0.02em;
}
@media (max-width: 820px) {
  .hero-stats { justify-content: center; gap: 10px 28px; }
  .hero-stats li { align-items: center; }
}

/* Scroll reveal */
.reveal, .reveal-group > * {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in-view, .reveal-group > .in-view { opacity: 1; transform: translateY(0); }
.reveal-group > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-group > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-group > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-group > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-group > *:nth-child(6) { transition-delay: 0.5s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-group > * { opacity: 1; transform: none; }
}

/* Sections */
section { padding: 72px 0; }
section.alt { background: #fff; border-top: 1px solid var(--ps-line-soft); border-bottom: 1px solid var(--ps-line-soft); }
.kicker {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ps-teal-deep); margin-bottom: 10px;
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before {
  content: ''; display: inline-block; width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--ps-teal) 0%, var(--ps-teal-lift) 100%);
  border-radius: 2px;
}
.contact-cta .kicker::after {
  content: ''; display: inline-block; width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--ps-teal-lift) 0%, var(--ps-teal) 100%);
  border-radius: 2px;
}
h2 {
  font-family: var(--font-display); font-weight: 700; color: var(--ps-navy);
  font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 26px;
}
h3 { font-family: var(--font-display); font-weight: 600; color: var(--ps-navy); font-size: 1.1rem; margin-bottom: 10px; }
.section-intro { max-width: 680px; margin-bottom: 36px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.cred-card {
  background: #fff; border: 1px solid var(--ps-line); border-radius: 14px; padding: 26px;
  position: relative; overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.cred-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--ps-teal) 0%, var(--ps-teal-lift) 60%, transparent 100%);
}
.cred-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(15, 24, 41, 0.09);
  border-color: var(--ps-teal);
}
section.alt .cred-card { background: var(--ps-ground); }
.cred-card ul { list-style: none; }
.cred-card li { padding: 9px 0; border-bottom: 1px solid var(--ps-line-soft); font-size: 15.5px; }
.cred-card li:last-child { border-bottom: none; }
.cred-card li strong { color: var(--ps-navy); display: block; }
.cred-card li span { color: var(--ps-muted); font-size: 14px; }
.badge {
  display: inline-block; font-family: var(--font-mono); font-size: 12.5px;
  background: rgba(69, 168, 167, 0.10); color: var(--ps-teal-deep);
  border: 1px solid rgba(69, 168, 167, 0.35);
  padding: 4px 12px; border-radius: 999px; margin: 0 6px 8px 0; letter-spacing: 0.04em;
}

/* Expertise */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 720px) { .cols-2 { grid-template-columns: 1fr; } }
.tile {
  background: #fff; border: 1px solid var(--ps-line); border-radius: 14px; padding: 28px;
  position: relative; overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.tile::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--ps-teal) 0%, var(--ps-teal-lift) 60%, transparent 100%);
  opacity: 0; transition: opacity 0.3s ease;
}
.tile:hover::before { opacity: 1; }
.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(15, 24, 41, 0.09);
  border-color: var(--ps-teal);
}
.tile .tile-tag {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 14px;
}
.tile .tag-core { color: var(--ps-teal-deep); }
.tile .tag-dev { color: var(--ps-navy-lift); }
.chiplist { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; }
.chiplist li {
  background: var(--ps-ground); border: 1px solid var(--ps-line);
  border-radius: 999px; padding: 6px 15px; font-size: 14.5px; color: var(--ps-navy); font-weight: 600;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.chiplist li:hover { background: #fff; border-color: var(--ps-teal); transform: translateY(-2px); }

/* Timeline */
.timeline {
  list-style: none; margin-left: 8px; border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--ps-teal) 0%, var(--ps-line) 85%) 1;
}
.timeline li { position: relative; padding: 0 0 26px 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -7px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ps-teal); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ps-teal);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.timeline li:hover::before {
  transform: scale(1.3);
  box-shadow: 0 0 0 1px var(--ps-teal), 0 0 0 6px rgba(69, 168, 167, 0.15);
}
.timeline li { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.timeline li:hover { transform: translateX(4px); }
.timeline .when { font-family: var(--font-mono); font-size: 13px; color: var(--ps-muted); }
.timeline .what { font-weight: 600; color: var(--ps-navy); }
.timeline .where { font-size: 15px; color: var(--ps-muted); }

/* Publications */
.pub {
  background: #fff; border: 1px solid var(--ps-line); border-radius: 12px;
  padding: 22px 26px; margin-bottom: 16px;
  border-left: 3px solid var(--ps-teal);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.pub:hover {
  transform: translateX(6px); box-shadow: 0 10px 26px rgba(15, 24, 41, 0.08);
  border-left-color: var(--ps-teal-lift);
}
section.alt .pub { background: var(--ps-ground); }
.pub .pub-title { font-weight: 600; color: var(--ps-navy); }
.pub .pub-meta { font-size: 14.5px; color: var(--ps-muted); margin-top: 4px; }

/* Videos (YouTube Shorts, click-to-play) */
.shorts-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
@media (max-width: 900px) {
  .shorts-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .shorts-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 480px) {
  .shorts-grid { grid-template-columns: 1fr; max-width: 300px; }
}
.yt-short {
  position: relative; display: block; width: 100%;
  aspect-ratio: 9 / 16; padding: 0; overflow: hidden;
  border: 1px solid var(--ps-line); border-radius: 14px;
  background: var(--ps-navy-deep); cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.yt-short:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(15, 24, 41, 0.14);
  border-color: var(--ps-teal);
}
.yt-short img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.yt-short iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.yt-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(22, 32, 58, 0.78); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: background 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.yt-short:hover .yt-play {
  background: var(--ps-teal); color: var(--ps-navy-deep);
  transform: translate(-50%, -50%) scale(1.08);
}
.yt-play svg { width: 26px; height: 26px; margin-left: 3px; }
.videos-more { margin-top: 30px; }
.btn-outline { border: 1px solid var(--ps-teal-deep); color: var(--ps-teal-deep); }
.btn-outline:hover { background: var(--ps-teal); border-color: var(--ps-teal); color: var(--ps-navy-deep); text-decoration: none; }

/* Contact / footer */
.connect-band {
  background: linear-gradient(160deg, var(--ps-navy) 0%, var(--ps-navy-deep) 100%);
  color: #fff; padding: 80px 0;
  position: relative; overflow: hidden;
}
.connect-band::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(69, 168, 167, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(143, 211, 210, 0.10) 0%, transparent 40%);
  pointer-events: none;
}
.connect-band .wrap { position: relative; z-index: 1; }
.connect-band .kicker { color: var(--ps-teal-lift); }
.connect-band h2 { color: #fff; }
.contact-cta { text-align: center; }
.contact-cta .kicker { color: var(--ps-teal-lift); margin-bottom: 10px; }
.social-icons {
  display: flex; justify-content: center; gap: 14px; margin-top: 26px;
  padding: 0; list-style: none; flex-wrap: wrap;
}
.social-icons a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22); color: var(--ps-teal-lift);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}
.social-icons a:hover {
  background: var(--ps-teal); border-color: var(--ps-teal);
  color: var(--ps-navy-deep); transform: translateY(-3px); text-decoration: none;
}
.social-icons svg { width: 20px; height: 20px; display: block; }
.contact-loc {
  display: inline-flex; align-items: center; gap: 7px;
  color: #DCE4F2; font-size: 15px; margin-top: 20px;
}
.contact-loc svg { width: 16px; height: 16px; color: var(--ps-teal-lift); flex: 0 0 auto; }
.contact-cta p { color: #DCE4F2; max-width: 540px; margin: 0 auto 24px; }
.contact-cta a.mail { color: var(--ps-teal-lift); font-weight: 600; }
.contact-cta .btn-teal { margin-top: 4px; }
footer { background: var(--ps-navy-deep); color: #AAB6D0; padding: 30px 0; font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer img { height: 30px; }
footer a { color: var(--ps-teal-lift); }
.sig { font-family: var(--font-display); font-weight: 600; color: var(--ps-teal-lift); }

/* Back to top */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 30;
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ps-teal); color: var(--ps-navy-deep);
  border: none; cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 24, 41, 0.22);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--ps-teal-lift); }
.back-to-top svg { width: 20px; height: 20px; }
