:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --terracotta: #c2703e;
  --terracotta-dim: #a85d33;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  color: var(--stone-800);
  background: var(--stone-900);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* Full background image */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('background.jpg') center / cover no-repeat;
  z-index: 0;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 200;
}

a {
  color: var(--terracotta);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--terracotta-dim); }

/* Layout — frosted glass panel */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 780px;
  margin: 0;
  padding: 10vh 4rem 6vh;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.15);
  animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero-name {
  font-family: 'DM Serif Display', serif;
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--stone-900);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.4em;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--stone-600);
  margin-bottom: 2.5rem;
  max-width: 520px;
}

.hero-tagline strong {
  font-weight: 400;
  color: var(--stone-800);
}

/* Divider */
.rule {
  border: none;
  border-top: 1px solid var(--stone-300);
  margin: 2.5rem 0;
}

/* Section labels */
.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: 1.2rem;
}

/* Projects */
.projects {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.project {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
}

.project-name {
  font-weight: 500;
  color: var(--stone-800);
  white-space: nowrap;
  flex-shrink: 0;
}

.project-dot {
  flex-grow: 1;
  border-bottom: 1px dotted var(--stone-400);
  min-width: 1rem;
  position: relative;
  top: -0.3em;
}

.project-desc {
  color: var(--stone-600);
  font-size: 0.9rem;
  text-align: right;
  flex-shrink: 0;
  max-width: 280px;
}

/* Roles */
.roles {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.role {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
}

.role-org {
  font-weight: 400;
  color: var(--stone-800);
}

.role-title {
  font-size: 0.9rem;
  color: var(--stone-600);
}

/* Links grid */
.links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  list-style: none;
}

.links-grid a {
  font-size: 0.9rem;
  color: var(--stone-500);
  padding: 0.15rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.links-grid a:hover {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

/* Footer */
.footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stone-300);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-location {
  font-size: 0.85rem;
  color: var(--stone-400);
}

.footer-email a {
  font-size: 0.85rem;
  color: var(--stone-500);
  font-weight: 400;
}

/* Callsign tag */
.callsign {
  display: inline-block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--stone-500);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--stone-300);
  border-radius: 3px;
  padding: 0.15em 0.5em;
  margin-left: 0.6rem;
  position: relative;
  top: -0.15em;
}

/* Responsive */
@media (max-width: 520px) {
  html { font-size: 15.5px; }
  .page {
    padding: 6vh 1.5rem 4vh;
    max-width: 100%;
    box-shadow: none;
  }
  .hero-name { font-size: 2rem; }
  .project { flex-direction: column; gap: 0.15rem; }
  .project-dot { display: none; }
  .project-desc { text-align: left; max-width: none; }
  .role { flex-direction: column; gap: 0.1rem; }
}

/* Print */
@media print {
  body { background: white; }
  body::before, body::after { display: none; }
  .page {
    padding: 2rem;
    animation: none;
    background: white;
    backdrop-filter: none;
    box-shadow: none;
  }
  a { color: var(--stone-800); }
  a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    font-weight: 300;
    color: var(--stone-500);
  }
  .rule { border-top-color: #ccc; }
  .footer { border-top-color: #ccc; }
}
