/* Page-specific styles for index.html */

/* Header specific to homepage */
header {
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-bottom: 3rem;
  clip-path: polygon(
    0 0,
    calc(100% - 20px) 0,
    100% 20px,
    100% 100%,
    20px 100%,
    0 calc(100% - 20px)
  );
  position: relative;
  transition: border-color 0.3s;
}

.header-content {
  display: flex;
  flex-direction: column;
}

h1 {
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  white-space: nowrap;
}

h1 .credentials {
  display: inline-block;
  font-weight: 300;
}

.subtitle {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 1rem;
  transition: color 0.3s;
}

.subtitle .affiliation {
  display: block;
}

.contact-links {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.contact-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s, opacity 0.3s, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  outline: none;
}

.contact-links a:hover {
  opacity: 0.7;
  transform: scale(1.15);
}

.contact-links a:focus-visible {
  outline: 2px solid var(--text-color);
  outline-offset: 4px;
}

.contact-links svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.scholar-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-muted);
  flex-wrap: wrap;
  align-items: center;
}

.scholar-stat {
  display: flex;
  flex-direction: column;
}

.scholar-stat-value {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
}

.scholar-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Theme toggle positioning specific to homepage */
.theme-toggle {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  margin-left: auto;
}

/* Navigation Stack - Horizontal */
.nav-stack {
  display: flex;
  flex-direction: row;
  gap: 0;
  position: relative;
}

.nav-card {
  border: 1px solid var(--border-muted);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  position: relative;
  background: var(--bg-color);
  clip-path: polygon(
    0 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
  flex: 1;
  min-height: 180px;
}

.nav-card:nth-child(1) {
  z-index: 3;
}

.nav-card:nth-child(2) {
  margin-left: -1px;
  z-index: 2;
}

.nav-card:nth-child(3) {
  margin-left: -1px;
  z-index: 1;
}

.nav-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, var(--accent-glow), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.nav-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 20px var(--accent-glow), inset 0 0 20px var(--accent-glow);
}

.nav-card:hover::before {
  opacity: 1;
}

.nav-card:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
}

.nav-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-card-title {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.4;
}

.nav-card-arrow {
  font-size: 1.5rem;
  opacity: 0.5;
  transition: all 0.3s ease;
  color: var(--text-color);
  align-self: flex-end;
  margin-top: auto;
}

.nav-card:hover .nav-card-arrow {
  opacity: 1;
  color: var(--accent-color);
  transform: translateX(4px);
}

/* Responsive - Homepage specific */
@media (max-width: 1024px) {
  h1 {
    font-size: clamp(1.3rem, 3vw, 1.75rem);
  }

  .subtitle {
    font-size: 1rem;
  }

  .nav-card-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1.25rem;
  }

  h1 {
    font-size: clamp(1.15rem, 5vw, 1.45rem);
    line-height: 1.2;
    white-space: normal;
  }

  h1 .credentials {
    display: block;
    margin-top: 0.2rem;
  }

  .scholar-stats {
    gap: 1.5rem;
  }

  .scholar-stat-value {
    font-size: 1.3rem;
  }

  .scholar-stat-label {
    font-size: 0.75rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .contact-links a {
    font-size: 0.9rem;
  }

  .theme-toggle {
    position: static;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  .contact-links svg {
    width: 24px;
    height: 24px;
  }

  /* Stack cards vertically on tablet/mobile */
  .nav-stack {
    flex-direction: column;
  }

  .nav-card {
    padding: 1.25rem 1.5rem;
    min-height: auto;
    flex-direction: row;
    align-items: center;
  }

  .nav-card:nth-child(2) {
    margin-left: 0;
    margin-top: -1px;
  }

  .nav-card:nth-child(3) {
    margin-left: 0;
    margin-top: -1px;
  }

  .nav-card-content {
    flex: 1;
  }

  .nav-card-arrow {
    align-self: center;
    margin-top: 0;
  }

  .nav-card-title {
    font-size: 1.1rem;
  }

  .nav-card-subtitle {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: clamp(1rem, 5.5vw, 1.25rem);
  }

  .subtitle {
    font-size: 0.8rem;
  }

  .contact-links {
    gap: 1.25rem;
  }

  .contact-links a {
    font-size: 0.8rem;
  }

  .contact-links svg {
    width: 22px;
    height: 22px;
  }

  .scholar-stats {
    gap: 0.75rem;
  }

  .scholar-stat-value {
    font-size: 1.1rem;
  }

  .scholar-stat-label {
    font-size: 0.7rem;
  }

  .theme-toggle {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .nav-card {
    padding: 1rem 1.25rem;
  }

  .nav-card:nth-child(2) {
    margin-left: 0;
  }

  .nav-card:nth-child(3) {
    margin-left: 0;
  }

  .nav-card-title {
    font-size: 1rem;
  }

  .nav-card-subtitle {
    font-size: 0.75rem;
  }

  .nav-card-arrow {
    font-size: 1.2rem;
  }
}
