/* Quiet, text-first visual system inspired by the supplied reference screenshots. */
:root {
  color-scheme: dark;
  --bg: #191b2a;
  --text: #cbd1ee;
  --muted: #979fbd;
  --link: #bcc6e7;
  --link-hover: #e7eaff;
  --focus: #aeb8dc;
  --selection: #363b56;
  --measure: 43.5rem;
  --page-gutter: clamp(1.4rem, 5vw, 3rem);
  --top-space: clamp(1.6rem, 5.6vh, 3.2rem);
  --transition: 150ms ease;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eceef4;
  --text: #454b67;
  --muted: #737a94;
  --link: #555d7b;
  --link-hover: #202433;
  --focus: #646c85;
  --selection: #d8dce6;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191b2a;
  --text: #cbd1ee;
  --muted: #979fbd;
  --link: #bcc6e7;
  --link-hover: #e7eaff;
  --focus: #aeb8dc;
  --selection: #363b56;
}

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

html {
  min-width: 18rem;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 1.12rem;
  line-height: 1.54;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-weight: 460;
  transition:
    background-color var(--transition),
    color var(--transition);
}

::selection {
  background: var(--selection);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a,
.text-link {
  color: var(--link);
  font: inherit;
  font-weight: 640;
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, currentColor 72%, transparent);
  transition:
    color var(--transition),
    text-decoration-color var(--transition),
    opacity var(--transition);
}

a:hover,
.text-link:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 2px;
}

.theme-toggle:focus,
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.site-shell {
  width: min(100%, calc(var(--measure) + (2 * var(--page-gutter))));
  margin: 0 auto;
  padding: var(--top-space) var(--page-gutter) 5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-bottom: clamp(1.2rem, 3vh, 2rem);
}


.site-header--home {
  justify-content: space-between;
  align-items: flex-start;
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 0.48rem;
}

.site-name {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.5rem, 1.28rem + 0.42vw, 1.72rem);
  line-height: 1.18;
  letter-spacing: 0.018em;
  font-weight: 690;
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, currentColor 72%, transparent);
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-link--primary {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  color: var(--link);
  font-size: 1rem;
  line-height: 1;
  font-weight: 640;
}

.nav-link--home {
  font-size: 1rem;
}

.theme-toggle {
  position: relative;
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  place-items: center;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--link);
  cursor: pointer;
  outline: none;
  border-radius: 0;
}


.theme-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0.92rem;
  height: 1.5px;
  background: color-mix(in srgb, currentColor 72%, transparent);
  transform: translateX(-50%);
  transition:
    background-color var(--transition),
    opacity var(--transition);
}

.theme-toggle:hover::after {
  background: currentColor;
}

.theme-icon {
  position: absolute;
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  line-height: 1;
  transition:
    opacity var(--transition),
    transform var(--transition),
    color var(--transition);
}

.theme-icon--sun {
  opacity: 1;
  transform: scale(1);
}

.theme-icon--moon {
  width: 1.14rem;
  height: 1.14rem;
  opacity: 0;
  transform: scale(0.78);
}

html[data-theme="light"] .theme-icon--sun {
  opacity: 0;
  transform: scale(0.78);
}

html[data-theme="light"] .theme-icon--moon {
  opacity: 1;
  transform: scale(1);
}

main {
  max-width: 100%;
}

.intro,
.writing {
  max-width: 41.75rem;
}

h1 {
  margin: 0 0 1.02rem;
  color: var(--text);
  font-size: clamp(1.5rem, 1.28rem + 0.42vw, 1.72rem);
  line-height: 1.18;
  letter-spacing: 0.018em;
  font-weight: 690;
}


p {
  margin: 0;
}

.intro-copy {
  max-width: 41rem;
  font-weight: 480;
}

.intro-copy p + p {
  margin-top: 0.82rem;
}

.link-list {
  display: grid;
  gap: 0.28rem;
  margin: 1.05rem 0 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  min-height: 1.55rem;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
}

.icon-link svg {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  color: var(--muted);
}

.icon-link > span {
  position: relative;
  top: -0.06em;
}

.text-link {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.website-item {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  column-gap: 0.7rem;
}

.surprise-message {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: 1.54;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity var(--transition);
}

.surprise-message.is-visible {
  opacity: 1;
}

.writing-subtitle {
  max-width: 36rem;
  color: var(--text);
}

.empty-state {
  margin-top: 2.15rem;
  color: var(--muted);
}

@media (max-width: 34rem) {
  :root {
    --page-gutter: 1.25rem;
    --top-space: 1.25rem;
  }

  body {
    font-size: 1.04rem;
  }

  .site-header {
    justify-content: space-between;
    margin-bottom: 2rem;
  }

  .site-header--home {
    align-items: flex-start;
  }

  .site-name {
    font-size: 1.5rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
