/* ==========================================================
   hellonewman.me
   ----------------------------------------------------------
   Single-page transmission. Edits are surgical:
   - copy lives in index.html
   - palette + tone lives in :root
   - motion lives at the bottom
   ========================================================== */

:root {
  /* palette */
  --cream: #F2EADA;
  --cream-soft: #EFE6D2;
  --oxblood: #2E0E12;
  --oxblood-deep: #1A0509;
  --deep: #0E1518;
  --deep-soft: #18222A;
  --accent: #E84A2A;
  --accent-warm: #F0876B;
  --orange: #E59A3D;
  --ink: #15110E;
  --muted-light: #897F70;
  --muted-dark: #847060;

  /* type */
  --font-display: 'Ultra', 'Georgia', serif;
  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* layout */
  --max: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--oxblood);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

/* ==========================================================
   HERO
   ========================================================== */

.hero {
  min-height: 100vh;
  background: radial-gradient(ellipse at 60% 40%, var(--oxblood) 0%, var(--oxblood-deep) 70%);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 10vh, 8rem) var(--gutter);
}

/* calibration scale at the bottom of the hero —
   instrument motif, draws in on load */
.hero-scale {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(2rem, 5vh, 4rem);
  height: 14px;
  z-index: 1;
  pointer-events: none;
}

.hero-scale .scale-line {
  position: absolute;
  inset: 0;
  display: block;
  background-image:
    /* tick marks across the top edge */
    repeating-linear-gradient(
      to right,
      rgba(240, 135, 107, 0.45) 0,
      rgba(240, 135, 107, 0.45) 1px,
      transparent 1px,
      transparent 56px
    ),
    /* solid baseline */
    linear-gradient(to right, rgba(240, 135, 107, 0.45), rgba(240, 135, 107, 0.45));
  background-repeat: repeat-x, no-repeat;
  background-position: 0 0, 0 100%;
  background-size: 100% 7px, 100% 1px;
  transform-origin: left center;
  animation: scale-draw 2.4s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes scale-draw {
  0%   { transform: scaleX(0); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: scaleX(1); opacity: 1; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.callsign {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 0.9vw, 0.85rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 2.5rem;
  display: inline-block;
  opacity: 0.85;
}

.name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin-bottom: 3rem;
  color: var(--cream);
}

.name-last {
  color: var(--accent-warm);
}

.lede {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.55;
  max-width: 60ch;
  margin-bottom: 2.5rem;
  color: var(--cream);
  opacity: 0.92;
  font-weight: 400;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  color: var(--cream);
}

.hero-meta a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
  transition: color 200ms ease;
}

.hero-meta a:hover { color: var(--accent-warm); }

.hero-meta .dot {
  color: var(--accent);
  opacity: 0.6;
}

/* staggered entry on load —
   each line fades + slides up in sequence */
.hero .callsign,
.hero .name .word,
.hero .lede,
.hero .hero-meta {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-enter 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero .callsign            { animation-delay: 0.15s; }
.hero .name .word:nth-child(1) { animation-delay: 0.30s; }
.hero .name .word:nth-child(2),
.hero .name .name-last     { animation-delay: 0.45s; }
.hero .lede:nth-of-type(1) { animation-delay: 0.70s; }
.hero .lede:nth-of-type(2) { animation-delay: 0.90s; }
.hero .hero-meta           { animation-delay: 1.10s; }

@keyframes hero-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================
   SECTIONS
   ========================================================== */

.section {
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
  position: relative;
}

.section--cream {
  background: var(--cream);
  color: var(--ink);
}

.section--deep {
  background:
    radial-gradient(ellipse at 20% 0%, var(--deep-soft) 0%, var(--deep) 60%);
  color: var(--cream);
}

.section--accent {
  background: var(--accent);
  color: var(--cream);
  background-image:
    radial-gradient(circle at 15% 80%, var(--orange) 0%, transparent 50%),
    radial-gradient(circle at 85% 20%, var(--oxblood) 0%, transparent 60%);
  background-blend-mode: multiply, normal;
}

/* section header — large typographic moment */

.section-header {
  max-width: var(--max);
  margin: 0 auto 5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 1.5rem 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid currentColor;
  border-color: rgba(0, 0, 0, 0.15);
}

.section--deep .section-header,
.section--accent .section-header {
  border-color: rgba(255, 255, 255, 0.18);
}

.num {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.1vw, 1.05rem);
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--accent);
  align-self: start;
  margin-top: 0.6rem;
}

.section--cream .num { color: var(--accent); }
.section--deep .num { color: var(--orange); }
.section--accent .num { color: var(--cream); opacity: 0.65; }

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
  align-self: end;
  padding-bottom: 0.7rem;
  text-align: right;
}

.section-body {
  max-width: var(--max);
  margin: 0 auto;
}

.section-body--narrow {
  max-width: 780px;
}

/* ==========================================================
   PROJECTS (Now)
   ========================================================== */

.project {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 3.5rem 0;
  border-top: 1px solid rgba(21, 17, 14, 0.12);
}

.project:first-of-type { border-top: none; padding-top: 0; }
.project:last-child { padding-bottom: 0; }

.project-side {
  position: relative;
}

.project-mark {
  width: 60px;
  height: 60px;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0.85;
}

.project-mark svg {
  width: 100%;
  height: 100%;
}

.project h3 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.project-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-dark);
  line-height: 1.5;
}

.project-body p {
  font-size: 1.08rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  color: var(--ink);
  max-width: 56ch;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 0.2rem;
  transition: gap 250ms ease, color 200ms ease;
}

.project-link:hover {
  color: var(--accent);
  gap: 0.9rem;
}

.project-link .arrow {
  transition: transform 250ms ease;
}

.project-link:hover .arrow {
  transform: translateX(4px);
}

/* ==========================================================
   DEEP SECTION OVERRIDES
   projects + body copy on the oxblood/deep background
   ========================================================== */

.section--deep .section-body p {
  font-size: clamp(1.05rem, 1.3vw, 1.18rem);
  line-height: 1.7;
  margin-bottom: 1.75rem;
  color: var(--cream);
  opacity: 0.92;
}

.section--deep .project {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.section--deep .project-body p {
  color: var(--cream);
  opacity: 0.92;
}

.section--deep .project-meta {
  color: var(--muted-light);
}

.section--deep .project-link {
  color: var(--cream);
}

.section--deep .project-link:hover {
  color: var(--accent-warm);
}

.section--deep .project-mark {
  color: var(--orange);
}

/* Experience Economy is the writing channel, not an instrument.
   Visually subordinate. */

.project--secondary .project-mark {
  width: 42px;
  height: 42px;
  opacity: 0.6;
}

.project--secondary h3 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  opacity: 0.85;
}

.project--secondary .project-meta {
  opacity: 0.7;
}

/* ==========================================================
   REACH
   ========================================================== */

.section--accent .section-body p {
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 60ch;
}

.contact-block {
  margin-top: 4rem;
  display: grid;
  gap: 1.25rem;
}

.contact-link {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  transition: padding-left 250ms ease;
}

.contact-link:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.25); }

.contact-link:hover {
  padding-left: 1rem;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}

.contact-value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ==========================================================
   FOOTER
   ========================================================== */

footer {
  background: var(--oxblood-deep);
  color: var(--cream);
  padding: 2.5rem var(--gutter);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  opacity: 0.7;
}

/* ==========================================================
   MOTION
   ========================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .callsign,
  .hero .name .word,
  .hero .lede,
  .hero .hero-meta {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .hero-scale .scale-line { animation: none; transform: scaleX(1); opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 768px) {
  .hero { padding: 5rem var(--gutter) 4rem; min-height: 92vh; }
  .name { line-height: 0.92; margin-bottom: 2rem; }
  .lede { font-size: 1.05rem; margin-bottom: 2rem; }
  .callsign { margin-bottom: 1.75rem; font-size: 0.7rem; }

  .section-header {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 3rem;
  }
  .section-tag { text-align: left; padding-bottom: 0; }
  .num { margin-top: 0; }

  .project {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2.5rem 0;
  }

  .project-mark { width: 48px; height: 48px; margin-bottom: 1rem; }

  .contact-link {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.25rem 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    text-align: left;
  }
}
