:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #12151a;
  --muted: #5a6372;
  --border: #e1e4ea;
  --accent: #15803d;
  --accent-text: #ffffff;
  --accent-soft: #e7f5ec;
  --shadow: 0 22px 45px -30px rgba(18, 21, 26, 0.45);
  --radius: 18px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b0e13;
  --surface: #12161d;
  --text: #e9ecf3;
  --muted: #9aa3b2;
  --border: #232a36;
  --accent: #34c46b;
  --accent-text: #06130c;
  --accent-soft: #13251b;
  --shadow: 0 26px 50px -32px rgba(0, 0, 0, 0.95);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

p {
  margin: 0;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.accent-text {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 70px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

.site-nav a {
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(12deg);
}

.theme-toggle .icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.hero {
  padding: 92px 24px 76px;
}

.hero h1 {
  max-width: 20ch;
  font-size: clamp(2.3rem, 5.4vw, 3.7rem);
  font-weight: 800;
}

.lead {
  max-width: 56ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.07rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 56px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.hero-stats dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-stats dd {
  margin: 4px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section {
  padding: 72px 24px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
}

.section-text {
  max-width: 54ch;
  margin-top: 12px;
  color: var(--muted);
}

.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}

.about-text p + p {
  margin-top: 16px;
}

.about-text {
  color: var(--muted);
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.skill-list li {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
}

.about-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.about-card h3 {
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.about-card li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.about-card li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow);
}

.project-media {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-one {
  background: linear-gradient(135deg, #1f7a4d, #6fbf94);
}

.media-two {
  background: linear-gradient(135deg, #6d8f74, #c2d4b4);
}

.media-three {
  background: linear-gradient(135deg, #2f7d6f, #9ac7b8);
}

.project-body {
  padding: 20px 22px 24px;
}

.project-body h3 {
  font-size: 1.1rem;
}

.project-body p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}
.media-four { background: linear-gradient(135deg, #5a7d4a, #b8d49a); }

.project-tag {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-status {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.project-meta { margin-top: 12px; }

.project-meta .project-status { margin-top: 0; }

.project-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-card {
  padding: 52px 32px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow);
}

.contact-card h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
}

.contact-card .eyebrow {
  margin-bottom: 10px;
}

.contact-card .section-text {
  margin: 14px auto 0;
}

.contact-card .hero-actions {
  justify-content: center;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 30px 24px 44px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a:hover {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 760px) {
  .about {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats {
    gap: 28px;
  }

  .site-nav {
    gap: 16px;
    font-size: 0.86rem;
  }

  .header-inner {
    height: 64px;
  }
}

@media (max-width: 480px) {
  .site-nav a:first-child {
    display: none;
  }

  .hero {
    padding-top: 64px;
  }

  .section {
    padding: 56px 20px;
  }

  .contact-card {
    padding: 38px 20px;
  }

  .hero-stats dd {
    font-size: 1.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .project-card:hover,
  .theme-toggle:hover {
    transform: none;
  }
}

body, button, input, textarea, h1, h2, h3, .brand, .btn {
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.btn { border-radius: 6px; }
.btn:hover, .btn:focus-visible { transform: none; translate: none; }

.project-media { display: none; }