/* jonachun.com — Shared Stylesheet */
/* Dark theme, teal accent, editorial design */

:root {
  --color-bg: #0a0a0c;
  --color-surface: #131318;
  --color-surface-hover: #1a1a22;
  --color-text: #e8e6e3;
  --color-text-secondary: #8a8894;
  --color-text-bright: #ffffff;
  --color-accent: #4fd1c5;
  --color-accent-dim: rgba(79, 209, 197, 0.12);
  --color-accent-glow: rgba(79, 209, 197, 0.25);
  --color-accent-hover: #38b2ac;
  --color-warm: #f0c27a;
  --color-border: rgba(255,255,255,0.06);
  --color-border-light: rgba(255,255,255,0.04);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
  --max-width: 1100px;
  --narrow: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--color-accent-dim); color: var(--color-accent); }

/* Skip navigation */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 200;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* Navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-light);
  transition: box-shadow 0.3s;
}
.site-nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.site-nav .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--color-text-bright);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-accent);
}
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.hamburger svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-text);
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}
.narrow {
  max-width: var(--narrow);
}

/* Page header */
.page-header {
  padding: 8rem 2rem 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.page-header .section-label {
  margin-bottom: 1rem;
}
.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--color-text-bright);
  line-height: 1.1;
}
.page-header h1 em {
  font-style: italic;
  color: var(--color-accent);
}
.page-header .page-desc {
  max-width: var(--narrow);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-top: 1.5rem;
}

/* Hero (homepage only) */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 65%);
  opacity: 0.3;
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}
.hero-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--color-text-bright);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}
.hero h1 em {
  font-style: italic;
  color: var(--color-accent);
}
.hero-bio {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}
.hero-bio strong {
  color: var(--color-text-bright);
  font-weight: 500;
}

/* Credential grid */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--color-border-light);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}
.cred-card {
  background: var(--color-surface);
  padding: 1.5rem 1.6rem;
  transition: background 0.3s;
}
.cred-card:hover { background: var(--color-surface-hover); }
.cred-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}
.cred-value {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--color-text-bright);
  line-height: 1.4;
}
.cred-sub {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-top: 0.3rem;
}

/* Sections */
section {
  padding: 6rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}
section h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--color-text-bright);
  line-height: 1.15;
  margin-bottom: 2rem;
}
section h2 em {
  font-style: italic;
  color: var(--color-accent);
}

/* Divider */
.divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}
.divider hr {
  border: none;
  height: 1px;
  background: var(--color-border);
}

/* Tech block */
.tech-block {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--color-border-light);
  margin-bottom: 2rem;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--color-text);
}
.tech-block strong {
  color: var(--color-text-bright);
  font-weight: 500;
}

/* Publication groups */
.pub-group { margin-bottom: 2.5rem; }
.pub-group-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-warm);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(240,194,122,0.15);
}
.pub-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.pub-title {
  font-size: 0.95rem;
  color: var(--color-text-bright);
  line-height: 1.5;
}
.pub-title a {
  color: var(--color-text-bright);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.pub-title a:hover {
  border-color: var(--color-accent);
}
.pub-venue {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-top: 0.2rem;
}
.pub-venue .highlight {
  color: var(--color-accent);
  font-weight: 500;
}

/* Card grids (industry, education) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.3s;
}
.card:hover {
  border-color: rgba(79,209,197,0.2);
}
.card-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.card-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--color-text-bright);
  margin-bottom: 0.4rem;
}
.card-desc {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Impact grid */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.impact-stat { text-align: center; padding: 2rem 1rem; }
.impact-num {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.impact-desc {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Contact */
.contact-section { text-align: center; padding: 8rem 2rem; }
.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-dim);
  padding-bottom: 0.2rem;
  transition: border-color 0.3s;
}
.contact-email:hover { border-color: var(--color-accent); }
.contact-links {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.contact-links a:hover { color: var(--color-accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border-light);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}
.footer-left {
  max-width: 300px;
}
.footer-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--color-text-bright);
  margin-bottom: 0.75rem;
}
.footer-left p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.footer-cols {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 0.5rem;
}
.footer-col a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--color-accent);
}
.footer-copy {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--color-border-light);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

/* Prose content */
.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.prose h2 {
  margin-top: 3rem;
}

/* Last updated */
.last-updated {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

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

/* Crawler-safe reveal: content visible by default */
.reveal {
  opacity: 1;
  transform: none;
}
.reveal.will-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.will-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .footer-grid {
    flex-direction: column;
  }
  .footer-left {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10,10,12,0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border-light);
  }
  .nav-links.open {
    display: flex;
  }
  .hamburger {
    display: block;
  }
  .hero { padding: 7rem 1.5rem 4rem; }
  section { padding: 4rem 1.5rem; }
  .page-header { padding: 7rem 1.5rem 2rem; }
  .cred-grid { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .cred-grid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-label, .hero h1, .hero-bio, .cred-grid {
    opacity: 1;
    animation: none;
  }
  .reveal.will-animate {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Print styles */
@media print {
  .site-nav, .hamburger, .skip-link { display: none !important; }
  .site-footer { border-top: 1px solid #ccc; }
  .footer-cols a::after { content: " (" attr(href) ")"; font-size: 0.7rem; }
  body {
    background: white;
    color: #1a1a1a;
    font-size: 12pt;
  }
  .hero::before { display: none; }
  .reveal, .reveal.will-animate {
    opacity: 1 !important;
    transform: none !important;
  }
  section { padding: 2rem 0; }
  .card { border-color: #ccc; }
  a { color: #1a1a1a; }
  .impact-num, .section-label, .cred-label, .card-label, .pub-group-label {
    color: #333;
  }
}
