/* =============================================================================
   jaquesbody design system — main.css
   Phase 0 — shared base for all projects
   Font: Inter (self-hosted, see /static/fonts/)
   Deviation from protocol.md Section 3.1 — justified: open-source (OFL),
   no external request, no privacy compromise, consistent geometric aesthetic
   ============================================================================= */


/* -----------------------------------------------------------------------------
   @font-face — Inter self-hosted
   Files expected at: static/fonts/
----------------------------------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* -----------------------------------------------------------------------------
   :root — light mode tokens (fallback)
   Dark mode is primary — these are the accessible alternative
----------------------------------------------------------------------------- */

:root {

  /* --- Colour: monochrome base (cool-biased) --- */
  --color-black:      #0d0d0f;   /* near-black, not pure — easier on eyes */
  --color-charcoal:   #1a1a1f;   /* primary dark surface */
  --color-mid:        #6b6b78;   /* secondary text, borders */
  --color-light:      #c2c2cc;   /* body text on dark, muted on light */
  --color-white:      #f0f0f5;   /* near-white — softer than #fff */
  
  /* --- Colour: semantic surface/text assignments (light mode) --- */
  --bg:               var(--color-white);
  --bg-surface:       #e2e2ea;   /* card / elevated surface */
  --text-primary:     var(--color-black);
  --text-secondary:   var(--color-mid);
  --border:           #c2c2cc;
  --color-white-pure: #ffffff;

  /* --- Accent --- */
  /* --accent is intentionally undefined here.                          */
  /* Each project sets --accent, --accent-hover, --accent-muted in its  */
  /* own <style> block or project css file before importing this system. */
  /* Example:                                                            */
  /*   --accent:       #0EDA29;                                          */
  /*   --accent-hover: #0bbf23;                                          */
  /*   --accent-muted: rgba(14, 218, 41, 0.12);                          */

  /* --- Typography: scale --- */
  --text-xs:   0.75rem;    /* 12px — labels, captions */
  --text-sm:   0.875rem;   /* 14px — secondary text, metadata */
  --text-base: 1rem;       /* 16px — body copy */
  --text-lg:   1.25rem;    /* 20px — lead text, card titles */
  --text-xl:   1.75rem;    /* 28px — section headings */
  --text-2xl:  2.75rem;    /* 44px — hero / page titles */

  /* --- Typography: weight --- */
  --weight-regular: 400;
  --weight-bold:    700;

  /* --- Typography: line-height --- */
  --leading-body:     1.6;   /* body copy — comfortable reading */
  --leading-heading:  1.15;  /* headings — tight, confident */

  /* --- Typography: font stack --- */
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Ubuntu, Cantarell, sans-serif;

  /* --- Spacing scale (8px base) --- */
  --space-1: 0.5rem;    /*  8px */
  --space-2: 1rem;      /* 16px */
  --space-3: 1.5rem;    /* 24px */
  --space-4: 2rem;      /* 32px */
  --space-6: 3rem;      /* 48px */
  --space-8: 4rem;      /* 64px */
  --space-12: 6rem;     /* 96px — large hero breathing room */

  /* --- Border radius --- */
  --radius-sm:   4px;    /* subtle — inputs, tags */
  --radius-md:   8px;    /* cards, modals */
  --radius-pill: 999px;  /* pill buttons only */

  /* --- Shadows --- */
  --shadow-none:     none;
  --shadow-subtle:   0 1px 3px rgba(0, 0, 0, 0.08),
                     0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-elevated: 0 4px 12px rgba(0, 0, 0, 0.12),
                     0 2px 4px  rgba(0, 0, 0, 0.08);
}


/* -----------------------------------------------------------------------------
   Dark mode — primary visual identity
   Token swap only — layout and spacing unchanged
----------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           var(--color-black);
    --bg-surface:   var(--color-charcoal);
    --text-primary: var(--color-white);
    --text-secondary: var(--color-mid);
    --border:       #2a2a32;

    --shadow-subtle:   0 1px 3px rgba(0, 0, 0, 0.4),
                       0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-elevated: 0 4px 12px rgba(0, 0, 0, 0.5),
                       0 2px 4px  rgba(0, 0, 0, 0.4);
  }
}


/* -----------------------------------------------------------------------------
   Reset — minimal, opinionated
----------------------------------------------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-padding-top: 5rem;
}

body {
  font-family:      var(--font-base);
  font-size:        var(--text-base);
  font-weight:      var(--weight-regular);
  line-height:      var(--leading-body);
  color:            var(--text-primary);
  background-color: var(--bg);
  min-height:       100vh;
  scrollbar-gutter: stable;
  scroll-padding-top: 5rem;
}

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

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
}


/* -----------------------------------------------------------------------------
   Typography — base element styles
----------------------------------------------------------------------------- */

h1 {
  font-size:   var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-heading);
}

h2 {
  font-size:   var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-heading);
}

h3 {
  font-size:   var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-heading);
}

h4, h5, h6 {
  font-size:   var(--text-base);
  font-weight: var(--weight-bold);
  line-height: var(--leading-heading);
}

p {
  font-size:   var(--text-base);
  line-height: var(--leading-body);
  color:       var(--text-primary);
}

small {
  font-size: var(--text-sm);
  color:     var(--text-secondary);
}


/* -----------------------------------------------------------------------------
   Utility classes — spacing, text, layout
   These are building blocks. Project templates use these directly.
----------------------------------------------------------------------------- */

/* Text sizes */
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }

/* Text colours */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-accent    { color: var(--accent); }

/* Font weight */
.font-regular { font-weight: var(--weight-regular); }
.font-bold    { font-weight: var(--weight-bold); }

/* Spacing — padding */
.p-1  { padding: var(--space-1); }
.p-2  { padding: var(--space-2); }
.p-3  { padding: var(--space-3); }
.p-4  { padding: var(--space-4); }

/* Spacing — margin bottom (vertical rhythm) */
.mb-1  { margin-bottom: var(--space-1); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-3  { margin-bottom: var(--space-3); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

/* Layout */
.container {
  width: 100%;
  max-width: 72rem;   /* 1152px — comfortable reading width */
  margin-inline: auto;
  padding-inline: var(--space-2);
}

.container--narrow {
  max-width: 48rem;   /* 768px — single column content */
}

/* Flex utilities */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }

/* Surface */
.surface {
  background-color: var(--bg-surface);
  border-radius:    var(--radius-md);
  border:           1px solid var(--border);
}

/* Shadows */
.shadow-subtle   { box-shadow: var(--shadow-subtle); }
.shadow-elevated { box-shadow: var(--shadow-elevated); }

/* Accent button — base pattern, colour set per project via --accent */
.btn-accent {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  gap:              var(--space-1);
  padding:          var(--space-1) var(--space-3);
  background-color: var(--accent);
  color:            var(--color-black);   /* dark text on accent — always */
  font-weight:      var(--weight-bold);
  font-size:        var(--text-sm);
  border:           none;
  border-radius:    var(--radius-sm);
  cursor:           pointer;
  transition:       background-color 150ms ease, opacity 150ms ease;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
}

.btn-accent:active {
  opacity: 0.85;
}

/* Ghost button — border only, accent colour */
.btn-ghost {
  display:          inline-flex;
  align-items:      center;
  justify-content:  center;
  gap:              var(--space-1);
  padding:          var(--space-1) var(--space-3);
  background-color: transparent;
  color:            var(--accent);
  font-weight:      var(--weight-bold);
  font-size:        var(--text-sm);
  border:           1px solid var(--accent);
  border-radius:    var(--radius-sm);
  cursor:           pointer;
  transition:       background-color 150ms ease, color 150ms ease;
}

.btn-ghost:hover {
  background-color: var(--accent-muted);
}

/* -----------------------------------------------------------------------------
   Under construction
----------------------------------------------------------------------------- */

.under-construction {
  padding-block: var(--space-12) var(--space-8);
}

.uc-headline {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-heading);
  margin-bottom: var(--space-3);
}

.uc-message {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

/* -----------------------------------------------------------------------------
   Portfolio homepage — jaquesbody.github.io
----------------------------------------------------------------------------- */

/* Header */
.site-header {
  padding-block: var(--space-3);
  position: sticky;
  top: 0;
  background-color: var(--bg);
  z-index: 10;
}

.site-logo {
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  color: var(--accent);
  letter-spacing: -0.01em;
}

.contact-link {
  color: var(--text-primary);
  font-weight: var(--weight-bold);
  transition: color 150ms ease;
}

.contact-link:hover {
  color: var(--accent);
}

/* Footer */
.site-footer {
  padding-block: var(--space-4);
  margin-top: var(--space-8);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.footer-copyright {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  text-align: center;
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color 150ms ease;
}

.footer-icons a:hover {
  color: var(--accent);
}

/* Wordmark / logomark sizing */
.logo-wordmark {
  height: 20px;
  width: auto;
  display: block;
}
