/* ── Reset ───────────────────────────────────────────────── */

html {
  background: #000;
}

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

:root {
  --bg: #000;
  --text: #fff;
  --muted: #ababab;
  --divider: #383838;
  --font: 'Schibsted Grotesk', sans-serif;
  --font-list: 'Geist', 'Inter', system-ui, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: underline; }

::selection { background: rgba(255, 255, 255, 0.12); }
::-moz-selection { background: rgba(255, 255, 255, 0.12); }

/* ── Interactive portrait canvas ────────────────────────
   Caps at 640px but shrinks to the parent width on narrow viewports.
   Negative margins compensate for the 80px "fly room" halo (12.5% of canvas
   size on each side) so the layout footprint matches the visible blob,
   scaling automatically with --portrait-size. */
.about-portrait {
  --portrait-size: min(640px, 100%);
  width: var(--portrait-size);
  height: var(--portrait-size);
  display: block;
  opacity: 0.7;
  image-rendering: pixelated;
  pointer-events: auto;
  margin: calc(var(--portrait-size) * -0.125)
          calc(var(--portrait-size) * -0.125)
          calc(2rem - var(--portrait-size) * 0.125)
          calc(var(--portrait-size) * -0.125);
}

/* Disable pointer events on touch devices so taps/scrolls in the canvas halo
   pass through to surrounding text instead of triggering the cursor warp. */
@media (hover: none) and (pointer: coarse) {
  .about-portrait { pointer-events: none; }
}

/* ── Page ──────────────────────────────────────────────── */

.page {
  max-width: 1340px;
  margin: 0 auto;
  padding: 20px 30px 40px;
}

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

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 160px;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.name-block {
  display: flex;
  flex-direction: column;
}

.name-primary {
  font-weight: 600;
}

.name-subtitle {
  font-weight: 400;
  color: var(--muted);
}

.nav-link {
  font-weight: 600;
  transition: opacity 0.15s;
}

.nav-link:hover {
  opacity: 0.6;
}

/* ── Main layout ─────────────────────────────────────────── */

.site-main {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* ── Sidebar ─────────────────────────────────────────────── */

.sidebar {
  width: 368px;
  flex-shrink: 0;
  padding-right: 10px;
  position: sticky;
  top: 0;
}

.sidebar-bio {
  border-top: 1px solid var(--divider);
  padding: 30px 0 40px 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 12px 0;
  border-top: 0.5px solid var(--divider);
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--text);
  transition: opacity 0.15s;
  cursor: pointer;
}

.sidebar-link:hover {
  opacity: 0.6;
}

.sidebar-link.link-email {
  font-weight: 600;
  letter-spacing: -0.005em;
}

.sidebar-link.link-plain {
  cursor: default;
  font-weight: 400;
}

.sidebar-link.link-plain:hover {
  opacity: 1;
}

.arrow {
  font-size: 10px;
  margin-left: 1px;
}

a .arrow {
  display: inline-block;
  text-decoration: none !important;
}

/* ── CV content column ───────────────────────────────────── */

.cv-content {
  flex: 1;
  min-width: 0;
  padding-left: 20px;
}

/* ── Section base ────────────────────────────────────────── */

.cv-section {
  border-top: 1px solid var(--divider);
  padding: 30px 0 80px;
}

.section-heading {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin-bottom: 30px;
}

/* ── Framing statement ───────────────────────────────────── */

.framing-section {
  padding-bottom: 60px;
}

.framing-text {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.framing-text p {
  margin-bottom: 0.65em;
}

.framing-text p:last-child {
  margin-bottom: 0;
}

.framing-lead {
  color: var(--text);
}

.framing-body {
  color: var(--muted);
}

/* ── Jobs ────────────────────────────────────────────────── */

.job-list {
  display: flex;
  flex-direction: column;
  gap: 50px;
  padding-right: 0;
}

.job {
  border-top: 0.5px solid var(--divider);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.job-left {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.job-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.job-meta a {
  color: var(--muted);
  text-decoration: underline;
  transition: color 0.15s;
}

.job-meta a:hover {
  color: var(--text);
}

.job-right {
  flex: 1;
  min-width: 280px;
  font-family: var(--font-list);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.job-right ul {
  list-style: disc;
  padding-left: 1.4em;
}

.job-right li {
  margin-bottom: 8px;
}

.job-right li:last-child {
  margin-bottom: 0;
}

.job-outcome {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 14px;
}

/* ── Skills ──────────────────────────────────────────────── */

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 37px;
}

.skills-column {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.skill-group-heading {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--muted);
  margin-bottom: 12px;
}

.skill-group ul {
  list-style: disc;
  padding-left: 1.4em;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.skill-group li {
  margin-bottom: 5px;
}

.skill-group li:last-child {
  margin-bottom: 0;
}

/* ── Education ───────────────────────────────────────────── */

.education-row {
  display: flex;
  gap: 37px;
}

.education-school {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.education-degree {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.degree-emphasis {
  color: var(--muted);
}

/* ── Impact ──────────────────────────────────────────────── */

.impact-intro {
  font-family: var(--font-list);
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 40px;
}

.scale-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 37px;
  margin-bottom: 60px;
}

.scale-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scale-number {
  font-family: var(--font);
  font-size: 64px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--text);
}

.scale-label {
  font-family: var(--font-list);
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 37px;
  margin-bottom: 60px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-number {
  font-family: var(--font);
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.metric-label {
  font-family: var(--font-list);
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}

.testimonial-list {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.testimonial {
  border-top: 0.5px solid var(--divider);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.testimonial-left {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonial-role {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

.testimonial-company {
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.testimonial-right {
  flex: 1;
  min-width: 280px;
}

.testimonial-quote {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 10px;
}

.testimonial-feature {
  font-family: var(--font-list);
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
}

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

.site-footer {
  border-top: 0.5px solid var(--divider);
  height: 400px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 20px;
}

.contact-link {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-decoration: underline;
  color: var(--text);
  transition: opacity 0.15s;
}

.contact-link:hover {
  opacity: 0.6;
}

/* ── About page ──────────────────────────────────────────── */

.about-section {
  border-top: 0.5px solid var(--divider);
  padding: 30px 60px 60px 0;
  display: flex;
  flex-direction: column;
  gap: 37px;
}

.about-body {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  max-width: 720px;
}

.about-body p {
  margin-bottom: 1em;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.brands-section {
  border-top: 0.5px solid var(--divider);
  padding: 16px 0 60px;
  display: flex;
  flex-direction: column;
  gap: 37px;
  overflow: hidden;
}

.brands-list {
  font-family: var(--font-list);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.005em;
  list-style: disc;
  padding-left: 1.4em;
  max-width: 311px;
}

.brands-list li {
  margin-bottom: 8px;
}

.brands-list li:last-child {
  margin-bottom: 0;
}

/* ── Logo slider ─────────────────────────────────────────── */

.logo-slider {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.logo-track {
  display: flex;
  align-items: center;
  gap: 72px;
  width: max-content;
  animation: logo-scroll 35s linear 1.2s infinite;
}

.logo-track:hover {
  animation-play-state: paused;
}

.logo-item {
  flex-shrink: 0;
  height: 64px;
  display: flex;
  align-items: center;
  opacity: 1;
  transition: opacity 0.2s;
}

.logo-item:hover {
  opacity: 0.5;
}

.logo-item img {
  height: 100%;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

@keyframes logo-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Name home link ─────────────────────────────────────── */

a.name-block {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* ── Typing cursor ───────────────────────────────────────── */

.typing-cursor::after {
  content: '';
  display: inline-block;
  width: 0.5em;
  height: 1.3em;
  background: currentColor;
  vertical-align: -0.3em;
  margin-left: 2px;
  animation: cursor-blink 1.1s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 960px) {
  .sidebar {
    width: 280px;
  }

  .sidebar-bio {
    padding-right: 0;
  }
}

@media (max-width: 700px) {
  .page {
    padding: 20px 20px 40px;
  }

  .site-header {
    font-size: 20px;
    padding-bottom: 40px;
  }

  .site-main {
    flex-direction: column;
    gap: 0;
  }

  .sidebar {
    width: 100%;
    position: static;
    padding-right: 0;
    margin-bottom: 30px;
  }

  .sidebar-bio {
    padding-right: 0;
  }

  .cv-content {
    padding-left: 0;
    width: 100%;
  }

  .cv-section {
    padding-bottom: 50px;
  }

  .job {
    flex-direction: column;
  }

  .job-right {
    min-width: 0;
  }

  .education-row {
    flex-direction: column;
    gap: 8px;
  }

  .site-footer {
    height: 200px;
  }

  .about-section {
    padding: 20px 0 40px;
    gap: 20px;
  }

  .about-body {
    font-size: 18px;
  }

  .brands-section {
    padding: 16px 0 40px;
    gap: 24px;
  }

  .logo-slider {
    -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  }

  .logo-item {
    height: 36px;
  }

  .logo-track {
    gap: 40px;
  }
}

@media (max-width: 420px) {
  .site-header {
    font-size: 17px;
  }

  .site-header .name-block {
    white-space: normal;
  }
}
