/* Colours and fonts – change these to restyle the whole site.
   Theme: dark like Spotify, with Malmö FF blue (#008ECB) instead of green. */
:root {
  color-scheme: dark;
  --bg: #121212;
  --bg-alt: #181818;
  --surface: #1f1f1f;
  --surface-hover: #282828;
  --ink: #ffffff;
  --ink-soft: #b3b3b3;
  --line: #2a2a2a;
  /* Malmö FF blue: buttons, step numbers. Text uses a hair lighter tint so it stays readable on black. */
  --green: #008ecb;      /* (name kept for compatibility) button background */
  --on-green: #000000;   /* text on buttons */
  --green-ink: #1aa3e0;  /* blue used as text */
  --accent: #1aa3e0;
  /* Placeholder highlight */
  --todo-bg: #4d3f0c;
  --todo-ink: #f9e7a6;
  --radius: 10px;
  --serif: "Figtree", system-ui, sans-serif; /* headings */
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 24px; } }

h1, h2, h3, .h3 { font-family: var(--serif); font-weight: 800; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.025em; }
h3, .h3 { font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3, .h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.eyebrow { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: .8rem; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 40em; }
.small-head { font-family: var(--sans); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); font-weight: 600; }

/* Placeholders */
mark.todo { background: var(--todo-bg); color: var(--todo-ink); border-radius: 4px; padding: 0 .25em; font-weight: 600; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ph {
  width: 100%; border: 2px dashed color-mix(in srgb, var(--ink-soft) 55%, transparent); border-radius: var(--radius); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px; text-align: center; color: var(--ink-soft);
}
.ph-label { font-weight: 600; font-size: .95rem; color: var(--ink); max-width: 28ch; }
.ph-format { font-size: .8rem; }
.media { width: 100%; height: auto; display: block; border-radius: var(--radius); object-fit: cover; }

/* Skip link */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Nav (mobile first) */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(18,18,18,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; flex-wrap: wrap; }
.logo { font-family: var(--serif); font-weight: 800; letter-spacing: -.02em; font-size: 1.2rem; text-decoration: none; }
.menu-btn { font: inherit; font-weight: 600; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
#menu { display: none; width: 100%; flex-direction: column; padding: 8px 0 16px; }
#menu.open { display: flex; }
#menu a { text-decoration: none; padding: 10px 0; color: var(--ink-soft); border-top: 1px solid var(--line); }
#menu a[aria-current="page"] { color: var(--ink); font-weight: 600; }
#menu a.nav-cta { color: var(--green-ink); font-weight: 600; }
@media (min-width: 800px) {
  .menu-btn { display: none; }
  #menu { display: flex; flex-direction: row; width: auto; gap: 26px; padding: 0; }
  #menu a { border: 0; padding: 0; font-size: .95rem; }
  #menu a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
  #menu a.nav-cta { background: var(--green); color: var(--on-green); padding: 8px 16px; border-radius: 999px; }
}

/* Buttons */
.btn { display: inline-block; padding: 13px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: transform .15s ease; }
.btn:hover { transform: scale(1.04); }
.btn-primary:hover { background: #1aa3e0; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-ghost { border: 1px solid #727272; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.link { color: var(--accent); font-weight: 600; text-decoration: none; }

/* Sections */
.hero { padding: 40px 0 56px; background: linear-gradient(180deg, #0a3247 0%, var(--bg) 100%); }
.hero-grid { display: grid; gap: 32px; }
.hero-img { max-width: 360px; }
.page-intro { padding: 48px 0 16px; }
.section { padding: 56px 0; }
.section-tight { padding-top: 24px; }
.section-alt { background: var(--bg-alt); }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }

.cards { display: grid; gap: 16px; margin-top: 24px; }
.card { background: var(--surface); border: 1px solid transparent; border-radius: var(--radius); padding: 24px; }
.card p { color: var(--ink-soft); margin: 0; }
.num { font-family: var(--serif); color: var(--accent); margin-bottom: 12px; }

/* Project cards */
.pgrid { display: grid; gap: 20px; margin-top: 24px; }
.pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid transparent; border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.pcard:hover { background: var(--surface-hover); }
.pcard .ph, .pcard .media { border-radius: 0; border-width: 0 0 2px; aspect-ratio: 16/10 !important; }
.pcard-body { padding: 20px; }
.pcard-body p { color: var(--ink-soft); }
.tag { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent) !important; margin-bottom: .4rem; }
.more { font-weight: 600; color: var(--accent); }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg-alt); margin-bottom: .6rem; }
.badge-ph { background: var(--todo-bg); color: var(--todo-ink); }

/* Project page */
.back { display: inline-block; margin-bottom: 20px; text-decoration: none; color: var(--ink-soft); }
.wide-img { margin: 24px 0; max-width: 900px; }
.facts { list-style: none; padding: 0; margin: 0 0 32px; display: flex; flex-wrap: wrap; gap: 28px; color: var(--ink-soft); }
.facts strong { display: block; font-family: var(--serif); font-size: 1.8rem; color: var(--ink); }
.pblocks { display: grid; gap: 28px; max-width: 760px; }
.pblock h2 { font-size: 1.3rem; }
.pblock p { color: var(--ink-soft); font-size: 1.05rem; }

/* How I work */
.steps { list-style: none; padding: 0; margin: 0; max-width: 780px; position: relative; }
.steps::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 20px; padding: 0 0 32px; position: relative; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: var(--on-green); display: grid; place-items: center; font-family: var(--serif); font-weight: 650; font-size: 1.1rem; }
.step h3 { margin-top: 6px; }
.step p { color: var(--ink-soft); margin: 0 0 .5em; }
.example { border-left: 3px solid var(--accent); padding-left: 14px; font-style: italic; }
.phase { display: grid; gap: 16px; margin: 24px 0 0; }
.phase div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.phase dt { font-weight: 600; margin-bottom: 4px; }
.phase dd { margin: 0; color: var(--ink-soft); }

/* About */
.about-grid { display: grid; gap: 32px; align-items: start; }
.about-img { max-width: 380px; }
.traits { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.traits li { padding-left: 16px; border-left: 3px solid var(--accent); color: var(--ink-soft); }
.traits strong { color: var(--ink); }
.cols3 { display: grid; gap: 32px; }
.cols3 p { color: var(--ink-soft); }
.merits { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid var(--line); }
.merits li { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.merit-big { font-family: var(--serif); font-size: 1.5rem; line-height: 1.15; }
.merit-label { font-size: .9rem; color: var(--ink-soft); }
.merit-big { color: var(--green-ink); margin-bottom: 4px; }

/* Contact */
.contact-grid { display: grid; gap: 32px; align-items: start; padding-bottom: 56px; }
.contact-list { display: grid; gap: 16px; margin: 24px 0 0; }
.contact-list dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); font-weight: 600; }
.contact-list dd { margin: 0; font-size: 1.15rem; }
.mini-steps { padding-left: 1.2em; margin: 0 0 1em; color: var(--ink-soft); }
.mini-steps li { margin-bottom: .6em; }
.note { font-weight: 600; color: var(--ink) !important; }

/* Closing band */
.closing { background: linear-gradient(180deg, #003d5a 0%, #121212 100%); color: var(--ink); text-align: center; }
.closing p { color: var(--ink-soft); max-width: 36em; margin: 0 auto 1.6rem; }
.closing h2 { max-width: 22em; margin-left: auto; margin-right: auto; }

/* Footer */
.footer { padding: 28px 0; font-size: .9rem; color: var(--ink-soft); }
.footer-inner { display: grid; gap: 12px; }

/* Wider screens */
@media (min-width: 800px) {
  .hero { padding: 80px 0 72px; }
  .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: center; }
  .hero-img { justify-self: end; width: 100%; }
  .page-intro { padding: 72px 0 24px; }
  .section { padding: 80px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .phase { grid-template-columns: repeat(4, 1fr); }
  .about-grid { grid-template-columns: 1fr 1.5fr; gap: 56px; }
  .cols3 { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1.3fr 1fr; gap: 56px; }
  .footer-inner { grid-template-columns: 1fr auto; text-align: left; }
}

/* Phone screenshots: shown whole on a soft panel instead of cropped */
.phone-wrap { width: 100%; background: var(--bg-alt); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; }
.phone-wrap img { height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.pcard .phone-wrap { border-radius: 0; aspect-ratio: 16/10 !important; padding: 16px; }

/* Philosophy */
.philosophy { background: var(--bg-alt); }
.phil-grid { display: grid; gap: 16px; margin-top: 28px; }
.phil { background: var(--surface); border-radius: var(--radius); padding: 24px; border-top: 3px solid var(--green); }
.phil p { color: var(--ink-soft); margin: 0; }
.phil-more { margin: 24px 0 0; }
@media (min-width: 800px) { .phil-grid { grid-template-columns: repeat(2, 1fr); } }
