:root {
  --bg: #fafafa;
  --fg: #111111;
  --muted: #6b6b6b;
  --border: #e2e2e2;
  --tile-bg: #e8e8e8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(17, 17, 17, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 17, 17, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--fg);
}

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

.home {
  display: flex;
  align-items: flex-start;
  gap: 64px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 40px 120px;
}

.intro {
  position: relative;
  flex: 0 0 auto;
  width: min(36vw, 480px);
}

.intro::before {
  content: "";
  position: absolute;
  inset: -32px;
  background: var(--bg);
  mask-image:
    linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent),
    linear-gradient(to bottom, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent),
    linear-gradient(to bottom, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  -webkit-mask-composite: source-in;
  z-index: -1;
  pointer-events: none;
}

h1 {
  font-size: clamp(60px, 14vw, 140px);
  line-height: 0.88;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tagline {
  margin-top: 20px;
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Info blocks */

.info-block {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.info-block h4 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 20px;
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-content a {
  font-size: 16px;
  width: fit-content;
}

.info-content a:hover {
  color: var(--muted);
}

.skills-panel {
  flex-direction: row;
  gap: 48px;
}

.skills-group h5 {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 600;
}

.skills-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skills-group li {
  font-size: 15px;
}

/* Projects */

.projects {
  flex: 1;
  display: flex;
  gap: 24px;
}

.tile-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tile-col-offset {
  margin-top: 72px;
}

.tile {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--tile-bg);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.tile:hover {
  transform: translateY(-10px);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.18);
}

.tile::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tile:hover::after {
  opacity: 1;
}

.tile-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tile:hover .tile-label {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .home {
    flex-direction: column;
    gap: 48px;
    padding: 60px 24px 80px;
  }

  .intro {
    width: 100%;
  }

  .skills-panel {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 500px) {
  .projects {
    gap: 12px;
  }

  .tile-col {
    gap: 12px;
  }

  .tile-col-offset {
    margin-top: 0;
  }
}
