/* ============================================================
   RSE Theme - Oxford Blue
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --oxford-blue:    #002147;
  --oxford-mid:     #003f7f;
  --oxford-light:   #1a5276;
  --accent:         #c8a951;   /* Oxford gold */
  --accent-hover:   #b8943d;
  --text-primary:   #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted:     #718096;
  --surface:        #f8f9fc;
  --surface-2:      #eef0f5;
  --white:          #ffffff;
  --border:         #dde1ec;
  --nav-height:     72px;

  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --shadow-sm:  0 1px 3px rgba(0,33,71,.08), 0 1px 2px rgba(0,33,71,.04);
  --shadow-md:  0 4px 16px rgba(0,33,71,.12), 0 2px 6px rgba(0,33,71,.06);
  --shadow-lg:  0 16px 48px rgba(0,33,71,.16), 0 4px 12px rgba(0,33,71,.08);
  --radius:     6px;
  --radius-lg:  12px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Utilities ─────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  color: var(--oxford-blue);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--oxford-blue);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--oxford-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--oxford-blue);
  border: 1.5px solid var(--oxford-blue);
}
.btn-outline:hover {
  background: var(--oxford-blue);
  color: var(--white);
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.7);
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--oxford-blue);
  height: var(--nav-height);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--oxford-blue);
  letter-spacing: -0.02em;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo-text strong {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-logo-text span {
  font-size: 0.72rem;
  opacity: 0.65;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  color: rgba(255,255,255,0.78);
  font-size: 0.85rem;
  font-weight: 400;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

.nav-links a.active {
  font-weight: 500;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Hero Carousel ─────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--oxford-blue);
  height: 560px;
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: transform;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.38) saturate(0.7);
  transition: transform 8s ease-out;
}

.hero-slide.active .hero-slide-bg {
  transform: scale(1.05);
}

/* gradient overlay */
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0,33,71,0.92) 0%,
    rgba(0,33,71,0.65) 50%,
    rgba(0,33,71,0.2) 100%
  );
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-slide-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-slide-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.5s ease 0.1s;
}

.hero-slide.active .hero-slide-tag {
  opacity: 1;
  transform: translateY(0);
}

.hero-slide-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.55s ease 0.2s;
}

.hero-slide.active .hero-slide-title {
  opacity: 1;
  transform: translateY(0);
}

.hero-slide-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 520px;
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.55s ease 0.32s;
}

.hero-slide.active .hero-slide-desc {
  opacity: 1;
  transform: translateY(0);
}

.hero-slide-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.5s ease 0.42s;
}

.hero-slide.active .hero-slide-actions {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Controls */
.hero-controls {
  position: absolute;
  bottom: 2rem;
  left: calc((100vw - 1200px) / 2 + 2rem);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  padding: 0;
}

.hero-dot.active {
  background: var(--accent);
  width: 28px;
  border-radius: 4px;
}

.hero-arrows {
  display: flex;
  gap: 0.5rem;
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 1.1rem;
  backdrop-filter: blur(4px);
}

.hero-arrow:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.6);
}

/* Hero Progress bar */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0%;
  z-index: 10;
  transition: width 0.1s linear;
}

/* ── Quick Links (below hero) ──────────────────────────────── */
.quick-links {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.quick-links-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.quick-link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.4rem 1.75rem;
  border-right: 1px solid var(--border);
  color: var(--text-primary);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.quick-link-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--oxford-blue);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.quick-link-item:hover::before { transform: scaleX(1); }

.quick-link-item:last-child { border-right: none; }

.quick-link-item:hover {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.quick-link-icon {
  width: 40px;
  height: 40px;
  background: var(--oxford-blue);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all var(--transition);
}

.quick-link-item:hover .quick-link-icon {
  background: var(--oxford-mid);
  color: var(--white);
  transform: scale(1.05);
}

.quick-link-text strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--oxford-blue);
  margin-bottom: 0.1rem;
}

.quick-link-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════
   HOME — PUBLICATIONS PREVIEW
══════════════════════════════════════════════════ */
.pub-preview-section {
  padding: 5rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.pub-preview-footer {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* ── Projects Section ──────────────────────────────────────── */
.projects-section {
  padding: 5rem 0;
  background: var(--white);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.section-header-left {}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Featured card spans 2 cols */
.project-card:first-child {
  grid-column: span 2;
}

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  group: true;
}

.project-card:first-child {
  aspect-ratio: 16/8;
}

.project-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.5) saturate(0.6);
}

.project-card:hover .project-card-bg {
  transform: scale(1.04);
  filter: brightness(0.45) saturate(0.7);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,33,71,0.92) 0%,
    rgba(0,33,71,0.5) 50%,
    rgba(0,33,71,0.1) 100%
  );
  transition: opacity var(--transition);
}

.project-card-content {
  position: absolute;
  inset: 0;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 2;
}

.project-card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 0.6rem;
  transition: transform var(--transition);
}

.project-card:first-child .project-card-title {
  font-size: 1.75rem;
}

.project-card-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  opacity: 0;
}

.project-card:hover .project-card-desc {
  max-height: 80px;
  opacity: 1;
}

.project-card-arrow {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: all var(--transition);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.25);
}

.project-card:hover .project-card-arrow {
  opacity: 1;
  transform: translateY(0);
}

/* ── Stats Bar ─────────────────────────────────────────────── */
.stats-bar {
  background: var(--oxford-blue);
  padding: 3.5rem 0;
  position: relative;
  overflow: hidden;
}

.stats-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(200,169,81,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 50%, rgba(0,63,127,0.4) 0%, transparent 60%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-number em {
  font-style: normal;
  color: var(--accent);
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
}

/* ── News Section ──────────────────────────────────────────── */
.news-section {
  padding: 5rem 0;
  background: var(--surface);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--oxford-mid);
}

.news-card-image {
  height: 180px;
  background: var(--surface-2);
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.04);
}

.news-card-image-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--oxford-blue), var(--oxford-mid));
  font-family: var(--font-mono);
  font-size: 2rem;
  color: rgba(255,255,255,0.2);
}

.news-card-body {
  padding: 1.5rem;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.news-card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oxford-mid);
  background: var(--surface-2);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-weight: 500;
}

.news-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.news-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--oxford-blue);
  line-height: 1.35;
  margin-bottom: 0.6rem;
  transition: color var(--transition);
}

.news-card:hover .news-card-title { color: var(--oxford-mid); }

.news-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: #001430;
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
  border-top: 3px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition);
  color: rgba(255,255,255,0.6);
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--oxford-blue);
}

.footer-motto {
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* ── Single / List Pages ───────────────────────────────────── */
.page-hero {
  background: var(--oxford-blue);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(0,63,127,0.6) 0%, transparent 60%);
}

.page-hero-content { position: relative; }

.page-hero-breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.page-hero-breadcrumb a { color: var(--accent); }

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.page-hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  line-height: 1.7;
}

.page-content {
  padding: 4rem 0;
}

.page-content .container {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
}

.page-hero-wit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  letter-spacing: 0.04em;
}

.page-hero-wit::before {
  content: '//';
  color: rgba(255,255,255,0.2);
}

.page-hero-wit--terminal {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  margin-top: 1.25rem;
}

.pwt-prompt {
  color: rgba(255,255,255,0.25);
  margin-right: 0.6rem;
  user-select: none;
}

.pwt-cmd { color: rgba(255,255,255,0.55); }

.pwt-arg {
  color: rgba(122,179,197,0.7);
  margin-left: 0.4rem;
}

.page-hero-wit--terminal::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 0.85em;
  background: rgba(255,255,255,0.4);
  margin-left: 4px;
  vertical-align: -1px;
  border-radius: 1px;
  animation: blink-cursor 1.1s step-start infinite;
}

.prose {
  max-width: 720px;
}

.prose h1, .prose h2, .prose h3 {
  font-family: var(--font-display);
  color: var(--oxford-blue);
  font-weight: 400;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.prose h2 { font-size: 1.65rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.prose h3 { font-size: 1.25rem; }

.prose p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.prose a { color: var(--oxford-mid); text-decoration: underline; text-underline-offset: 3px; }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--oxford-blue);
}

.prose pre {
  background: var(--oxford-blue);
  color: rgba(255,255,255,0.9);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.sidebar {}

.sidebar-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.sidebar-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oxford-blue);
  margin-bottom: 1rem;
}

/* ── List Page ─────────────────────────────────────────────── */
.list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.list-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-card:hover {
  border-color: var(--oxford-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.list-card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oxford-mid);
}

.list-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--oxford-blue);
  line-height: 1.3;
}

.list-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.list-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card:first-child { grid-column: span 2; }
  .quick-links-inner { grid-template-columns: repeat(2, 1fr); }
  .quick-link-item:nth-child(2) { border-right: none; }
  .quick-link-item:nth-child(3) { border-right: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-content .container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--oxford-blue);
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-logo-text span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
  }

  .hero { height: 580px; }
  .hero-slide-content { padding: 0 1.5rem 5.5rem;  }
  .hero-controls { left: 1.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card:first-child { grid-column: span 1; }
  .news-grid { grid-template-columns: 1fr; }
  .quick-links-inner { grid-template-columns: 1fr 1fr; }

  .quick-link-item {
    padding: 1rem 1rem;
    gap: 0.5rem;
  }

  .quick-link-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  .quick-link-icon svg {
    width: 15px;
    height: 15px;
  }

  .quick-link-text strong {
    font-size: 0.82rem;
  }

  .quick-link-text span {
    font-size: 0.72rem;
  }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .list-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ══════════════════════════════════════════════════
   ACCENT → WHITE (Oxford style)
══════════════════════════════════════════════════ */
:root {
  --accent:       #ffffff;
  --accent-hover: #e8eaf0;
}

/* Labels on white background use oxford-mid instead */
.section-label       { color: var(--oxford-mid); }
.news-card-tag       { color: var(--oxford-mid); background: var(--surface-2); }
.list-card-tag       { color: var(--oxford-mid); }

/* Hero tag — subtle white */
.hero-slide-tag      { color: rgba(255,255,255,0.65); }
.project-card-tag    { color: rgba(255,255,255,0.65); }

/* Nav bottom border → white */
.nav                 { border-bottom-color: rgba(255,255,255,0.2); }

/* Hero dot active → white */
.hero-dot.active     { background: #ffffff; }

/* Footer top border → oxford-mid */
.footer              { border-top-color: var(--oxford-mid); }


/* ══════════════════════════════════════════════════
   ABOUT SECTION
══════════════════════════════════════════════════ */
.about-section {
  padding: 5.5rem 0;
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-desc a {
  color: var(--oxford-mid);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.pillar {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.pillar-icon {
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--oxford-blue);
  flex-shrink: 0;
}

.pillar strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--oxford-blue);
  margin-bottom: 0.1rem;
}

.pillar span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* About visual — two light cards side by side */
.about-visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.about-card:hover { box-shadow: var(--shadow-md); }

.about-card-1 { border-left: 3px solid var(--oxford-blue); }
.about-card-2 { border-left: 3px solid var(--oxford-mid); }

.about-card-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--oxford-mid);
  margin-bottom: 0.875rem;
  font-weight: 500;
}

.about-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-card-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.about-card-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--oxford-mid);
  font-size: 1.1rem;
  line-height: 1.3;
}

/* ══════════════════════════════════════════════════
   FEATURED RESOURCE
══════════════════════════════════════════════════ */
.resource-section {
  padding: 3.75rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.resource-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
}

.resource-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--oxford-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.resource-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  font-weight: 400;
  color: var(--oxford-blue);
  line-height: 1.2;
  margin-bottom: 0.55rem;
}

.resource-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 720px;
}

.resource-action {
  white-space: nowrap;
}


/* ══════════════════════════════════════════════════
   TEAM SECTION
══════════════════════════════════════════════════ */
.team-section {
  padding: 5rem 0;
  background: var(--surface);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  transition: all var(--transition);
}

.team-card:hover {
  border-color: var(--oxford-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.team-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
}

.team-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: var(--oxford-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: rgba(255,255,255,0.8);
}

.team-card-info strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--oxford-blue);
  margin-bottom: 0.2rem;
}

.team-card-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}


/* ══════════════════════════════════════════════════
   CTA BANNER
══════════════════════════════════════════════════ */
.cta-banner {
  padding: 5rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.cta-banner-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 400;
  color: var(--oxford-blue);
  margin-bottom: 0.6rem;
}

.cta-banner-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

.cta-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════════════
   RESPONSIVE additions
══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .resource-strip { grid-template-columns: auto minmax(0, 1fr); }
  .resource-action { grid-column: 2; justify-self: start; }
}

@media (max-width: 768px) {
  .cta-banner-inner { flex-direction: column; align-items: flex-start; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .resource-section { padding: 3rem 0; }
  .resource-strip {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 1rem;
  }
  .resource-icon {
    width: 48px;
    height: 48px;
  }
  .resource-action {
    grid-column: auto;
    width: 100%;
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════════
   WORK WITH US PAGE
══════════════════════════════════════════════════ */

/* ── How We Engage ───────────────────────── */
.wwu-engage {
  padding: 5rem 0;
  background: var(--white);
}

.wwu-engage-header {
  max-width: 640px;
  margin-bottom: 3rem;
}

.wwu-engage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.wwu-engage-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition);
  position: relative;
  background: var(--white);
}

.wwu-engage-card:hover {
  border-color: var(--oxford-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.wwu-engage-card--featured {
  background: var(--oxford-blue);
  border-color: var(--oxford-blue);
}

.wwu-engage-card--featured h3 {
  color: #ffffff;
}

.wwu-engage-card--featured p {
  color: rgba(255,255,255,0.88);
}

.wwu-engage-card--featured p {
  color: rgba(255,255,255,0.7);
}

.wwu-engage-card--featured:hover {
  background: var(--oxford-mid);
  border-color: var(--oxford-mid);
}

.wwu-engage-card-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.wwu-engage-card--featured .wwu-engage-card-num {
  color: rgba(255,255,255,0.4);
}

.wwu-engage-card-icon {
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--oxford-blue);
}

.wwu-engage-card--featured .wwu-engage-card-icon {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
}

.wwu-engage-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--oxford-blue);
  line-height: 1.3;
}

.wwu-engage-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.wwu-engage-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--oxford-mid);
  margin-top: auto;
  transition: gap var(--transition);
}

.wwu-engage-link:hover { gap: 0.65rem; }

.wwu-engage-card--featured .wwu-engage-link {
  color: rgba(255,255,255,0.8);
}

.wwu-engage-card--featured .wwu-engage-link:hover {
  color: white;
}

/* ── What We Build (Services) ────────────── */
.wwu-services {
  padding: 5rem 0;
  background: var(--surface);
}

.wwu-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}

.wwu-service-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.75rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.wwu-service-item:hover { background: var(--surface); }

/* Remove right border on last column */
.wwu-service-item:nth-child(3n) { border-right: none; }
/* Remove bottom border on last row */
.wwu-service-item:nth-last-child(-n+3) { border-bottom: none; }

.wwu-service-icon {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--oxford-blue);
  flex-shrink: 0;
  transition: all var(--transition);
}

.wwu-service-item:hover .wwu-service-icon {
  background: var(--oxford-blue);
  color: var(--white);
  border-color: var(--oxford-blue);
}

.wwu-service-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--oxford-blue);
  margin-bottom: 0.35rem;
}

.wwu-service-item p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ── Process Steps ───────────────────────── */
.wwu-process {
  padding: 5rem 0;
  background: var(--white);
}

.wwu-process-steps {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
}

.wwu-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0 1.75rem;
  position: relative;
}

/* Vertical connector line */
.wwu-step-line {
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.wwu-step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--oxford-blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.wwu-step-body {
  padding-bottom: 2.5rem;
}

.wwu-step:last-child .wwu-step-body {
  padding-bottom: 0;
}

.wwu-step h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--oxford-blue);
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  line-height: 1.3;
}

.wwu-step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
  .wwu-engage-grid { grid-template-columns: 1fr; }
  .wwu-engage-card--featured { order: -1; }
  .wwu-services-grid { grid-template-columns: repeat(2, 1fr); }
  .wwu-service-item:nth-child(3n) { border-right: 1px solid var(--border); }
  .wwu-service-item:nth-child(2n) { border-right: none; }
  .wwu-service-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .wwu-service-item:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 768px) {
  .wwu-services-grid { grid-template-columns: 1fr; }
  .wwu-service-item { border-right: none !important; }
  .wwu-service-item:last-child { border-bottom: none; }
}

/* ══════════════════════════════════════════════════
   PEOPLE / OUR TEAM PAGE
══════════════════════════════════════════════════ */

/* ── Featured Lead ───────────────────────── */
.people-lead {
  padding: 5rem 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.people-lead-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: center;
}

.people-lead-avatar {
  width: 280px;
  height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.people-lead-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.people-lead-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: var(--oxford-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
}

.people-lead-name {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  color: var(--oxford-blue);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.people-lead-role {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--oxford-mid);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.people-lead-bio {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
  margin-bottom: 1.75rem;
}

.people-lead-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.people-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  transition: all var(--transition);
}

.people-social-link:hover {
  background: var(--oxford-blue);
  color: var(--white);
  border-color: var(--oxford-blue);
}

/* ── Team Grid ───────────────────────────── */
.people-grid-section {
  padding: 5rem 0;
  background: var(--surface);
}

.people-grid-header {
  margin-bottom: 2.5rem;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.people-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.people-card:hover {
  border-color: var(--oxford-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.people-card-avatar {
  height: 260px;
  overflow: hidden;
  background: var(--surface-2);
}

.people-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.55s ease;
}

.people-card:hover .people-card-avatar img {
  transform: scale(1.03);
}

.people-card-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--oxford-blue) 0%, var(--oxford-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
}

.people-card-body {
  padding: 1.5rem;
}

.people-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--oxford-blue);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.people-card-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oxford-mid);
  margin-bottom: 0.875rem;
}

.people-card-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

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

.people-card-icon-link {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}

.people-card-icon-link:hover {
  background: var(--oxford-blue);
  color: var(--white);
  border-color: var(--oxford-blue);
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
  .people-lead-inner { grid-template-columns: 220px 1fr; gap: 2.5rem; }
  .people-lead-avatar { width: 220px; height: 220px; }
  .people-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .people-lead-inner { grid-template-columns: 1fr; gap: 2rem; }
  .people-lead-avatar { width: 160px; height: 160px; }
  .people-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════════════════ */

.contact-section {
  padding: 5rem 0 6rem;
  background: linear-gradient(180deg, var(--white) 0%, var(--surface) 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 5rem;
  align-items: start;
}

/* ── Direct email side ───────────────────────────── */
.contact-direct-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  font-weight: 400;
  color: var(--oxford-blue);
  margin-bottom: 0.7rem;
  line-height: 1.25;
}

.contact-direct-desc {
  max-width: 620px;
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-email-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-email-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.contact-email-card:hover {
  border-color: var(--oxford-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.contact-email-card:focus-visible {
  outline: 3px solid rgba(0, 63, 127, 0.18);
  outline-offset: 2px;
}

.contact-email-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
  background: rgba(200, 169, 81, 0.16);
  border-radius: var(--radius);
}

.contact-email-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.contact-email-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-email-address {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--oxford-blue);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.contact-email-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.contact-email-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 84px;
  padding: 0.55rem 0.8rem;
  color: var(--white);
  background: var(--oxford-blue);
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.contact-email-action svg { flex-shrink: 0; }

.contact-privacy-note {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  background: rgba(200, 169, 81, 0.12);
  border: 1px solid rgba(200, 169, 81, 0.35);
  border-radius: var(--radius);
}

.contact-privacy-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--oxford-blue);
  background: var(--white);
  border-radius: var(--radius);
}

.contact-privacy-note p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ── Info side ───────────────────────────── */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition);
}

.contact-info-card:hover { border-color: var(--oxford-mid); }

.contact-info-icon {
  width: 40px;
  height: 40px;
  background: var(--oxford-blue);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}

.contact-info-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.contact-info-value {
  font-size: 0.875rem;
  color: var(--oxford-blue);
  font-weight: 500;
  line-height: 1.6;
  transition: color var(--transition);
}

a.contact-info-value:hover {
  color: var(--oxford-mid);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  border-left: 3px solid var(--oxford-mid);
}

.contact-note svg { color: var(--oxford-mid); flex-shrink: 0; margin-top: 1px; }

.contact-note p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.pre-submit-wit {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-top: -0.75rem;
  margin-bottom: 1.25rem;
}

.pre-submit-wit::before {
  content: '// ';
  color: var(--border);
}

.pre-submit-wit::after {
  content: '|';
  animation: blink-cursor 1.1s step-start infinite;
  margin-left: 2px;
}

/* ══════════════════════════════════════════════════
   PATENTS PAGE
══════════════════════════════════════════════════ */

.patents-section {
  padding: 4rem 0 6rem;
  background: var(--surface);
}

.patents-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ── Patent Card ─────────────────────────── */
.patent-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.patent-card:hover { box-shadow: var(--shadow-md); }

.patent-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.patent-card-icon {
  width: 42px;
  height: 42px;
  background: var(--oxford-blue);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}

.patent-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.patent-number {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

.patent-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 99px;
}

.patent-status--granted  { background: #e6f4ea; color: #1e7e34; }
.patent-status--pending  { background: #fff3cd; color: #856404; }
.patent-status--filed    { background: var(--surface-2); color: var(--text-secondary); }

/* ── Card Body ───────────────────────────── */
.patent-card-body {
  padding: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.patent-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--oxford-blue);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.patent-card-inventors,
.patent-card-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.patent-card-inventors svg,
.patent-card-date svg { flex-shrink: 0; color: var(--oxford-mid); }

.patent-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-top: 1rem;
  max-width: 760px;
}

.patent-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.patent-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oxford-mid);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
}

/* ── Card Actions ────────────────────────── */
.patent-card-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
}

.patent-btn {
  font-size: 0.82rem;
  padding: 0.55rem 1.1rem;
  gap: 0.4rem;
}

/* ── PDF Preview ─────────────────────────── */
.patent-pdf-preview { background: var(--surface); }

.patent-pdf-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.patent-pdf-preview-bar span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.patent-pdf-preview-bar a {
  font-size: 0.78rem;
  color: var(--oxford-mid);
  transition: color var(--transition);
}

.patent-pdf-preview-bar a:hover {
  color: var(--oxford-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.patent-pdf-iframe {
  display: block;
  width: 100%;
  height: 600px;
  border: none;
  background: #525659;
}

/* ══════════════════════════════════════════════════
   PORTFOLIO PAGE — Publications + Software Tools
   Append this block to assets/css/main.css
══════════════════════════════════════════════════ */

/* ── Section wrapper ─────────────────────── */
.portfolio-section {
  padding: 3rem 0 6rem;
  background: var(--surface);
  min-height: 60vh;
}

/* ── Tab bar ─────────────────────────────── */
.portfolio-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2.5rem;
}

.portfolio-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;   /* sit on top of section border */
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.portfolio-tab:hover {
  color: var(--oxford-blue);
  background: var(--white);
}

.portfolio-tab.active {
  color: var(--oxford-blue);
  border-bottom-color: var(--oxford-blue);
  background: var(--white);
  font-weight: 600;
}

.portfolio-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.4rem;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  border-radius: 99px;
  transition: background var(--transition), color var(--transition);
}

.portfolio-tab.active .portfolio-tab-count {
  background: var(--oxford-blue);
  color: var(--white);
}

/* ── Panel ───────────────────────────────── */
.portfolio-panel { display: none; }
.portfolio-panel.active { display: block; }

.panel-wit {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
}

.panel-wit--hero {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  background: #111827;
  color: #94a3b8;
  padding: 0.7rem 1.4rem 0.7rem 0;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255,255,255,0.08);
}

.panel-wit--hero::before {
  content: '27';
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 3rem;
  padding: 0 1.1rem;
  color: rgba(255,255,255,0.18);
  border-right: 1px solid rgba(255,255,255,0.08);
  margin-right: 1.1rem;
  font-size: 0.78rem;
  user-select: none;
  flex-shrink: 0;
}

.panel-wit--hero::after {
  content: '';
  display: inline-block;
  width: 9px;
  height: 1.1em;
  background: #94a3b8;
  margin-left: 4px;
  vertical-align: -2px;
  border-radius: 1px;
  animation: blink-cursor 1.1s step-start infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Empty state ─────────────────────────── */
.portfolio-empty {
  padding: 4rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}


/* ════════════════════════════════════════════
   PUBLICATIONS
════════════════════════════════════════════ */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pub-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--oxford-blue);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
  overflow: hidden;
}

.pub-card:hover {
  box-shadow: var(--shadow-md);
}

.pub-card-inner {
  padding: 1.75rem 2rem;
}

/* ── Header row ── */
.pub-card-header { margin-bottom: 0; }

.pub-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

/* Type badge */
.pub-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
}

.pub-badge--article       { background: #dbeafe; color: #1e40af; }
.pub-badge--preprint      { background: #fef3c7; color: #92400e; }
.pub-badge--conference    { background: #d1fae5; color: #065f46; }
.pub-badge--book-chapter  { background: #ede9fe; color: #5b21b6; }
.pub-badge--report        { background: var(--surface-2); color: var(--text-secondary); }

.pub-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pub-journal {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-secondary);
}

/* Title */
.pub-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--oxford-blue);
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

/* Authors */
.pub-authors {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.pub-author-highlight {
  font-weight: 700;
  color: #002855;
}

/* ── Abstract (hidden by default, toggled by JS) ── */
.pub-abstract-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  opacity: 0;
  margin-top: 0;
}

.pub-abstract-wrap.open {
  max-height: 600px;
  opacity: 1;
  margin-top: 1rem;
}

.pub-abstract {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--oxford-mid);
}

/* ── Tags ── */
.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.pub-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oxford-mid);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.18rem 0.6rem;
  border-radius: 99px;
}

/* ── Actions row ── */
.pub-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.pub-action-btn {
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  gap: 0.35rem;
}

/* Abstract toggle button */
.pub-abstract-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: auto;   /* push to the right */
}

.pub-abstract-toggle:hover {
  color: var(--oxford-blue);
  border-color: var(--oxford-blue);
  background: var(--surface);
}

.toggle-chevron {
  transition: transform 0.25s ease;
}


/* ════════════════════════════════════════════
   SOFTWARE TOOLS
════════════════════════════════════════════ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch; 
  gap: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.tool-card:hover {
  border-color: var(--oxford-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.tool-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.tool-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.tool-action-btn {
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  gap: 0.35rem;
}

/* Icon box */
.tool-card-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  align-self: flex-start;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--oxford-blue);
  overflow: hidden;
  transition: all var(--transition);
}

.tool-card:hover .tool-card-icon {
  background: var(--oxford-blue);
  color: var(--white);
  border-color: var(--oxford-blue);
}

.tool-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Meta row */
.tool-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tool-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
}

.tool-badge--live        { background: #d1fae5; color: #065f46; }
.tool-badge--beta        { background: #fef3c7; color: #92400e; }
.tool-badge--guide       { background: #dbeafe; color: #1e3a8a; }
.tool-badge--development { background: var(--surface-2); color: var(--text-muted); }
.tool-badge--archived    { background: #fee2e2; color: #991b1b; }

.tool-platform {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.tool-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--oxford-blue);
  line-height: 1.3;
  margin-bottom: 0.45rem;
}

.tool-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.tool-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

/* External link arrow */
.tool-card-arrow {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(-3px);
  transition: all var(--transition);
}

.tool-card:hover .tool-card-arrow {
  opacity: 1;
  transform: translateY(0);
  background: var(--oxford-blue);
  color: var(--white);
  border-color: var(--oxford-blue);
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .portfolio-tab { padding: 0.65rem 0.9rem; font-size: 0.82rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .pub-card-inner { padding: 1.25rem; }
  .pub-card-actions { gap: 0.5rem; }
  .pub-abstract-toggle { margin-left: 0; width: 100%; justify-content: center; }
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 768px) {
  .patent-pdf-iframe { height: 400px; }
  .patent-card-actions { flex-wrap: wrap; }
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .contact-info { position: static; }
}

@media (max-width: 640px) {
  .contact-section { padding: 3.5rem 0 4.5rem; }
  .contact-email-card {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    padding: 1rem;
  }
  .contact-email-icon {
    width: 44px;
    height: 44px;
  }
  .contact-email-action {
    grid-column: 2;
    justify-self: start;
    margin-top: 0.25rem;
  }
  .contact-privacy-note { grid-template-columns: 1fr; }
}
