:root {
  color-scheme: light;
  --background: #f5f5f0;
  --surface: #ffffff;
  --text: #171713;
  --muted: #696962;
  --line: #d7d7cf;
}

* { box-sizing: border-box; }

html {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text);
}

body { margin: 0; }
a { color: inherit; }

.site-shell {
  width: min(100% - 40px, 820px);
  margin: 0 auto;
  padding: 72px 0 96px;
}

.profile {
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.profile-photo {
  display: grid;
  width: 112px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e7e7e0;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-details { display: grid; gap: 5px; }

.contact-details h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.contact-details a {
  width: fit-content;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.divider {
  height: 1px;
  margin: 40px 0;
  background: var(--line);
}

.introduction p {
  max-width: 680px;
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.projects { margin-top: 72px; }

.section-heading {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.project-tile {
  position: relative;
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease;
}

.project-tile--featured {
  min-height: 230px;
  grid-column: span 2;
}

.project-tile:hover,
.project-tile:focus-visible {
  border-color: var(--text);
  transform: translateY(-2px);
}

.project-number {
  color: var(--muted);
  font-size: 0.75rem;
}

.project-tile h3 {
  margin: auto 0 0;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.project-arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: var(--muted);
  font-size: 1.1rem;
}

.project-page { max-width: 680px; }

.back-link {
  display: inline-block;
  margin-bottom: 64px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.project-page h1 {
  margin: 0 0 24px;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.project-page p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

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

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 28px, 820px);
    padding-top: 40px;
  }

  .profile {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-grid { grid-template-columns: 1fr; }
  .project-tile--featured { grid-column: auto; }
}
