/* =============================================================================
   Landing page — modern ML engineer refresh
   Loaded ONLY by index.html (after agency.min.css), so nothing here touches
   Resume / Investing / Stocks pages. Builds on the existing dark + teal tokens.
   Type system: IBM Plex Sans (reading) + IBM Plex Mono (the technical voice).
   ============================================================================= */

:root {
  --font-sans: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  --accent-soft: rgba(105, 179, 162, 0.14);
  --accent-line: rgba(105, 179, 162, 0.32);
  --hairline: rgba(255, 255, 255, 0.08);
}

/* ---------- Base typography ---------- */
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { font-family: var(--font-sans); }

/* keyboard focus — visible, on-brand */
a:focus-visible,
button:focus-visible,
.btn-modern:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Navigation ---------- */
#mainNav {
  border-bottom: 1px solid transparent;
}
#mainNav.navbar-shrink {
  border-bottom: 1px solid var(--hairline);
}
.brand-modern {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
}
.brand-modern:hover { color: var(--accent); }
.brand-modern img { width: 30px; height: auto; display: block; }
.brand-modern .brand-dot { color: var(--accent); }

#mainNav .navbar-nav .nav-item .nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

/* ---------- Shared section header ---------- */
.sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
/* symmetric hairlines that fade outward from the label (centered headers) */
.sec-eyebrow::before,
.sec-eyebrow::after {
  content: "";
  width: 34px;
  height: 1px;
  flex: none;
}
.sec-eyebrow::before { background: linear-gradient(90deg, transparent, currentColor); }
.sec-eyebrow::after  {
  margin-left: -0.22em; /* offset the trailing letter-spacing so both gaps match */
  background: linear-gradient(90deg, currentColor, transparent);
}
/* left-aligned variant (About): label sits flush-left with one trailing line */
.sec-eyebrow--start::before { display: none; }

section h2.section-heading,
#description h2,
#TECHNOLOGIES .tech-head h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.015em;
}

section h3.section-subheading {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 26px;
}

/* ---------- Vertical rhythm ----------
   agency.css ships 60/80px section padding; that stacks to ~160px+ of dead
   space between adjacent sections. Tighten it here so the shared stylesheet
   (used by Resume / Investing / Stocks) stays untouched. */
section { padding: 36px 0; }
@media (min-width: 768px) {
  section { padding: 44px 0; }
}

/* =============================================================================
   HERO — the "terminal identity"
   ============================================================================= */
.masthead::after {
  /* soft fade so the particle field melts into the About section */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 160px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(43, 43, 47, 0) 0%, var(--bg-page) 100%);
  z-index: 1;
}

.textlanding.hero-modern {
  max-width: 780px;
  width: 92%;
  box-sizing: border-box;
  padding: 1.5em 1em;
  z-index: 2;
}
/* nothing in the hero may push past its column (guards against wide font fallbacks) */
.hero-modern > * { max-width: 100%; }

/* faint glow anchoring the name — the one place we let the accent breathe */
.hero-modern::before {
  content: "";
  position: absolute;
  top: 42%;
  left: 50%;
  width: 620px;
  max-width: 120%;
  height: 320px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(105, 179, 162, 0.16), rgba(105, 179, 162, 0) 68%);
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-body);
  padding: 7px 15px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(105, 179, 162, 0.55);
  animation: pulseDot 2.4s ease-out infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(105, 179, 162, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(105, 179, 162, 0); }
  100% { box-shadow: 0 0 0 0 rgba(105, 179, 162, 0); }
}

.hero-name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(30px, 8.5vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin: 22px 0 14px;
  overflow-wrap: break-word;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(18px, 3vw, 27px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-muted);
  margin: 0 0 20px;
  min-height: 1.3em;
}
.hero-role .prompt { color: var(--accent); margin-right: 4px; }
.hero-role .rot { color: var(--accent); }
.hero-role .caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.16em;
  background: var(--accent);
  animation: blinkCaret 1.05s steps(1) infinite;
}
@keyframes blinkCaret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.hero-tagline {
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.7vw, 17.5px);
  line-height: 1.7;
  color: var(--text-body);
  max-width: min(560px, 100%);
  margin: 0 auto 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 30px;
}

/* modern buttons (used in hero, portfolio, contact) */
.btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s ease, background-color 0.22s ease,
              border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}
.btn-modern--solid {
  background: var(--accent);
  color: #10201c;
  font-weight: 600;
}
.btn-modern--solid:hover,
.btn-modern--solid:focus {
  background: var(--accent-hover);
  color: #10201c;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(105, 179, 162, 0.28);
}
.btn-modern--ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--accent-line);
  color: var(--text-primary);
}
.btn-modern--ghost:hover,
.btn-modern--ghost:focus {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* hero social icons */
.hero-social {
  display: flex;
  gap: 12px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  color: var(--text-body);
  font-size: 18px;
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.22s ease, border-color 0.22s ease,
              color 0.22s ease, background-color 0.22s ease;
}
.hero-social a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* scroll cue */
.arrowlanding a { text-decoration: none; }
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.scroll-cue .chev {
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(45deg);
  animation: cueBob 1.8s ease-in-out infinite;
}
@keyframes cueBob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50%      { transform: rotate(45deg) translate(3px, 3px); opacity: 1; }
}

/* =============================================================================
   ABOUT — headshot frame
   ============================================================================= */
.headshot-frame {
  position: relative;
  border-radius: 16px;
  padding: 6px;
  background: linear-gradient(160deg, var(--accent-line), rgba(105, 179, 162, 0.05) 55%, var(--border-color));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
}
.headshot-frame img {
  border-radius: 12px;
  display: block;
  margin: 0 !important;
}

/* =============================================================================
   TECHNOLOGIES — retrofit the inline styles onto the new type system
   ============================================================================= */
#TECHNOLOGIES .tech-sub {
  font-family: var(--font-sans) !important;
  font-style: normal !important;
}
#TECHNOLOGIES .tech-chip {
  font-family: var(--font-mono) !important;
  text-transform: none;
  letter-spacing: 0.01em;
}
#TECHNOLOGIES .tech-title { font-family: var(--font-sans); }
#TECHNOLOGIES .tech-head h2 { letter-spacing: 0.06em; }

/* =============================================================================
   PORTFOLIO — mono pill filters + project cards (siblings of the Tech cards)
   ============================================================================= */
#portfolio-button-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}
#portfolio-button-container .btn-secondary {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 999px;
  border-width: 1px;
}

/* grid — 2-up from md up; centered so a lone filtered card doesn't hug the left */
#portfolio-items {
  margin-top: 30px;
  justify-content: center;
}
#portfolio .portfolio-item { margin-bottom: 30px; }

/* card shell — mirrors #TECHNOLOGIES .tech-card */
#portfolio .proj-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 16px;
  background: linear-gradient(180deg, #3b3b40 0%, var(--bg-card) 60%);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1),
              border-color 0.35s ease, box-shadow 0.35s ease;
}
#portfolio .proj-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px; z-index: 3;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
#portfolio .proj-card:hover {
  transform: translateY(-8px);
  border-color: rgba(105, 179, 162, 0.5);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(105, 179, 162, 0.12);
}
#portfolio .proj-card:hover::before { transform: scaleX(1); }

/* figure — framed panel so the light plots read as intentional "research figures" */
#portfolio .proj-figure { padding: 22px 22px 0; }
#portfolio .proj-media {
  position: relative;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #fafaf8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
#portfolio .proj-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
#portfolio .proj-card:hover .proj-img { transform: scale(1.04); }

/* floating category tag over the figure */
#portfolio .proj-badge {
  position: absolute;
  top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(20, 28, 26, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(105, 179, 162, 0.4);
}

/* body */
#portfolio .proj-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 22px 26px 26px;
}
#portfolio .proj-title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 10px;
}
#portfolio .proj-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-body);
  margin: 0;
}
#portfolio .proj-desc strong { color: var(--text-primary); font-weight: 600; }

/* method chips — identical language to #TECHNOLOGIES .tech-chip, pinned to bottom */
#portfolio .proj-chips {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}
#portfolio .proj-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-body);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease,
              border-color 0.25s ease, color 0.25s ease;
}
#portfolio .proj-chip:hover {
  transform: translateY(-2px);
  background: rgba(105, 179, 162, 0.14);
  border-color: rgba(105, 179, 162, 0.55);
  color: var(--text-primary);
}
#portfolio .proj-chip .chip-logo {
  width: 15px; height: 15px;
  object-fit: contain;
  display: block;
}
#portfolio .proj-chip .chip-ico {
  font-size: 12px;
  color: var(--accent);
  line-height: 1;
}

@media (max-width: 767px) {
  #portfolio .proj-media { height: 240px; }
}

/* =============================================================================
   RESUME band — heading harmony
   ============================================================================= */
#website p[style],
.parallaxwebsite p {
  font-family: var(--font-sans);
}

/* =============================================================================
   Scroll reveal — only active once JS marks the doc ready (no-JS = visible)
   ============================================================================= */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1),
                transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }
  .reveal-ready .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* hero entrance — one orchestrated load moment */
  .reveal-ready .hero-modern > * {
    opacity: 0;
    animation: heroIn 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  }
  .reveal-ready .hero-modern > .hero-status  { animation-delay: 0.05s; }
  .reveal-ready .hero-modern > .hero-name    { animation-delay: 0.16s; }
  .reveal-ready .hero-modern > .hero-role    { animation-delay: 0.28s; }
  .reveal-ready .hero-modern > .hero-tagline { animation-delay: 0.40s; }
  .reveal-ready .hero-modern > .hero-actions { animation-delay: 0.52s; }
  .reveal-ready .hero-modern > .hero-social  { animation-delay: 0.62s; }
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* =============================================================================
   Responsive
   ============================================================================= */
@media (max-width: 767px) {
  .hero-name { letter-spacing: -0.03em; }
  .headshot-frame { max-width: 320px; margin: 0 auto 26px; }
}
