/*
  jeffguebert.com — stylesheet
  ─────────────────────────────────────────────────────────────────────
  Font: Plus Jakarta Sans
  Chosen over Geist (too developer-utilitarian) and Space Grotesk
  (too quirky/editorial) for its clean geometric proportions and
  just enough warmth to match the "conversational and confident"
  tone of a PM in gaming/tech. Works at all sizes and weights used.
  ─────────────────────────────────────────────────────────────────────
*/

/* ── Fonts ─────────────────────────────────────────────────────────── */
/*
  Plus Jakarta Sans is distributed as a variable font; one file covers
  the full weight axis (200–800). We self-host two subset files:
  latin-ext first (fallback), then latin (primary).
*/

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/PlusJakartaSans-latin-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/PlusJakartaSans-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* ── Color tokens: dark mode (default) ─────────────────────────────── */

:root {
  --bg:              #0f1117;
  --bg-card:         #161b27;
  --bg-card-hover:   #1c2236;
  --text:            #e0e0e6;
  --text-heading:    #f0f0f6;
  --text-muted:      #888898;
  --accent-blue:     #4a90d9;
  --accent-orange:   #d4843e;
  --border:          rgba(255, 255, 255, 0.07);
  --border-hover:    rgba(74, 144, 217, 0.42);
  --shadow:          0 2px 14px rgba(0, 0, 0, 0.38);
  --shadow-hover:    0 6px 28px rgba(74, 144, 217, 0.14);
  --toggle-bg:       #1c2236;
}

/* Light mode via media query (no manual override in effect) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:              #f5f5f7;
    --bg-card:         #ffffff;
    --bg-card-hover:   #ebebf2;
    --text:            #2a2a3e;
    --text-heading:    #0f0f20;
    --text-muted:      #5a5a78;
    --border:          rgba(0, 0, 0, 0.08);
    --border-hover:    rgba(74, 144, 217, 0.5);
    --shadow:          0 2px 14px rgba(0, 0, 0, 0.07);
    --shadow-hover:    0 6px 28px rgba(74, 144, 217, 0.16);
    --toggle-bg:       #ffffff;
  }
}

/* Manual light override */
[data-theme="light"] {
  --bg:              #f5f5f7;
  --bg-card:         #ffffff;
  --bg-card-hover:   #ebebf2;
  --text:            #2a2a3e;
  --text-heading:    #0f0f20;
  --text-muted:      #5a5a78;
  --border:          rgba(0, 0, 0, 0.08);
  --border-hover:    rgba(74, 144, 217, 0.5);
  --shadow:          0 2px 14px rgba(0, 0, 0, 0.07);
  --shadow-hover:    0 6px 28px rgba(74, 144, 217, 0.16);
  --toggle-bg:       #ffffff;
}

/* Manual dark override */
[data-theme="dark"] {
  --bg:              #0f1117;
  --bg-card:         #161b27;
  --bg-card-hover:   #1c2236;
  --text:            #e0e0e6;
  --text-heading:    #f0f0f6;
  --text-muted:      #888898;
  --accent-blue:     #4a90d9;
  --accent-orange:   #d4843e;
  --border:          rgba(255, 255, 255, 0.07);
  --border-hover:    rgba(74, 144, 217, 0.42);
  --shadow:          0 2px 14px rgba(0, 0, 0, 0.38);
  --shadow-hover:    0 6px 28px rgba(74, 144, 217, 0.14);
  --toggle-bg:       #1c2236;
}

/* ── Reset & base ───────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.25rem 1.5rem;
  transition: background-color 200ms ease, color 200ms ease;
}

/* ── Theme toggle ───────────────────────────────────────────────────── */

#theme-toggle {
  position: fixed;
  top: 1.125rem;
  right: 1.125rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--toggle-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
  z-index: 100;
}

#theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--accent-blue);
}

#theme-toggle:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

/* Icon visibility: show moon in dark mode, sun in light mode */
.icon-moon { display: block; }
.icon-sun  { display: none; }

[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-moon { display: none; }
  :root:not([data-theme="dark"]) .icon-sun  { display: block; }
}

/* ── Layout ─────────────────────────────────────────────────────────── */

main {
  width: 100%;
  max-width: 620px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4.5rem;
  gap: 3rem;
}

/* ── Header ─────────────────────────────────────────────────────────── */

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

/* ── JG Monogram ────────────────────────────────────────────────────── */

.monogram {
  width: 112px;
  height: auto;
  margin-bottom: 0.375rem;
}

.monogram svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* ── Name & Tagline ─────────────────────────────────────────────────── */

h1 {
  font-size: clamp(2rem, 5.5vw, 2.75rem);
  font-weight: 700;
  font-variant-caps: small-caps;
  color: var(--text-heading);
  letter-spacing: 0.025em;
  line-height: 1.1;
}

.tagline {
  font-size: clamp(0.975rem, 2.5vw, 1.075rem);
  font-weight: 400;
  color: var(--text-muted);
  max-width: 550px;
  line-height: 1.55;
}

/* ── Link cards (playing card layout) ──────────────────────────────── */

.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.links-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.links-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  width: 145px;
  aspect-ratio: 5 / 7;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    background-color 200ms ease,
    border-color     200ms ease,
    box-shadow       200ms ease,
    transform        150ms ease;
}

.link-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.link-card:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

.link-card:active {
  transform: translateY(-2px);
}

/* Icon area — top portion of the card */
.card-icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  border-bottom: 1px solid var(--border);
  transition: color 200ms ease, border-color 200ms ease;
}

/* Label area — bottom strip */
.card-foot {
  position: relative;
  height: 3.25rem;
  flex-shrink: 0;
}

/* Name and description share the same space; one is visible at a time */
.card-name,
.card-desc {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.625rem;
  text-align: center;
  line-height: 1.3;
  transition: opacity 200ms ease;
}

.card-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-heading);
  opacity: 1;
}

.card-desc {
  font-size: 0.725rem;
  color: var(--text-muted);
  opacity: 0;
}

.link-card:hover .card-name { opacity: 0; }
.link-card:hover .card-desc { opacity: 1; }
.link-card:hover .card-icon { color: var(--accent-orange); }

/* ── Links section headings ─────────────────────────────────────────── */

.links-heading {
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--border);
}

/* ── Footer ─────────────────────────────────────────────────────────── */

footer {
  width: 100%;
  max-width: 620px;
  padding: 2.5rem 0 0.5rem;
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ── Responsive: narrow screens ─────────────────────────────────────── */

@media (max-width: 480px) {
  body {
    padding-top: 2rem;
  }

  main {
    padding-top: 3.5rem;
    gap: 2.25rem;
  }

  .monogram {
    width: 88px;
  }

}
