:root {
  --bg: #fff;
  --fg: #1a1a1a;
  --muted: #6a6a6a;
  --line: rgba(0, 0, 0, 0.12);
  --machine-blue: #1a1a1a;
  --machine-blue-dark: #000;
  --machine-blue-soft: #f5f5f5;
  --navbar-height: 80px;
  --navbar-logo-pad: 10px;
  color-scheme: only light;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  color-scheme: light;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

html.is-preloading body {
  overflow: hidden;
}

html.is-preloading .navbar,
html.is-preloading .home,
html.is-preloading .desktop-notice {
  visibility: hidden;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(0, 0, 0, 0.05), transparent 70%),
    #fff;
  transition: opacity 0.3s ease;
}

.site-loader[hidden] {
  display: none;
}

.site-loader--done {
  opacity: 0;
  pointer-events: none;
}

.site-loader__inner {
  width: min(560px, 100%);
  text-align: center;
}

.site-loader__kicker {
  margin: 0 0 12px;
  color: var(--machine-blue);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.site-loader__title {
  margin: 0 0 12px;
  color: var(--machine-blue);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.site-loader__lead {
  margin: 0 auto 28px;
  max-width: 34em;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.site-loader__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.site-loader__bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--machine-blue);
  transition: width 0.25s ease;
}

.site-loader__status {
  margin: 14px 0 8px;
  color: var(--machine-blue);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.site-loader__detail {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  word-break: break-word;
}

.navbar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--navbar-height);
  padding: 0 40px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.navbar__logo {
  position: absolute;
  left: 50%;
  top: 0;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  color: var(--fg);
  text-decoration: none;
  transform: translateX(-50%);
}

.navbar__logo-svg {
  display: block;
  height: calc(var(--navbar-height) - 2 * var(--navbar-logo-pad));
  width: auto;
  max-width: min(320px, 42vw);
}

.navbar__logo:hover,
.navbar__logo:focus-visible {
  color: #000;
}

.navbar__logo:focus-visible {
  outline: 2px solid var(--machine-blue);
  outline-offset: 4px;
}

.navbar__kicker,
.navbar__hint {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.navbar__kicker {
  color: var(--machine-blue);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.navbar__hint {
  margin-left: auto;
  color: var(--machine-blue);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  text-decoration: none;
}

.navbar__hint:hover,
.navbar__hint:focus-visible {
  color: var(--machine-blue-dark);
}

.navbar__hint:focus-visible {
  outline: 2px solid var(--machine-blue);
  outline-offset: 4px;
}

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 36px 40px 40px;
  background:
    radial-gradient(1200px 480px at 50% -80px, rgba(0, 0, 0, 0.06), transparent 70%),
    var(--bg);
}

.intro {
  max-width: 920px;
  margin: 0 auto 28px;
  text-align: center;
}

.intro__eyebrow {
  margin: 0 0 10px;
  color: var(--machine-blue);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.intro__title {
  margin: 0 0 12px;
  color: var(--machine-blue);
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.intro__lead {
  margin: 0 auto;
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
}

.projects {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
  min-height: 0;
}

.project {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(26, 26, 26, 0.04);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  animation: rise 0.7s ease both;
}

.project:nth-child(2) {
  animation-delay: 0.08s;
}

.project:nth-child(3) {
  animation-delay: 0.16s;
}

.project:nth-child(4) {
  animation-delay: 0.24s;
}

.project:hover,
.project:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(0, 0, 0, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.project:focus-visible {
  outline: 2px solid var(--machine-blue);
  outline-offset: 4px;
}

.project__media {
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
}

.project__media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(0, 0, 0, 0.05), transparent 58%),
    var(--machine-blue-soft);
}

.project__media--grossportallader {
  background: #fff;
}

.project__media--grossportallader img {
  object-fit: contain;
  object-position: center;
  transform: none;
}

.project:hover .project__media--grossportallader img,
.project:focus-visible .project__media--grossportallader img {
  transform: none;
}

.project__placeholder {
  text-align: center;
  padding: 24px;
}

.project__placeholder-kicker {
  margin: 0 0 8px;
  color: var(--machine-blue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.project__placeholder-title {
  margin: 0 0 10px;
  color: var(--machine-blue);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.project__placeholder-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.project__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.03);
  transition: transform 0.6s ease;
}

.project:hover .project__media img,
.project:focus-visible .project__media img {
  transform: scale(1.08);
}

.project__index {
  position: absolute;
  top: 16px;
  left: 18px;
  color: var(--machine-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.project__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.project__kicker {
  margin: 0;
  color: var(--machine-blue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.project__title {
  margin: 0;
  color: var(--fg);
  font-size: clamp(22px, 1.8vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.project__text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 2px;
  padding: 0;
  list-style: none;
}

.project__tags li {
  padding: 5px 10px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  background: var(--machine-blue-soft);
  color: var(--machine-blue-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.project__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--machine-blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project__cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.project:hover .project__cta svg,
.project:focus-visible .project__cta svg {
  transform: translateX(4px);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .home {
    padding: 28px 24px 32px;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project {
    flex-direction: row;
    align-items: flex-start;
  }

  .project__media {
    flex: 0 0 46%;
    width: 46%;
    aspect-ratio: 4 / 3;
  }

  .project__body {
    flex: 1;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 800px) {
  .navbar {
    padding: 0 20px;
    gap: 16px;
  }

  .navbar__kicker {
    font-size: 16px;
  }

  .home {
    padding: 24px 20px 28px;
  }

  .intro {
    margin-bottom: 22px;
    text-align: left;
  }

  .intro__lead {
    margin: 0;
  }

  .project {
    flex-direction: column;
  }

  .project__media {
    flex: none;
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .project__body {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .desktop-notice {
    padding: 16px;
  }

  .desktop-notice__card {
    padding: 28px 22px 22px;
  }
}

.desktop-notice {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.28);
}

html.has-desktop-notice,
html.has-desktop-notice body {
  overflow: hidden;
}

html.has-desktop-notice .navbar,
html.has-desktop-notice .home {
  filter: blur(12px);
  pointer-events: none;
  user-select: none;
}

html.has-desktop-notice .project {
  animation: none;
}

html.has-desktop-notice .desktop-notice {
  display: flex;
}

.desktop-notice__card {
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  padding: 36px 32px 28px;
  background: #fff;
  border: 5px solid var(--machine-blue);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  text-align: center;
  animation: notice-in 0.35s ease both;
}

.desktop-notice__body p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.desktop-notice__body .desktop-notice__lead {
  margin: 0 0 16px;
  color: var(--machine-blue);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.desktop-notice__body p + p {
  margin-top: 1em;
}

.desktop-notice__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 28px;
  padding: 14px 18px;
  border: 0;
  border-radius: 2px;
  background: var(--machine-blue);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.desktop-notice__btn:hover,
.desktop-notice__btn:focus-visible {
  background: var(--machine-blue-dark);
}

.desktop-notice__btn:focus-visible {
  outline: 2px solid var(--machine-blue);
  outline-offset: 3px;
}

@keyframes notice-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project,
  .project__media img,
  .project__cta svg,
  .desktop-notice__card,
  .site-loader,
  .site-loader__bar-fill {
    animation: none;
    transition: none;
  }

  .project:hover,
  .project:focus-visible {
    transform: none;
  }
}
