@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #fafbfc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-subtle: rgba(226, 232, 240, 0.9);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
}

code, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Ambient Subtle Lighting */
.ambient-glow-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 400px;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.06) 0%, rgba(59, 130, 246, 0.03) 40%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Portfolio Card */
.portfolio-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
}

.portfolio-card:hover {
  transform: translateY(-3px);
  border-color: rgba(148, 163, 184, 0.5);
  box-shadow: 0 16px 30px -10px rgba(15, 23, 42, 0.06), 0 0 1px 1px rgba(15, 23, 42, 0.03);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Portfolio storytelling and case studies */
html { scroll-padding-top: 5rem; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.project-focus {
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}
.project-focus-label {
  color: #475569;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.project-focus p { margin-top: 0.35rem; color: #334155; font-size: 0.8rem; line-height: 1.6; }
.project-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; }
.process-card { padding: 1.3rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; }
.process-number { color: #2563eb; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; font-weight: 700; }
.process-card h3 { color: #0f172a; font-size: 0.9rem; font-weight: 750; margin: 0.65rem 0 0.35rem; }
.process-card p { color: #64748b; font-size: 0.8rem; line-height: 1.65; }

/* Shared visual language for every project case study */
.case-kicker { color: #2563eb; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; font-size: 0.7rem; }
.case-lede { color: #475569; font-size: 1.05rem; line-height: 1.85; }
.case-section { padding: 3.5rem 0; border-top: 1px solid #e2e8f0; }
.case-section h2 { color: #0f172a; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; }
.case-section p { color: #475569; line-height: 1.8; }
.case-card { background: white; border: 1px solid #e2e8f0; border-radius: 1.1rem; padding: 1.35rem; }
.case-card h3 { font-size: 0.95rem; font-weight: 800; margin-bottom: 0.5rem; color: #0f172a; }
.case-card p { font-size: 0.85rem; line-height: 1.75; }
.case-tag { display: inline-flex; padding: 0.3rem 0.65rem; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font: 600 0.72rem 'JetBrains Mono', monospace; }
.case-flow { background: linear-gradient(145deg,#0f172a,#172b4d); border: 1px solid #24385e; color: #f8fafc; border-radius: 1.25rem; padding: 1.5rem; }
.case-flow-list { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0.6rem; margin-top: 1.5rem; align-items: stretch; }
.case-flow-step { background: #ffffff10; border: 1px solid #ffffff25; border-radius: 0.85rem; padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; justify-content: center; min-height: 130px; }
.case-flow-step span { color: #93c5fd; font: 700 0.7rem 'JetBrains Mono',monospace; }
.case-flow-step strong { font-size: 0.85rem; line-height: 1.4; }
.case-flow-step small { font-size: 0.72rem; color: #cbd5e1; line-height: 1.45; }
.case-note { font-size: 0.8rem; color: #64748b; line-height: 1.75; }
.case-link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.85rem; color: #1d4ed8; }
.case-link:hover { color: #1e40af; text-decoration: underline; }
.case-sidebar { position: relative; }
.case-sidebar dl > div { padding: 0.75rem 0; border-bottom: 1px solid #e2e8f0; }
.case-sidebar dt { font-size: 0.7rem; color: #64748b; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.case-sidebar dd { margin-top: 0.3rem; font-size: 0.85rem; color: #0f172a; line-height: 1.55; }
[hidden] { display: none !important; }
@media (max-width: 720px) {
  .case-flow-list { grid-template-columns: 1fr; }
  .case-flow-step { min-height: 0; }
  .project-actions { justify-content: flex-start; }
  .project-item > div:last-child { flex-wrap: wrap; gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Entire portfolio card opens its own project page. Live links remain independent. */
.portfolio-card { position: relative; isolation: isolate; cursor: pointer; }
.project-primary-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.project-primary-link:focus-visible { outline: none; }
.portfolio-card:has(.project-primary-link:focus-visible) { outline: 3px solid #2563eb; outline-offset: 4px; }
.project-external, .project-actions a { position: relative; z-index: 2; }
.project-actions a:hover { text-decoration: underline; }
.portfolio-card:hover h3 .project-primary-link { color: #2563eb; }
@media (hover: none) { .portfolio-card { cursor: auto; } }

/* Shared details pages. All panels are genuine CSS / content layouts, not screenshots. */
.case-section-heading { max-width: 52rem; }
.case-eyebrow { color: #2563eb; font: 800 0.7rem 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .08em; }
.case-highlight { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 1rem; padding: 1.4rem 1.6rem; }
.case-highlight-label { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; color: #1d4ed8; margin-bottom: .55rem; }
.case-highlight p { color: #1e3a8a; font-size: .9rem; line-height: 1.85; }
.case-feature-index { display: inline-flex; margin-bottom: 1rem; width: 2rem; height: 2rem; justify-content: center; align-items: center; border-radius: .6rem; color: #1d4ed8; background: #dbeafe; font: 800 .73rem 'JetBrains Mono', monospace; }
.feature-card { transition: border-color .2s ease, transform .2s ease; }
.feature-card:hover { border-color: #bfdbfe; transform: translateY(-2px); }
.case-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 1.25rem; padding: 2rem; }
.case-cta h2 { font-size: 1.5rem; }
.case-cta p:not(.case-eyebrow) { max-width: 30rem; }
.related-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.related-project { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.15rem; background: #fff; border: 1px solid #e2e8f0; border-radius: .85rem; color: #0f172a; transition: border-color .2s ease, background .2s ease; }
.related-project:hover { border-color: #93c5fd; background: #eff6ff; }
.related-project > span:first-child { display: flex; flex-direction: column; gap: .3rem; }
.related-project strong { font-size: .86rem; }
.related-project small { font-size: .7rem; color: #64748b; }
.related-project > span:last-child { color: #2563eb; font-weight: 800; }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } .case-cta { padding: 1.4rem; } }

/* Public portfolio overview of private content automation — conceptual only */
.workflow-overview-card {
  padding: 1.65rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.1rem;
  display: flex;
  flex-direction: column;
}
.workflow-overview-card .case-link { align-self: flex-start; }
.workflow-overview-steps {
  counter-reset: workflow;
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}
.workflow-overview-steps li {
  counter-increment: workflow;
  display: flex;
  gap: .85rem;
  align-items: center;
  padding: .7rem .85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: .65rem;
  color: #334155;
  font-size: .81rem;
  font-weight: 650;
}
.workflow-overview-steps li::before {
  content: counter(workflow, decimal-leading-zero);
  color: #2563eb;
  font: 750 .7rem 'JetBrains Mono', monospace;
}
.workflow-overview-steps li + li { position: relative; }
.overview-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .6rem;
}
.overview-step {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .85rem;
  padding: 1.15rem;
}
.overview-step-number {
  font: 800 .71rem 'JetBrains Mono', monospace;
  color: #2563eb;
}
.overview-step strong { font-size: .81rem; line-height: 1.4; color: #334155; }
@media (max-width: 800px) {
  .overview-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 450px) {
  .overview-flow { grid-template-columns: 1fr; }
}
