/* ============================================================
   Levi — Aerospace Engineering Portfolio
   Plain, conventional theme
   ============================================================ */
:root {
  --bg: #FFFFFF;
  --surface: #F7F7F5;
  --ink: #1A1A1A;
  --ink-muted: #6B6B6B;
  --accent: #2B4FBE;
  --line: #E4E4E1;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1120px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-mark {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  border-color: var(--accent);
}
.nav-icons {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-icons a {
  color: var(--ink-muted);
  text-decoration: none;
  display: flex;
  transition: color 0.15s ease;
}
.nav-icons a svg { width: 19px; height: 19px; }
.nav-icons a:hover, .nav-icons a:focus-visible { color: var(--ink); }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-right {
    position: fixed;
    inset: 68px 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 28px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .nav-right.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-icons { margin-top: 14px; gap: 20px; }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    width: 36px;
    height: 36px;
    cursor: pointer;
  }
  .nav-toggle span, .nav-toggle::before, .nav-toggle::after {
    content: "";
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--ink);
    margin: 3px auto;
  }
}

/* ---------- breadcrumb (project pages) ---------- */
.breadcrumb {
  font-size: 14px;
  color: var(--ink-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 28px 0 0;
}
.breadcrumb:hover { color: var(--accent); }

/* ---------- hero image ---------- */
.hero-image {
  width: 100%;
  height: 62vh;
  min-height: 340px;
  max-height: 560px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-image .media-placeholder { width: 100%; height: 100%; border: none; }

/* ---------- hero text ---------- */
.hero {
  padding: 48px 0 48px;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-size: clamp(34px, 5.5vw, 54px);
  line-height: 1.05;
  margin-top: 14px;
}
.hero .role {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--ink-muted);
  margin-top: 12px;
  max-width: 62ch;
}
.hero .bio {
  margin-top: 16px;
  max-width: 62ch;
  font-size: 16px;
  color: var(--ink);
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.btn {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- about / body photo ---------- */
.about {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}
.about .grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}
.about-photo {
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-copy h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 10px; }
.about-copy p { color: var(--ink-muted); margin-top: 14px; font-size: 15.5px; }
@media (max-width: 760px) {
  .about .grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
}

/* ---------- section shell ---------- */
.section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: none; }
.section-head { max-width: 62ch; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); margin-top: 10px; }
.section-head p { color: var(--ink-muted); margin-top: 12px; }

/* ---------- media placeholder ---------- */
.media-placeholder {
  height: 100%;
  min-height: 200px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  color: var(--ink-muted);
}
.media-placeholder svg { width: 26px; height: 26px; opacity: 0.4; }
.media-placeholder span {
  font-size: 12px;
  max-width: 26ch;
}

/* ---------- bento featured projects ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.bento-card {
  border: 1px solid var(--line);
  background: var(--bg);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.bento-card:hover { border-color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.bento-large { grid-column: span 3; }
.bento-large .media-placeholder { min-height: 260px; }
.bento-small { grid-column: span 2; }
.bento-small .media-placeholder { min-height: 150px; }
.bento-card-body { padding: 22px; }
.bento-large .bento-card-body h3 { font-size: 21px; margin-top: 8px; }
.bento-small .bento-card-body h3 { font-size: 16px; margin-top: 6px; }
.bento-card-body p { font-size: 13.5px; color: var(--ink-muted); margin-top: 8px; }
.bento-card .read { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--accent); }
@media (max-width: 900px) {
  .bento-large, .bento-small { grid-column: span 6; }
}

/* ---------- focus carousel ---------- */
.focus-shell {
  border: 1px solid var(--line);
  background: var(--bg);
}
.focus-panel { display: none; }
.focus-panel.active { display: grid; }
.focus-panel { grid-template-columns: 1.1fr 0.9fr; }
.focus-copy { padding: 40px; }
.focus-copy .eyebrow { margin-bottom: 12px; }
.focus-copy h3 { font-size: 24px; margin-top: 4px; }
.focus-copy p { color: var(--ink-muted); margin-top: 14px; font-size: 15px; }
.focus-links {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.focus-links a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.focus-links a:hover { border-color: var(--accent); color: var(--accent); }
.focus-media { border-left: 1px solid var(--line); }
.focus-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}
.focus-nav .arrows { display: flex; gap: 8px; }
.focus-nav button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  border-radius: var(--radius);
  font-size: 16px;
}
.focus-nav button:hover { border-color: var(--accent); color: var(--accent); }
.focus-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.focus-dots { display: flex; gap: 6px; }
.focus-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--line); display: block;
}
.focus-dots span.active { background: var(--accent); }
@media (max-width: 760px) {
  .focus-panel { grid-template-columns: 1fr; }
  .focus-media { border-left: none; border-top: 1px solid var(--line); }
}

/* ---------- project grid (related) ---------- */
.related {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 640px) { .related { grid-template-columns: 1fr; } }
.project-card {
  border: 1px solid var(--line);
  background: var(--bg);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}
.project-card:hover { border-color: var(--ink); }
.project-card-body { padding: 20px; }
.project-card h3 { font-size: 17px; margin-top: 6px; }
.project-card p { font-size: 13.5px; color: var(--ink-muted); margin-top: 8px; }
.project-card .read { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--accent); }

/* ---------- tools ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 32px;
}
.tool-item { border-top: 1px solid var(--line); padding-top: 14px; }
.tool-item strong { display: block; font-size: 15px; font-weight: 700; }
.tool-item span { font-size: 13.5px; color: var(--ink-muted); }
@media (max-width: 900px) { .tools-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tools-grid { grid-template-columns: 1fr; } }

/* ---------- experience ---------- */
.exp-list { list-style: none; margin: 0; padding: 0; }
.exp-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.exp-row:last-child { border-bottom: 1px solid var(--line); }
.exp-when { font-size: 14px; font-weight: 600; color: var(--ink-muted); }
.exp-what h3 { font-size: 17px; }
.exp-what p { color: var(--ink-muted); font-size: 14.5px; margin-top: 6px; }
@media (max-width: 640px) { .exp-row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- connect ---------- */
.connect { text-align: left; }
.connect h2 { font-size: clamp(28px, 4vw, 40px); }
.connect p { color: var(--ink-muted); max-width: 56ch; margin-top: 14px; }
.connect-links { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer {
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- project page specific ---------- */
.project-hero { padding: 28px 0 40px; }
.project-hero .eyebrow { margin-top: 20px; }
.project-hero h1 { font-size: clamp(32px, 5vw, 48px); margin-top: 14px; }
.project-hero .dek { color: var(--ink-muted); max-width: 60ch; margin-top: 16px; font-size: 16.5px; }
.project-hero-media { margin-top: 32px; }
.project-hero-media .media-placeholder { min-height: 320px; border: 1px solid var(--line); }

.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}
.spec-strip .cell { padding: 18px 20px; border-left: 1px solid var(--line); }
.spec-strip .cell:first-child { border-left: none; }
.spec-strip .value { font-weight: 700; font-size: 19px; }
.spec-strip .label { font-size: 12px; color: var(--ink-muted); margin-top: 6px; }
@media (max-width: 700px) {
  .spec-strip { grid-template-columns: repeat(2, 1fr); }
  .spec-strip .cell:nth-child(3) { border-left: none; }
}

.prose { max-width: 68ch; }
.prose h2 { font-size: 24px; margin-top: 4px; }
.prose h3 { font-size: 18px; margin-top: 28px; }
.prose p { margin-top: 14px; color: var(--ink); font-size: 15.5px; }
.prose ul { margin-top: 14px; padding-left: 20px; list-style: disc; }
.prose ul li {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.placeholder-note {
  font-size: 13px;
  color: var(--accent);
  background: #EEF1FB;
  border: 1px dashed var(--accent);
  padding: 12px 16px;
  margin-top: 16px;
}

/* ---------- image gallery (project pages) ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 20px;
}
.gallery.full { grid-template-columns: 1fr; }
.gallery figure { margin: 0; }
.gallery .media-placeholder { border: 1px solid var(--line); min-height: 240px; }
.gallery figcaption { font-size: 13px; color: var(--ink-muted); margin-top: 8px; }
.gallery img { border: 1px solid var(--line); width: 100%; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }

/* ---------- resume page ---------- */
.resume-embed {
  border: 1px solid var(--line);
  height: 80vh;
  min-height: 500px;
  background: var(--surface);
}
.resume-embed embed { width: 100%; height: 100%; }
.resume-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 14px;
  color: var(--ink-muted);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

/* ---------- resume content ---------- */
.resume-doc { max-width: 760px; }
.resume-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 20px; margin-bottom: 32px; }
.resume-head h1 { font-size: 30px; }
.resume-head .role-line { font-size: 14px; color: var(--ink-muted); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.resume-contact { font-size: 13.5px; color: var(--ink-muted); text-align: right; line-height: 1.7; }
.resume-contact a { color: var(--ink-muted); text-decoration: none; }
.resume-contact a:hover { color: var(--accent); }
.resume-section { margin-bottom: 30px; }
.resume-section h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 16px; }
.resume-role { margin-bottom: 18px; }
.resume-role-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 15px; }
.resume-role-head .title { font-weight: 700; }
.resume-role-head .dates { color: var(--ink-muted); font-size: 13.5px; white-space: nowrap; }
.resume-role .org { font-size: 14px; color: var(--ink-muted); font-style: italic; margin-top: 2px; }
.resume-role ul { margin-top: 8px; padding-left: 20px; list-style: disc; }
.resume-role ul li { font-size: 14.5px; margin-top: 5px; line-height: 1.5; }
.skills-grid { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14.5px; }
.skills-grid dt { font-weight: 700; }
.skills-grid dd { margin: 0; color: var(--ink-muted); }
.resume-list { padding-left: 20px; list-style: disc; }
.resume-list li { font-size: 14.5px; margin-top: 6px; }

/* ---------- framed image card (matches reference style) ---------- */
.img-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}
.img-row .img-card { margin-top: 0; }
@media (max-width: 700px) {
  .img-row { grid-template-columns: 1fr; }
}
.img-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-top: 28px;
  max-width: 480px;
}
.img-card .frame {
  background: linear-gradient(160deg, #f4f6fa 0%, #e8ecf2 100%);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.img-card .frame img {
  max-width: 100%;
  max-height: 260px;
  width: auto;
  height: auto;
  display: block;
  border: none;
}
.img-card .cap-title {
  font-size: 15px;
  font-weight: 700;
  margin-top: 12px;
}
.img-card .cap-text {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 5px;
  line-height: 1.45;
}

.img-card-wide { max-width: 640px; }

.bento-card img { width: 100%; height: 260px; object-fit: contain; display: block; background: var(--surface); padding: 12px; box-sizing: border-box; }
