/* Justin Terranova — Ops command center / executive brief */
:root {
  --bg: #0b0e14;
  --bg-elevated: #10141c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf4;
  --muted: #9aa3b5;
  --accent: #5b9fd4;
  --accent-soft: rgba(91, 159, 212, 0.14);
  --accent-glow: rgba(91, 159, 212, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 64px;
  --max: 1120px;
  --font: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mx: 50%;
  --my: 30%;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #7bb4e0; }
ul, ol { list-style: none; }

.mono { font-family: var(--mono); }

/* —— Ambient layers —— */
.mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 15% 10%, rgba(91, 159, 212, 0.11), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 20%, rgba(91, 159, 212, 0.06), transparent 55%),
    radial-gradient(ellipse 55% 45% at 50% 90%, rgba(120, 140, 180, 0.05), transparent 60%),
    var(--bg);
  animation: mesh-drift 28s ease-in-out infinite alternate;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image:
    linear-gradient(rgba(255,255,255,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.6) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}

.cursor-spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mx) var(--my),
    rgba(91, 159, 212, 0.08),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
body.has-pointer .cursor-spotlight { opacity: 1; }

@keyframes mesh-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(1.5%, -1%, 0) scale(1.03); }
}

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

/* —— Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(11, 14, 20, 0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(91, 159, 212, 0.35);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.brand-name { font-size: 0.95rem; }

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

.nav-links a {
  color: var(--muted);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-links a.nav-cta {
  margin-left: 0.35rem;
  border: 1px solid var(--border);
  color: var(--text);
}
.nav-links a.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 8px;
  cursor: pointer;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
}

/* —— Layout —— */
main {
  flex: 1;
  position: relative;
  z-index: 1;
  padding-bottom: 4rem;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4.5rem 0 1rem;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 40rem;
}
.section-num {
  display: block;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}
.section-head p { color: var(--muted); font-size: 1rem; }

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  padding-top: 2rem;
}
.page-lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 42rem;
}

/* —— Glass / cards —— */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  --spot-x: 50%;
  --spot-y: 50%;
}
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--spot-x) var(--spot-y),
    rgba(91, 159, 212, 0.12),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
body.has-pointer .glass-card:hover::before { opacity: 1; }
.glass-card > * { position: relative; z-index: 1; }

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 560;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #0b0e14;
}
.btn-primary:hover {
  background: #7bb4e0;
  color: #0b0e14;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* —— Hero —— */
.hero {
  padding: 3rem 0 2rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 0.55rem;
}
.hero-role {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}
.hero-value {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34rem;
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

.portrait-frame {
  width: min(100%, 340px);
  margin-left: auto;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow:
    0 0 0 1px rgba(91, 159, 212, 0.12),
    0 0 40px rgba(91, 159, 212, 0.12),
    0 24px 48px rgba(0, 0, 0, 0.45);
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
}
.portrait-meta {
  margin-top: 1rem;
  margin-left: auto;
  width: min(100%, 340px);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* —— KPI —— */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.kpi-card {
  padding: 1.35rem 1.25rem;
  min-height: 120px;
}
.kpi-value {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.45rem;
}
.kpi-label {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}
.kpi-note {
  color: rgba(154, 163, 181, 0.7);
  font-size: 0.8rem;
}

/* —— Bento —— */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.bento-card {
  padding: 1.5rem 1.4rem;
  min-height: 170px;
}
.bento-num {
  display: block;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  letter-spacing: 0.06em;
}
.bento-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
}
.bento-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* —— Outcomes —— */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.outcome-card {
  padding: 1.5rem;
}
.outcome-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.outcome-org {
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.outcome-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.outcome-flow {
  display: grid;
  gap: 0.85rem;
}
.outcome-flow dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.outcome-flow dd {
  color: var(--muted);
  font-size: 0.92rem;
}

/* —— Timeline —— */
.timeline {
  border-left: 1px solid var(--border);
  margin-left: 0.35rem;
  padding-left: 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 1.25rem;
  padding: 1.15rem 0 1.15rem 1.5rem;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 1.45rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 159, 212, 0.2);
}
.timeline-item time {
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 0.2rem;
}
.timeline-item h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.timeline-meta {
  color: var(--accent);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}
.timeline-item p:last-child {
  color: var(--muted);
  font-size: 0.92rem;
}
.edu-line {
  margin-top: 1.75rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.82rem;
}

/* —— Chips —— */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.chip-row li {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.chip-row li:hover {
  border-color: rgba(91, 159, 212, 0.45);
  color: var(--text);
  background: var(--accent-soft);
}
.stack-more {
  margin-top: 1.25rem;
  font-size: 0.92rem;
}

/* —— Contact —— */
.contact-section { padding-bottom: 2rem; }
.contact-panel {
  padding: 2.25rem 2rem;
  text-align: left;
}
.contact-panel h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  letter-spacing: -0.025em;
  margin: 0.5rem 0 0.65rem;
}
.contact-panel > p {
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 1.5rem;
}
.contact-loc {
  margin-top: 1.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* —— Reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* —— Subpages: About —— */
.about-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 2rem;
}
.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 3/4;
  box-shadow: 0 0 32px rgba(91, 159, 212, 0.1);
}
.about-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
}
.about-copy p {
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 1.02rem;
}
.about-copy p:first-of-type { color: var(--text); }
.contact-block {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-block h3 {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.contact-block a, .contact-block span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}
.contact-block a:hover { color: var(--accent); }

/* —— Resume —— */
.skills-tagline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.skills-tagline p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.skills-tagline p:last-child { margin-bottom: 0; }
.skills-tagline strong { color: var(--text); }

.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.job {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.job-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.35rem;
}
.job-title { font-size: 1.08rem; font-weight: 600; }
.job-dates {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}
.job-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}
.job ul {
  padding-left: 1.15rem;
  list-style: disc;
}
.job li {
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.job li::marker { color: var(--accent); }

.edu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0.5rem 0 2rem;
}
.edu h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.edu p { color: var(--muted); font-size: 0.92rem; }

/* —— Skills —— */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding-bottom: 2rem;
}
.skills-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.skills-col h2 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  color: var(--accent);
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-tags li {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}
.skill-tags li:hover {
  border-color: rgba(91, 159, 212, 0.45);
  color: var(--text);
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* —— Responsive —— */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .portrait-frame,
  .portrait-meta {
    margin-left: 0;
    margin-right: auto;
  }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .outcome-grid { grid-template-columns: 1fr; }
  .outcome-card:last-child:nth-child(odd) { grid-column: auto; }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media (max-width: 860px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-photo {
    max-width: 280px;
    margin: 0 auto;
  }
  .skills-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(11, 14, 20, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; }
  .nav-links a.nav-cta { margin-left: 0; }
  .brand-name { display: none; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .contact-panel { padding: 1.5rem 1.25rem; }
}

@media (max-width: 480px) {
  .kpi-strip { grid-template-columns: 1fr; }
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-spotlight { display: none !important; }
  body.has-pointer .glass-card:hover::before { opacity: 0; }
}

/* —— Portfolio —— */
.portfolio-hero {
  padding: 0.5rem 0 0;
}
.portfolio-hero .page-title {
  padding-top: 0.35rem;
  margin-bottom: 0.65rem;
}
.portfolio-hero .page-lead {
  margin-bottom: 0.5rem;
}

.ja-intro {
  padding: 1.5rem 1.5rem;
  margin-bottom: 1.25rem;
}
.ja-tagline {
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}
.ja-intro p:last-child {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 48rem;
}

.ja-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.ja-service {
  padding: 1.35rem 1.35rem;
}
.ja-service h3 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}
.ja-service p {
  color: var(--muted);
  font-size: 0.94rem;
}

.subsection-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0.5rem 0 1rem;
  font-weight: 500;
}
.subsection-label span {
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
}

.package-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.package-card {
  padding: 1.25rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 180px;
}
.package-name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.package-price {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
}
.package-card ul {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.35rem;
}
.package-card li {
  color: var(--muted);
  font-size: 0.88rem;
  padding-left: 0.85rem;
  position: relative;
}
.package-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.ja-intake {
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.75rem;
}
.ja-intake h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}
.ja-intake p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 44rem;
}

.ja-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.ja-shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  aspect-ratio: 16 / 10;
  position: relative;
}
.ja-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.ja-shot figcaption,
.mock-caption {
  font-size: 0.65rem;
  color: rgba(154, 163, 181, 0.75);
  letter-spacing: 0.04em;
}
.ja-shot figcaption {
  position: absolute;
  left: 0.65rem;
  bottom: 0.55rem;
  background: rgba(11, 14, 20, 0.72);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}
.ja-shot.is-mock figcaption::after {
  content: " · Illustrative layout";
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
  padding-bottom: 2rem;
}
.portfolio-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.portfolio-card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.portfolio-visual {
  position: relative;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.portfolio-card-wide .portfolio-visual {
  border-bottom: none;
  border-right: 1px solid var(--border);
  aspect-ratio: auto;
  min-height: 220px;
}
.portfolio-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.portfolio-visual .mock-caption {
  position: absolute;
  left: 0.65rem;
  bottom: 0.55rem;
  background: rgba(11, 14, 20, 0.72);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}
.portfolio-body {
  padding: 1.35rem 1.4rem 1.5rem;
}
.portfolio-body .outcome-org {
  margin-bottom: 0.4rem;
}
.portfolio-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.portfolio-body .outcome-flow {
  gap: 0.75rem;
}

@media (max-width: 960px) {
  .package-strip { grid-template-columns: repeat(2, 1fr); }
  .ja-gallery { grid-template-columns: repeat(2, 1fr); }
  .portfolio-card-wide {
    grid-template-columns: 1fr;
  }
  .portfolio-card-wide .portfolio-visual {
    border-right: none;
    border-bottom: 1px solid var(--border);
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 860px) {
  .ja-services { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .ja-projects { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .package-strip { grid-template-columns: 1fr; }
  .ja-gallery { grid-template-columns: 1fr; }
}


/* JA feature + projects + insights teaser */
.ja-intro-brand {
  margin-bottom: 1rem;
}
.ja-intro-brand img {
  max-width: 180px;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #000;
}
.ja-feature {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.ja-feature img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top center;
}
.ja-feature figcaption {
  padding: 0.65rem 0.9rem 0.85rem;
  font-size: 0.72rem;
  color: rgba(154, 163, 181, 0.85);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border);
}
.ja-projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.ja-project {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ja-project-visual {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.ja-project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.ja-project-body {
  padding: 1.2rem 1.3rem 1.4rem;
}
.ja-project-body h3 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.35rem 0 0.55rem;
}
.ja-project-body p:last-child {
  color: var(--muted);
  font-size: 0.94rem;
}

.insight-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  padding: 0;
  text-decoration: none;
  color: inherit;
  margin-bottom: 2rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.insight-card:hover {
  border-color: rgba(94, 234, 212, 0.35);
}
.insight-card-visual {
  min-height: 240px;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
}
.insight-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.insight-card-body {
  padding: 1.5rem 1.55rem 1.65rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
}
.insight-meta {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.insight-card-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.insight-card-body p {
  color: var(--muted);
  font-size: 0.95rem;
}
.insight-cta {
  margin-top: 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* Essay / Insights page */
.essay-hero {
  padding-top: 2rem;
  padding-bottom: 1rem;
}
.essay-byline {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.75rem;
}
.essay-hero-art {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.essay-hero-art img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.essay-hero-art figcaption {
  padding: 0.65rem 0.9rem 0.85rem;
  font-size: 0.72rem;
  color: rgba(154, 163, 181, 0.85);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border);
}
.essay-body {
  max-width: 46rem;
  padding-bottom: 3rem;
}
.essay-section {
  margin-bottom: 2.25rem;
}
.essay-section h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.essay-section p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.essay-close {
  color: var(--text) !important;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  margin-top: 1.5rem;
}
.essay-figure {
  margin: 1.35rem 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.essay-figure img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}
.essay-figure-wide img {
  max-height: 380px;
  object-position: center;
}
.essay-figure figcaption {
  padding: 0.55rem 0.85rem 0.75rem;
  font-size: 0.7rem;
  color: rgba(154, 163, 181, 0.85);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border);
}
.essay-back {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}
.essay-back a {
  color: var(--accent);
  text-decoration: none;
}
.essay-back a:hover {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .ja-projects { grid-template-columns: 1fr; }
  .insight-card { grid-template-columns: 1fr; }
  .insight-card-visual {
    border-right: none;
    border-bottom: 1px solid var(--border);
    aspect-ratio: 16 / 10;
    min-height: 0;
  }
}
