/* Typography, colors and layout follow unvalley.me (Inter, 14px body, gray scale).
   Background stays the same as before. */

:root {
  color-scheme: light;
  --background: #FAFAFA;
  --text: #000000;
  --heading: #171717;
  --name: #404040;
  --muted: #737373;
  --line: #E5E5E5;
  --content-width: 655px;
  --hover-heading: #171717;
  --hover-name: #404040;
  --body: #545454;
  --link: #171717;
  --link-line: #959595;
}

/* Dark mode: system preference, unless the visitor picked "light" */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #171717;
    --text: #FFFFFF;
    --heading: #F5F5F5;
    --name: #D4D4D4;
    --muted: #A3A3A3;
    --line: #404040;
    --hover-heading: #F5F5F5;
    --hover-name: #E5E5E5;
    --body: #D4D4D4;
    --link: #F5F5F5;
    --link-line: #545454;
  }
}

/* Dark mode: explicit choice */
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #171717;
  --text: #FFFFFF;
  --heading: #F5F5F5;
  --name: #D4D4D4;
  --muted: #A3A3A3;
  --line: #404040;
  --hover-heading: #F5F5F5;
  --hover-name: #E5E5E5;
  --body: #D4D4D4;
  --link: #F5F5F5;
  --link-line: #545454;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.page-shell {
  width: min(100% - 40px, 724px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(88px, 14vh, 132px) 0 56px;
}

/* Profile */
.profile {
  margin-bottom: 42px;
}

.profile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

h1,
p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}

h1 {
  color: var(--heading);
  font-size: 16px;
  font-weight: 400;
}

.role {
  margin-top: 8px;
  color: var(--muted);
}

/* Theme switcher: light <-> dark (set by the button in index.html) */
.theme-toggle {
  flex-shrink: 0;
  margin: -12px 0;
  padding: 12px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--heading);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Bio */
.bio {
  display: grid;
  gap: 24px;
  max-width: var(--content-width);
  color: var(--body);
}

.bio p {
  font-size: 16px;
  line-height: 28px;
  color: var(--body);
}

.bio a {
  color: var(--link);
  font-weight: 500;
  text-decoration-color: var(--link-line);
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.15s ease;
}

.bio a:hover {
  color: var(--body);
}

a {
  color: inherit;
  text-decoration-color: currentColor;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

/* Highlights — styled like the Collections section on unvalley.me */
.highlights {
  max-width: var(--content-width);
  margin-top: 40px;
  padding: 16px 0;
}

.highlights h2 {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}

.highlights ul {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.highlights li a {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  font-size: 14px;
  line-height: 24px;
  text-decoration: none;
}

.highlights .name {
  flex-shrink: 0;
  color: var(--name);
  transition: color 0.15s ease;
}

.highlights .leader {
  display: none;
}

.highlights .desc {
  min-width: 0;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.highlights li a:hover .name {
  color: var(--hover-heading);
}

.highlights li a:hover .desc {
  color: var(--hover-name);
}

.highlights .arrow {
  display: inline-block;
  margin-left: 4px;
}

@media (min-width: 640px) {
  .highlights li a {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .highlights .leader {
    display: block;
    flex: 1;
    min-width: 24px;
    border-bottom: 1px dotted var(--line);
  }

  .highlights .desc {
    max-width: 58%;
    text-align: right;
  }
}

/* Small screens */
@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 32px, 655px);
    padding-top: 84px;
    padding-bottom: 44px;
  }

  .profile {
    margin-bottom: 36px;
  }

  .highlights {
    margin-top: 36px;
  }
}
