/* ═══════════════════════════════════════════════════════════════
   Tyler Edic — Portfolio · Clean corporate light · Navy + Gold
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy: #122a4d;
  --navy-deep: #0c1e39;
  --navy-soft: #2c4a75;
  --gold: #c9a227;
  --gold-ink: #8a6a1e;      /* gold dark enough for text on light bg */
  --gold-pale: #f5edd8;
  --bg: #fcfbf7;
  --surface: #ffffff;
  --tint: #f4f1e9;
  --line: #e6e1d3;
  --text: #29303b;
  --muted: #5c6675;
  --shadow: 0 10px 30px rgba(18, 42, 77, 0.08);
  --radius: 14px;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--font-display); color: var(--navy); line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 600; margin: 14px 0 22px; }
h1 em { font-style: italic; color: var(--gold-ink); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 600; margin-bottom: 18px; max-width: 22ch; }
h3 { font-size: 1.2rem; font-weight: 600; }

a { color: var(--navy-soft); text-decoration: none; }

/* ── Eyebrows & section furniture ─────────────────────────────── */
.eyebrow, .section-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.section-eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px; height: 2px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 10px;
}
.eyebrow-light { color: var(--gold); }
.section { padding: 96px 0; }
.section-tinted { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-warm { background: linear-gradient(180deg, #faf6ea 0%, #f5efe0 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-note { color: var(--muted); margin: -6px 0 36px; }

/* Navy band (Competencies) */
.section-navy { background: linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 55%, #1a3a68 100%); }
.section-navy .section-eyebrow { color: var(--gold); }
.section-navy h2 { color: #fff; }
.section-navy .pillar-card {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.section-navy .pillar-card:hover {
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}
.section-navy .pillar-card h3 { color: #fff; }
.section-navy .pillar-card > p { color: rgba(255, 255, 255, 0.68); }
.section-navy .pillar-card li { color: rgba(255, 255, 255, 0.82); }
.section-navy .pillar-cred { color: var(--gold); border-top-color: rgba(255, 255, 255, 0.15); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--navy-deep); }
.btn-outline { border-color: var(--gold); color: var(--gold-ink); background: transparent; }
.btn-outline:hover { background: var(--gold-pale); }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: #d9b53e; }
.btn-ghost { border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ── Scroll progress bar ──────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), #e3c25a);
  z-index: 200;
  pointer-events: none;
}

/* ── Back to top ──────────────────────────────────────────────── */
.to-top {
  position: fixed;
  bottom: 26px; right: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  border: 1.5px solid var(--gold);
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--navy-deep); }

/* ── Nav ──────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 251, 247, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--navy); }
.brand-dot { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--navy); border-bottom-color: var(--gold); }
.nav-resume { margin-left: 6px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; transition: 0.2s; }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  padding: 88px 0 96px;
  background: linear-gradient(180deg, #f7f3e8 0%, var(--bg) 75%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -140px; right: -140px;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.16), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -180px; left: -160px;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 42, 77, 0.07), transparent 65%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 64px; align-items: center; }
.lede { font-size: 1.13rem; color: var(--muted); max-width: 54ch; }
.hero-ctas { display: flex; gap: 14px; margin: 30px 0 44px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 36px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.hero-stats dt { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--navy); }
.hero-stats dd { font-size: 0.82rem; color: var(--muted); margin-top: 2px; max-width: 12ch; }

.hero-photo { justify-self: center; text-align: center; }
.photo-frame {
  position: relative;
  width: min(320px, 70vw);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  transform: translate(14px, 14px);
  pointer-events: none;
  z-index: -1;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 62% center; display: block; }
.photo-fallback[hidden] { display: none !important; }
.photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--navy);
}
.photo-caption { font-size: 0.85rem; color: var(--muted); margin-top: 18px; }

/* ── About ────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; margin-top: 32px; }
.about-text p + p { margin-top: 18px; }
.about-facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  align-self: start;
}
.about-facts h3 { margin-bottom: 16px; }
.about-facts ul { list-style: none; }
.about-facts li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; color: var(--muted); }
.about-facts li:last-child { border-bottom: none; }
.about-facts strong { display: block; color: var(--navy); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Pillars ──────────────────────────────────────────────────── */
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 42px; }
.pillar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.pillar-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(18, 42, 77, 0.13); }
.pillar-icon { font-size: 1.5rem; color: var(--gold); margin-bottom: 14px; }
.pillar-card h3 { margin-bottom: 10px; }
.pillar-card > p { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.pillar-card ul { list-style: none; margin-bottom: 22px; }
.pillar-card li { padding: 7px 0 7px 22px; position: relative; font-size: 0.92rem; }
.pillar-card li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.pillar-cred {
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-ink);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* ── AI enablement ────────────────────────────────────────────── */
.ai-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 10px; }
.ai-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.ai-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.ai-icon { font-size: 1.4rem; color: var(--gold); margin-bottom: 12px; }
.ai-card h3 { margin-bottom: 10px; }
.ai-card p { color: var(--muted); font-size: 0.95rem; }

.ai-feature {
  margin-top: 28px;
  background: linear-gradient(160deg, var(--navy-deep), var(--navy) 70%);
  border-radius: var(--radius);
  padding: 38px 42px;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--navy-soft);
}
.ai-feature-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.ai-feature h3 { color: #fff; font-size: 1.3rem; margin-bottom: 12px; }
.ai-feature strong { color: var(--gold); }
.ai-feature-note { margin-top: 16px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }

.ai-training { margin-top: 28px; }
.ai-training h3 { font-size: 1.05rem; margin-bottom: 16px; }
.chip-list-sm li { font-size: 0.8rem; padding: 6px 14px; }
.chip-more { border-style: dashed !important; color: var(--gold-ink) !important; font-weight: 600; }

/* ── Case studies ─────────────────────────────────────────────── */
.case {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  margin-top: 28px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.case:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(18, 42, 77, 0.12);
}
.case-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 26px; }
.case-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--gold); line-height: 1; }
.case-head h3 { font-size: 1.35rem; max-width: 30ch; }
.case-tags { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.case-vitals {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.case-vitals li {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 0.82rem;
  color: var(--muted);
}
.case-vitals strong {
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-right: 6px;
}
.case-body { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 34px; }
.case-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-ink);
  margin-bottom: 10px;
}
.case-col p { font-size: 0.95rem; color: var(--muted); }
.result-chips { list-style: none; }
.result-chips li {
  background: var(--gold-pale);
  border: 1px solid #e8dcb4;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.result-chips strong { color: var(--navy); font-size: 1.02rem; }

/* ── Projects / Things I've built ─────────────────────────────── */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 42px; }
.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.project-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 16px 40px rgba(18, 42, 77, 0.13); }
.project-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.project-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.project-tagline { font-family: var(--font-display); font-style: italic; color: var(--gold-ink); margin-bottom: 12px; }
.project-card > p:not(.project-tagline) { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.project-tech { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.project-tech li { background: var(--tint); border: 1px solid var(--line); border-radius: 99px; padding: 5px 13px; font-size: 0.78rem; color: var(--text); }
.project-link {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
  transition: color 0.18s ease;
}
.project-link:hover { color: var(--gold-ink); }

/* ── Certifications ───────────────────────────────────────────── */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 42px; }
.cert-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.cert-card:hover { transform: translateY(-4px); }
.cert-badge {
  width: 78px; height: 78px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cert-card:hover .cert-badge {
  transform: rotate(-6deg) scale(1.08);
  box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.18);
}
.cert-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.cert-card p { font-size: 0.85rem; color: var(--muted); }

.toolbox {
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow);
}
.toolbox h3 { margin-bottom: 18px; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chip-list li {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.chip-list li:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
  transform: translateY(-2px);
}

/* ── Leadership & community ───────────────────────────────────── */
.lead-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.lead-grid-2 { grid-template-columns: 1fr 1fr; margin-top: 42px; }
.lead-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
}
.lead-year { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 8px; }
.lead-org { font-weight: 600; color: var(--navy-soft); font-size: 0.92rem; margin: 4px 0 10px; }
.lead-card h3 { margin-bottom: 10px; }
.lead-card > p:last-child { color: var(--muted); font-size: 0.94rem; }

/* ── Contact ──────────────────────────────────────────────────── */
.contact { background: linear-gradient(160deg, var(--navy-deep), var(--navy) 65%, #1a3a68); padding: 110px 0; }
.contact-inner { text-align: center; }
.contact h2 { color: #fff; margin: 14px auto 18px; }
.contact-lede { color: rgba(255,255,255,0.75); max-width: 52ch; margin: 0 auto 38px; }
.contact-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer { background: var(--navy-deep); padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.site-footer p, .site-footer a { color: rgba(255,255,255,0.55); font-size: 0.85rem; }
.site-footer a:hover { color: var(--gold); }

/* ── Scroll reveal ────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .pillar-card, .cert-card, .case, .cert-badge, .chip-list li, .ai-card, .project-card { transition: none; }
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-photo { order: -1; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .pillar-grid, .cert-grid { grid-template-columns: 1fr 1fr; }
  .case-body { grid-template-columns: 1fr; gap: 24px; }
  .lead-grid { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .pillar-grid, .cert-grid, .lead-grid, .ai-grid { grid-template-columns: 1fr; }
  .case { padding: 28px 22px; }
  .ai-feature { padding: 28px 22px; }
  .toolbox { padding: 26px 22px; }
  .to-top { bottom: 18px; right: 18px; width: 42px; height: 42px; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 0; width: 100%; }
  .nav-resume { margin: 12px 0 0; }
}
