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

:root {
  --bg: #141820;
  --bg-raised: #1a1f2b;
  --bg-subtle: #1e2433;
  --border: rgba(148, 163, 194, 0.08);
  --border-hover: rgba(148, 163, 194, 0.14);
  --text: #d4dae6;
  --text-muted: rgba(180, 192, 214, 0.50);
  --text-faint: rgba(180, 192, 214, 0.30);
  --accent: #6e8ccc;
  --accent-soft: #8aa4d6;
  --accent-glow: rgba(110, 140, 204, 0.08);
  --warm: #c9956a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.16), 0 2px 6px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.20), 0 4px 12px rgba(0,0,0,0.12);
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layout ---- */
.jm-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: 24px 0;
}

/* ---- Navigation ---- */
nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(20, 24, 32, 0.85);
  border-radius: 50px;
  padding: 8px 6px;
  display: flex;
  gap: 2px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
nav a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 40px;
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.01em;
}
nav a:hover {
  color: var(--text);
}
nav a.jm-active {
  color: var(--text);
  background: var(--bg-subtle);
}

/* ---- Hero / About ---- */
.jm-about {
  display: flex;
  align-items: center;
  padding-top: 100px;
}
.jm-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: center;
  width: 100%;
}
.jm-photo {
  width: 280px;
  height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
}
.jm-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.jm-photo .jm-ph {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
}
.jm-photo .jm-ph svg {
  opacity: 0.3;
}
.jm-hi {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  font-weight: 500;
}
.jm-about h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: #e8edf5;
}
.jm-bio {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.85;
  font-weight: 400;
  max-width: 540px;
}
.jm-cta {
  display: flex;
  gap: 14px;
  align-items: center;
}
.jm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 50px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
  border: none;
}
.jm-btn:hover { transform: translateY(-1px); }
.jm-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.jm-btn-primary:hover {
  box-shadow: var(--shadow-md);
  background: var(--accent-soft);
}
.jm-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 13px 20px;
  font-weight: 500;
}
.jm-btn-ghost:hover { color: var(--text); }
.jm-btn-ghost .jm-arrow {
  transition: transform var(--transition);
}
.jm-btn-ghost:hover .jm-arrow { transform: translateX(3px); }

/* ---- Section common ---- */
.jm-sec-head {
  margin-bottom: 36px;
}
.jm-sec-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 500;
}
.jm-sec-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #e8edf5;
  letter-spacing: -0.015em;
}

/* ---- Experience ---- */
.jm-exp-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jm-exp {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 36px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  border-radius: 0;
}
.jm-exp:first-child {
  border-top: 1px solid var(--border);
}
.jm-exp-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--text-faint);
  padding-top: 5px;
  font-weight: 400;
}
.jm-exp-body h3 {
  font-size: 1.06rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.jm-exp-body .jm-company {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}
.jm-exp-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
  font-weight: 400;
}
.jm-exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.jm-exp-tags span {
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 400;
}

/* ---- Projects ---- */
.jm-proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.jm-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 340px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: default;
}
.jm-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.jm-card-info {
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.jm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jm-card-head h3 {
  font-size: 1.06rem;
  font-weight: 600;
}
.jm-card-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-faint);
  font-weight: 400;
}
.jm-card-info p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.75;
  font-weight: 400;
}
.jm-card-foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}
.jm-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.jm-card-tech span {
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--accent-glow);
  color: var(--accent-soft);
  font-weight: 400;
}
.jm-card-links {
  display: flex;
  gap: 18px;
  padding-top: 4px;
}
.jm-card-links a {
  font-size: 0.76rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  font-weight: 500;
}
.jm-card-links a:hover { color: var(--accent); }

/* ---- Card media panel ---- */
.jm-card-media {
  width: 100%;
  height: 200px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  order: 2;
}
.jm-card-info {
  order: 1;
}
.jm-media-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jm-media-viewport img,
.jm-media-viewport video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.jm-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}
.jm-media-placeholder svg {
  opacity: 0.35;
}
.jm-media-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(20, 24, 32, 0.75);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.jm-media-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(20, 24, 32, 0.92);
}
.jm-media-prev { left: 10px; }
.jm-media-next { right: 10px; }
.jm-zoom-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(20, 24, 32, 0.75);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.jm-zoom-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(20, 24, 32, 0.92);
}
.jm-zoom-btn .material-symbols-outlined {
  font-size: 16px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---- Airplane ---- */
.jm-airplane {
  position: absolute;
  width: 100px;
  height: auto;
  z-index: 50;
  pointer-events: none;
  display: none;
  will-change: left, top, transform;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

/* ---- Projects disclaimer ---- */
.jm-proj-note {
  margin-top: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.7;
  letter-spacing: 0.02em;
  font-style: italic;
  text-align: center;
}

/* ---- Leadership overrides (no date rail) ---- */
#leadership .jm-exp {
  grid-template-columns: 1fr;
  gap: 0;
}
#leadership .jm-exp-date {
  display: none;
}

/* ---- Skills ---- */
.jm-skills {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jm-skill-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 36px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.jm-skill-row:first-child {
  border-top: 1px solid var(--border);
}
.jm-skill-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 5px;
  font-weight: 500;
}
.jm-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.jm-skill-tags span {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 6px 14px;
  border-radius: 50px;
  background: var(--accent-glow);
  color: var(--accent-soft);
  border: 1px solid var(--border);
  font-weight: 400;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.jm-skill-tags span:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* ---- Lightbox ---- */
.jm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jm-lightbox[hidden] { display: none; }
.jm-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: zoom-out;
}
.jm-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jm-lightbox-content img,
.jm-lightbox-content video {
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: block;
}

/* ---- Footer ---- */
footer {
  padding: 34px 0 48px;
  border-top: 1px solid var(--border);
}
.jm-foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.jm-foot-copy {
  font-size: 0.8rem;
  color: var(--text-faint);
  font-weight: 400;
}
.jm-foot-links {
  display: flex;
  gap: 24px;
}
.jm-foot-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}
.jm-foot-links a:hover { color: var(--accent); }

/* ---- Language button ---- */
#lang-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  background: rgba(20, 24, 32, 0.85);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  transition: color var(--transition), border-color var(--transition);
  letter-spacing: 0.06em;
}
#lang-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

/* ---- Animations ---- */
.jm-fade {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.jm-d1 { animation-delay: 0.05s; }
.jm-d2 { animation-delay: 0.15s; }
.jm-d3 { animation-delay: 0.28s; }
.jm-d4 { animation-delay: 0.40s; }

.jm-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.jm-reveal.jm-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .jm-proj-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .jm-about h1 { font-size: 2.3rem; }
  .jm-inner { grid-template-columns: 1fr; gap: 40px; }
  .jm-photo { order: -1; width: 200px; height: 240px; justify-self: start; }
  .jm-sec-title { font-size: 1.7rem; }
  .jm-exp { grid-template-columns: 1fr; gap: 6px; }
  .jm-foot-inner { flex-direction: column; gap: 16px; text-align: center; }
  section { padding: 32px 0; }
  .jm-proj-grid { grid-template-columns: 1fr; }
  .jm-card { min-height: unset; }
  .jm-card-media { height: 220px; }
}
