:root {
  --gold: #c9a84c;
  --gold-light: #e2c97e;
  --white: #f0ece4;
  --dark: #0a0a0a;
  --dark2: #111111;
  --gray: #555;
  --gray-light: #888;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

#loader {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }

.loader-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--white);
  text-transform: uppercase;
}

.loader-bar-wrap {
  width: 260px;
  height: 1px;
  background: #222;
  position: relative;
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  width: 0%;
  animation: barFill 2.4s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes barFill { to { width: 100%; } }

.loader-text {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: var(--gray-light);
  text-transform: uppercase;
}

.loader-dots span {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  margin: 0 3px;
  animation: dotPulse 1.2s infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%,100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95), transparent);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  color: var(--white);
  text-decoration: none;
}

.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-light);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--white); }

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 8vw 80px;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(201,168,76,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.chapter-label {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 20px;
}

.hero-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--white);
}
.hero-heading em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  margin-top: 32px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gray-light);
  text-transform: uppercase;
  max-width: 340px;
}

.tl-deco {
  position: absolute;
  right: 7vw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  opacity: 0.85;
}
.tl-pole {
  width: 2px;
  height: 80px;
  background: #333;
}
.tl-box {
  width: 52px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
}
.tl-light {
  width: 28px; height: 28px;
  border-radius: 50%;
  position: relative;
}
.tl-light.red   { background: #c0392b; box-shadow: 0 0 14px 4px rgba(192,57,43,0.5); animation: pulse-red 1.8s infinite; }
.tl-light.yellow{ background: #1a1a1a; border: 1px solid #333; }
.tl-light.green { background: #1a1a1a; border: 1px solid #333; }
@keyframes pulse-red {
  0%,100% { box-shadow: 0 0 14px 4px rgba(192,57,43,0.5); }
  50%      { box-shadow: 0 0 24px 8px rgba(192,57,43,0.8); }
}

section { padding: 80px 8vw; }

.section-label {
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 20px 0 40px;
}

#supervisor {
  border-top: 1px solid #1e1e1e;
}

.supervisor-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--white);
}
.supervisor-name span { color: var(--gold); font-style: italic; }

.supervisor-desc {
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--gray-light);
  letter-spacing: 0.1em;
  line-height: 1.9;
  max-width: 560px;
}

#members { border-top: 1px solid #1e1e1e; }

.members-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--white);
  margin-bottom: 8px;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  border: 1px solid #1e1e1e;
  margin-top: 44px;
}

.member-card {
  background: var(--dark2);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
}
.member-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.member-card:hover { background: #161616; }
.member-card:hover::before { opacity: 1; }

.member-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 300;
  color: #1e1e1e;
  position: absolute;
  top: 12px; right: 20px;
  line-height: 1;
  user-select: none;
}

.member-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 6px;
}
.member-name em { color: var(--gold); font-style: italic; }

.member-role {
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 28px;
}

.member-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid rgba(201,168,76,0.35);
  padding: 10px 20px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  font-family: 'Montserrat', sans-serif;
}
.member-btn:hover {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}
.member-btn svg { width: 10px; height: 10px; transition: transform 0.3s; }
.member-btn:hover svg { transform: translateX(3px); }

footer {
  border-top: 1px solid #1e1e1e;
  padding: 40px 8vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: var(--gray-light);
}
.footer-brand a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-brand a:hover { color: var(--gold-light); }

.footer-note {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray);
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

@media(max-width:640px){
  nav { padding: 18px 24px; }
  section { padding: 60px 6vw; }
  .tl-deco { display: none; }
  footer { flex-direction: column; align-items: flex-start; }
}
