/* =========================================================================
   Royce · ML × Bioinformatics Engineer — site styles
   ========================================================================= */

:root {
  --bg: #0a0e1a;
  --bg-2: #0f1424;
  --surface: #131a2c;
  --surface-2: #1a2238;
  --border: #232b40;
  --border-strong: #2c3654;
  --text: #e6edf3;
  --text-2: #b4bfd1;
  --text-muted: #8392ad;
  --accent: #22d3ee;
  --accent-2: #34d399;
  --accent-3: #a78bfa;
  --warn: #fbbf24;
  --link: #22d3ee;
  --link-hover: #67e8f9;
  --shadow-lg: 0 24px 60px -20px rgba(8, 12, 26, 0.7), 0 8px 24px -8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --content: 880px;
  --container: 1040px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background-image:
    radial-gradient(1400px 700px at 80% -10%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(1100px 600px at 0% 8%, rgba(167, 139, 250, 0.08), transparent 60%),
    radial-gradient(900px 600px at 50% 100%, rgba(52, 211, 153, 0.06), transparent 60%);
  overflow-x: hidden;
}

/* Site-wide dot pattern overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(34, 211, 238, 0.08);
  z-index: 60;
  pointer-events: none;
}
.reading-progress::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, #22d3ee, #34d399, #a78bfa);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
  transition: width 0.05s linear;
}

/* Animated background orbs (hero) */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.hero-bg .orb-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #22d3ee, transparent 60%);
  top: -100px; right: -120px;
  animation: float-1 18s ease-in-out infinite;
}
.hero-bg .orb-2 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, #a78bfa, transparent 60%);
  bottom: -120px; left: -80px;
  animation: float-2 22s ease-in-out infinite;
}
.hero-bg .orb-3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, #34d399, transparent 60%);
  top: 50%; left: 60%;
  animation: float-3 26s ease-in-out infinite;
  opacity: 0.35;
}
.hero-bg .grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-30px, 40px) scale(1.08); }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -30px) scale(1.1); }
}
@keyframes float-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.15) rotate(20deg); }
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::selection { background: rgba(34, 211, 238, 0.3); color: #f0f6fc; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--link-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

p { margin: 0 0 1em; }
strong { color: #f0f6fc; font-weight: 600; }
em { color: var(--text); }

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f0f6fc;
  margin: 0 0 0.6em;
  line-height: 1.15;
}

img { max-width: 100%; vertical-align: middle; }

/* Scroll-reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible {
    opacity: 1; transform: none; transition: none;
  }
}

/* layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--gutter);
  padding-left: var(--gutter);
}

.page-content {
  flex: 1 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--accent);
  color: #0a0e1a;
  padding: 0.5rem 1rem;
  font-weight: 600;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
}
.brand:hover { color: var(--text); }

.brand-mark {
  display: inline-flex;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.brand:hover .brand-mark { transform: rotate(-8deg); }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.brand-sub { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.02em; display: none; }
@media (min-width: 720px) { .brand-sub { display: inline; } }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.4rem);
  font-size: 0.9rem;
}
.site-nav a {
  color: var(--text-2);
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}
.site-nav a:hover { color: var(--text); }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }

@media (max-width: 720px) {
  .site-nav a:not(.status-pill) { display: none; }
}

.status-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--accent-2) !important;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}
.status-pill::after { display: none !important; }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* hero */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3rem);
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(3rem, 7vw, 4.5rem);
  line-height: 1.02;
  margin-bottom: 1rem;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, #ffffff 0%, #b4bfd1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 .accent {
  background: linear-gradient(135deg, #22d3ee 0%, #34d399 60%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  position: relative;
}
.hero h1 .accent::after {
  content: "";
  position: absolute;
  left: 4%; right: 4%;
  bottom: 0.05em;
  height: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, #a78bfa, transparent);
  opacity: 0.5;
}

.hero .lead {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--text-2);
  max-width: 60ch;
  margin-bottom: 1.6rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  margin: 1.4rem 0 1.8rem;
}
.hero-meta .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--text-2);
  white-space: nowrap;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hero-meta .chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
              box-shadow 0.18s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn:hover::before { transform: translateX(100%); }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #062b35;
  border-color: var(--accent);
  box-shadow: 0 6px 24px -10px rgba(34, 211, 238, 0.6);
}
.btn-primary:hover {
  background: var(--link-hover);
  color: #062b35;
  box-shadow: 0 10px 32px -8px rgba(34, 211, 238, 0.7);
}
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* now card */
.now-card {
  position: relative;
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.06), rgba(52, 211, 153, 0.04));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.now-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), transparent 40%, rgba(167, 139, 250, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}
.now-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--accent);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.now-text { color: var(--text-2); font-size: 0.95rem; }
.now-text strong { color: #f0f6fc; }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-top: 1.4rem;
}
.stat-card {
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.stat-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}
.stat-value {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-label {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

/* sections */
section.section {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--border);
  position: relative;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin: 0;
  letter-spacing: -0.02em;
}
.section-head .eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.section-divider {
  display: block;
  width: 100%;
  height: 60px;
  margin: 0;
  color: var(--border);
  pointer-events: none;
}

/* roles */
.roles-card {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.05) 0%, rgba(167, 139, 250, 0.05) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
}
.roles-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.3), transparent 50%, rgba(167, 139, 250, 0.2));
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.6;
}
@media (min-width: 720px) {
  .roles-card { grid-template-columns: 1.4fr 1fr; gap: 2.4rem; align-items: center; }
}
.roles-card h3 { font-size: 1.15rem; margin: 0 0 0.5rem; color: #f0f6fc; }
.roles-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.roles-card li {
  padding-left: 1.3rem;
  position: relative;
  color: var(--text-2);
  font-size: 0.95rem;
}
.roles-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}
.roles-card li strong { color: #f0f6fc; font-weight: 600; }

.roles-side .meta-line {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.2rem 0;
}
.roles-side .meta-line strong { color: var(--text); }

/* featured cards */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.featured-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  isolation: isolate;
}
.featured-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
  border-radius: inherit;
  z-index: -2;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.featured-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--surface);
  border-radius: calc(var(--radius) - 1px);
  z-index: -1;
  transition: background 0.25s ease;
}
.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -16px rgba(34, 211, 238, 0.35),
              0 0 0 1px rgba(34, 211, 238, 0.4);
}
.featured-card:hover::before { opacity: 1; }
.featured-card:hover::after { background: linear-gradient(135deg, #1a2238, #131a2c); }
.featured-card:hover .featured-card-inner { transform: translateY(-1px); }

.featured-card-inner { transition: transform 0.25s ease; }

.featured-card .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.8rem;
  font-weight: 600;
}
.featured-card .tag.bio { color: var(--accent-2); }
.featured-card .tag.ai { color: var(--accent-3); }

.featured-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
  color: #f0f6fc;
}
.featured-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.featured-card .arrow {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  transition: gap 0.2s ease;
}
.featured-card:hover .arrow { gap: 0.8rem; }

/* selected groups */
.subsection + .subsection { margin-top: 1.6rem; }

.subsection h3 {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-2);
  margin: 0 0 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.subsection h3 .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.subsection h3.bio .dot { background: var(--accent-2); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15); }
.subsection h3.ai  .dot { background: var(--accent-3); box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15); }
.subsection h3.q   .dot { background: var(--warn);      box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15); }

.work-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}
.work-list li {
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.94rem;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.work-list li:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
  transform: translateX(2px);
}
.work-list li a { font-weight: 500; color: var(--text); }
.work-list li a:hover { color: var(--accent); }
.work-list li .dash { color: var(--text-muted); margin: 0 0.4rem; }
.work-list li .desc { color: var(--text-muted); }

/* writing */
.writing-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}
.writing-card:hover { border-color: var(--border-strong); }
.writing-card p { margin: 0; color: var(--text-2); }
.writing-card .grow { flex: 1 1 auto; min-width: 0; }

/* contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
@media (min-width: 820px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.contact-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.5);
  color: var(--text);
}
.contact-card:hover::before { opacity: 1; }
.contact-card .icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent);
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
}
.contact-card:hover .icon { transform: scale(1.08) rotate(-4deg); }
.contact-card.email .icon { background: rgba(52, 211, 153, 0.12); color: var(--accent-2); }
.contact-card.github .icon { background: rgba(167, 139, 250, 0.12); color: var(--accent-3); }
.contact-card.orcid .icon { background: rgba(251, 191, 36, 0.12); color: var(--warn); }

.contact-card .label {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.contact-card .value {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
  position: relative;
  z-index: 1;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--bg-2);
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: grid;
  gap: 1rem;
  align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr; }
  .footer-meta { grid-column: 1 / -1; }
}

.footer-brand .brand-name {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #f0f6fc;
}
.footer-tag { color: var(--text-muted); font-size: 0.88rem; max-width: 52ch; }

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  font-size: 0.88rem;
}

.footer-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* utility */
.dim { color: var(--text-muted); }

@media (max-width: 600px) {
  .hero h1 { font-size: 2.5rem; }
  .hero-meta .chip { font-size: 0.78rem; }
  .footer-meta { flex-direction: column; align-items: flex-start; }
}