/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
:root {
  --white:       #ffffff;
  --off-white:   #f7f5f4;
  --gray-100:    #f0eeec;
  --gray-200:    #e4e1de;
  --gray-300:    #c8c4bf;
  --gray-400:    #a09b95;
  --gray-600:    #6b6560;
  --gray-800:    #2e2b28;
  --pink:        #e8d5d0;
  --pink-mid:    #d4b5ae;
  --pink-dark:   #b8918a;
  --purple:      #c9c0d3;
  --purple-mid:  #b0a3be;
  --purple-dark: #8e7fa0;
  --overlay:     rgba(46, 43, 40, 0.82);

  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'Outfit', sans-serif;

  --radius-pill:  999px;
  --shadow-soft:  0 2px 18px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 36px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07);
  --transition:   0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--off-white);
  color: var(--gray-800);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(201,192,211,0.55) 0%, rgba(232,213,208,0.45) 50%, rgba(240,238,236,0.3) 100%),
    url('https://images.unsplash.com/photo-1461696114087-397271a7aedc?w=1920&q=85') center center / cover no-repeat;
}

.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(247,245,244,0.10) 0%,
    rgba(247,245,244,0.55) 100%
  );
  pointer-events: none;
}

.header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  text-align: center;
  padding: 3rem 2rem;
}

/* Avatar */
.avatar-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.7);
  box-shadow: 0 4px 24px rgba(140,100,120,0.15), 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow var(--transition);
  position: relative;
  z-index: 2;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  transition: border-color var(--transition), transform var(--transition);
  z-index: 1;
}

.avatar-wrap:hover .avatar-ring {
  border-color: var(--purple-mid);
  transform: scale(1.06);
}

.avatar-wrap:hover .avatar-circle {
  box-shadow: 0 6px 32px rgba(140,100,120,0.22), 0 2px 8px rgba(0,0,0,0.10);
}

/* Header text */
.header-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  letter-spacing: 0.12em;
  color: var(--gray-800);
  text-transform: lowercase;
  line-height: 1;
}

.header-sub {
  font-family: var(--font-body);
  font-weight: 200;
  font-size: clamp(0.82rem, 2.2vw, 1rem);
  letter-spacing: 0.04em;
  color: var(--gray-600);
  max-width: 420px;
  line-height: 1.7;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* ============================================
   YEAR NAV
   ============================================ */
.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-bottom: 3.5rem;
}

.year-btn {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 0.45rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
  box-shadow: var(--shadow-soft);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.year-btn:hover {
  background: var(--gray-100);
  color: var(--gray-800);
  border-color: var(--gray-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.year-btn.active {
  background: var(--purple-dark);
  color: var(--white);
  border-color: var(--purple-dark);
  box-shadow: 0 4px 18px rgba(142,127,160,0.28);
}

/* ============================================
   GALLERY
   ============================================ */
.gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.2rem;
  justify-content: center;
}

/* Each item is a circle */
.gallery-item {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(200,196,191,0.45);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity 0.4s ease;
  opacity: 1;
}

.gallery-item.hidden {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity var(--transition);
}

/* Hover overlay */
.gallery-item .item-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  background: transparent;
}

.gallery-item:hover .item-overlay {
  opacity: 1;
  background: var(--overlay);
}

.gallery-item .item-overlay span {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  transform: translateY(4px);
  transition: transform var(--transition);
}

.gallery-item:hover .item-overlay span {
  transform: translateY(0);
}

.gallery-item:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-hover);
}

/* Size classes assigned randomly in JS */
.size-xs  { width: 110px;  height: 110px; }
.size-sm  { width: 145px;  height: 145px; }
.size-md  { width: 185px;  height: 185px; }
.size-lg  { width: 230px;  height: 230px; }
.size-xl  { width: 280px;  height: 280px; }

@media (max-width: 600px) {
  .size-xs  { width: 80px;   height: 80px; }
  .size-sm  { width: 105px;  height: 105px; }
  .size-md  { width: 135px;  height: 135px; }
  .size-lg  { width: 165px;  height: 165px; }
  .size-xl  { width: 200px;  height: 200px; }
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  max-width: 90vw;
  max-height: 90svh;
  transform: scale(0.94);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.open .lightbox-inner {
  transform: scale(1);
}

.lightbox-inner img {
  max-width: min(820px, 88vw);
  max-height: 65svh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.08);
}

.lightbox-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.45rem);
  font-weight: 300;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.05em;
  font-style: italic;
  text-align: center;
}

.lightbox-close {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: rgba(255,255,255,0.5);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-pill);
  padding: 0.42rem 1.4rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  outline: none;
}

.lightbox-close:hover {
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-mid); }
