:root {
  color-scheme: light;
  --bg: #f5f1ea;
  --bg-soft: #f8f5ef;
  --surface: #f7f3ec;
  --border: #e3ddd3;
  --text: #171513;
  --muted: #78716a;
  --muted-strong: #5e5650;
  --accent: #1c1a18;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --bg-soft: #161616;
  --surface: #181818;
  --border: #2b2b2b;
  --text: #f2eee8;
  --muted: #a19a92;
  --muted-strong: #c9c0b5;
  --accent: #f2eee8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  width: 100%;
  padding: 18px 16px 0;
}

.topbar-inner {
  width: min(100%, 720px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand,
.top-link,
.theme-toggle {
  font-size: 0.88rem;
  color: var(--muted-strong);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-link,
.theme-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle {
  width: 56px;
  min-height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.top-link {
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
}

.theme-track {
  width: 56px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
}

.theme-thumb {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-strong);
  box-shadow: 0 4px 10px rgba(28, 26, 24, 0.08);
  transform: translateX(0);
  transition: transform 0.22s ease, background-color 0.22s ease;
}

body[data-theme="dark"] .theme-thumb {
  transform: translateX(24px);
}

.theme-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.theme-sun {
  display: inline-flex;
}

.theme-moon {
  display: none;
}

body[data-theme="dark"] .theme-sun {
  display: none;
}

body[data-theme="dark"] .theme-moon {
  display: inline-flex;
}

.icon-link {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-strong);
}

.icon-link,
.top-link,
.search-action,
.pill-grid a,
.icon-pill {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease,
    color 0.22s ease;
}

.icon-link:hover,
.top-link:hover,
.theme-toggle:hover,
.search-action:hover,
.pill-grid a:hover,
.icon-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(28, 26, 24, 0.06), 0 8px 20px rgba(28, 26, 24, 0.08);
  border-color: rgba(28, 26, 24, 0.16);
}

body[data-theme="dark"] .icon-link:hover,
body[data-theme="dark"] .top-link:hover,
body[data-theme="dark"] .theme-toggle:hover,
body[data-theme="dark"] .search-action:hover,
body[data-theme="dark"] .pill-grid a:hover,
body[data-theme="dark"] .icon-pill:hover {
  box-shadow: 0 0 0 1px rgba(242, 238, 232, 0.08), 0 8px 20px rgba(242, 238, 232, 0.06);
  border-color: rgba(242, 238, 232, 0.18);
}

.icon-link svg,
.icon-pill svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 24px 16px 72px;
}

.hero {
  padding: 20px 0 28px;
  text-align: center;
}

.terminal-hero {
  max-width: 560px;
  margin: 18px auto 0;
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 30%),
    var(--surface);
  box-shadow: 0 14px 28px rgba(84, 67, 44, 0.05);
}

body[data-theme="dark"] .terminal-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    var(--surface);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.terminal-bar {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.terminal-bar span:nth-child(1) {
  background: #ff5f57;
}

.terminal-bar span:nth-child(2) {
  background: #febc2e;
}

.terminal-bar span:nth-child(3) {
  background: #28c840;
}

body[data-theme="dark"] .terminal-bar span {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.terminal-path {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: left;
}

.terminal-prompt {
  color: var(--muted);
  margin-right: 10px;
}

.eyebrow,
.section-label,
.item-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.dynamic-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 24px rgba(28, 26, 24, 0.04);
  animation: floatLine 4.8s ease-in-out infinite;
}

body[data-theme="dark"] .dynamic-line {
  background: rgba(255, 255, 255, 0.04);
}

.hero h1 {
  margin: 16px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: left;
}

.hero-subtitle {
  margin: 14px 0 0;
  max-width: none;
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.8;
  text-transform: none;
  letter-spacing: 0.01em;
  text-align: left;
}

.intro-block,
.card {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.intro-block {
  padding: 22px;
}

.intro-copy {
  text-align: center;
}

.intro-copy h2,
.card h3 {
  margin: 0;
  font-family: "Roboto Slab", serif;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.intro-copy p,
.body-copy,
.skills-list p,
.search-note {
  margin: 10px 0 0;
  color: var(--muted-strong);
  font-size: 0.96rem;
  line-height: 1.9;
}

.search-card {
  max-width: 100%;
  margin-top: 22px;
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}

.search-prefix,
.search-text {
  color: var(--muted);
  font-size: 0.95rem;
}

.search-text {
  flex: 1;
  text-align: left;
}

.search-action {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--muted);
}

.search-note {
  text-align: left;
}

.card {
  padding: 22px;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill-grid {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill-grid.inline {
  justify-content: flex-start;
}

.pill-grid a,
.button-like {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.icon-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.icon-pill {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-strong);
  flex: 0 0 auto;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(28, 26, 24, 0.04);
}

.icon-pill span {
  font-size: 0.88rem;
  position: relative;
  z-index: 1;
}

.icon-pill svg {
  position: relative;
  z-index: 1;
}

.icon-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.icon-pill:hover::before {
  transform: translateX(100%);
}

.footer-links {
  justify-content: center;
}

.footer-links .icon-pill {
  width: 42px;
  padding: 0;
}

.pill-grid a {
  gap: 8px;
}

.pill-grid svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

.list-block {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.with-logo {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.logo-badge {
  width: 92px;
  height: 92px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

body[data-theme="dark"] .logo-badge img {
  mix-blend-mode: normal;
}

body[data-theme="dark"] .icon-pill {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.list-item {
  text-align: left;
}

.item-content {
  min-width: 0;
}

.list-item.compact {
  margin-top: 16px;
}

.list-item h3 {
  margin-top: 8px;
}

.card {
  position: relative;
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 84px;
  height: 84px;
  background: radial-gradient(circle at top right, rgba(207, 144, 74, 0.1), transparent 72%);
  pointer-events: none;
}

body[data-theme="dark"] .card::after {
  background: radial-gradient(circle at top right, rgba(143, 183, 255, 0.08), transparent 72%);
}

.skills-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.skills-list span {
  color: var(--text);
}

.center-copy {
  text-align: center;
}

@keyframes floatLine {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    flex-direction: column;
  }

  .topbar-actions {
    flex-direction: column;
  }

  .page {
    padding-top: 18px;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 11vw, 3rem);
  }

  .search-shell {
    flex-wrap: wrap;
    height: auto;
    padding: 14px;
  }

  .search-text,
  .search-note,
  .list-item {
    text-align: center;
  }

  .with-logo {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .logo-badge {
    margin: 0 auto;
  }

  .pill-grid.inline {
    justify-content: center;
  }

  .icon-row {
    justify-content: center;
  }

  .icon-pill {
    width: 100%;
    justify-content: center;
  }
}
