:root {
  --bg: #D5D5D5;
  --surface: #D5D5D5;
  --border: #D5D5D5;
  --text: #202634;
  --muted: #5d687d;
  --accent: #2269d5;
  --accent-soft: rgba(34, 105, 213, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Cascadia Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

main.container {
  max-width: 1080px;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.mono-label {
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 2rem;
  background: var(--surface);
  border-radius: 0.75rem;
  overflow: hidden;
}

.hero-contacts-inline {
  margin: 0;
  font-size: 0.92rem;
}

.hero-whoami-label {
  margin: 0;
  padding: 0.9rem 1.2rem 0;
}

.hero-main {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: stretch;
}

.hero-cat-wrap {
  background: var(--surface);
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding: 0 1rem 0.6rem;
}

.hero-cat {
  width: 92%;
  max-width: 92%;
  max-height: 290px;
  height: auto;
  object-fit: contain;
}

.hero-content {
  background: transparent;
  padding: 1.2rem;
}

.contacts-section {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 0.9rem 1.2rem;
  margin-bottom: 2rem;
}

.contacts-section .mono-label {
  margin: 0 0 0.3rem;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag-chip {
  border: 1px solid #aeb6c3;
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.3rem 0.7rem;
  font-size: 0.84rem;
  cursor: pointer;
}

.tag-chip:hover {
  background: var(--surface);
  color: #0f1f3b;
}

.tag-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #0f1f3b;
}

.projects-section {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.2rem;
}

.skills-section {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.2rem;
  margin-bottom: 2rem;
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.projects-filter-state {
  color: var(--muted);
  margin: 0.4rem 0 0.8rem;
}

.project-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.project-row {
  background: var(--surface);
  border: 0;
  border-left: 4px solid #9aa5b5;
  border-radius: 0;
  padding: 0.9rem;
}

.project-row:hover {
  background: var(--surface);
  border-left-color: var(--accent);
}

.project-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.35rem;
  cursor: pointer;
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.project-title {
  margin: 0;
  font-size: 1rem;
}

.project-year {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-expand-hint {
  color: var(--muted);
  font-size: 0.9rem;
  transition: transform 0.2s ease;
  transform-origin: center;
}

.project-row.expanded .project-expand-hint {
  transform: rotate(90deg);
}

.project-summary {
  margin: 0 0 0.55rem;
  color: #3d4760;
  font-size: 0.9rem;
  cursor: pointer;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  cursor: pointer;
}

.project-tag {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid #b2bac6;
  background: var(--surface);
  border-radius: 0;
  padding: 0.1rem 0.48rem;
}

.project-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  font-size: 0.875rem;
  line-height: 1.45;
}

.project-row.expanded .project-details {
  max-height: 2000px;
  margin-top: 0.8rem;
}

.project-role {
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.project-body {
  white-space: pre-line;
  margin-top: 0.5rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .desktop-only {
    display: none;
  }

  .hero-main {
    grid-template-columns: 1fr;
  }

  .hero-cat-wrap {
    display: none;
  }

  .hero-cat {
    width: 78%;
    max-width: 78%;
    max-height: 100%;
  }
}
