/* ==========================================================================
   stephencolon.com — styles
   Warm, executive, single-scroll. Gold accent with a deep-green complement.
   ========================================================================== */

:root {
  /* Palette — warm neutrals + gold accent */
  --cream:       #faf6ef;  /* page background */
  --cream-tint:  #f3ece0;  /* alternating section tint */
  --ink:         #2b2621;  /* primary text */
  --ink-soft:    #5a5248;  /* secondary text */
  --line:        rgba(43, 38, 33, 0.12); /* hairline borders */

  --gold:        #d69e2e;  /* accent: flourishes, underlines, hover */
  --gold-deep:   #a9741a;  /* accent for text/links (AA on cream) */
  --gold-soft:   #f6e9cf;  /* soft accent fill */
  --green:       #3d5a40;  /* deep-green complement */
  --green-deep:  #2f4632;

  --maxw:        1080px;
  --maxw-text:   720px;
  --radius:      14px;
  --shadow:      0 18px 40px -24px rgba(43, 38, 33, 0.35);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
           Arial, "Helvetica Neue", sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12;
  color: var(--ink); margin: 0; letter-spacing: -0.01em; }

strong { font-weight: 600; }

::selection { background: var(--gold-soft); }

/* ---------- A11y helpers ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; border-radius: 8px; font-size: 0.95rem;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem); }
.container--text { max-width: calc(var(--maxw-text) + 5rem); }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tint { background: var(--cream-tint); }

.section__kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-deep);
  margin: 0 0 0.6rem;
}
.section__title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin-bottom: 1.6rem;
}

.prose p { margin: 0 0 1.1rem; color: var(--ink-soft); max-width: var(--maxw-text); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); }

.eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold-deep);
  margin: 0 0 0.35rem;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(250, 246, 239, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 0.9rem clamp(1.25rem, 5vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav__brand {
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem;
  color: var(--ink); letter-spacing: -0.01em;
}
.nav__brand:hover { text-decoration: none; color: var(--gold-deep); }

.nav__links { display: flex; align-items: center; gap: 0.4rem; }
.nav__links a {
  position: relative;
  color: var(--ink-soft);
  font-size: 0.97rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}
.nav__links a:hover { color: var(--ink); text-decoration: none; }
.nav__links a::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.2rem;
  height: 2px; background: var(--gold); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease;
}
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--ink); }

.nav__cta {
  background: var(--ink); color: var(--cream) !important;
  padding: 0.5rem 1.05rem !important;
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--gold-deep); }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav__toggle span {
  width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: 0.8rem 1.5rem; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--gold); color: var(--ink); }
.btn--primary:hover { background: var(--gold-deep); color: var(--cream); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 6rem); }
.hero__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.hero__name {
  font-size: clamp(2.8rem, 8vw, 5rem);
  margin: 0.2rem 0 1.2rem;
}
.hero__tagline {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.5; color: var(--ink-soft); max-width: 34ch;
  margin: 0 0 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero__portrait { position: relative; }
.hero__portrait img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero__portrait::before {
  content: ""; position: absolute; inset: 0;
  transform: translate(18px, 18px); z-index: -1;
  border-radius: var(--radius);
  border: 2px solid var(--gold);
}

/* ---------- Now ---------- */
.now__grid {
  display: grid; grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(2rem, 6vw, 4rem); align-items: start;
}
.now__figure { margin: 0; }
.now__figure img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  object-fit: cover;
}

/* ---------- Work / timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line);
}
.job {
  position: relative; padding: 0 0 2.4rem 2.4rem;
}
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--cream);
  box-shadow: 0 0 0 1px var(--gold);
}
.job__head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.3rem 1rem;
}
.job__role { font-size: 1.3rem; }
.job__dates {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600;
  color: var(--gold-deep); white-space: nowrap;
  letter-spacing: 0.02em;
}
.job__org {
  margin: 0.25rem 0 0.7rem; font-weight: 600; color: var(--ink);
}
.job__note {
  display: inline; font-weight: 400; font-style: italic;
  color: var(--ink-soft); font-size: 0.92em;
}
.job__summary { margin: 0 0 0.8rem; color: var(--ink-soft); }
.job__highlights { margin: 0; padding-left: 1.15rem; color: var(--ink-soft); }
.job__highlights li { margin-bottom: 0.35rem; }
.job__highlights li::marker { color: var(--gold); }

/* ---------- Education ---------- */
.education {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 2.2rem; border-top: 1px solid var(--line);
}
.education__title { font-size: 1.3rem; margin-bottom: 1.1rem; }
.education__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.education__list li { display: flex; flex-direction: column; }
.education__degree { font-weight: 600; color: var(--ink); }
.education__where { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Contact ---------- */
.contact__lede {
  font-size: 1.15rem; color: var(--ink-soft);
  max-width: 48ch; margin: 0 0 2rem;
}
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.contact__alt { margin: 1.5rem 0 2rem; color: var(--ink-soft); }

.social { display: flex; gap: 0.75rem; }
.social__link {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50%; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--line);
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.social__link:hover {
  transform: translateY(-2px); background: var(--gold); color: var(--ink);
  border-color: var(--gold); text-decoration: none;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__portrait { max-width: 380px; margin-inline: auto; order: -1; }
  .now__grid { grid-template-columns: 1fr; }
  .now__figure { max-width: 460px; }
}

@media (max-width: 820px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    background: rgba(250, 246, 239, 0.97);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 0.6rem clamp(1.25rem, 5vw, 2.5rem) 1.1rem;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 0.7rem 0.6rem; }
  .nav__links a::after { display: none; }
  .nav__links a.is-active { color: var(--gold-deep); }
  .nav__cta { text-align: center; margin-top: 0.3rem; }
  .job__head { flex-direction: column; }
  .job__dates { order: -1; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .social__link:hover, .footer__social a:hover { transform: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
