/* Glassmorphism Redesign */
:root {
  /* Core Colors */
  --bg-gradient: linear-gradient(135deg, #fefaf7 0%, #fdfbf9 100%);
  /* Fallback */
  --glass-surface: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --glass-blur: blur(12px);

  --ink: #1d1d1f;
  --muted: #6e6e73;
  --brand: #bc6442;
  --brand-hover: #a35233;
  --line: rgba(0, 0, 0, 0.08);

  --radius: 20px;
  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-gradient: linear-gradient(135deg, #0f1113 0%, #1a1d21 100%);
    --glass-surface: rgba(20, 23, 26, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    --ink: #f5f5f7;
    --muted: #86868b;
    --brand: #e3a187;
    --brand-hover: #f0bba5;
    --line: rgba(255, 255, 255, 0.1);
  }
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  /* Parallax-like effect */
  color: var(--ink);
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Add a subtle mesh/blob background via pseudo-element */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(188, 100, 66, 0.08), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(66, 135, 245, 0.05), transparent 40%);
  z-index: -1;
  pointer-events: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

p {
  margin-bottom: 1.5rem;
}

.muted {
  color: var(--muted);
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-hover);
}

/* Layout Utilities */
.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Glassy Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.3);
  /* More transparent */
  border-bottom-color: transparent;
  padding: 0.75rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.site-header.scrolled:hover {
  background: var(--glass-surface);
  /* Restore on hover */
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-links a {
  padding: 0.6rem 1rem;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(188, 100, 66, 0.1);
  /* Brand tint */
  color: var(--brand);
}

.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: inline-flex;
    background: transparent;
    border: 1px solid var(--line);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--ink);
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    /* High opacity for readability */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

/* Hero Section */
.hero {
  text-align: center;
  padding-block: clamp(4rem, 8vw, 6rem);
}

.hero-image-wrapper {
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Glassy Cards */
.card,
.contact-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.card:hover,
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12);
}

/* Media Card (Blog Preview) */
.media-card {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .media-card {
    grid-template-columns: 300px 1fr;
  }
}

.media-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.badges {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.badge {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--line);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Contact Page Specifics */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  height: 100%;
}

.icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(188, 100, 66, 0.1);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.cta-button {
  display: inline-block;
  margin-top: auto;
  padding: 0.8rem 1.5rem;
  background: var(--brand);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  transition: opacity 0.2s;
}

.cta-button:hover {
  opacity: 0.9;
  color: white;
}

.cta-button.linkedin-button {
  background: #0077b5;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--glass-border);
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
}

/* Images */
/* Card Images (for grids) */
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

/* Yale Badge */
.yale-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  background: #00356b;
  color: white;
  border-radius: 100px;
  font-weight: 600;
}

/* Image Blending */
.blend-mode {
  mix-blend-mode: multiply;
  filter: contrast(1.05) brightness(1.02);
}

/* Timeline Styles */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 3rem auto;
  padding-left: 2rem;
  border-left: 2px solid var(--line);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.6rem;
  top: 0.25rem;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--brand);
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.timeline-org {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.timeline-desc {
  color: var(--muted);
  font-size: 0.95rem;
}