/* ============================================
   Darren Hill - Portfolio Design System
   ============================================ */

:root {
  /* Color */
  --bg: #0b0c0e;
  --bg-raised: #141618;
  --bg-card: #17191c;
  --border: #26292e;
  --text: #f2f1ec;
  --text-muted: #a3a7ad;
  --text-faint: #6b6f75;
  --accent: #ff7a33;
  --accent-hover: #ff9257;
  --accent-muted: #ff7a3320;
  --tag-ai: #4fd1c5;
  --tag-growth: #ff7a33;
  --tag-brand: #c9a3ff;

  /* Type */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --font-display: "Helvetica Neue", var(--font-body);

  /* Layout */
  --max-width: 1120px;
  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 16px; color: var(--text-muted); }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 14, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-cta {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text) !important;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 16px 24px; }
  .nav-cta { margin: 16px 24px; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #0b0c0e;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section.tight { padding: 56px 0; }

.section-head {
  max-width: 620px;
  margin-bottom: 48px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 70px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 48px;
  align-items: center;
}

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

.hero-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card-media {
  aspect-ratio: 16 / 10;
  background: var(--bg-raised);
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }

.card-body h3 { margin-bottom: 8px; }
.card-body p { font-size: 0.94rem; margin-bottom: 14px; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag.growth { color: var(--tag-growth); border-color: var(--tag-growth); }
.tag.ai { color: var(--tag-ai); border-color: var(--tag-ai); }
.tag.brand { color: var(--tag-brand); border-color: var(--tag-brand); }

.card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

/* ---------- Stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  margin: 36px 0;
}

.stat {
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.stat .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-display);
}

.stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Photo grid (About) ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 720px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

.photo-grid figure {
  margin: 0;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
}

.photo-grid img { width: 100%; height: 100%; object-fit: cover; }

.photo-grid figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
}

/* ---------- Video embed ---------- */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.video-embed iframe { width: 100%; height: 100%; border: 0; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.video-grid figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 600;
}

/* ---------- Detail page (project / ai) ---------- */
.detail-hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-faint); }
.breadcrumb a:hover { color: var(--accent); }

.detail-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  aspect-ratio: 21 / 9;
  margin: 32px 0;
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; }

.prose h3 { margin-top: 36px; }
.prose ul { color: var(--text-muted); padding-left: 20px; }
.prose li { margin-bottom: 8px; }

.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

.side-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  height: fit-content;
}
.side-card h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 14px; }
.side-card dl { margin: 0; }
.side-card dt { font-size: 0.78rem; color: var(--text-faint); margin-top: 14px; }
.side-card dt:first-child { margin-top: 0; }
.side-card dd { margin: 4px 0 0; font-size: 0.92rem; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 60px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }

.footer-copy { font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 48px 0; }

/* Missing-image fallback - branded placeholder; auto-heals when the real file is dropped in */
.media-ph{background:linear-gradient(135deg,#1f1f1f 0%,#242424 55%,rgba(254,81,2,.16) 100%)!important;position:relative}
.media-ph::after{content:"\25C6";position:absolute;inset:0;display:grid;place-items:center;color:rgba(254,81,2,.38);font-size:1.75rem}
