/* ============================================================
   THE DUCKWERKS — style.css
   Aesthetic: Industrial Dark — clean, high-contrast, craft-forward
   Fonts: Bebas Neue (display) + DM Sans (body) + DM Mono (labels/meta)
   Colors: Deep black ground, warm white text, cyan + amber accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=DM+Mono:wght@300;400;500&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-base:        #080808;
  --bg-surface:     #0f0f0f;
  --bg-raised:      #161616;
  --bg-overlay:     #1e1e1e;

  /* Borders */
  --border-subtle:  #1f1f1f;
  --border-default: #2a2a2a;
  --border-strong:  #3a3a3a;

  /* Text */
  --text-primary:   #ede8e0;   /* warm white — aged paper */
  --text-secondary: #b8b3ac;   /* lifted for legibility */
  --text-muted:     #6a6560;
  --text-inverse:   #080808;

  /* Accent — Cyan (from dashboard) */
  --cyan:           #00c8d4;
  --cyan-dim:       #00c8d41a;
  --cyan-mid:       #00c8d440;

  /* Accent — Amber (rubber duck / warm industrial) */
  --amber:          #f5a623;
  --amber-dim:      #f5a6231a;

  /* Accent — Green (data/status) */
  --green:          #4ade80;
  --green-dim:      #4ade801a;

  /* Accent — Red (error/warning) */
  --red:            #f87171;
  --red-dim:        #f871711a;

  /* Typography */
  --font-display:   'Bebas Neue', 'Impact', sans-serif;
  --font-body:      'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono:      'DM Mono', 'Courier New', monospace;

  /* Spacing scale */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;

  /* Layout */
  --max-width: 1080px;
  --nav-height: 56px;

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 220ms ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.0625rem;  /* 17px — just a nudge up from 16 */
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: var(--text-primary);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p {
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 60ch;
}

/* Label / overline style — mimics dashboard uppercase labels */
.label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   LAYOUT CONTAINERS
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

main {
  flex: 1;
  padding-top: var(--nav-height);
}

/* ============================================================
   NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  color: tan;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-title:hover {
  color: var(--amber);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text-primary);
  border-bottom-color: var(--cyan);
}

/* ============================================================
   HERO / PAGE HEADER
   ============================================================ */
.hero {
  padding: var(--space-6) 0 var(--space-1);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-image-wrap {
  width: 100%;
  max-height: 320px;
  overflow: hidden;
  margin-bottom: var(--space-7);
  position: relative;
}

.hero-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to bottom, var(--bg-base) 0%, transparent 20%, transparent 60%, var(--bg-base) 100%),
    linear-gradient(to right, var(--bg-base) 0%, transparent 8%, transparent 92%, var(--bg-base) 100%);
}

.hero-image-wrap img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center 60%;
  filter: grayscale(20%) contrast(1.05);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: tan;
  margin-bottom: var(--space-1);
  display: block;
}

.hero h1 {
  margin-bottom: var(--space-4);
  color: tan;
}

.hero p {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-secondary);
}

/* ============================================================
   PAGE SECTION
   ============================================================ */
.page-section {
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.page-section:last-child {
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.section-header .label {
  color: var(--text-muted);
}

/* ============================================================
   HOME PAGE — CARD GRID
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  margin-top: var(--space-7);
}

.card {
  background: var(--bg-surface);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: background var(--transition-base);
  text-decoration: none;
  color: inherit;
}

.card:hover {
  background: var(--bg-raised);
}

.card-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.card h3 {
  font-size: 1.4rem;
  letter-spacing: 0.06em;
}

.card p {
  font-size: 0.975rem;
  color: var(--text-secondary);
  flex: 1;
  max-width: none;
}

.card-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: tan;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  transition: gap var(--transition-fast);
}

.card:hover .card-link {
  gap: var(--space-3);
  color: var(--amber);
}

/* Accent bar on card top — each card gets a different color */
.card:nth-child(1) { border-top: 2px solid var(--cyan); }
.card:nth-child(2) { border-top: 2px solid var(--amber); }
.card:nth-child(3) { border-top: 2px solid var(--red); }

/* ============================================================
   PROJECT CARDS (Professional / Music pages)
   ============================================================ */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}

.project-card {
  background: var(--bg-surface);
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: var(--space-6);
  align-items: center;
  transition: background var(--transition-base);
}

.project-card:hover {
  background: var(--bg-raised);
}

.project-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.project-card h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

.project-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.project-card p {
  font-size: 0.975rem;
  color: var(--text-secondary);
  max-width: 65ch;
}

.project-link {
  flex-shrink: 0;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  white-space: nowrap;
  border: 1px solid var(--border-default);
  padding: var(--space-2) var(--space-4);
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.project-link:hover {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  color: var(--cyan);
}

.project-toggle {
  background: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  align-self: center;
}
.project-expand {
  grid-column: 1 / -1;
  grid-row: 2;
  padding-top: var(--space-4);
}
.project-expand ul {
  margin: 0;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.project-expand li {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ============================================================
   BLOG LIST
   ============================================================ */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}

.post-item {
  background: var(--bg-surface);
  padding: var(--space-5) var(--space-6);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-5);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-base);
}

.post-item:hover {
  background: var(--bg-raised);
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  white-space: nowrap;
}

.post-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
}

.post-item:hover .post-title {
  color: var(--cyan);
}

.post-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.post-item:hover .post-arrow {
  color: var(--cyan);
  transform: translateX(4px);
}

/* ============================================================
   BLOG POST (single)
   ============================================================ */
.post-header {
  padding: var(--space-9) 0 var(--space-7);
  border-bottom: 1px solid var(--border-subtle);
  max-width: 720px;
}

.post-header h1 {
  margin-bottom: var(--space-4);
}

.post-header-meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.post-header-meta time,
.post-header-meta .author {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.post-header-meta .sep {
  width: 1px;
  height: 10px;
  background: var(--border-strong);
  display: inline-block;
}

.post-content {
  padding: var(--space-7) 0 var(--space-9);
  max-width: 700px;
}

.post-content p,
.post-content li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 65ch;
  margin-bottom: var(--space-4);
}

.post-content h2,
.post-content h3 {
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
}

.post-content a {
  color: var(--cyan);
  border-bottom: 1px solid var(--cyan-mid);
}

.post-content a:hover {
  border-bottom-color: var(--cyan);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-raised);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--amber);
}

.post-content pre {
  background: var(--bg-raised);
  border: 1px solid var(--border-default);
  padding: var(--space-5);
  overflow-x: auto;
  margin: var(--space-5) 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
}

.post-content blockquote {
  border-left: 2px solid var(--cyan);
  padding-left: var(--space-5);
  margin: var(--space-5) 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-7) 0;
}

.post-content ul,
.post-content ol {
  padding-left: var(--space-5);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: auto;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border-subtle);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.footer-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.footer-email {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-email:hover {
  color: var(--cyan);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
}

.footer-copy,
.footer-credit {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.footer-credit a {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.footer-credit a:hover {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

/* ============================================================
   UTILITY / MISC
   ============================================================ */

/* Divider line — thin, subtle */
.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-7) 0;
}

/* Status dot — like the pipeline indicators in the dashboard */
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  margin-right: var(--space-2);
}

.dot--amber { background: var(--amber); }
.dot--green { background: var(--green); }
.dot--muted { background: var(--text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-5);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .project-card h2 { grid-column: 1; grid-row: 1; }
  .project-meta    { grid-column: 1; grid-row: 2; }
  .project-card p  { grid-column: 1; grid-row: 3; }
  .project-link    { grid-column: 1; grid-row: 4; align-self: start; width: fit-content; }
  .project-toggle  { grid-column: 1; grid-row: 4; align-self: start; }

  .post-item {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: var(--space-1) var(--space-4);
  }

  .post-date { grid-column: 1; grid-row: 1; }
  .post-title { grid-column: 1 / 3; grid-row: 2; }
  .post-arrow { grid-column: 2; grid-row: 1; }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    align-items: flex-start;
  }

  .section-header {
    flex-direction: column;
    gap: var(--space-2);
  }
}

/* ============================================================
   PAGE THEMES — per-section accent colors
   Professional → cyan  |  Music → amber  |  Blog → red
   ============================================================ */

/* Professional — cyan */
.page--professional .project-list {
  border-top: 2px solid var(--cyan);
}
.page--professional .project-meta {
  color: var(--cyan);
}
.page--professional .project-link {
  color: var(--cyan);
}
.page--professional .project-link:hover {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  color: var(--cyan);
}

/* Music — amber */
.page--music .project-list {
  border-top: 2px solid var(--amber);
}
.page--music .project-meta {
  color: var(--amber);
}
.page--music .project-link {
  color: var(--amber);
}
.page--music .project-link:hover {
  border-color: var(--amber);
  background: var(--amber-dim);
  color: var(--amber);
}

/* Blog — red */
.page--blog .project-list {
  border-top: 2px solid var(--red);
}
.page--blog .project-meta {
  color: var(--red);
}
.page--blog .project-link {
  color: var(--red);
}
.page--blog .project-link:hover {
  border-color: var(--red);
  background: var(--red-dim);
  color: var(--red);
}

/* ============================================================ */

@media (max-width: 480px) {
  :root {
    --nav-height: 48px;
  }

  .site-nav {
    gap: var(--space-4);
  }

  .hero {
    padding: var(--space-7) 0 var(--space-6);
  }
}
