/* ============================================================
   ANDREW MORK PORTFOLIO — styles.css
   Covers: homepage, about, all case studies
   ============================================================ */

/* ------------------------------------------------------------
   CSS CUSTOM PROPERTIES
   ------------------------------------------------------------ */
:root {
  --bg: #f3f4f6;
  --bg-gradient: radial-gradient(circle at top left, #e5e7eb 0, #f9fafb 55%, #f3f4f6 100%);
  --fg: #0f172a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card: #ffffff;
  --radius: 18px;
  --max-width: 920px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.10);
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --accent-strong: #1d4ed8;
}

:root[data-theme="dark"] {
  --bg: #020617;
  --bg-gradient: radial-gradient(circle at top left, #020617 0, #020617 40%, #020617 100%);
  --fg: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --card: #0f172a;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.65);
  --accent: #60a5fa;
  --accent-soft: #1e3a8a;
  --accent-strong: #93c5fd;
}

/* ------------------------------------------------------------
   FONT STACKS
   ------------------------------------------------------------ */
:root {
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
}

/* ------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.10) 0, transparent 40%),
    var(--bg-gradient);
  color: var(--fg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ------------------------------------------------------------
   LAYOUT
   ------------------------------------------------------------ */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 72px;
}

section { margin-top: 64px; }
section.fade-in:first-child { margin-top: 24px; }

/* ------------------------------------------------------------
   HEADER & NAV
   ------------------------------------------------------------ */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 12px;
  z-index: 10;
  backdrop-filter: blur(16px);
}

:root[data-theme="dark"] header {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(31, 41, 55, 0.9);
}

.brand { font-size: 13px; text-decoration: none; }
.brand strong { display: block; font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.brand span { color: var(--muted); font-size: 11px; }

.nav-wrap {
  position: relative;
  overflow: hidden;
}

nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

nav a {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

nav a:hover {
  text-decoration: none;
  border-bottom-color: var(--accent);
}

nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.backlink {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.backlink:hover { color: var(--accent); text-decoration: none; }

/* ------------------------------------------------------------
   TYPOGRAPHY
   ------------------------------------------------------------ */
h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 8px;
}

h2 {
  font-family: var(--font-display);
  margin: 0 0 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
  color: var(--accent);
}

h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p { margin: 0 0 14px; font-size: 15px; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.meta-line {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 4px;
}

.muted { color: var(--muted); font-size: 15px; line-height: 1.7; }

.hero-text {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 12px 0;
  max-width: 72ch;
}

.cred-line {
  font-size: 15px;
  color: var(--muted);
  margin: 10px 0 0;
  max-width: 68ch;
}

.why-line {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin: 20px 0 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

.highlight {
  color: var(--accent);
}

/* ------------------------------------------------------------
   CARD
   ------------------------------------------------------------ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 26px 26px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.04);
}

.card h2 { margin-bottom: 14px; }
.card h3 { margin-bottom: 10px; }

.card ul {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

.card ul li + li { margin-top: 8px; }
.card ul strong { color: var(--fg); }

/* ------------------------------------------------------------
   EXEC METRICS
   ------------------------------------------------------------ */
.exec-metrics {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.metric {
  flex: 1;
  min-width: 130px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.metric-number {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ------------------------------------------------------------
   BUTTON
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s ease;
}
.btn:hover {
  background: var(--accent-strong);
  text-decoration: none;
  color: #fff;
}

/* ------------------------------------------------------------
   ROLE CARD (case studies)
   ------------------------------------------------------------ */
.role-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 26px 26px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.04);
}

.role-card h2 { margin-bottom: 14px; }

/* ------------------------------------------------------------
   BULLETS
   ------------------------------------------------------------ */
ul.bullets {
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}
ul.bullets li + li { margin-top: 10px; }
ul.bullets strong { color: var(--fg); }
.signal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.chip {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 500;
  border: 1px solid var(--accent-soft);
}

:root[data-theme="dark"] .chip {
  background: rgba(96, 165, 250, 0.12);
  color: var(--accent);
  border-color: rgba(96, 165, 250, 0.2);
}

/* ------------------------------------------------------------
   HOMEPAGE — HERO GRID
   ------------------------------------------------------------ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 680px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   HOMEPAGE — WORK SECTION
   ------------------------------------------------------------ */
.work-featured {
  margin-bottom: 16px;
}

.work-supporting {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.span-full {
  grid-column: 1 / -1;
}

@media (max-width: 680px) {
  .work-supporting { grid-template-columns: 1fr; }
}

.work-linkcard {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.work-linkcard:hover {
  text-decoration: none;
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.12);
}

.work-content { flex: 1; }

.work-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 14px;
  line-height: 1.55;
}

.work-proof {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.work-proof span {
  font-size: 12px;
  color: var(--muted);
}

.work-proof strong {
  color: var(--fg);
}

.work-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.work-logo {
  flex-shrink: 0;
  width: 48px;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.work-logo img {
  width: 100%;
  height: auto;
  opacity: 0.85;
}

.work-logo img.rr {
  border-radius: 8px;
}

.featured-logo {
  width: 56px;
}

/* Ecosystem card — full bleed breakout */
.ecosystem-card {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: 1px solid rgba(96, 165, 250, 0.2);
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
  background: rgba(96, 165, 250, 0.07);
  padding: 40px max(20px, calc((100vw - 920px) / 2 + 20px));
  margin-top: 16px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

/* Re-constrain inner content */
.ecosystem-card > * {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.ecosystem-card .ecosystem-grid {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.ecosystem-card h2 {
  margin-bottom: 6px;
}

.ecosystem-intro {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 800px) {
  .ecosystem-card {
    width: 100%;
    left: 0;
    margin-left: 0;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.2);
    padding: 24px 20px;
  }
  .ecosystem-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .ecosystem-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   HOMEPAGE — SYSTEMS GRID
   ------------------------------------------------------------ */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.sys {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
}

.sys-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 400;
  font-style: italic;
}

/* ------------------------------------------------------------
   HOMEPAGE — PHILOSOPHY
   ------------------------------------------------------------ */
.philosophy ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.philosophy ul li {
  font-size: 15px;
  padding-left: 20px;
  position: relative;
  color: var(--fg);
}

.philosophy ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.signature {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 8px;
}

/* ------------------------------------------------------------
   HOMEPAGE — TESTIMONIALS
   ------------------------------------------------------------ */
.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 600px) {
  .quote-grid { grid-template-columns: 1fr; }
}

.quote-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0;
}

.quote-card blockquote {
  font-size: 14px;
  font-style: italic;
  color: var(--fg);
  margin: 0 0 10px;
  line-height: 1.6;
}

.quote-card figcaption {
  font-size: 12px;
  color: var(--muted);
}

/* ------------------------------------------------------------
   HOMEPAGE — CTA FINAL
   ------------------------------------------------------------ */
.cta-final {
  text-align: center;
  padding: 48px 24px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cta-final h2 {
  font-size: clamp(18px, 2.5vw, 24px);
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 10px;
}

.cta-final p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ------------------------------------------------------------
   CASE STUDY — MEDIA
   ------------------------------------------------------------ */
.work-media {
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.03);
  border: 1px solid var(--border);
  padding: 10px;
  overflow: visible;
  margin-bottom: 8px;
}

:root[data-theme="dark"] .work-media {
  background: rgba(96, 165, 250, 0.06);
}

.work-media-inner {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: #f8fafc;
  overflow: visible;
}

:root[data-theme="dark"] .work-media-inner {
  border-color: rgba(71, 85, 105, 0.8);
  background: #0f172a;
}

.work-media-inner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 11px;
  image-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

.screen-caption {
  margin-top: 12px;
  padding: 0 4px;
}

.screen-caption-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.screen-caption p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.screen-block {
  margin-bottom: 40px;
}

/* ------------------------------------------------------------
   CASE STUDY — ABOUT SUB-PLATFORMS
   ------------------------------------------------------------ */
.sub-platforms {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.sub-btn {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--card);
  text-decoration: none;
  transition: all 0.15s;
}

.sub-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.sub-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ------------------------------------------------------------
   ABOUT PAGE — SPECIFIC
   ------------------------------------------------------------ */
.two-modes {
  font-size: 14px;
  color: var(--muted);
}

/* ------------------------------------------------------------
   REVEAL ANIMATION (homepage scroll)
   ------------------------------------------------------------ */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------
   FADE-IN ANIMATION (case studies)
   ------------------------------------------------------------ */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, .fade-in, .reveal {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
footer {
  margin-top: 72px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 680px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    border-radius: 16px;
    position: relative;
    top: 0;
  }

  .work-supporting {
    grid-template-columns: 1fr;
  }

  .exec-metrics {
    gap: 10px;
  }

  .metric {
    min-width: 100px;
  }
}
