/* ============================================
   Blaine Heffron — Portfolio
   Aesthetic: Laboratory Elegance
   A physicist's precision meets editorial design
   ============================================ */

/* Fonts loaded via <link> in HTML head for better LCP */

/* --- Design Tokens --- */
:root {
  /* Dark palette (default) */
  --bg-deep: #04050e;
  --bg-primary: #080a18;
  --bg-elevated: #0e1024;
  --bg-card: #12142c;
  --bg-card-hover: #1a1c3a;
  --border: #1c1e3d;
  --border-subtle: #141630;

  --text-primary: #e6e6f0;
  --text-secondary: #9294ae;
  --text-muted: #5a5c74;

  --accent: #00b4ec;
  --accent-dim: rgba(0, 180, 236, 0.10);
  --accent-glow: rgba(0, 180, 236, 0.22);
  --accent-bright: #40d0ff;
  --accent-text: #00b4ec;

  --gold: #d4a030;
  --gold-dim: rgba(212, 160, 48, 0.10);
  --gold-glow: rgba(212, 160, 48, 0.18);
  --gold-text: #e0b040;

  --success: #34d399;
  --tag-bg: rgba(0, 180, 236, 0.08);
  --tag-text: #60c8e8;
  --tag-border: rgba(0, 180, 236, 0.15);

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* Spacing */
  --section-pad: clamp(72px, 10vh, 128px);
  --container-max: 1140px;
  --container-pad: clamp(20px, 5vw, 48px);

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --nav-height: 64px;
  --theme: dark;
}

/* Light theme */
[data-theme="light"] {
  --bg-deep: #f8f8fc;
  --bg-primary: #ffffff;
  --bg-elevated: #f2f2f8;
  --bg-card: #f5f5fa;
  --bg-card-hover: #eeeef5;
  --border: #d8d8e4;
  --border-subtle: #e4e4ee;

  --text-primary: #14162e;
  --text-secondary: #52546e;
  --text-muted: #8a8ca4;

  --accent: #0070b8;
  --accent-dim: rgba(0, 112, 184, 0.07);
  --accent-glow: rgba(0, 112, 184, 0.14);
  --accent-bright: #0088dd;
  --accent-text: #0068aa;

  --gold: #b88820;
  --gold-dim: rgba(184, 136, 32, 0.07);
  --gold-glow: rgba(184, 136, 32, 0.12);
  --gold-text: #9a7018;

  --tag-bg: rgba(0, 112, 184, 0.06);
  --tag-text: #0068a0;
  --tag-border: rgba(0, 112, 184, 0.15);

  --theme: light;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

a:hover {
  color: var(--accent-bright);
}

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

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* --- Focus Styles --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; }

p {
  color: var(--text-secondary);
  max-width: 68ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* --- Layout --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

section {
  padding: var(--section-pad) 0;
  position: relative;
}

section:nth-child(even) {
  background: var(--bg-primary);
}

section:nth-child(odd) {
  background: var(--bg-deep);
}

/* --- Section Headers --- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.section-title {
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(4, 5, 14, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom-color: var(--border-subtle);
}

[data-theme="light"] .nav.scrolled {
  background: rgba(255, 255, 255, 0.88);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-brand:hover {
  color: var(--accent-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a.active {
  color: var(--accent-text);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  font-size: 1rem;
}

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

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 1px;
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
  padding-top: var(--nav-height);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(0, 180, 236, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(212, 160, 48, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

[data-theme="light"] .hero-gradient {
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(0, 112, 184, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(184, 136, 32, 0.04) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 3;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero h1 {
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.35s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-text);
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.65s forwards;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-bright);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.82rem;
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  margin-bottom: 20px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-sidebar h3 {
  margin-bottom: 20px;
}

.education-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.education-item:last-child {
  border-bottom: none;
}

.education-degree {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.education-school {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.education-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.skill-pill {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--accent-dim);
  color: var(--accent-text);
  border: 1px solid var(--tag-border);
  transition: all 0.2s ease;
}

.skill-pill:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}

/* --- Portfolio Grid --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px var(--accent-dim);
}

.project-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 180, 236, 0.03) 100%);
  border-color: rgba(0, 180, 236, 0.2);
}

.project-card.featured:hover {
  border-color: var(--accent);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
  background: var(--gold-dim);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
  width: fit-content;
}

.card-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.project-card h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.project-card p {
  font-size: 0.92rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--tag-border);
}

.card-links {
  display: flex;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.card-link {
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.card-link:hover {
  color: var(--accent-text);
}

.card-link svg {
  width: 16px;
  height: 16px;
}

/* --- Research Preview --- */
.research-preview {
  background: var(--bg-deep);
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.research-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: all 0.35s var(--ease-out);
  overflow: hidden;
}

.research-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.research-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

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

.research-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gold-dim);
  border: 1px solid rgba(212, 160, 48, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.25rem;
}

.research-card h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.research-card .research-field {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold-text);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.research-card p {
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.research-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.research-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* --- Publications --- */
.publications-list {
  list-style: none;
}

.pub-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s ease;
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.45;
}

.pub-title a {
  color: var(--text-primary);
}

.pub-title a:hover {
  color: var(--accent-text);
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pub-authors .self {
  color: var(--accent-text);
  font-weight: 600;
}

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

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

.pub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pub-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

.pub-toggle svg {
  transition: transform 0.3s ease;
}

.pub-toggle.expanded svg {
  transform: rotate(180deg);
}

.pub-hidden {
  display: none;
}

.pub-hidden.show {
  display: block;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info p {
  margin-bottom: 24px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: var(--accent-text);
}

.contact-link svg {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- Footer --- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-deep);
}

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

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

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: color 0.2s ease;
}

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

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Grain Overlay --- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

[data-theme="light"] .grain {
  opacity: 0.018;
}

/* --- Research Page Specific --- */
.research-hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 64px;
  background: var(--bg-deep);
}

.research-detail {
  padding: 64px 0;
}

.research-detail:nth-child(even) {
  background: var(--bg-primary);
}

.research-detail:nth-child(odd) {
  background: var(--bg-deep);
}

.research-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}

.research-detail-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: var(--radius-md);
  background: var(--gold-dim);
  border: 1px solid rgba(212, 160, 48, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.research-detail-meta .research-field {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold-text);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.research-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.highlight-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}

.highlight-item h4 {
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.highlight-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.research-cta {
  margin-top: 40px;
  padding: 32px;
  background: var(--gold-dim);
  border: 1px solid rgba(212, 160, 48, 0.15);
  border-radius: var(--radius-md);
  text-align: center;
}

.research-cta h4 {
  color: var(--gold-text);
  margin-bottom: 8px;
}

.research-cta p {
  font-size: 0.9rem;
  margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: span 1;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-deep);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 999;
  }

  [data-theme="light"] .nav-links {
    background: var(--bg-primary);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.15rem;
  }

  .nav-hamburger {
    display: block;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .project-card {
    padding: 24px;
  }

  .research-card {
    padding: 24px 20px;
  }
}

/* Print */
@media print {
  .nav, .grain, .hero-canvas, .hero-gradient, .theme-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  section {
    background: #fff !important;
    padding: 24px 0;
  }
}
