/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --bg:         #0b0b0b;
  --border:     rgba(255, 255, 255, 0.07);
  --text:       #e4e4e7;
  --text-muted: #71717a;
  --accent:     #DD4A38;
  --green:      #4ade80;
  --nav-height: 68px;
  --container:  1100px;

  /* Mouse spotlight — updated by JS */
  --mx: -1000px;
  --my: -1000px;
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(9px); }
}

@keyframes orbDrift {
  0%   { transform: translate(-50%, -50%) translate(-18%, -28%) scale(1);    }
  30%  { transform: translate(-50%, -50%) translate( 14%, -12%) scale(1.08); }
  60%  { transform: translate(-50%, -50%) translate( 22%,  18%) scale(0.94); }
  100% { transform: translate(-50%, -50%) translate(-18%, -28%) scale(1);    }
}

@keyframes availablePulse {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: 0.5; transform: scale(0.82); }
}

/* ============================================================
   Reset / Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Film grain — SVG fractal noise tiled at low opacity */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.038;
}

/* Mouse-tracking spotlight glow */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
    750px circle at var(--mx) var(--my),
    rgba(221, 74, 56, 0.055),
    transparent 60%
  );
  pointer-events: none;
  z-index: 9999;
}

h1, h2, h3 { margin: 0; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* Keyboard focus — visible only on keyboard nav, not mouse clicks */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
}

/* ============================================================
   Scroll-reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   Navigation
   ============================================================ */
.topBar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}
.topBar.scrolled {
  background: rgba(11, 11, 11, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
}

.logo {
  display: block;
  width: 70px;
  height: 56px;
  background: url('assets/images/logoJMbacked3.png') center no-repeat;
  background-size: contain;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.logo:hover { opacity: 0.4; }

.social-nav { display: flex; align-items: center; gap: 4px; }
.social-nav li a {
  display: block;
  width: 34px;
  height: 34px;
  filter: brightness(0) invert(1);
  opacity: 0.5;
  border-radius: 6px;
  transition: opacity 0.2s ease;
}
.social-nav li a:hover { opacity: 1; }

.icon-github  { background: url('assets/images/github-50.png')   no-repeat center / contain; }
.icon-twitter { background: url('assets/images/twitter-50.png')  no-repeat center / contain; }
.icon-linkedin{ background: url('assets/images/linkedin-50.png') no-repeat center / contain; }

/* ============================================================
   Hero / Landing
   ============================================================ */
.landing {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  background-size: cover;
  background-position: center top;
  overflow: hidden;
}

/* Gradient overlay: image bleeds into page at bottom */
.landing::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.52) 0%,
    rgba(0, 0, 0, 0.18) 42%,
    rgba(11, 11, 11, 0.88) 82%,
    rgba(11, 11, 11, 1)  100%
  );
  z-index: 1;
}

/* Dot-grid texture */
.landing::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 3;
  pointer-events: none;
}

/* Ambient drifting orb */
.hero-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70vw;
  max-width: 860px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(221, 74, 56, 0.2)  0%,
    rgba(221, 74, 56, 0.06) 45%,
    transparent 70%
  );
  filter: blur(55px);
  animation: orbDrift 22s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 0 1.5rem;
  opacity: 0;
}
.hero-content.loaded {
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-content {
  max-width: 720px;
}

.hero-content h1 {
  font-weight: 200;
  font-style: italic;
  font-size: clamp(1.35rem, 3.2vw, 2.1rem);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
  letter-spacing: 0.01em;
  margin-bottom: 1em;
}
.hero-content h1.scrambling {
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace;
  font-style: normal;
  font-weight: 300;
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}

/* Attribution line */
.hero-sub {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.14em;
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace;
  transition: opacity 0.7s ease;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 3rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.6s ease;
  animation: scrollBounce 2.4s ease-in-out infinite;
  animation-delay: 1.8s;
}
.scroll-cue:hover { opacity: 0.35 !important; }

/* ============================================================
   Section label (code-comment style)
   ============================================================ */
.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  margin-bottom: 0.6rem;
  opacity: 0.9;
}

.section-label::after {
  content: '_';
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================================================
   About section
   ============================================================ */
.about { padding: 120px 0 80px; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 80px;
  align-items: start;
}

/* Location + availability metadata */
.meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace;
  letter-spacing: 0.05em;
  margin: 0 0 1.4rem;
}

.available {
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.2s ease;
}
.available:hover { opacity: 0.75; }

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: availablePulse 2.2s ease-in-out infinite;
}

/* DT-LA city image */
.about-image { position: relative; }

.dt {
  background: url('assets/images/dt-la.png') no-repeat center top;
  background-size: contain;
  min-height: 420px;
  opacity: 0.42;
  filter: grayscale(50%);
  margin-top: 8px;
}

/* Horizontal scanline overlay */
.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent      0px,
    transparent      3px,
    rgba(0,0,0,0.18) 3px,
    rgba(0,0,0,0.18) 4px
  );
  pointer-events: none;
}

.about-body h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.about-body p {
  font-size: 1.05rem;
  line-height: 1.78;
  color: rgba(228, 228, 231, 0.72);
  margin: 0 0 1.2em;
}
.about-body p:last-child { margin-bottom: 0; }

.about-body a {
  color: var(--text);
  border-bottom: 1px solid rgba(221, 74, 56, 0.3);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.about-body a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============================================================
   Prior Work section
   ============================================================ */
.work { padding: 0 0 120px; }

.work-header {
  text-align: center;
  margin-bottom: 3rem;
}

/* App icon grid */
.apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 0.75rem;
  max-width: 580px;
  margin: 0 auto;
}

/* Each icon starts hidden; JS staggers them in */
.apps li {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.2s ease;
  border-radius: 20px;
  padding: 16px 8px 14px;
}
.apps li:hover { background: rgba(255, 255, 255, 0.04); }

.apps li div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-align: center;
  transition: color 0.2s ease;
}
.apps li:hover div { color: var(--text); }

.apps img {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease,
              filter 0.3s ease;
}

/* Lift + chromatic aberration on hover */
.apps li:hover img {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.65);
  filter: drop-shadow(-3px 0 0 rgba(221, 74, 56, 0.65))
          drop-shadow( 3px 0 0 rgba(80, 160, 255, 0.55));
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 3.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer p { margin: 0.5rem 0; }
footer a { color: var(--text-muted); transition: color 0.2s ease; }
footer a:hover { color: var(--accent); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .dt { min-height: 260px; margin-top: 0; }
}

@media (max-width: 600px) {
  .about { padding: 80px 0 60px; }
  .apps {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 300px;
  }
  .hero-content h1 { font-size: 2.2rem; }
  .hero-sub { font-size: 1rem; }
}

@media (max-height: 500px) {
  :root { --nav-height: 54px; }
}

