/* ============================================================================
   Portfolio project overview pages, shared light theme
   Visually consistent with the Sun & Rain Works homepage (app/globals.css).
   Each page sets its project accent via:  <body style="--accent:#2563eb">
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Geist:wght@400;500;600;700&display=swap');

:root {
  --background: #edf3f9;
  --foreground: #0f2337;
  --ink: #15273a;
  --surface: #ffffff;
  --surface-soft: #fff6ec;
  --surface-border: rgba(15, 35, 55, 0.12);
  --muted: #4b6075;
  --faint: #6b7c90;

  --sun-yellow: #ffd60a;
  --sun-yellow-deep: #e6bd00;
  --rain-blue: #0a5e86;
  --leaf-green: #1f8f6b;
  --emerald: #0f6b4f;
  --emerald-deep: #0a4d39;

  /* default accent; pages override on <body> */
  --accent: #0c7da0;

  --serif: "Fraunces", "Times New Roman", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Respect reduced-motion preference */
@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;
  }
}

body {
  margin: 0;
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1200px 600px at 8% 5%, #d2e9f4 0%, transparent 52%),
    radial-gradient(900px 480px at 100% 90%, #dbe7fa 0%, transparent 54%),
    var(--background);
  background-attachment: fixed;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; }
a { color: var(--rain-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; }

/* ---- top bar ------------------------------------------------------------- */
.dd-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, var(--sun-yellow) 0%, var(--sun-yellow-deep) 100%);
  border-bottom: 2px solid var(--sun-yellow-deep);
  box-shadow: 0 8px 26px rgba(230, 189, 0, 0.32);
}
.dd-top-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.7rem 0;
}
.dd-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-right: auto;
}
.dd-brand strong { font-family: var(--serif); font-size: 1.2rem; color: var(--rain-blue); }
.dd-brand span { font-family: var(--sans); font-size: 0.78rem; font-weight: 700; color: var(--leaf-green); }
.dd-nav { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; }
.dd-nav a {
  color: var(--rain-blue);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.dd-nav a:hover { background: var(--rain-blue); color: var(--sun-yellow); text-decoration: none; }

/* ---- hero ---------------------------------------------------------------- */
.dd-hero {
  position: relative;
  overflow: hidden;
  margin: 1.4rem auto 0;
  width: min(1080px, calc(100% - 2rem));
  border-radius: 32px;
  padding: clamp(2rem, 5vw, 3.6rem);
  color: #f4faff;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 70%, #0b2238) 0%, transparent 60%),
    linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #0b2238));
  box-shadow: 0 24px 70px rgba(15, 35, 55, 0.22);
}
.dd-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.85;
}
.dd-hero h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(2.6rem, 6.4vw, 4.4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.dd-hero .dd-tagline {
  margin: 0.8rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.28rem, 2.7vw, 1.85rem);
  line-height: 1.2;
  color: #fdf7ee;
  opacity: 0.97;
}
.dd-hero .dd-lead {
  margin: 1.15rem 0 0;
  max-width: 58ch;
  font-size: clamp(1.02rem, 2.1vw, 1.17rem);
  line-height: 1.62;
  color: rgba(244, 250, 255, 0.94);
}
.dd-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.dd-live {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border-radius: 999px; padding: 0.32rem 0.8rem;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
}
.dd-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5eff8f; box-shadow: 0 0 10px #5eff8f; }

/* hero action buttons */
.dd-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.3rem; }
.dd-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 0.6rem 1.1rem;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dd-btn:hover { transform: translateY(-1px); text-decoration: none; }
.dd-btn-primary { color: #08273d; background: #ffffff; box-shadow: 0 10px 24px rgba(6, 27, 44, 0.25); }
.dd-btn-ghost { color: #f4faff; background: rgba(244, 250, 255, 0.12); border: 1px solid rgba(244, 250, 255, 0.45); }

/* non-clickable label for projects whose source repo is private */
.dd-btn.dd-static { cursor: default; }
.dd-btn.dd-static:hover { transform: none; }
.dd-nav .dd-private {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 0.45rem 0.9rem;
  font-weight: 700; font-size: 0.92rem;
  color: var(--rain-blue); cursor: default;
}

/* tech pills */
.dd-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.2rem; }
.dd-pill {
  font-family: var(--mono); font-size: 0.74rem;
  padding: 0.28rem 0.7rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #f4faff;
}

/* ---- sections ------------------------------------------------------------ */
.dd-section { width: min(1080px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2.8rem, 5.5vw, 4.2rem) 0 0; }
.dd-section > .dd-kicker {
  display: inline-block; margin-bottom: 0.55rem;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); font-weight: 700;
}
.dd-section > h2 { margin: 0 0 0.4rem; font-size: clamp(1.95rem, 3.8vw, 2.7rem); font-weight: 600; }
.dd-section > .dd-sub { margin: 0.3rem 0 0; max-width: 62ch; color: var(--muted); font-size: 1.08rem; line-height: 1.6; }
.dd-section p { color: var(--ink); line-height: 1.7; }

/* card surfaces */
.dd-grid { display: grid; gap: 1rem; margin-top: 1.4rem; }
.dd-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.dd-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.dd-card {
  background:
    linear-gradient(158deg,
      color-mix(in srgb, var(--accent) 14%, #ffffff) 0%,
      color-mix(in srgb, var(--accent) 5%, #ffffff) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, #ffffff);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 16%, transparent);
}
.dd-card h3 { margin: 0 0 0.5rem; font-size: 1.34rem; font-weight: 600; color: var(--foreground); }
.dd-card p { margin: 0.3rem 0 0; color: var(--ink); font-size: 0.97rem; line-height: 1.6; }
.dd-card .dd-tag {
  display: inline-block; font-family: var(--mono); font-size: 0.7rem;
  color: var(--accent); letter-spacing: 0.05em; margin-bottom: 0.35rem;
}

/* stat tiles */
.dd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.9rem; margin-top: 1.4rem; }
.dd-stat {
  background:
    linear-gradient(158deg,
      color-mix(in srgb, var(--accent) 13%, #ffffff) 0%,
      color-mix(in srgb, var(--accent) 5%, #ffffff) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, #ffffff);
  border-radius: 16px; padding: 1rem 1.1rem;
}
.dd-stat .n { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: var(--accent); line-height: 1; }
.dd-stat .l { font-family: var(--mono); font-size: 0.74rem; color: var(--faint); margin-top: 0.35rem; }

/* callout */
.dd-callout {
  margin-top: 1.4rem;
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, #ffffff);
  border-radius: 0 14px 14px 0;
  padding: 1rem 1.3rem;
}
.dd-callout p { margin: 0; color: var(--ink); }

/* agent roster cards (avatars) */
.dd-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 0.85rem; margin-top: 1.4rem; }
.dd-agent {
  display: flex; align-items: center; gap: 0.7rem;
  background:
    linear-gradient(158deg,
      color-mix(in srgb, var(--agent, var(--accent)) 16%, #ffffff) 0%,
      color-mix(in srgb, var(--agent, var(--accent)) 6%, #ffffff) 100%);
  border: 1px solid color-mix(in srgb, var(--agent, var(--accent)) 32%, #ffffff);
  border-left: 4px solid var(--agent, var(--accent));
  border-radius: 16px; padding: 0.7rem 0.85rem;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--agent, var(--accent)) 16%, transparent);
}
.dd-agent img {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--agent, var(--accent));
  background: #f3f6fb;
}
.dd-agent .nm { font-weight: 700; font-size: 0.98rem; color: var(--foreground); line-height: 1.1; }
.dd-agent .rl { font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }
.dd-agent.adversary { border-style: dashed; border-left-style: solid; }

/* feature list */
.dd-list { margin: 1.4rem 0 0; padding: 0; list-style: none; display: grid; gap: 1rem; max-width: 76ch; }
.dd-list li { position: relative; padding-left: 1.7rem; color: var(--ink); line-height: 1.62; }
.dd-list li::before {
  content: "→"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}
.dd-list li strong { color: var(--foreground); }

/* two-column prose */
.dd-prose { margin-top: 1.3rem; max-width: 64ch; }
.dd-prose p { margin: 0.85rem 0; line-height: 1.75; }
code, .dd-mono { font-family: var(--mono); font-size: 0.9em; background: rgba(15, 35, 55, 0.06); padding: 0.1em 0.4em; border-radius: 6px; }

/* ---- footer -------------------------------------------------------------- */
.dd-footer {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 6px solid #ffe93d;
  background: linear-gradient(180deg, #1bbd72 0%, #0f8a52 100%);
  box-shadow: 0 -10px 30px rgba(15, 138, 82, 0.4);
}
.dd-footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.7rem 1.5rem;
  width: min(1080px, calc(100% - 2rem)); margin: 0 auto; padding: 3.4rem 0;
}
.dd-footer a { color: #ffffff; font-weight: 700; }
.dd-footer p { margin: 0; color: #ffffff; font-size: 1.2rem; }
.dd-footer .dd-est { font-weight: 700; font-size: 1.45rem; color: #ffe93d; }

@media (max-width: 620px) {
  .dd-actions .dd-btn { flex: 1 1 auto; }
}
