:root {
  --bg: #f2f2f7;
  --text-muted: rgba(60, 60, 67, 0.6);
  --text-primary: #000000;
  --link-color: #000000;
  --link-underline: #000000;
  --side-margin: 32px;
  --top-spacing: clamp(100px, 20vh, 200px);

  /* Preview Card Tokens (Light Mode - Full Opacity #ffffff, Thin Border, No Shadow) */
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.12);
  --card-title: #000000;
  --card-sub: #636366;
  --card-tag: #8e8e93;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --text-muted: rgba(235, 235, 245, 0.7);
    --text-primary: #ffffff;
    --link-color: #ffffff;
    --link-underline: #ffffff;

    /* Preview Card Tokens (Dark Mode - Full Opacity #2C2C2E, Thin Border, No Shadow) */
    --card-bg: #2C2C2E;
    --card-border: rgba(255, 255, 255, 0.12);
    --card-title: #ffffff;
    --card-sub: #aeaeb2;
    --card-tag: #8e8e93;
  }
}

@media (min-width: 768px) {
  :root {
    --side-margin: 64px;
    --top-spacing: clamp(140px, 20vh, 220px);
  }
}

@media (min-width: 1440px) {
  :root {
    --side-margin: clamp(64px, 5vw, 160px);
    --top-spacing: clamp(160px, 22vh, 320px);
  }
}

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

html {
  background-color: var(--bg);
  color: var(--text-muted);
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  font-size: 18px;
  line-height: 1.253;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 1280px) {
  html {
    font-size: clamp(18px, 1.25vw + 2px, 32px);
  }
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background-color: var(--bg);
  padding-left: var(--side-margin);
  padding-right: var(--side-margin);
  padding-top: var(--top-spacing);
  padding-bottom: 64px;
}

.content {
  width: max-content;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.888rem;
  text-align: left;
  position: relative;
  z-index: 2;
}

@media (max-width: 767px) {
  .content {
    max-width: min(100%, 315px);
  }
}

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

p {
  color: var(--text-muted);
  font-weight: 400;
  white-space: normal;
}

.text-nowrap {
  white-space: nowrap;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.75;
}

/* Keep .has-preview fully opaque on hover so the child preview-card is never dimmed */
.has-preview:hover {
  opacity: 1;
}

a:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   Preview Link Cards (Desktop Hover - Full Opacity)
   ========================================================================== */

.has-preview {
  position: relative;
  display: inline-block;
}

.preview-card {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  background-color: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px) scale(0.97);
  transform-origin: bottom left;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.18s;
  z-index: 50;
  text-align: left;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.preview-card,
.preview-card * {
  text-decoration: none !important;
}

/* Desktop hover / focus trigger */
@media (hover: hover) and (min-width: 768px) {
  .has-preview:hover .preview-card,
  .has-preview:focus-visible .preview-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
}

/* 1. Porsche Photo-Only Card (Only the image, framed by thin border) */
.preview-card-photo {
  width: 260px;
  height: 146px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

.preview-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 2. Rich Card with Thumbnail (HearHere) */
.preview-card-rich {
  width: 250px;
  padding: 8px 8px 10px 8px;
}

.preview-card-rich .preview-thumb {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  background: rgba(0, 0, 0, 0.05);
}

.preview-card-rich .preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-card-rich .preview-info {
  display: flex;
  flex-direction: column;
  padding: 8px 4px 2px 4px;
  gap: 2px;
}

/* 3. Text-Only Cards (Kakimasu, Stack, Conversational UI, Email) */
.preview-card-text {
  width: 240px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.preview-site {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--card-tag);
}

.preview-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--card-title);
  line-height: 1.3;
  margin-top: 2px;
}

.preview-desc {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--card-sub);
  line-height: 1.38;
  margin-top: 3px;
}

/* Mobile: Disable preview cards */
@media (max-width: 767px) {
  .preview-card {
    display: none !important;
  }
}

/* ==========================================================================
   Hero Illustration (Desktop)
   ========================================================================== */

.hero-illustration {
  position: fixed;
  bottom: 0;
  pointer-events: none;
  line-height: 0;
  margin: 0;
  padding: 0;
  z-index: 1;
}

.hero-img {
  display: block;
  margin: 0;
  padding: 0;
  vertical-align: bottom;
}

/* Mobile (< 768px): clean text layout without illustration */
@media (max-width: 767px) {
  body {
    padding-bottom: 64px;
  }

  .content {
    max-width: min(100%, 315px);
  }

  .hero-illustration {
    display: none;
  }
}

/* Desktop (>= 768px): pinned on the right at bottom of viewport */
@media (min-width: 768px) {
  .hero-illustration {
    display: flex;
    right: var(--side-margin);
    height: 85vh;
    height: 85dvh;
    max-height: 85vh;
    max-height: 85dvh;
    max-width: 58vw;
    width: auto;
    align-items: flex-end;
    justify-content: flex-end;
  }

  .hero-img {
    width: auto;
    height: 100%;
    max-height: 85vh;
    max-height: 85dvh;
    max-width: 58vw;
    object-fit: contain;
    object-position: bottom right;
  }
}
