/* ============================================================
   Dr. [Your Name] — Geotechnical & Earthquake Engineering
   Shared stylesheet for the whole site
   ============================================================ */

:root {
  --bg: #0d1117;
  --bg-soft: #131a23;
  --card: #18212d;
  --card-hover: #1e2a3a;
  --line: #2a3646;
  --text: #e8edf3;
  --text-dim: #9fb0c3;
  --accent: #f5b942;        /* seismic amber */
  --accent-2: #4fd1c5;      /* instrument teal */
  --accent-3: #e06c75;      /* alert red, used sparingly */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(79, 209, 197, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(245, 185, 66, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(13, 17, 23, 0.82);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.15rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex; align-items: center; justify-content: center;
  color: #0d1117; font-weight: 800; font-size: 0.85rem; font-family: var(--sans);
}
.nav { display: flex; gap: 22px; }
.nav a { color: var(--text-dim); font-size: 0.92rem; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 50px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center;
}
.kicker {
  color: var(--accent); font-size: 0.85rem; letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 600; margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.12; font-weight: 600; margin-bottom: 18px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.lede { color: var(--text-dim); font-size: 1.08rem; max-width: 56ch; margin-bottom: 28px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; transition: all 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #14110a; }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(245, 185, 66, 0.35); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* Animated seismograph line under hero */
.seismo { margin-top: 36px; opacity: 0.9; }
.seismo path {
  stroke-dasharray: 2400; stroke-dashoffset: 2400;
  animation: trace 7s linear infinite;
}
@keyframes trace { to { stroke-dashoffset: 0; } }

/* ---------- Section headings ---------- */
.section { padding: 64px 0; }
.section-title {
  font-family: var(--serif); font-size: 1.8rem; font-weight: 600; margin-bottom: 8px;
}
.section-sub { color: var(--text-dim); margin-bottom: 36px; max-width: 64ch; }

/* ---------- Smart-button card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.smart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
  color: var(--text);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  position: relative; overflow: hidden;
}
.smart-card::after {
  content: "→";
  position: absolute; right: 18px; bottom: 14px;
  color: var(--accent); opacity: 0; transition: all 0.22s ease;
  transform: translateX(-6px);
}
.smart-card:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: var(--accent);
  text-decoration: none;
  box-shadow: var(--shadow);
}
.smart-card:hover::after { opacity: 1; transform: translateX(0); }
.smart-card .icon { font-size: 1.6rem; line-height: 1; }
.smart-card h3 { font-size: 1.02rem; font-weight: 600; }
.smart-card p { font-size: 0.85rem; color: var(--text-dim); }
.smart-card.soon { opacity: 0.55; border-style: dashed; pointer-events: none; }
.smart-card .tag {
  position: absolute; top: 14px; right: 14px;
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-2); border: 1px solid var(--accent-2);
  padding: 2px 8px; border-radius: 999px;
}

/* ---------- Plot cards (scientific diagrams) ---------- */
.plot-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.plot-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.plot-card:hover { transform: translateY(-4px); border-color: var(--accent-2); }
.plot-card svg { width: 100%; height: auto; display: block; background: #0a0e14; }
.plot-card figcaption {
  padding: 14px 16px; font-size: 0.84rem; color: var(--text-dim);
  border-top: 1px solid var(--line);
}
.plot-card figcaption strong { color: var(--text); display: block; margin-bottom: 2px; }

/* Floating plot card variant used in hero */
.hero .plot-card { box-shadow: var(--shadow); transform: rotate(1.5deg); }
.hero .plot-card:hover { transform: rotate(0deg) translateY(-4px); }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Subpage layout ---------- */
.page-head { padding: 70px 0 30px; border-bottom: 1px solid var(--line); }
.page-head .kicker { margin-bottom: 10px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; }
.page-head p { color: var(--text-dim); margin-top: 12px; max-width: 64ch; }
.page-body { padding: 44px 0 80px; }
.page-body h2 { font-family: var(--serif); font-size: 1.4rem; margin: 36px 0 12px; }
.page-body h2:first-child { margin-top: 0; }
.page-body ul { padding-left: 22px; color: var(--text-dim); }
.page-body li { margin-bottom: 8px; }
.placeholder-note {
  background: rgba(245, 185, 66, 0.08);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px; font-size: 0.9rem; color: var(--text-dim);
  margin-bottom: 32px;
}
.placeholder-note strong { color: var(--accent); }

/* Link-list (journals, videos, etc.) */
.link-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.link-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; color: var(--text); transition: border-color 0.2s ease;
}
.link-item:hover { border-color: var(--accent); text-decoration: none; }
.link-item .meta { font-size: 0.82rem; color: var(--text-dim); }
.link-item .go { color: var(--accent); font-weight: 700; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 20px; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 10px; top: 4px; bottom: 4px;
  width: 2px; background: linear-gradient(var(--accent), var(--accent-2));
}
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item::before {
  content: ""; position: absolute; left: -30px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.timeline-item .when {
  font-size: 0.8rem; color: var(--accent); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.timeline-item h3 { font-size: 1.05rem; margin: 4px 0; }
.timeline-item p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-align: center;
}
.contact-card .icon { font-size: 2rem; margin-bottom: 10px; }
.contact-card h3 { margin-bottom: 6px; }
.contact-card a { word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0; margin-top: 40px;
  color: var(--text-dim); font-size: 0.88rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .hero { padding-top: 56px; }
}
