:root {
  --portfolio-bg: #121110;
  --portfolio-text: #d7d2cb;
  --portfolio-muted: #8a857f;
  --portfolio-link: #d3cec8;
  --portfolio-link-hover: #f0ebe4;

  --anthropic-bg: #f3f1ea;
  --anthropic-text: #1e2023;
  --anthropic-muted: #666971;
  --anthropic-link: #1e2023;
  --anthropic-card-a: #d7ab88;
  --anthropic-card-b: #e9e1c3;
  --anthropic-card-c: #f2f2ef;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Inter", "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  background-color: var(--portfolio-bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  background-attachment: fixed;
  color: var(--portfolio-text);
  line-height: 1.62;
  transition: background 250ms ease, color 250ms ease;
  font-size: 17px;
  letter-spacing: -0.004em;
}

body.anthropic-mode {
  background-color: var(--anthropic-bg);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  color: var(--anthropic-text);
}

a {
  color: var(--portfolio-link);
  text-underline-offset: 0.13em;
  text-decoration-thickness: 1px;
  transition: color 150ms ease, opacity 150ms ease;
}

a:hover {
  color: var(--portfolio-link-hover);
}

body.anthropic-mode a {
  color: var(--anthropic-link);
}

.page {
  width: min(100%, 560px);
  margin-left: auto;
  margin-right: auto;
  padding: clamp(2rem, 5vw, 4.4rem) 0 3.5rem;
}

.section {
  margin-top: 2.9rem;
}

h2 {
  margin: 0 0 0.78rem;
  font-size: 1.02rem;
  font-weight: 540;
  letter-spacing: -0.003em;
}

.section-heading-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
}

.post-item__meta {
  font-size: 0.76rem;
  margin-bottom: 0.2rem;
  color: var(--portfolio-muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.88em;
}

.site-name {
  font-size: 0.95rem;
  margin: 0 0 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
}

.intro p {
  margin: 0 0 0.8rem;
}

.identity-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.6rem;
}

.avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.31rem;
  background: linear-gradient(160deg, #9f6ee2, #6f51e4);
  color: #f7f2ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  text-transform: lowercase;
  font-size: 0.67rem;
}

.identity-line {
  margin: 0;
  line-height: 1.3;
  font-size: 0.95rem;
}

.tagline {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino,
    serif;
  font-size: 2.05rem;
  font-style: italic;
  line-height: 1.25;
  color: #d6d0ca;
}

.muted {
  color: var(--portfolio-muted);
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li {
  margin: 0.1rem 0;
}

.muted-links a {
  color: var(--portfolio-muted);
}

.post-list {
  display: grid;
  gap: 0.92rem;
}

.post-list--technical .post-item {
  border-left: 1px solid #2d2926;
  padding-left: 0.74rem;
}

.post-item h3 {
  margin: 0.04rem 0 0.15rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.post-item h3 a {
  text-decoration-thickness: 1px;
}

.post-item p {
  margin: 0 0 0.3rem;
  font-size: 0.92rem;
}

.post-item a {
  font-size: 0.9rem;
}

.personal-blog .muted {
  margin-bottom: 1.15rem;
}

.personal-cards {
  display: grid;
  gap: 1.2rem;
}

.endcap {
  margin-top: 3rem;
  padding-bottom: 1rem;
}

.lock-button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--portfolio-link);
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lock-button:hover {
  color: var(--portfolio-link-hover);
  border-color: rgba(255, 255, 255, 0.34);
}

.secret-toggle {
  margin-top: 2.4rem;
  width: 1rem;
  height: 1rem;
  border: 0;
  background: transparent;
  color: #514c48;
  cursor: pointer;
  opacity: 0.2;
  transition: opacity 150ms ease;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1;
}

.secret-toggle:hover,
.secret-toggle:focus-visible {
  opacity: 0.55;
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.64);
}

.modal__panel {
  position: relative;
  width: min(92vw, 560px);
  background: #1a1817;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.7rem;
  padding: 1rem;
}

.modal__panel h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.field {
  display: block;
  margin-top: 0.8rem;
}

.field span {
  display: inline-block;
  font-size: 0.85rem;
  margin-bottom: 0.32rem;
  color: var(--portfolio-muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.21);
  background: #131212;
  color: var(--portfolio-text);
  border-radius: 0.45rem;
  padding: 0.56rem 0.66rem;
  font-size: 0.92rem;
  font-family: inherit;
}

.field textarea {
  resize: vertical;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.56rem;
  margin-top: 0.88rem;
}

.modal__btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0.42rem 0.82rem;
  font-size: 0.82rem;
  cursor: pointer;
  background: transparent;
  color: var(--portfolio-text);
}

.modal__btn--primary {
  border-color: transparent;
  background: #d8d2ca;
  color: #111;
}

body.anthropic-mode .muted,
body.anthropic-mode .post-item__meta {
  color: var(--anthropic-muted);
}

body.anthropic-mode .tagline {
  font-family: "IBM Plex Sans", "Inter", "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-style: normal;
  color: var(--anthropic-text);
}

body.anthropic-mode .post-list--technical .post-item {
  border-left-color: rgba(0, 0, 0, 0.22);
}

.post-item--personal .post-item__brand {
  margin: 0 0 0.55rem;
  margin-left: auto;
  font-size: 1.06rem;
  font-weight: 770;
  letter-spacing: 0.06em;
  line-height: 1;
}

.post-item--personal .post-item__meta {
  margin-top: auto;
}

body.anthropic-mode .post-item--personal {
  display: flex;
  flex-direction: column;
  min-height: 11.6rem;
  padding: 1.15rem 1.28rem;
  color: var(--anthropic-text);
  border: 1px solid rgba(0, 0, 0, 0.09);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.anthropic-mode .post-item--personal:nth-child(3n + 1) {
  background: var(--anthropic-card-a);
}

body.anthropic-mode .post-item--personal:nth-child(3n + 2) {
  background: var(--anthropic-card-b);
}

body.anthropic-mode .post-item--personal:nth-child(3n + 3) {
  background: var(--anthropic-card-c);
}

body.anthropic-mode .post-item--personal p,
body.anthropic-mode .post-item--personal a,
body.anthropic-mode .post-item--personal h3 {
  color: var(--anthropic-text);
}

body.anthropic-mode .secret-toggle {
  opacity: 0.66;
}

body.anthropic-mode .lock-button {
  border-color: rgba(0, 0, 0, 0.2);
  color: var(--anthropic-text);
}

body.anthropic-mode .modal__panel {
  background: #f3eee4;
  border-color: rgba(0, 0, 0, 0.15);
}

body.anthropic-mode .field span {
  color: var(--anthropic-muted);
}

body.anthropic-mode .field input,
body.anthropic-mode .field textarea {
  background: #fffef9;
  border-color: rgba(0, 0, 0, 0.2);
  color: var(--anthropic-text);
}

body.anthropic-mode .modal__btn {
  border-color: rgba(0, 0, 0, 0.24);
  color: var(--anthropic-text);
}

body.anthropic-mode .modal__btn--primary {
  background: #1f2023;
  color: #f6f2ea;
}

.flip-hint {
  color: var(--portfolio-muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .page {
    margin-left: 1rem;
    margin-right: 1rem;
    width: auto;
  }

  .tagline {
    font-size: 1.6rem;
  }

  body {
    font-size: 16px;
  }
}
