:root {
  color-scheme: dark;
  --bg: #070807;
  --surface: #101210;
  --surface-raised: #151815;
  --text: #f3f0e7;
  --muted: #9ea39a;
  --line: #242923;
  --gold: #e9bd6d;
  --copper: #d88b65;
  --rose: #d99a83;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

main,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

main {
  padding: 48px 0;
}

/* .intro {
  max-width: 860px;
  margin-bottom: 48px;
} */
 .intro {
  display: flex;         /* Aligns image and intro-text side-by-side */
  align-items: flex-start; /* Aligns the image to the top of the text */
  gap: 20px;             /* Adds space between the image and the text */
  padding-top: 30px;
  padding-bottom: 30px;
}

.profile-pic {
  border-radius: 50%;    /* Optional: Makes your round icon perfectly circular */
  flex-shrink: 0;        /* Prevents the image from squeezing/shrinking */
}

.intro-text {
  display: flex;
  flex-direction: column; /* Stacks the H1 and Paragraph into 2 rows */
}

/* Cleaning up default margins so they align nicely */
#page-title {
  margin-top: 0;
  margin-bottom: 10px;   /* Space between title and paragraph */
}

.intro-text p {
  margin: 0;
  line-height: 1.6;      /* Makes your Chinese text easier to read */
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
  font-size: clamp(2.45rem, 6.5vw, 4.9rem);
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: 0;
}

h1 span {
  color: var(--gold);
}

h1 strong {
  color: var(--copper);
  font-weight: inherit;
}

.intro p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.75;
}

.album-section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h2 {
  margin-bottom: 0;
  color: var(--rose);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.album-link {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--gold);
  background: var(--surface);
  text-decoration: none;
  font-weight: 700;
}

.album-link:hover,
.album-link:focus-visible {
  background: rgba(233, 189, 109, 0.12);
  outline: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.photo-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  aspect-ratio: 1;
}

.photo-card button {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0d0f0d;
  transition: filter 180ms ease, transform 180ms ease;
}

.photo-card button:hover img,
.photo-card button:focus-visible img {
  filter: brightness(1.1);
  transform: scale(1.025);
}

.photo-card button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.status-message {
  margin: 22px 0 0;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: grid;
  gap: 6px;
  padding: 26px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.lightbox {
  width: min(1120px, calc(100% - 28px));
  max-height: 92vh;
  border: 0;
  padding: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.9);
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  background: #050505;
  box-shadow: var(--shadow);
}

.close-button,
.nav-button {
  position: fixed;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  color: white;
  background: rgba(10, 10, 10, 0.76);
  cursor: pointer;
  font-weight: 750;
}

.close-button {
  top: 18px;
  right: 20px;
}

.nav-button {
  top: 50%;
  transform: translateY(-50%);
}

.prev-button {
  left: 20px;
}

.next-button {
  right: 20px;
}

@media (max-width: 900px) {
  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .album-link {
    text-align: center;
  }

  main {
    padding-top: 38px;
  }

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

  .nav-button {
    top: auto;
    bottom: 24px;
    transform: none;
  }
}
