/* =========================================================
   Sean Woods — CV / portfolio
   Engineered minimal. IBM Plex Mono + Instrument Sans.
   Warm paper, ink, one pitch-green accent.
   ========================================================= */

:root {
  --fs-display: clamp(2.6rem, 7.5vw, 5rem);
  --fs-role:    clamp(1rem, 1.4vw, 1.1rem);
  --fs-h2:      0.74rem;
  --fs-h3:      1.05rem;
  --fs-body:    0.98rem;
  --fs-small:   0.78rem;

  --leading-tight: 1.02;
  --leading:       1.6;

  --max:    760px;
  --gutter: clamp(1.5rem, 5vw, 2.5rem);

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---- THEMES ------------------------------------------- */
html[data-theme="light"] {
  --bg:        #f6f4ee;
  --bg-elev:   #fdfcf9;
  --fg:        #121310;
  --fg-soft:   #3a3b37;
  --fg-mute:   #6b6c64;
  --line:      #d6d3c6;
  --line-soft: #e5e2d6;
  --accent:    #146c43;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg:        #0f110f;
  --bg-elev:   #171a17;
  --fg:        #ecede8;
  --fg-soft:   #b9bab2;
  --fg-mute:   #7d7f77;
  --line:      #292c28;
  --line-soft: #1e211e;
  --accent:    #52b788;
  color-scheme: dark;
}

/* ---- RESET / BASE ------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--leading);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }

/* ---- TOPBAR ------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.mark {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.navlinks {
  display: none;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
}
.navlinks a { transition: color .2s var(--ease); }
.navlinks a:hover { color: var(--fg); }
@media (min-width: 720px) {
  .navlinks { display: inline-flex; }
}

.topbar__actions { display: inline-flex; gap: 0.4rem; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 0.75rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { color: var(--fg); border-color: var(--fg); }
.btn--icon { width: 30px; padding: 0; }
.btn--icon .ico-moon { display: none; }
html[data-theme="dark"] .btn--icon .ico-sun  { display: none; }
html[data-theme="dark"] .btn--icon .ico-moon { display: inline; }

/* ---- MAIN LAYOUT -------------------------------------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- HERO --------------------------------------------- */
.hero {
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3rem, 7vw, 5rem);
  text-align: center;
}
.hero__eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--fg-mute);
  margin: 0 0 2rem;
  text-transform: lowercase;
  animation: rise .7s var(--ease) both;
}
.hero__name {
  font-family: var(--mono);
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: var(--leading-tight);
  letter-spacing: -0.045em;
  margin: 0;
  animation: rise .7s var(--ease) .08s both;
}
.hero__role {
  margin: 1.25rem 0 0;
  font-size: var(--fs-role);
  color: var(--fg-soft);
  animation: rise .7s var(--ease) .16s both;
}
.hero__quote-sub {
  max-width: 48ch;
  margin: 2rem auto 0;
  color: var(--fg-soft);
  font-size: 0.98rem;
  line-height: 1.6;
  animation: rise .7s var(--ease) .24s both;
}
.hero__avail {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 2.25rem auto 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--fg-soft);
  animation: rise .7s var(--ease) .32s both;
}
.hero__open {
  margin: 0.9rem 0 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
  animation: rise .7s var(--ease) .44s both;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 45%, transparent); }
  50%      { opacity: .6; box-shadow: 0 0 0 5px transparent; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.stats {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 7vw, 4rem);
  margin: 2.5rem 0 0;
  animation: rise .7s var(--ease) .30s both;
}
.stat dt {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}
.stat dd {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.hero__avail { animation-delay: .38s; }

/* ---- SECTION FRAME ------------------------------------ */
.section {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--line-soft);
}
.section__title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: var(--fs-h2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__eyebrow, .hero__name, .hero__role, .hero__quote-sub, .hero__avail, .stats, .hero__open { animation: none; }
  .dot { animation: none; }
}

/* ---- PROJECTS ------------------------------------------ */
.projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .projects { grid-template-columns: 1fr 1fr; }
  .project--featured { grid-column: 1 / -1; }
}
.project {
  border: 1px solid var(--line-soft);
  background: var(--bg-elev);
  padding: 1.4rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.project:hover { border-color: var(--line); transform: translateY(-2px); }
.project__shot {
  display: block;
  margin: -1.4rem -1.5rem 0.5rem;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.project__shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  filter: saturate(0.96);
  transition: transform .35s var(--ease);
}
.project--featured .project__shot img { aspect-ratio: 21 / 9; }
.project__shot:hover img { transform: scale(1.015); }
.project__title {
  font-family: var(--mono);
  font-weight: 600;
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
  margin: 0;
}
.project__meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--fg-mute);
  text-transform: lowercase;
  margin: 0.3rem 0 0;
}
.project__body {
  margin: 0;
  color: var(--fg-soft);
  font-size: 0.93rem;
  line-height: 1.6;
}
.project__links { list-style: none; margin: 0; padding: 0; }
.link {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.link:hover { border-color: var(--accent); }
.link__arr { margin-left: 0.25rem; }

/* ---- WORK ROLES ---------------------------------------- */
.role { padding: 0 0 2.25rem; }
.role:last-child { padding-bottom: 0; }
.role__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.role__title {
  font-family: var(--mono);
  font-weight: 600;
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
  margin: 0;
}
.role__org { margin: 0.2rem 0 0; color: var(--fg-mute); font-size: 0.9rem; }
.role__years {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--fg-mute);
  white-space: nowrap;
  margin: 0;
}
.role__bullets {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--fg-soft);
  font-size: 0.93rem;
}
.role__bullets li { margin-bottom: 0.45rem; }
.role__bullets li::marker { color: var(--accent); }

/* ---- EDUCATION ------------------------------------------ */
.edu { display: flex; flex-direction: column; gap: 1.75rem; }
.edu__item { margin: 0; }
.edu__years {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--fg-mute);
  margin: 0 0 0.3rem;
}
.edu__degree {
  font-family: var(--mono);
  font-weight: 600;
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
  margin: 0;
}
.edu__org { margin: 0.2rem 0 0; color: var(--fg-soft); font-size: 0.93rem; }
.edu__grade {
  margin: 0.2rem 0 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

/* ---- STACK / CONTACT ROWS ------------------------------- */
.stack, .contact { margin: 0; }
.stack__row, .contact__row {
  display: grid;
  grid-template-columns: minmax(150px, 240px) 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.stack__row:last-child, .contact__row:last-child { border-bottom: 0; }
.stack__row dt, .contact__row dt {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}
.stack__row dd {
  margin: 0;
  color: var(--fg-mute);
  font-size: 0.82rem;
  font-family: var(--mono);
  text-transform: lowercase;
  letter-spacing: 0.01em;
}
.contact__row dd {
  margin: 0;
  font-size: 0.93rem;
  color: var(--fg-soft);
}
.contact__row dd a { border-bottom: 1px solid var(--line); transition: border-color .2s var(--ease), color .2s var(--ease); }
.contact__row dd a:hover { color: var(--accent); border-color: var(--accent); }
.phone-mask { font-family: var(--mono); letter-spacing: 0.08em; }
.reveal-btn {
  margin-left: 0.6rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.reveal-btn:hover { color: var(--fg); border-color: var(--fg); }

/* ---- CONTACT FORM --------------------------------------- */
.contact-form { margin-top: 2.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.contact-form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
@media (min-width: 640px) {
  .contact-form__grid { grid-template-columns: 1fr 1fr; }
}
.form-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.82rem;
  transition: border-color .2s var(--ease);
}
.form-input::placeholder { color: var(--fg-mute); }
.form-input:focus { outline: none; border-color: var(--fg); }
.form-textarea { min-height: 120px; resize: vertical; }
.btn--submit { align-self: flex-start; height: 36px; padding: 0 1.1rem; }

/* ---- FOOTER ---------------------------------------------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
  text-align: center;
}
.footer p { margin: 0; }
.footer__sep { margin: 0 0.6rem; opacity: 0.5; }
