/* --- Self-hostade typsnitt (variabla woff2, latin, OFL) ------------------- */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/fraunces-latin-var.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/fraunces-italic-latin-var.woff2') format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/schibsted-grotesk-latin-var.woff2') format('woff2'); }
@font-face { font-family: 'Spline Sans Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('/assets/fonts/spline-sans-mono-latin-var.woff2') format('woff2'); }

/* =========================================================================
   Sebastian Liljegren – Personlig auktoritetshub
   Shared base + component styles
   Palette: cream #EEE5D0 · ink #2D2B23 · brown #6E5F3E · gold #BDA77E
   Type: Fraunces (headings) · Schibsted Grotesk (body) · Spline Sans Mono (meta)
   ========================================================================= */

:root {
  --cream:      #EEE5D0;
  --ink:        #2D2B23;
  --ink-soft:   #403B2E;
  --brown:      #6E5F3E;
  --gold:       #BDA77E;
  --cream-dim:  #EAE1CB;
  --cream-dim2: #DBD2BB;
  --card:       #F1E8D0;
  --card-hover: #F7F0DD;
  --card-dark:  #35322A;
  --muted:      #55503F;
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;
  --serif:'Fraunces', Georgia, serif;
  --mono: 'Spline Sans Mono', monospace;
  --wrap: 1120px;
}

/* --- Reset / base (from the design's shared helmet block) ---------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #EEE5D0;
  color: #2D2B23;
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 600;
  margin: 0;
}
p { margin: 0; }
a { color: #2D2B23; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #6E5F3E; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 1px; }

@keyframes slReveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* The full-height page shell */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #EEE5D0;
  overflow-x: hidden;
}
.page > main { flex: 1 0 auto; }

/* =========================================================================
   Site header
   ========================================================================= */
.site-header {
  width: 100%;
  background: #EEE5D0;
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
}
.site-header__bar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header__logo {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 23px;
  letter-spacing: .005em;
  color: #2D2B23;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 34px);
}
.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  color: #2D2B23;
  text-decoration: none;
  padding: 6px 1px;
  white-space: nowrap;
}
.nav-link:hover { color: #6E5F3E; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: #BDA77E;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(45,43,35,.35);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: #2D2B23;
}
.site-drawer { display: none; padding: 2px clamp(20px, 5vw, 64px) 16px; }
.site-drawer.is-open { display: block; }
.drawer-link {
  display: block;
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: #2D2B23;
  text-decoration: none;
  padding: 14px 2px;
  border-bottom: 1px solid rgba(45,43,35,.12);
}
.site-header__rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(189,167,126,.9), transparent);
}

@media (max-width: 800px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (min-width: 801px) {
  .site-drawer { display: none !important; }
}

/* =========================================================================
   Site footer
   ========================================================================= */
.site-footer {
  width: 100%;
  background: #2D2B23;
  color: #EAE1CB;
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
}
.site-footer__rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(189,167,126,.9), transparent);
}
.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(46px,7vw,76px) clamp(20px,5vw,64px) clamp(30px,4vw,44px);
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 56px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer__brand {
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.site-footer__name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 27px;
  line-height: 1.1;
  color: #EEE5D0;
}
.site-footer__email { font-size: 16px; color: #BDA77E; text-decoration: none; }
.site-footer__email:hover { text-decoration: underline; color: #BDA77E; }
.site-footer__label {
  font-family: 'Spline Sans Mono', monospace;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #BDA77E;
  margin-bottom: 16px;
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 20px;
  max-width: 380px;
}
.social-links a { font-size: 15px; color: #EAE1CB; text-decoration: none; }
.social-links a:hover { color: #BDA77E; }
.site-footer__bottom {
  margin-top: clamp(34px,5vw,52px);
  padding-top: 22px;
  border-top: 1px solid rgba(189,167,126,.3);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
}
.site-footer__org {
  font-family: 'Spline Sans Mono', monospace;
  font-size: 12px;
  letter-spacing: .05em;
  color: #C9BFA6;
}
.site-footer__policy { font-size: 14px; color: #C9BFA6; text-decoration: none; }
.site-footer__policy:hover { color: #EEE5D0; }

/* =========================================================================
   Hover utilities — replace the design's `style-hover` attribute.
   `!important` lets them win over the elements' inline base styles.
   ========================================================================= */
.h-dark:hover      { background: #403B2E !important; color: #EEE5D0 !important; }   /* dark button */
.h-outline:hover   { background: rgba(45,43,35,.06) !important; }                    /* ghost button on cream */
.h-light:hover     { background: #fff !important; color: #2D2B23 !important; }       /* cream button on dark */
.h-ghostdark:hover { background: rgba(238,229,208,.1) !important; }                  /* ghost button on dark */
.h-accent:hover    { color: #6E5F3E !important; }                                    /* mono arrow links */
.h-download:hover  { border-color: #2D2B23 !important; color: #2D2B23 !important; }  /* download chip */

.project-card { transition: background .28s ease, transform .28s ease; }
.project-card:hover { background: #F7F0DD !important; transform: translateY(-4px); }


/* =========================================================================
   Hoppa till innehållet (tillgänglighet)
   ========================================================================= */
.skip-link {
  position: absolute;
  left: -9999px;
  background: #2D2B23;
  color: #EEE5D0;
  border-radius: 8px;
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 20px;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  outline: 2px solid #BDA77E;
  outline-offset: 2px;
}
