/* ==========================================================================
   SECTIONS — hero, marquee, about, experience, capabilities, contact, footer
   ========================================================================== */

main {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Hero
   ========================================================================== */

#hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

#webgl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-label {
  margin-bottom: 1.75rem;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.mask-line {
  display: block;
  overflow: hidden;
}

.mask-inner {
  display: block;
}

.hero-meta {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 32rem;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-dim);
}

.scroll-indicator {
  position: absolute;
  left: clamp(1.25rem, 4vw, 3rem);
  bottom: 2rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  transform-origin: top;
}

/* ==========================================================================
   Marquee
   ========================================================================== */

#marquee {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
  overflow: hidden;
}

.marquee-row {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-row + .marquee-row {
  margin-top: 1rem;
}

.marquee-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
}

.marquee-item {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.marquee-item em {
  font-style: normal;
  color: var(--accent);
  margin: 0 0.4em;
}

/* ==========================================================================
   Shared section spacing
   ========================================================================== */

#about,
#experience,
#capabilities,
#process,
#contact {
  padding: clamp(5rem, 12vw, 9rem) clamp(1.25rem, 4vw, 3rem);
}

/* ==========================================================================
   About
   ========================================================================== */

.about-statement {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 56rem;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
}

.stat-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 9rem;
}

.stat-figure {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--accent);
}

@media (max-width: 767px) {
  .stats-row {
    flex-direction: column;
    gap: 1.75rem;
  }
}

/* ==========================================================================
   Experience / Timeline
   ========================================================================== */

.timeline {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--line);
  transform: scaleY(0);
  transform-origin: top;
}

.timeline-line::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
}

@media (min-width: 1024px) {
  .timeline-line {
    left: 50%;
    transform: translateX(-50%) scaleY(0);
  }
}

.timeline-entry {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2.5rem;
}

.timeline-entry:last-child {
  margin-bottom: 0;
}

.timeline-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: border-color 0.35s ease;
}

.timeline-card:hover {
  border-color: var(--accent);
}

@media (min-width: 1024px) {
  .timeline-entry {
    width: 50%;
    padding-left: 3.5rem;
    padding-right: 0;
  }

  .timeline-entry:nth-child(even) {
    margin-left: 50%;
  }

  .timeline-entry:nth-child(odd) {
    padding-left: 0;
    padding-right: 3.5rem;
    text-align: right;
  }

  .timeline-entry:nth-child(odd) .entry-desc {
    margin-left: auto;
  }
}

.entry-date {
  margin-bottom: 0.75rem;
}

.entry-company {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.entry-role {
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}

.entry-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 34rem;
}

/* ==========================================================================
   Capabilities
   ========================================================================== */

.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 768px) {
  .capabilities-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.cap-card {
  background: var(--bg);
  padding: clamp(2rem, 4vw, 3rem);
  transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid transparent;
}

.cap-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: var(--bg-elev);
}

.cap-index {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--text-dim);
  opacity: 0.4;
  margin-bottom: 1.25rem;
  letter-spacing: 0;
}

.cap-title {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
}

.cap-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 26rem;
}

/* ==========================================================================
   How I Work / Process
   ========================================================================== */

.process-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 56rem;
  margin: 0 auto;
}

.process-row {
  background: var(--bg-elev);
  display: flex;
  align-items: flex-start;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: none;
  border-radius: 0;
}

.process-index {
  flex-shrink: 0;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  color: var(--text-dim);
  opacity: 0.4;
  letter-spacing: 0;
  line-height: 1;
  padding-top: 0.15em;
}

.process-title {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.process-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 38rem;
}

@media (max-width: 640px) {
  .process-row {
    gap: 1rem;
  }
}

/* ==========================================================================
   Contact
   ========================================================================== */

#contact {
  text-align: center;
}

.contact-subhead {
  font-family: var(--font-body);
  color: var(--text-dim);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  max-width: 32rem;
  margin: 1.25rem auto 0;
}

.contact-cta {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  max-width: 60rem;
  margin: 0 auto;
}

.contact-button-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 1.1rem 1.9rem;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.contact-button:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.btn-arrow {
  color: var(--accent);
  transition: transform 0.3s ease;
}

.contact-button:hover .btn-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   Footer
   ========================================================================== */

#footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  #footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    text-align: left;
  }

  #footer > :last-child {
    text-align: right;
  }
}

/* ==========================================================================
   Reveal-ready states (JS owns the animated-in state via GSAP;
   these are safe no-JS-visible defaults)
   ========================================================================== */

[data-reveal-lines] .rline {
  overflow: hidden;
  display: block;
}

.stat-block,
.timeline-card,
.cap-card {
  opacity: 1;
}
