#main-content {
  min-height: 100dvh;
  padding-top: calc(var(--site-header-height, 4.25rem) + clamp(1rem, 2vw, 1.75rem));
  padding-bottom: var(--site-footer-safe-space, clamp(2.5rem, 6vw, 5rem));
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.08), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.055), transparent 30rem),
    linear-gradient(180deg, #090b10 0%, #0d1017 48%, #08090d 100%);
  color: #f7f4ef;
  color-scheme: dark;
  overflow-x: clip;
  --lp-surface: rgba(255, 255, 255, 0.045);
  --lp-surface-strong: rgba(255, 255, 255, 0.075);
  --lp-line: rgba(255, 255, 255, 0.13);
  --lp-line-strong: rgba(255, 255, 255, 0.22);
  --lp-text-muted: rgba(247, 244, 239, 0.72);
  --lp-text-soft: rgba(247, 244, 239, 0.86);
  --lp-chip: rgba(255, 255, 255, 0.075);
  --lp-shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.32);
  --lp-radius: 1.35rem;
}

.content-wrapper {
  width: min(100%, 82rem);
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 2rem);
}

#intro {
  min-height: min(43rem, calc(100dvh - var(--site-header-height, 4.25rem) - 2rem));
  display: grid;
  align-items: center;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.025);
  box-shadow: var(--lp-shadow);
  overflow: hidden;
  isolation: isolate;
}

.intro-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.75fr);
  align-items: center;
  gap: clamp(1.4rem, 4vw, 4.25rem);
  padding: clamp(1.35rem, 4vw, 4.5rem);
}

.intro-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.intro-copy h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.65rem, 4.35vw, 4.9rem);
  line-height: 1;
  letter-spacing: -0.055em;
  font-weight: 300;
  white-space: nowrap;
  text-wrap: nowrap;
}

.subtitle {
  max-width: 40rem;
  margin: 0;
  color: var(--lp-text-soft);
  font-size: clamp(1.02rem, 1.75vw, 1.45rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.proof-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  max-width: 52rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.48rem 0.72rem;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  background: var(--lp-chip);
  color: var(--lp-text-soft);
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  line-height: 1;
  white-space: nowrap;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.1rem;
}

.cta-row .single-button,
.projects-actions .single-button {
  min-width: min(100%, 9.5rem);
  min-height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.profile-photo {
  width: clamp(16rem, 27vw, 25rem);
  aspect-ratio: 5 / 6;
  justify-self: end;
  object-fit: cover;
  object-position: 50% 34%;
  border: 1px solid var(--lp-line-strong);
  border-radius: calc(var(--lp-radius) * 0.9);
  box-shadow: 0 1.2rem 3.5rem rgba(0, 0, 0, 0.36);
}

.section {
  padding-block: clamp(1.25rem, 4vw, 3.2rem);
}

#competencies {
  padding-top: clamp(1rem, 3vw, 2.25rem);
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.2rem);
}

.card {
  min-height: 100%;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid var(--lp-line);
  border-radius: calc(var(--lp-radius) * 0.75);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    var(--lp-surface);
  box-shadow: 0 0.9rem 2.2rem rgba(0, 0, 0, 0.2);
}

.card h2,
.card h3 {
  margin: 0 0 0.5rem;
  color: #fffaf2;
  font-size: clamp(1.05rem, 1.45vw, 1.25rem);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.card p {
  margin: 0;
  color: var(--lp-text-muted);
  font-size: clamp(0.92rem, 1.05vw, 1rem);
  line-height: 1.55;
}

#skills {
  padding-block: clamp(0.6rem, 2.5vw, 2.1rem);
}

#skills-title {
  margin: 0 0 1rem;
  color: #fffaf2;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}

#skills .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#skills .tags li {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0.42rem 0.68rem;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  background: var(--lp-chip);
  color: var(--lp-text-soft);
  font-size: clamp(0.84rem, 1vw, 0.94rem);
  line-height: 1;
  white-space: nowrap;
}

#projects {
  display: grid;
  gap: clamp(1rem, 2vw, 1.35rem);
  padding-top: clamp(1.1rem, 3vw, 2.3rem);
}

.projects-grid {
  display: grid;
  gap: clamp(0.8rem, 1.6vw, 1.15rem);
  align-items: stretch;
}

.projects-grid.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-card {
  min-width: 0;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.85rem;
  padding: 0.8rem;
  border: 1px solid var(--lp-line);
  border-radius: calc(var(--lp-radius) * 0.75);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--lp-surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-0.18rem);
  border-color: var(--lp-line-strong);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025)),
    var(--lp-surface-strong);
}

.project-card:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.7);
  outline-offset: 0.22rem;
}

.project-card .media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--lp-line);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
}

.project-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card .info {
  min-width: 0;
}

.project-card .info h3 {
  margin: 0 0 0.4rem;
  color: #fffaf2;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.012em;
}

.project-card .desc {
  margin: 0;
  color: var(--lp-text-muted);
  font-size: clamp(0.88rem, 1vw, 0.95rem);
  line-height: 1.45;
}

.project-card .stack {
  width: fit-content;
  max-width: 100%;
  padding: 0.36rem 0.55rem;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  background: var(--lp-chip);
  color: var(--lp-text-soft);
  font-size: clamp(0.76rem, 0.9vw, 0.86rem);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projects-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  margin-top: clamp(0.85rem, 2vw, 1.4rem);
}

#contact-cta {
  min-height: 32vh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius);
  background: var(--lp-surface);
  text-align: center;
  box-shadow: var(--lp-shadow);
}

#contact-cta p {
  margin: 0.25rem 0 0.9rem;
  color: var(--lp-text-muted);
}

.plain-link {
  margin-left: 0.5rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 1200px) {
  .projects-grid.four-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .intro-shell {
    grid-template-columns: minmax(0, 1.2fr) minmax(15rem, 0.75fr);
  }

  .intro-copy h1 {
    font-size: clamp(1.5rem, 4vw, 4.1rem);
  }
}

@media (max-width: 960px) {
  #main-content {
    padding-top: calc(var(--site-header-height, 4.25rem) + 0.8rem);
  }

  #intro {
    min-height: auto;
  }

  .intro-shell {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .intro-copy {
    justify-items: center;
  }

  .intro-copy h1 {
    max-width: none;
    font-size: clamp(1.35rem, 5.7vw, 3rem);
    white-space: nowrap;
    text-wrap: nowrap;
  }

  .subtitle {
    max-width: 38rem;
  }

  .proof-bar {
    justify-content: center;
  }

  .profile-photo {
    order: -1;
    justify-self: center;
    width: min(52vw, 16rem);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
  }

  .cards-3 {
    grid-template-columns: 1fr;
  }

  .projects-grid.four-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .content-wrapper {
    padding: clamp(0.8rem, 4vw, 1.15rem);
  }

  .intro-shell {
    gap: 1rem;
    padding: clamp(1rem, 4.8vw, 1.35rem);
  }

  .intro-copy {
    gap: 0.9rem;
  }

  .intro-copy h1 {
    font-size: clamp(1.02rem, 5.1vw, 1.8rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    white-space: nowrap;
    text-wrap: nowrap;
  }

  .subtitle {
    font-size: clamp(0.96rem, 4vw, 1.08rem);
    line-height: 1.45;
  }

  .badge {
    max-width: 100%;
    white-space: normal;
    line-height: 1.25;
  }

  .cta-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-row .single-button {
    min-width: 0;
    width: 100%;
  }

  .profile-photo {
    width: min(56vw, 12rem);
  }

  .section {
    padding-block: clamp(0.9rem, 5vw, 1.55rem);
  }

  .card {
    padding: 1rem;
  }

  .projects-grid.four-col {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: 0.75rem;
  }

  .projects-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .projects-actions .single-button {
    width: 100%;
  }

  #skills .tags li {
    font-size: 0.88rem;
  }
}

@media (max-width: 380px) {
  .intro-copy h1 {
    font-size: clamp(0.88rem, 4.85vw, 1.15rem);
    letter-spacing: -0.025em;
  }
}

@media (orientation: landscape) {
  .intro-shell {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, clamp(13rem, 24vw, 24rem));
    align-items: center;
  }

  .intro-copy {
    min-width: 0;
  }

  .intro-copy h1 {
    max-width: 100%;
    font-size: clamp(1.35rem, 3.6vw, 4.6rem);
    line-height: 1.02;
    white-space: nowrap;
    text-wrap: nowrap;
    overflow-wrap: normal;
  }

  .profile-photo {
    width: min(100%, clamp(12rem, 24vw, 24rem));
    max-height: min(64vh, 32rem);
    justify-self: end;
    object-fit: cover;
  }
}

@media (orientation: landscape) and (max-width: 1180px) {
  .intro-shell {
    grid-template-columns: minmax(0, 1fr) minmax(10.5rem, 20vw);
    gap: clamp(1rem, 2.4vw, 2rem);
  }

  .intro-copy h1 {
    font-size: clamp(1.1rem, 3.1vw, 2.8rem);
    letter-spacing: -0.04em;
  }

  .subtitle {
    font-size: clamp(0.92rem, 1.35vw, 1.12rem);
  }

  .profile-photo {
    width: min(100%, clamp(10.5rem, 20vw, 15rem));
    max-height: 58vh;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  #main-content {
    padding-top: calc(var(--site-header-height, 4.25rem) + 0.65rem);
  }

  #intro {
    min-height: auto;
  }

  .intro-shell {
    grid-template-columns: minmax(0, 1fr) minmax(9rem, 18vw);
    gap: clamp(0.8rem, 2vw, 1.3rem);
    padding: clamp(0.85rem, 2.2vw, 1.15rem);
  }

  .intro-copy {
    gap: 0.65rem;
  }

  .intro-copy h1 {
    font-size: clamp(1rem, 2.8vw, 2.25rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
  }

  .subtitle {
    font-size: clamp(0.82rem, 1.2vw, 0.98rem);
    line-height: 1.35;
  }

  .proof-bar {
    gap: 0.4rem;
  }

  .badge {
    min-height: 1.85rem;
    padding: 0.34rem 0.55rem;
    font-size: clamp(0.7rem, 0.95vw, 0.8rem);
  }

  .cta-row .single-button {
    min-height: 2.35rem;
    font-size: clamp(0.78rem, 1vw, 0.9rem);
  }

  .profile-photo {
    width: min(100%, clamp(9rem, 18vw, 12.5rem));
    max-height: 52vh;
    aspect-ratio: 1 / 1;
    border-radius: 1rem;
  }

  .section {
    padding-block: 1rem;
  }
}

@media (orientation: landscape) and (max-width: 900px) {
  .intro-shell {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .intro-copy {
    justify-items: center;
  }

  .intro-copy h1 {
    font-size: clamp(1.05rem, 4vw, 2rem);
    white-space: nowrap;
  }

  .profile-photo {
    order: -1;
    width: min(28vw, 9.5rem);
    max-height: 34vh;
    justify-self: center;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
  }
}

@media (orientation: landscape) and (min-width: 1300px) {
  .content-wrapper {
    width: min(94vw, 90rem);
  }

  .profile-photo {
    width: clamp(20rem, 27vw, 28rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card:hover,
  .project-card:focus-visible {
    transition: none;
    transform: none;
  }
}