/* David Chau Consulting — amber design system
   Polished from the original concept: warmer surfaces, tighter type scale,
   refined accents, accessible focus states. Fonts: Fraunces + Sora. */

:root {
  --bg: #16110d;
  --bg-2: #1c1610;
  --bg-3: #221a12;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(217, 138, 58, 0.06);
  --border: #2e2418;
  --border-mid: #3a2d1c;
  --border-hover: #d98a3a;
  --text: #f0e6d8;
  --text-bright: #faf3e8;
  --text-dim: #a8977f;
  --text-faint: #bcae98;
  --accent: #e0954a;
  --accent-2: #c2702a;
  --accent-soft: rgba(224, 149, 74, 0.14);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --container: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #1a1209; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 60px; }

/* Atmospheric glows */
.glow { position: fixed; pointer-events: none; z-index: 0; border-radius: 50%; filter: blur(8px); }
.glow-1 { top: -220px; right: -180px; width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(217, 138, 58, 0.16), transparent 65%); }
.glow-2 { bottom: 8%; left: -260px; width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(180, 90, 40, 0.10), transparent 65%); }

/* ===== NAV ===== */
nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(22, 17, 13, 0.72);
  border-bottom: 1px solid rgba(46, 36, 24, 0.6);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 60px; max-width: var(--container); margin: 0 auto;
}
.logo { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--text-bright); letter-spacing: 0.3px; }
.logo span { color: var(--accent); }
.navlinks { display: flex; gap: 34px; align-items: center; font-size: 14px; }
.navlinks a { color: var(--text-dim); transition: color 0.2s var(--ease); }
.navlinks a:hover { color: var(--accent); }
.nav-cta { border: 1px solid var(--border-mid); padding: 9px 20px; border-radius: 7px; color: var(--text) !important; display: inline-flex; align-items: center; gap: 8px; }
.nav-cta:hover { border-color: var(--accent); }
.nav-arrow { color: var(--accent); transition: transform 0.2s var(--ease); }
.nav-cta:hover .nav-arrow { transform: translateX(3px); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; }

/* ===== HERO ===== */
.hero { position: relative; z-index: 2; padding: 130px 0 96px; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.9; }
.eyebrow { color: var(--accent); font-weight: 500; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 26px; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--accent); display: inline-block; }
.hero h1 { font-family: var(--serif); font-size: 62px; line-height: 1.07; font-weight: 600; color: var(--text-bright); letter-spacing: -1px; max-width: 880px; }
.hero h1 em { color: var(--accent); font-style: italic; }
.hero .lead { font-size: 18px; line-height: 1.75; color: var(--text-faint); max-width: 620px; margin-top: 30px; font-weight: 300; }
.btns { margin-top: 42px; display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a1209; padding: 16px 34px; border-radius: 8px; font-weight: 600; font-size: 15px; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); box-shadow: 0 8px 24px rgba(217, 138, 58, 0.18); font-family: var(--sans); cursor: pointer; border: 0; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(217, 138, 58, 0.3); }
.btn-ghost { border: 1px solid var(--border-mid); color: var(--text); padding: 16px 34px; border-radius: 8px; font-weight: 500; font-size: 15px; transition: border-color 0.2s var(--ease); }
.btn-ghost:hover { border-color: var(--accent); }

.hero-stats { display: flex; gap: 54px; margin-top: 76px; flex-wrap: wrap; }
.stat .num { font-family: var(--serif); font-size: 40px; font-weight: 600; color: var(--accent); line-height: 1; }
.stat .label { font-size: 13px; color: var(--text-dim); margin-top: 8px; letter-spacing: 0.5px; }

/* ===== SECTION SHELL ===== */
section.block { position: relative; z-index: 2; padding: 92px 0; }
.sec-eyebrow { color: var(--accent); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; font-weight: 500; margin-bottom: 16px; }
.sec-title { font-family: var(--serif); font-size: 40px; font-weight: 600; color: var(--text-bright); letter-spacing: -0.5px; margin-bottom: 14px; line-height: 1.1; }
.sec-sub { color: var(--text-dim); font-size: 17px; font-weight: 300; max-width: 580px; margin-bottom: 54px; }

/* ===== SERVICES ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 34px 30px; transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease); }
.card:hover { border-color: var(--border-hover); background: var(--surface-hover); transform: translateY(-3px); }
.card .ic { font-size: 24px; margin-bottom: 20px; color: var(--accent); line-height: 1; }
.card h3 { font-family: var(--serif); font-size: 21px; color: var(--text-bright); font-weight: 600; margin-bottom: 12px; }
.card p { font-size: 14.5px; line-height: 1.7; color: var(--text-dim); font-weight: 300; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.about-text p { color: var(--text-faint); font-size: 16px; font-weight: 300; line-height: 1.8; margin-bottom: 20px; }
.about-text p strong { color: var(--text-bright); font-weight: 500; }
.pullquote { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--accent); line-height: 1.4; border-left: 2px solid var(--accent); padding-left: 24px; margin: 34px 0; font-weight: 400; }
.about-card { background: linear-gradient(160deg, rgba(217, 138, 58, 0.08), rgba(255, 255, 255, 0.02)); border: 1px solid var(--border); border-radius: 16px; padding: 44px 40px; }
.about-card .year { font-family: var(--serif); font-size: 64px; font-weight: 600; color: var(--accent); line-height: 1; }
.about-card .year-label { font-size: 14px; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; margin-top: 10px; margin-bottom: 28px; }
.about-card h4 { font-family: var(--serif); font-size: 22px; color: var(--text-bright); margin-bottom: 14px; }
.about-card p { font-size: 14.5px; color: var(--text-faint); font-weight: 300; line-height: 1.7; }

/* ===== EXPERIENCE / TIMELINE ===== */
.timeline { position: relative; padding-left: 36px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1.5px; background: linear-gradient(var(--accent), transparent); }
.tl-item { position: relative; padding-bottom: 48px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: -36px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl-period { font-size: 13px; color: var(--accent); letter-spacing: 1px; font-weight: 500; margin-bottom: 6px; }
.tl-role { font-family: var(--serif); font-size: 22px; color: var(--text-bright); font-weight: 600; margin-bottom: 3px; }
.tl-org { font-size: 14px; color: var(--text-dim); font-style: italic; margin-bottom: 14px; }
.tl-desc { font-size: 14.5px; color: var(--text-faint); font-weight: 300; line-height: 1.7; max-width: 640px; }

/* ===== AI EDGE ===== */
.edge { background: linear-gradient(160deg, var(--bg-2), var(--bg)); border: 1px solid var(--border); border-radius: 20px; padding: 64px 56px; position: relative; overflow: hidden; }
.edge::after { content: ''; position: absolute; top: -100px; right: -100px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(217, 138, 58, 0.14), transparent 65%); }
.edge .inner { position: relative; z-index: 2; max-width: 700px; }
.edge h2 { font-family: var(--serif); font-size: 38px; color: var(--text-bright); font-weight: 600; letter-spacing: -0.5px; margin-bottom: 20px; line-height: 1.15; }
.edge h2 em { color: var(--accent); font-style: italic; }
.edge p { font-size: 16px; color: var(--text-faint); font-weight: 300; line-height: 1.8; margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.tag { font-size: 13px; color: var(--text); border: 1px solid var(--border-mid); padding: 8px 16px; border-radius: 50px; background: var(--surface); }

/* ===== TECH STRIP ===== */
.tech-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 50px; padding-top: 40px; border-top: 1px solid var(--border); }
.tech-col h5 { font-size: 12px; color: var(--accent); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; font-weight: 500; }
.tech-col p { font-size: 14px; color: var(--text-faint); font-weight: 300; line-height: 1.7; max-width: 260px; }

/* ===== CONTACT ===== */
.contact { text-align: center; padding: 110px 0; }
.contact .sec-title { font-size: 46px; }
.contact .intro { color: var(--text-faint); font-size: 18px; font-weight: 300; max-width: 520px; margin: 0 auto 40px; }
.contact-form { max-width: 540px; margin: 0 auto; text-align: left; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; font-weight: 500; }
.field input, .field textarea {
  width: 100%; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-mid);
  border-radius: 8px; padding: 13px 16px; font-family: var(--sans); font-size: 14.5px; color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease); outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); opacity: 0.6; }
.field input:focus, .field textarea:focus { border-color: var(--accent); background: rgba(255, 255, 255, 0.05); }
.field textarea { resize: vertical; min-height: 120px; }
.contact-form .btn-primary { width: 100%; justify-content: center; text-align: center; margin-top: 6px; }
.form-note { font-size: 13px; margin-top: 16px; min-height: 20px; }
.form-note.error { color: #f08a6a; }
.form-note.success { color: #8fc7a0; }
.contact-detail { margin-top: 40px; font-size: 15px; color: var(--text-dim); }
.contact-detail a { color: var(--accent); text-decoration: none; }
.contact-detail a:hover { text-decoration: underline; }

/* ===== FOOTER ===== */
footer { border-top: 1px solid var(--border); padding: 38px 0; text-align: center; position: relative; z-index: 2; }
footer p { font-size: 13px; color: var(--text-dim); }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ===== REVEAL ANIMATION ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 880px) {
  .wrap, .nav-inner { padding-left: 26px; padding-right: 26px; }
  .navlinks { display: none; }
  .navlinks.open { display: flex; position: absolute; top: 64px; right: 0; left: 0; flex-direction: column; gap: 0; background: rgba(22, 17, 13, 0.97); border-bottom: 1px solid var(--border); padding: 12px 26px 20px; }
  .navlinks.open a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .navlinks.open .nav-cta { border: 1px solid var(--border-mid); text-align: center; margin-top: 12px; }
  .nav-toggle { display: block; }
  .hero { padding: 90px 0 70px; }
  .hero h1 { font-size: 38px; }
  .hero .lead { font-size: 16px; }
  .grid-3, .about-grid, .tech-strip { grid-template-columns: 1fr; }
  .about-grid { gap: 40px; }
  .edge { padding: 40px 28px; }
  .sec-title, .edge h2 { font-size: 30px; }
  .contact .sec-title { font-size: 34px; }
  .hero-stats { gap: 32px; }
  .field-row { grid-template-columns: 1fr; }
}
