:root {
  --bg: #020817;
  --surface: #030b1a;
  --text: #f8fafc;
  --muted: #c3ccd8;
  --line: rgba(255,255,255,.13);
  --accent: #4f8cff;
  --accent2: #ff8b98;
  --red: #c7243c;
  --yrkon: #ffcc33;
  --ph: rgba(255,255,255,.06);
  --ph-line: rgba(255,255,255,.16);
}
html[data-theme="light"] {
  --bg: #eef2f7;
  --surface: #fff;
  --text: #101827;
  --muted: #475569;
  --line: rgba(16,24,39,.14);
  --yrkon: #b8860b;
  --ph: rgba(16,24,39,.05);
  --ph-line: rgba(16,24,39,.16);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  transition: background-color .35s ease, color .35s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: #fff;
  color: #0b121c;
  padding: .6rem 1.1rem;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 600;
  transition: top 150ms ease;
}
.skip-link:focus { top: 1rem; }

/* ── header (identical to the rest of the site: fixed, blurs on scroll) ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background-color .3s ease;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: .75rem; }
.brand img { display: block; width: 150px; height: 52px; object-fit: contain; object-position: center; }
@media (max-width: 767px) {
  .brand img { width: 124px; height: 48px; }
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-links a { position: relative; color: #d1d5db; transition: color .15s ease; }
html[data-theme="light"] .nav-links a { color: #475569; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a[aria-current="page"] { color: #102033; }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
}
.theme-toggle {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.theme-toggle:hover { transform: rotate(12deg) scale(1.05); background: rgb(255 255 255 / 0.1); }
html[data-theme="light"] .theme-toggle { border-color: rgb(16 32 51 / 0.2); }
/* the toggle draws its own sun / moon (stroke: currentColor) instead of the
   Unicode dingbats ☼ / ☾: some platforms render those through the
   colour-emoji font, which ignores text colour and painted a solid white disc
   on dark backgrounds regardless of theme */
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

main { max-width: 80rem; margin: 0 auto; padding: 9.5rem 1.5rem 11rem; }

/* ── reveal-on-scroll ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.23,1,.32,1), transform .7s cubic-bezier(.23,1,.32,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal.delay { transition-delay: 140ms; }
.reveal.delay2 { transition-delay: 260ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * , *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ── hero ── */
.yrkon-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  padding-left: clamp(1rem, 5vw, 3.5rem);
}
.yrkon-hero::before {
  content: "";
  position: absolute;
  top: -5rem;
  left: -6rem;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--yrkon) 55%, transparent) 0%, transparent 70%);
  filter: blur(70px);
  opacity: .5;
  z-index: -1;
  pointer-events: none;
  animation: yrkon-glow 7s ease-in-out infinite;
}
@keyframes yrkon-glow {
  0%, 100% { opacity: .38; transform: scale(1); }
  50% { opacity: .58; transform: scale(1.1); }
}
.yrkon-hero h1 {
  position: relative;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: .95;
  color: var(--yrkon);
  letter-spacing: -.02em;
}
.yrkon-hero-copy { max-width: 34rem; }
.yrkon-lede {
  margin: 0 0 .9rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.5;
  color: var(--text);
}
.yrkon-sub {
  margin: 0;
  font-size: .9rem;
  line-height: 1.65;
  color: var(--muted);
}

.yrkon-tags {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.yrkon-tags span {
  padding: .45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: .78rem;
  color: var(--muted);
  transition: border-color .2s ease, color .2s ease;
}
.yrkon-tags span:hover {
  border-color: var(--yrkon);
  color: var(--text);
}

.scroll-cue {
  margin-top: 4.5rem;
  padding-left: clamp(1rem, 5vw, 3.5rem);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.scroll-cue-arrow {
  display: inline-block;
  color: var(--yrkon);
  font-size: 1rem;
  animation: scroll-bounce 1.8s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── placeholder image blocks ── */
.ph-box {
  background: var(--ph);
  border: 1px dashed var(--ph-line);
  border-radius: 14px;
  transition: transform .3s cubic-bezier(.23,1,.32,1), border-color .25s ease;
}

.yrkon-feature {
  margin-top: 4.5rem;
  aspect-ratio: 2.1;
  width: 100%;
}
.yrkon-feature:hover { transform: scale(1.005); }

.yrkon-copy {
  margin-top: 3rem;
  max-width: 40rem;
}
.yrkon-copy p {
  margin: 0 0 .9rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}
.yrkon-copy p:last-child { margin-bottom: 0; }

/* ── gallery bento grid ── */
.gallery-grid {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 160px;
  gap: 16px;
  grid-template-areas:
    "a c c"
    "b c c"
    "d e f"
    "g h i"
    "j j k"
    "l l k";
}
.gallery-grid .ph-box:hover { transform: scale(1.02); }
.g-a { grid-area: a; } .g-b { grid-area: b; } .g-c { grid-area: c; }
.g-d { grid-area: d; } .g-e { grid-area: e; } .g-f { grid-area: f; }
.g-g { grid-area: g; } .g-h { grid-area: h; } .g-i { grid-area: i; }
.g-j { grid-area: j; } .g-k { grid-area: k; } .g-l { grid-area: l; }

/* ── more projects ── */
.more-projects { margin-top: 8rem; }
.more-projects h2 {
  margin: 0 0 3rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: .95;
}
.more-projects h2 .more { color: var(--text); display: block; }
.more-projects h2 .projects { color: var(--red); display: block; }

.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.more-card { position: relative; }
.more-card:hover { z-index: 2; }
.more-card .ph-box { aspect-ratio: 1.5; }
.more-card:hover .ph-box { transform: scale(1.025); }
.more-meta { display: flex; justify-content: space-between; gap: 16px; padding-top: 10px; }
.more-name { font-family: "Space Grotesk", sans-serif; font-size: 1rem; }
.more-desc { margin-top: 2px; font-size: .76rem; color: var(--muted); }
.more-arrow { font-size: 1.1rem; color: var(--accent2); opacity: .65; transition: transform .22s ease, opacity .22s ease; }
.more-card:hover .more-arrow { transform: translate(3px, -3px); opacity: 1; }

/* ── footer — the same markup and rules on Home, About, Projects, Contact and
      Yrkon; the inner column lines up with .nav-bar above it ── */
.site-footer {
  --f-line: rgba(255, 255, 255, 0.13);
  --f-accent: #4f8cff;
  --f-muted: #c3ccd8;
  --f-faint: #8d98a8;
  --f-text: #f8fafc;
  border-top: 1px solid var(--f-line);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--f-muted);
}
html[data-theme="light"] .site-footer {
  --f-line: rgba(16, 24, 39, 0.14);
  --f-accent: #245bb5;
  --f-muted: #475569;
  --f-faint: #5b6a7e;
  --f-text: #101827;
}
.site-footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 34px 1.5rem 30px;
}
.site-footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.site-footer h2 {
  margin: 0 0 9px;
  color: var(--f-accent);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-footer p { margin: 5px 0; }
.site-footer a {
  display: block;
  margin: 5px 0;
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}
.site-footer a:hover,
.site-footer a:focus-visible { color: var(--f-text); }
.site-footer-base {
  margin-top: 34px;
  text-align: center;
}
.site-footer-base p { margin: 0; }
.site-footer-base .site-footer-credit {
  margin-top: 10px;
  font-size: 0.66rem;
  color: var(--f-faint);
}
@media (min-width: 1024px) {
  .site-footer-inner { padding: 34px 3rem 30px; }
}
@media (max-width: 767px) {
  .site-footer-inner { padding: 28px 1.25rem 26px; }
  .site-footer-cols { grid-template-columns: 1fr 1fr; }
  .site-footer-cols > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 519px) {
  .site-footer-cols { grid-template-columns: 1fr; }
  .site-footer-cols > div:last-child { grid-column: auto; }
}

/* ── primary nav — one shared bar on Home, About, Projects, Contact and Yrkon.
      A 1fr / auto / 1fr grid keeps the links on the page centre line whatever
      the logo and the theme button measure. ── */
.nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem;
}
.nav-bar > :first-child { justify-self: start; }
.nav-bar > :last-child { justify-self: end; }
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  font-size: 0.875rem;
  white-space: nowrap;
}
@media (min-width: 1024px) {
  .nav-bar { padding: 1.5rem 3rem; }
  .nav-links { gap: 3rem; }
}
@media (max-width: 767px) {
  .nav-bar { padding: 1.25rem 1.25rem; gap: 0.75rem; }
  .nav-links { gap: 1.35rem; font-size: 0.8125rem; }
}
@media (max-width: 559px) {
  .nav-bar { grid-template-columns: 1fr auto; row-gap: 0.85rem; padding: 1rem 1.25rem; }
  .nav-links { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: 1.5rem; }
  main { padding-top: 9.25rem; }
}


@media (max-width: 900px) {
  .yrkon-hero { grid-template-columns: 1fr; gap: 1.5rem; padding-left: 0; }
  .scroll-cue { padding-left: 0; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
    grid-template-areas:
      "a c"
      "b c"
      "d e"
      "f g"
      "h h"
      "i i"
      "j k"
      "l l";
  }
  .more-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  main { padding: 7rem 1.125rem 7rem; }
}
