:root {
  --bg: #f4f2ee;
  --text: #1b1916;
  --muted: #6b6560;
  --line: #ddd8d0;
  --card: #fffdf9;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #cde9e4;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.writeup {
  margin-top: 0.35rem;
  color: var(--muted);
}

.story {
  margin-top: 0.85rem;
}

.story-label {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.story-label:first-child {
  margin-top: 0;
}

ul {
  margin: 0.55rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

li + li {
  margin-top: 0.3rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: 0.45rem 0.7rem;
  background: var(--text);
  color: #fff;
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.page {
  width: min(46rem, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: 4.5rem 0 3.5rem;
}

.intro {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1.8rem;
  align-items: center;
  padding-bottom: 2.8rem;
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.avatar {
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: 38% 58%;
  background: #ddd;
}

.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin-top: 0.25rem;
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.about {
  margin-top: 0.7rem;
  color: var(--muted);
  max-width: 36rem;
}

.icons {
  display: flex;
  gap: 1.15rem;
  margin-top: 1.15rem;
}

.icons a {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  overflow: visible;
  color: #8a847c;
  transition: color 0.15s ease;
}

.icon-mail:hover,
.icon-mail:focus-visible {
  color: #c2410c;
}

.icon-github:hover,
.icon-github:focus-visible {
  color: #171717;
}

.icon-linkedin:hover,
.icon-linkedin:focus-visible {
  color: #0a66c2;
}

.icon-cv:hover,
.icon-cv:focus-visible {
  color: #0f766e;
}

.icons svg {
  width: 1.3rem;
  height: 1.3rem;
  overflow: visible;
  display: block;
}

.tip {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 50%;
  z-index: 2;
  padding: 0.28rem 0.5rem;
  border-radius: 0.4rem;
  background: var(--text);
  color: #fffdf9;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -0.25rem);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.icons a:hover .tip,
.icons a:focus-visible .tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.block {
  margin-top: 2.4rem;
}

.block[open] .label {
  margin-bottom: 1rem;
}

.label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  user-select: none;
}

.label::-webkit-details-marker {
  display: none;
}

.label::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.2rem;
  transition: transform 0.15s ease;
}

.block[open] .label::after {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
}

.item + .item {
  border-top: 1px solid var(--line);
}

.logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.7rem;
  object-fit: cover;
}

.logo-contain {
  background: var(--card);
  padding: 0.28rem;
  border: 1px solid var(--line);
}

.logo-letter {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.7rem;
  background: #1f2937;
  color: #fff;
  font-size: 1rem;
  font-weight: 650;
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.item-head h3 {
  font-size: 1.05rem;
  font-weight: 650;
}

.item-head h3 a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.item-head h3 a:hover {
  color: #0f766e;
}

.item-head p,
.when {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: #9a948c;
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .intro {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 1.2rem;
  }

  .item-head {
    flex-direction: column;
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .icons a,
  .tip,
  .label::after {
    transition: none;
  }
}
