/* ============================================================
   LAYOUT & COMPONENT STYLES
   ============================================================ */

/* ---- THEME TOGGLE ---- */
.theme-toggle {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: 100;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
}

/* ---- HERO SECTION ---- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-20) var(--space-6);
  overflow: hidden;
}

/* Background image with dark overlay */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://abhishekchatterjee.xyz/img/20160304_103143.jpg');
  background-size: cover;
  background-position: center 30%;
  filter: grayscale(100%);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--overlay-start) 0%,
    rgba(0,0,0,0.35) 50%,
    var(--overlay-end) 100%
  );
  z-index: 1;
}

/* All hero content sits above overlay */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  max-width: var(--content-narrow);
  width: 100%;
}

/* ---- AVATAR ---- */
.avatar-wrap {
  position: relative;
  display: inline-block;
}

.avatar {
  width: clamp(80px, 14vw, 120px);
  height: clamp(80px, 14vw, 120px);
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.35);
  filter: grayscale(100%);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.avatar:hover {
  filter: grayscale(0%);
  transform: scale(1.04);
}

/* ---- IDENTITY ---- */
.hero-name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.05;
}

.hero-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}

/* ---- DIVIDER ---- */
.hero-rule {
  width: 32px;
  height: 1px;
  background: rgba(255,255,255,0.35);
  border: none;
}

/* ---- LINKS GRID ---- */
.links-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  max-width: 320px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.85);
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
}

.link-item:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.40);
  color: #ffffff;
  transform: translateY(-1px);
}

.link-item:active {
  transform: translateY(0);
}

.link-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.70;
}

.link-item:hover .link-icon {
  opacity: 1;
}

.link-label {
  flex: 1;
}

/* Special — CTA button for calendar */
.link-item--cta {
  background: rgba(255,255,255,0.92);
  border-color: transparent;
  color: #111111;
  font-weight: 500;
}

.link-item--cta:hover {
  background: #ffffff;
  color: #000000;
  border-color: transparent;
}

.link-item--cta .link-icon {
  opacity: 0.6;
}

/* ---- FOOTER BAR ---- */
.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-6) var(--space-6);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.05em;
}

.site-footer a {
  color: rgba(255,255,255,0.45);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: rgba(255,255,255,0.75);
}

/* ---- FADE-IN ANIMATION ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content > * {
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-content > *:nth-child(3) { animation-delay: 0.22s; }
.hero-content > *:nth-child(4) { animation-delay: 0.28s; }
.hero-content > *:nth-child(5) { animation-delay: 0.35s; }
.hero-content > *:nth-child(6) { animation-delay: 0.42s; }

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
  .hero {
    padding: var(--space-16) var(--space-4) var(--space-10);
    justify-content: center;
  }

  .hero-content {
    gap: var(--space-6);
  }

  .links-grid {
    max-width: 100%;
  }

  .theme-toggle {
    top: var(--space-4);
    right: var(--space-4);
  }
}

@media (min-width: 768px) {
  .links-grid {
    max-width: 360px;
  }
}
