:root {
  --bg: #0A0A0B;
  --surface: #141416;
  --accent: #C6FF3D;
  --other: #38BDF8;
  --text: #F2F2F0;
  --text-2: #C8C8CE;
  --text-3: #B8B8BE;
  --text-4: #9C9CA2;
  --text-5: #6E6E74;
  --text-6: #5C5C62;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 1200px 700px at 15% -10%, rgba(198,255,61,0.08), transparent 60%),
    radial-gradient(ellipse 900px 600px at 100% 30%, rgba(56,189,248,0.06), transparent 55%),
    repeating-linear-gradient(120deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 34px);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.accent { color: var(--accent); }

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo,
.logo:hover {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a:not(.btn) {
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.nav-links a:not(.btn):hover { color: var(--accent); text-decoration: underline; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

/* BUTTONS */
.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 100px;
  display: inline-block;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
}

.btn-primary,
.btn-primary:hover { background: var(--accent); color: var(--bg); }

.btn-secondary,
.btn-secondary:hover {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: transparent;
  padding: 10px 22px;
  font-size: 13px;
}
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* HERO */
.hero {
  padding: 140px 48px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 32px;
  max-width: 1100px;
}

.hero-sub {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-3);
  max-width: 640px;
  margin: 0 0 48px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ABOUT */
.about {
  padding: 40px 48px 100px;
  max-width: 900px;
  margin: 0 auto;
}

.about h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 28px; }
.about p { font-size: 18px; line-height: 1.75; color: var(--text-2); margin: 0 0 20px; }
.about p:last-child { margin-bottom: 0; }

/* SECTIONS shared */
section h2 { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }

/* WORK */
.work {
  padding: 40px 48px 100px;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.work-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin: 40px 0 40px;
}

.filters { display: flex; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; }

.filter-btn {
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 8px 16px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  animation: riseIn 0.4s ease both;
}

.project-card:hover { border-color: var(--border-strong); }

.project-thumb {
  height: 180px;
  background: repeating-linear-gradient(135deg, #1B1B1F, #1B1B1F 10px, #201F24 10px, #201F24 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  overflow: hidden;
}

.project-thumb picture,
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumb span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}

.project-body { padding: 24px; }

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.project-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-5);
}

.project-body h3 { font-size: 20px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.project-body p { font-size: 14px; line-height: 1.55; color: var(--text-4); margin: 0; }

/* TIMELINE */
.timeline {
  padding: 40px 48px 100px;
  max-width: 900px;
  margin: 0 auto;
}

.timeline h2 { margin-bottom: 48px; }

.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.timeline-dates { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); }
.timeline-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.timeline-head h3 { font-size: 18px; font-weight: 600; margin: 0; }
.timeline-org { font-size: 14px; color: var(--text-5); }
.timeline-detail { font-size: 14px; line-height: 1.6; color: var(--text-4); margin: 0; }

/* SKILLS */
.skills {
  padding: 0 48px 100px;
  max-width: 1200px;
  margin: 0 auto;
}

.skills h2 { margin-bottom: 40px; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.skill-group-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  color: #D0D0D6;
}

/* CONTACT */
.contact {
  padding: 90px 48px 60px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.contact h2 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 40px;
}

.contact h2 a { color: var(--text); }
.contact h2 a:hover { color: var(--accent); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

.footer-links a { color: var(--text-3); }
.footer-links a:hover { color: var(--accent); }

.site-footer {
  padding: 32px 48px;
  text-align: center;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-6);
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6,6,7,0.8);
  backdrop-filter: blur(6px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open { display: flex; }

.modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: riseIn 0.25s ease;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.5);
  border: none;
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal-media {
  position: relative;
  overflow: hidden;
}

.modal-media-item {
  aspect-ratio: 16 / 9;
  background: #0A0A0B;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.modal-media-item.active { display: flex; }

.modal-media-item span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

.modal-media-item iframe,
.modal-media-item img,
.modal-media-item picture {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: contain;
  border-radius: 16px 16px 0 0;
  display: block;
}

/* FLIP's slides (cover + 10 marketing images) are all authored at 16:9,
   matching the container exactly, so they fill edge-to-edge with no
   letterboxing. Slides without the .is-16-9 marker keep object-fit: contain
   since their aspect ratio isn't guaranteed to match the container (e.g.
   portrait phone screenshots). */
.modal-media-item.is-16-9 img,
.modal-media-item.is-16-9 picture {
  object-fit: cover;
}

.youtube-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
  background: #0A0A0B;
}

.youtube-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.youtube-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  transition: transform 0.15s;
}

.youtube-thumb:hover .youtube-play-icon { transform: translate(-50%, -50%) scale(1.08); }

/* Nav row overlays the bottom edge of the image, inside the media area,
   instead of adding its own layout height below it. Every marketing slide
   we've authored keeps its bottom ~60px clear of text/content, so this
   strip stays out of the way regardless of what a given slide contains. */
.modal-media-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 10px 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  z-index: 2;
}

.modal-media-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-media-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.15s;
}

.modal-media-dot:hover { background: rgba(255,255,255,0.6); }
.modal-media-dot.active { background: var(--accent); }

/* Plain chevrons, no circle/background, sized to sit comfortably next to
   the dots without reading as a heavier, separate control. */
.modal-media-arrow {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.15s;
}

.modal-media-arrow svg {
  width: 15px;
  height: 15px;
  display: block;
}

.modal-media-arrow:hover { color: var(--accent); }
.modal-media-arrow:disabled { opacity: 0.3; cursor: default; }

.modal-body { padding: 24px 36px 36px; }

.modal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-year { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-5); }

.modal-body h3 { font-size: 28px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.02em; }

.modal-role {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 20px;
  font-family: 'JetBrains Mono', monospace;
}

.modal-description { font-size: 15px; line-height: 1.7; color: var(--text-2); margin: 0 0 24px; }

.modal-tech { margin-bottom: 24px; }

.modal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.modal-stats:empty { display: none; border: none; padding: 0; margin-bottom: 0; }

.modal-stat-value { font-size: 22px; font-weight: 700; color: var(--accent); }
.modal-stat-label { font-size: 12px; color: #8A8A90; font-family: 'JetBrains Mono', monospace; }

.modal-link { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 720px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .hero, .about, .work, .timeline, .skills, .contact { padding-left: 20px; padding-right: 20px; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
}
