:root {
  --page-bg: #f6efee;
  --surface: rgba(255, 250, 249, 0.84);
  --surface-strong: #fffaf8;
  --text: #251c22;
  --muted: #6a5a63;
  --accent: #d11224;
  --accent-soft: #f6d8db;
  --accent-line: rgba(209, 18, 36, 0.24);
  --accent-line-strong: rgba(209, 18, 36, 0.4);
  --border: rgba(37, 28, 34, 0.1);
  --shadow: 0 20px 60px rgba(45, 24, 30, 0.12);
  --radius-lg: 28px;
  --radius-md: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(237, 28, 36, 0.28), transparent 30%),
    radial-gradient(circle at top right, rgba(209, 18, 36, 0.16), transparent 26%),
    linear-gradient(180deg, #fcf5f4 0%, #f8eceb 52%, var(--page-bg) 100%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.hero {
  text-align: center;
  padding: 32px 24px 8px;
}

.hero__photo {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 250, 249, 0.95);
  outline: 3px solid var(--accent-line-strong);
  outline-offset: 7px;
  box-shadow: var(--shadow);
}

.hero__name {
  margin: 20px 0 12px;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero__description {
  width: min(780px, 100%);
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--muted);
}

.hero__links {
  display: flex;
  flex-direction: row; /* Forces horizontal alignment */
  flex-wrap: nowrap;   /* Prevents them from stacking */
  justify-content: center;
  gap: 16px;           /* Adjust this to change spacing between icons */
  margin-top: 22px;
}

.hero__link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;         /* Much smaller fixed width */
  height: 38px;        /* Much smaller fixed height */
  border: 1px solid var(--border);
  border-radius: 50%;  /* Turns the button into a perfect circle */
  background: rgba(255, 253, 248, 0.82);
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(23, 28, 38, 0.08);
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.hero__link-pill:hover,
.hero__link-pill:focus-visible {
  transform: translateY(-2px);
  background: var(--surface-strong);
  border-color: var(--accent-line-strong);
}

.hero__link-icon {
  display: inline-flex;
  width: 16px;         /* Shrunk down from 18px */
  height: 16px;
  color: var(--accent);
}

.hero__link-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.projects {
  margin-top: 42px;
  display: grid;
  gap: 24px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 32px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(209, 18, 36, 0.28), rgba(255, 255, 255, 0.06));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.project-card__media {
  min-height: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(209, 18, 36, 0.14), rgba(247, 225, 227, 0.2)),
    var(--surface-strong);
  border: 2px solid var(--accent-line);
}

.project-card__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 300px;
  padding: 10px;
}

.project-card__media-item {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid var(--accent-line);
  box-shadow: 0 10px 24px rgba(23, 28, 38, 0.1);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.project-card__media-item:hover,
.project-card__media-item:focus-visible {
  transform: scale(1.02);
  box-shadow: 0 16px 30px rgba(45, 24, 30, 0.16);
}

.project-card__media-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-card__title {
  margin: 4px 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.project-card__description {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.project-card__link:hover,
.project-card__link:focus-visible {
  background: #efc9ce;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1080px);
    padding-top: 24px;
  }

  .hero {
    padding-left: 8px;
    padding-right: 8px;
  }

  .hero__links {
    gap: 8px;
  }

  .hero__link-pill {
    padding: 8px 12px;
    font-size: 0.92rem;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .project-card__media {
    min-height: 240px;
  }

  .project-card__gallery {
    min-height: 240px;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    padding: 8px;
  }
}
