@import url('https://api.fontshare.com/v2/css?f[]=satoshi@900,700,500,400&display=swap');

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

:root {
  --bg: #ffffff;
  --blue-light: #e4eff9;
  --blue-section: #eaf3fb;
  --fun-fact-bg: #cce4f7;
  --card-img-bg: linear-gradient(145deg, #f3f2ef 0%, #e8e7e2 100%);
  --card-img-bg-hover: linear-gradient(145deg, #ebe9e5 0%, #dddcd7 100%);
  --nav-bg: #e8e6e0;
  --nav-cta-bg: #1b1b2a;
  --nav-cta-text: #ffffff;
  --text: #1a1a1a;
  --text-muted: #7a7a74;
  --shadow: 0 4px 28px rgba(0,0,0,0.07);
  --shadow-hover: 0 16px 56px rgba(0,0,0,0.13);
  --radius: 20px;
  --radius-sm: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: 90px;
  padding-bottom: 80px;
}

/* ── Animations ─────────────────────────────────── */

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Page-load (hero) */
.load-1 { animation: heroFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both; }
.load-2 { animation: heroFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.20s both; }
.load-3 { animation: heroFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both; }
.load-4 { animation: heroFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.50s both; }
.nav-load { animation: fadeIn 0.5s ease 0s both; }

/* Scroll-triggered */
.fade-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.17s; }
.d3 { transition-delay: 0.26s; }
.d4 { transition-delay: 0.35s; }
.d5 { transition-delay: 0.44s; }

/* ── Navigation ─────────────────────────────────── */
.pill-nav {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--nav-bg);
  border-radius: 100px;
  padding: 5px 6px;
  display: flex;
  gap: 2px;
  align-items: center;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
.nav-link {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 100px;
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(0,0,0,0.06); }
.nav-link.active { background: #ffffff; font-weight: 700; box-shadow: 0 1px 8px rgba(0,0,0,0.08); }
.nav-link.active:hover { background: #ffffff; }
.nav-link.cta { font-weight: 500; }
.nav-link.cta:hover { background: rgba(0,0,0,0.06); }

/* ── Container ───────────────────────────────────── */
.container { max-width: 880px; margin: 0 auto; padding: 0 40px; }

/* ── Home Hero ───────────────────────────────────── */
.hero {
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 64px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: fixed;
  top: -120px; left: 0; right: 0;
  height: 700px;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(174,210,240,0.38) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.hero-status {
  font-size: 13px; color: var(--text-muted);
  letter-spacing: 0.3px; position: relative; z-index: 1;
}
.hero-heading {
  font-size: 54px; font-weight: 700;
  letter-spacing: -2px; line-height: 1.05;
  max-width: 640px;
  position: relative; z-index: 1;
}
.hero-bottom {
  display: flex; justify-content: flex-end;
  position: relative; z-index: 1;
}
.hero-bio {
  font-size: 15px; color: var(--text-muted);
  line-height: 1.65; max-width: 290px;
}

/* ── Marquee ticker ──────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid rgba(0,0,0,0.07);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 15px 0;
  margin: 0 -40px 64px;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 24s linear infinite;
}
.marquee-item {
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--text-muted); padding: 0 36px;
  white-space: nowrap;
}

/* ── Section label ───────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  text-transform: uppercase;
}

/* ── Project cards ───────────────────────────────── */
.project-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  margin-bottom: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover { transform: scale(1.025); box-shadow: var(--shadow-hover); }
.project-card:hover .card-image { background: var(--card-img-bg-hover); }

.card-image {
  background: var(--card-img-bg);
  overflow: hidden;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  padding: 28px 24px;
}
.card-image img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.14));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .card-image img { transform: scale(1.04); }

.card-content {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background: white;
}

/* ── Tags ────────────────────────────────────────── */
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; font-weight: 400; letter-spacing: 0.2px;
  background: #1b1b2a; color: white;
  padding: 5px 13px; border-radius: 100px;
}
.tag.research { background: #4b4968; }

.card-content h2 { font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -0.3px; }
.card-content p { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

/* ── Divider ─────────────────────────────────────── */
.divider { height: 1px; background: rgba(0,0,0,0.07); margin: 0 0 40px; }

/* ── Case header (two-column) ────────────────────── */
.case-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 64px;
}
.case-header-text .tags { margin-bottom: 20px; }
.case-header-text h1 {
  font-size: 56px; font-weight: 900;
  letter-spacing: -2px; line-height: 1; margin-bottom: 16px;
}
.case-header-text .case-subtitle {
  font-size: 15px; color: var(--text-muted);
  line-height: 1.65; max-width: 360px;
}
.case-header-image {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-header-image img {
  width: 100%; height: auto;
  max-height: 280px; object-fit: contain;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,0.15));
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.case-header-image:hover img { transform: scale(1.04) translateY(-4px); }

/* ── Case overview cards ─────────────────────────── */
.case-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 64px;
}
.case-overview-card { background: var(--blue-section); border-radius: var(--radius-sm); padding: 28px; }
.case-overview-card h3 {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px;
}
.case-overview-card p { font-size: 15px; line-height: 1.65; }

/* ── Case section heading (centered, large) ─────── */
.case-section-heading {
  font-size: 38px; font-weight: 900;
  letter-spacing: -1.5px; text-align: center;
  padding: 72px 0 40px;
}

/* ── Case body text (Översikt) ───────────────────── */
.case-body-text {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 64px;
}

/* ── Lärdomar (text only) ────────────────────────── */
.case-learing { max-width: 640px; margin: 0 auto 64px; }
.case-learing h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 16px; }
.case-learing p { font-size: 16px; line-height: 1.75; color: var(--text-muted); }

/* ── Case content row (text + image) ────────────── */
.case-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
}
.case-row.reverse { direction: rtl; }
.case-row.reverse > * { direction: ltr; }

.case-row-text h3 {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.5px; margin-bottom: 14px;
}
.case-row-text p {
  font-size: 16px; line-height: 1.75;
  color: var(--text-muted);
}
.case-row-image { width: 100%; }
.case-row-image img {
  width: 100%; height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

/* ── Feature pills (3-col) ───────────────────────── */
.feature-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 64px;
}
.feature-pill {
  background: var(--blue-section);
  border-radius: var(--radius-sm);
  padding: 28px 24px;
  text-align: center;
}
.feature-pill .pill-icon svg {
  width: 28px; height: 28px; display: block; margin: 0 auto;
}
.feature-pill .pill-icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
}
.feature-pill h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.feature-pill p { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

/* ── Before / After section ──────────────────────── */
.ba-block {
  border-top: 1px solid rgba(0,0,0,0.07);
  padding: 56px 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.ba-title h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 14px; }
.ba-title p { font-size: 16px; color: var(--text-muted); line-height: 1.75; max-width: 600px; }
.ba-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.ba-label {
  font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted);
  display: block; margin-bottom: 10px;
}
.ba-img { width: 100%; }
.ba-img img {
  width: 100%; height: auto;
  display: block;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.ba-effect-row {
  background: var(--blue-section);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
}
.ba-effect { font-size: 14px; line-height: 1.65; color: var(--text); margin-top: 6px; }

/* ── Interaction flow steps ──────────────────────── */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: var(--blue-section);
  border-radius: var(--radius);
  padding: 40px 32px;
  margin: 32px 0 56px;
  align-items: end;
}
.flow-step { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.flow-step img {
  height: 200px; width: auto; max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.1));
}
.flow-step-label { font-size: 13px; font-weight: 700; text-align: center; }

/* ── Case full-width documentation image ────────── */
.case-full-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  margin: 16px 0 64px;
}

/* ── Case mockup showcase (blue bg gallery) ──────── */
.case-mockup-showcase {
  background: var(--blue-section);
  border-radius: var(--radius);
  padding: 48px 40px;
  margin: 0 0 64px;
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: flex-end;
}
.case-mockup-showcase img {
  max-height: 320px; width: auto; max-width: 45%;
  object-fit: contain;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,0.12));
}

/* ── Wireframe carousel ──────────────────────────── */
.wireframe-section { margin: 0 0 64px; }
.wireframe-section .section-label { margin-bottom: 32px; }
.carousel { position: relative; display: flex; align-items: center; gap: 16px; }
.carousel-viewport { overflow: hidden; border-radius: var(--radius); flex: 1; }
.carousel-track { display: flex; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.carousel-slide {
  min-width: 100%; display: flex; flex-direction: column; justify-content: center;
  align-items: center; gap: 16px; padding: 32px 40px; min-height: 320px;
}
.carousel-slide-label {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted);
}
.carousel-slide img {
  max-height: 400px; width: auto; max-width: 100%;
  object-fit: contain; display: block;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.12));
}
/* Duo slide: desktop + mobil bredvid varandra */
.slide-pair {
  display: flex; gap: 28px; align-items: flex-end;
  justify-content: center; width: 100%;
}
.slide-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.slide-col img {
  max-height: 340px; width: auto; max-width: 100%;
  object-fit: contain; display: block;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.12));
}
.slide-page-label {
  font-size: 14px; font-weight: 700; letter-spacing: -0.2px; color: var(--text);
}
/* UI showcase (färgpalett + komponenter) */
.ui-elements-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ui-elements-grid > img { width: 100%; height: auto; border-radius: var(--radius-sm); display: block; }
.ui-featured { grid-column: 1 / -1; width: 60%; margin: 0 auto; display: block; border-radius: var(--radius-sm); }
.ui-bottom-row { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 10px; }
.ui-bottom-row img { width: auto; max-width: calc(33.33% - 5px); max-height: 120px; border-radius: var(--radius-sm); object-fit: contain; }
.ui-showcase { display: flex; flex-direction: column; gap: 16px; }
.ui-showcase-palette { width: 100%; height: auto; border-radius: var(--radius-sm); }
.ui-showcase-components { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ui-showcase-components img { height: 38px; width: auto; max-width: 100%; object-fit: contain; }
.carousel-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: white; border: none; cursor: pointer;
  font-size: 26px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  flex-shrink: 0; color: var(--text);
}
.carousel-btn:hover { transform: scale(1.1); box-shadow: 0 4px 24px rgba(0,0,0,0.15); }
.carousel-btn:disabled { opacity: 0.2; cursor: default; transform: none; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.carousel-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #ccc;
  transition: background 0.2s, transform 0.2s; border: none; cursor: pointer; padding: 0;
}
.carousel-dot.active { background: var(--text); transform: scale(1.3); }

/* ── Fler case ───────────────────────────────────── */
.more-cases {
  padding-top: 48px;
  border-top: 1px solid rgba(0,0,0,0.07);
  margin-bottom: 40px;
}
.more-cases h3 {
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 24px;
}
.case-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.case-link-card {
  background: #ffffff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.case-link-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.case-thumb-wrap {
  height: 260px;
  background: #f0efec;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  overflow: hidden;
}
.case-thumb-wrap img {
  height: 100%; width: auto; max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.12));
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.case-link-card:hover .case-thumb-wrap img { transform: scale(1.05) translateY(-4px); }

.case-link-card .case-text { padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; }
.case-link-card span { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.case-link-card strong { font-size: 15px; font-weight: 700; line-height: 1.4; }

/* ── Om mig ──────────────────────────────────────── */
.about-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
  padding: 72px 0 56px;
}
.about-header h1 { font-size: 52px; font-weight: 900; letter-spacing: -2px; margin-bottom: 18px; }
.about-header p.bio { font-size: 15px; line-height: 1.65; color: var(--text-muted); max-width: 480px; margin-bottom: 28px; }
.contact-btn {
  display: inline-block; background: var(--nav-cta-bg); color: white;
  text-decoration: none; font-size: 14px; font-weight: 700;
  padding: 12px 24px; border-radius: 100px; transition: background 0.15s;
}
.contact-btn:hover { background: #2e2e44; }
.photo-wrap { width: 160px; height: 210px; border-radius: 16px; overflow: hidden; background: #dde8f0; flex-shrink: 0; }
.photo-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 64px; }
.info-card { background: #f0efec; border-radius: var(--radius); padding: 32px; }
.info-card.fun-fact { background: var(--fun-fact-bg); }
.info-card h2 { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 20px; }
.edu-item { margin-bottom: 18px; }
.edu-item:last-child { margin-bottom: 0; }
.edu-item .date { font-size: 14px; color: var(--text-muted); margin-bottom: 3px; }
.edu-item .title { font-size: 14px; font-weight: 500; line-height: 1.4; }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.info-list li { font-size: 14px; line-height: 1.5; display: flex; gap: 8px; }
.info-list li::before { content: '—'; color: var(--text-muted); flex-shrink: 0; }

/* ── Kontakt ─────────────────────────────────────── */
.contact-page {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - 170px);
  text-align: center; padding: 40px 0;
}
.contact-page h1 { font-size: 64px; font-weight: 900; letter-spacing: -3px; margin-bottom: 24px; }
.contact-page .lead { font-size: 18px; color: var(--text-muted); max-width: 520px; line-height: 1.6; margin-bottom: 32px; }
.contact-details { display: flex; flex-direction: column; gap: 8px; font-size: 18px; }
.contact-details a { color: var(--text); text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }
.contact-back {
  display: inline-block; margin-top: 48px;
  background: #1b1b2a; color: white;
  text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 12px 24px; border-radius: 100px;
  transition: background 0.15s;
}
.contact-back:hover { background: #2e2e44; }

/* ── Scroll to top ───────────────────────────────── */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--text); color: white; border: none; cursor: pointer;
  font-size: 17px; display: flex; align-items: center; justify-content: center;
  transition: opacity 0.2s, transform 0.2s; opacity: 0; pointer-events: none;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-2px); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 700px) {
  body { padding-top: 76px; }
  .container { padding: 0 24px; }
  .hero { grid-template-columns: 1fr; padding: 48px 0 40px; gap: 20px; }
  .hero h1 { font-size: 40px; letter-spacing: -1.5px; }
  .project-card { grid-template-columns: 1fr; }
  .card-image { height: 220px; padding: 20px; }
  .card-content { padding: 24px; }
  .case-header { grid-template-columns: 1fr; padding: 48px 0 40px; gap: 32px; }
  .case-header-text h1 { font-size: 36px; }
  .case-overview { grid-template-columns: 1fr; }
  .case-row { grid-template-columns: 1fr; }
  .feature-pills { grid-template-columns: 1fr; }
  .ba-block { grid-template-columns: 1fr; gap: 24px; }
  .ba-cols { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .case-mockup-showcase { flex-direction: column; align-items: center; }
  .case-mockup-showcase img { max-width: 80%; }
  .info-grid { grid-template-columns: 1fr; }
  .about-header { grid-template-columns: 1fr; padding: 48px 0 40px; }
  .photo-wrap { display: none; }
  .case-links { grid-template-columns: 1fr; }
  .case-thumb-wrap { height: 200px; }
  .contact-page h1 { font-size: 42px; }
}
