/* ============================================================
   Randy Bachle — Portfolio
   Slate & Cobalt · Fraunces (serif headlines) / Inter · cobalt accent
   ============================================================ */

:root {
  /* ---- Slate & Cobalt palette ---- */
  --bg:        #f7f9fc;
  --bg-alt:    #eef2f8;
  --surface:   #ffffff;
  --surface-2: #f0f4fa;
  --border:    #e3e9f1;
  --border-2:  #cfd8e4;

  --text:      #141a24;
  --text-mid:  #465061;
  --text-dim:  #727d8d;

  --accent:    #3b5bdb;   /* cobalt / indigo */
  --accent-2:  #4d6bf0;
  --accent-soft:#e4e9fd;
  --accent-rgb: 59,91,219;
  --teal:      #3b5bdb;

  --maxw: 1120px;
  --r:    12px;

  --shadow:   0 1px 2px rgba(20,26,36,.04), 0 8px 24px -12px rgba(20,26,36,.14);
  --shadow-lg:0 10px 40px -16px rgba(20,26,36,.20);

  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px 0;
  transition: padding .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding: 12px 0;
  background: rgba(250,247,242,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px -16px rgba(40,34,20,.4);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.nav__brand { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-head); font-weight: 600; }
.nav__name { font-size: 17px; letter-spacing: -.01em; }
.nav__brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.nav__links { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav__links a { color: var(--text-mid); transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  color: var(--accent) !important; border: 1px solid var(--border-2);
  padding: 8px 16px; border-radius: 9px; transition: all .2s var(--ease);
}
.nav__cta:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- HERO ---------- */
.hero { position: relative; padding: 184px 0 110px; overflow: hidden; }
.hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center;
}
.hero__eyebrow {
  font-family: var(--font-head); font-weight: 600; font-size: 14px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px;
}
.hero__title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.06;
  letter-spacing: -.012em; margin-bottom: 26px;
}
.accent { color: var(--accent); }
.hero__lede { font-size: clamp(1.08rem, 1.8vw, 1.28rem); color: var(--text-mid); max-width: 600px; margin-bottom: 26px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--text-dim); font-size: 15px; margin-bottom: 38px; }
.hero__meta .dot { color: var(--border-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Portrait */
.hero__portrait { display: flex; justify-content: center; }
.hero__portrait img {
  width: 100%; max-width: 330px; aspect-ratio: 1; object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg);
  background: var(--surface);
}

.hero__glow {
  position: absolute; top: -12%; right: -6%; width: 680px; height: 680px; z-index: 1;
  background: radial-gradient(circle, rgba(var(--accent-rgb),.12) 0%, rgba(var(--accent-rgb),.04) 40%, transparent 70%);
  filter: blur(10px); pointer-events: none;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 15.5px;
  padding: 14px 26px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: all .22s var(--ease);
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(var(--accent-rgb),.55); }
.btn--ghost { border-color: var(--border-2); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--full { width: 100%; }

/* ---------- HIGHLIGHTS (formerly metrics) ---------- */
.metrics { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.metrics__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 40px 26px; border-right: 1px solid var(--border); }
.metric:last-child { border-right: none; }
.metric__num {
  display: block; font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -.01em; color: var(--accent); margin-bottom: 8px;
}
.metric__label { display: block; font-size: 14.5px; color: var(--text-mid); line-height: 1.45; }

/* ---------- SECTIONS ---------- */
.section { padding: 104px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 760px; margin-bottom: 52px; }
.section__kicker {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.section__title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 1.14; letter-spacing: -.01em;
}
.section__sub { color: var(--text-mid); margin-top: 16px; font-size: 1.1rem; }
.prose { color: var(--text-mid); font-size: 1.1rem; max-width: 720px; margin-bottom: 18px; }

/* ---------- PILLARS ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 50px; }
.pillar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 30px 28px; box-shadow: var(--shadow);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pillar:hover { border-color: var(--border-2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pillar h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.22rem; margin-bottom: 12px; }
.pillar h3::before { content: ""; display: block; width: 30px; height: 3px; border-radius: 2px; background: var(--accent); margin-bottom: 16px; }
.pillar p { color: var(--text-mid); font-size: 1rem; }

/* ---------- HOW I LEAD ---------- */
.lead__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.lead__body .prose:last-child { margin-bottom: 0; }

/* ---------- PROJECTS ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.project {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 34px 32px; box-shadow: var(--shadow);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.project:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.project__head { margin-bottom: 18px; }
.project__title { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; letter-spacing: -.01em; }
.project__role { display: block; font-size: 13.5px; color: var(--accent); margin-top: 5px; font-weight: 600; }
.project__desc { color: var(--text-mid); font-size: 1.02rem; margin-bottom: 22px; }
.project__stats { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-bottom: 22px; }
.project__stats li { font-size: 14px; color: var(--text-dim); padding-left: 16px; position: relative; }
.project__stats li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.project__stats strong { color: var(--text); font-weight: 600; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: 12.5px; color: var(--text-mid); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 7px; padding: 5px 11px; font-weight: 500;
}

/* Secondary / compact projects */
.work__more-label {
  font-family: var(--font-head); font-weight: 600; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim); margin: 46px 0 22px;
}
.projects--compact { grid-template-columns: repeat(3, 1fr); }
.project--compact { padding: 26px 26px; }
.project--compact .project__title { font-size: 1.22rem; }
.project--compact .project__desc { font-size: .96rem; margin-bottom: 18px; }

.work__also { margin-top: 34px; color: var(--text-dim); font-size: .98rem; max-width: 920px; }
.work__also strong { color: var(--text-mid); font-weight: 600; }

/* ---------- TIMELINE ---------- */
.timeline { list-style: none; max-width: 860px; }
.timeline__item { display: grid; grid-template-columns: 180px 1fr; gap: 28px; padding: 26px 0; border-top: 1px solid var(--border); }
.timeline__item:first-child { border-top: none; }
.timeline__when { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--accent); padding-top: 4px; }
.timeline__body h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.18rem; margin-bottom: 8px; }
.timeline__body h3 span { color: var(--text-dim); font-weight: 400; }
.timeline__body p { color: var(--text-mid); font-size: 1rem; }
.creds { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 44px; color: var(--text-dim); font-size: 14.5px; }
.creds .dot { color: var(--border-2); }

/* ---------- CONTACT ---------- */
.contact__inner { max-width: 680px; margin: 0 auto; text-align: center; }
.contact__inner .prose { margin-left: auto; margin-right: auto; }
.contact__links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; justify-content: center; }
.contact__link {
  border: 1px solid var(--border-2); border-radius: 10px; padding: 12px 20px; background: var(--surface);
  font-size: 15px; color: var(--text); transition: all .2s var(--ease);
}
.contact__link:hover { border-color: var(--accent); color: var(--accent); }
.contact__link--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.contact__link--primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--border); padding: 30px 0; background: var(--bg-alt); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; color: var(--text-dim); font-size: 14px; }
.footer__top { color: var(--text-mid); transition: color .2s var(--ease); }
.footer__top:hover { color: var(--accent); }

/* ---------- REVEAL ANIMATION ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__portrait { order: -1; justify-content: flex-start; }
  .hero__portrait img { max-width: 180px; }
  .metrics__grid { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: none; }
  .metric:nth-child(1), .metric:nth-child(2) { border-bottom: 1px solid var(--border); }
  .cards-3 { grid-template-columns: 1fr; }
  .lead__grid { grid-template-columns: 1fr; gap: 28px; }
  .projects { grid-template-columns: 1fr; }
  .projects--compact { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__links { gap: 16px; }
  .nav__links a:not(.nav__cta) { display: none; }
  .hero { padding: 140px 0 80px; }
  .section { padding: 76px 0; }
  .metrics__grid { grid-template-columns: 1fr; }
  .metric { border-right: none; border-bottom: 1px solid var(--border); }
  .metric:last-child { border-bottom: none; }
  .project__stats { grid-template-columns: 1fr; }
  .timeline__item { grid-template-columns: 1fr; gap: 6px; }
  .container { padding: 0 20px; }
}
