/* Base typography, components, and contact dialog. */

    :root {
      --bg: #0d1117;
      --card-bg: #161b22;
      --border: #30363d;
      --text: #c9d1d9;
      --text-muted: #8b949e;
      --heading: #f0f6fc;
      --accent: #58a6ff;
      --tag-bg: #21262d;
      --radius: 8px;
    }

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

    body {
      background-color: var(--bg);
      color: var(--text);
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      line-height: 1.65;
      padding: 0 1.5rem;
      display: flex;
      justify-content: center;
    }

    .container {
      width: 100%;
      max-width: 820px;
      padding: 2.5rem 0 5rem 0;
    }

    nav {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 1.25rem;
      margin-bottom: 2.5rem;
      border-bottom: 1px solid var(--border);
    }

    .nav-brand {
      font-weight: 700;
      color: var(--heading);
      text-decoration: none;
      font-size: 1.15rem;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 1.25rem;
    }

    .nav-link {
      color: var(--text-muted);
      text-decoration: none;
      font-size: 0.92rem;
      font-weight: 500;
      transition: color 0.2s;
    }

    .nav-link.active, .nav-link:hover { color: var(--accent); }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      padding: 0.45rem 0.9rem;
      background: var(--tag-bg);
      color: var(--heading);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      font-size: 0.85rem;
      font-weight: 500;
      text-decoration: none;
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: inherit;
    }

    .btn:hover {
      border-color: var(--accent);
      color: var(--accent);
      transform: translateY(-1px);
    }

    .btn-primary {
      background: #1f6feb;
      border-color: #388bfd;
      color: #ffffff;
    }

    .btn-primary:hover {
      background: #388bfd;
      color: #ffffff;
    }

    header { margin-bottom: 3rem; }

    h1 {
      color: var(--heading);
      font-size: 2.25rem;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .tagline {
      font-family: 'JetBrains Mono', monospace;
      color: var(--accent);
      font-size: 0.95rem;
      margin-top: 0.35rem;
    }

    .quick-links {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      margin-top: 1.25rem;
    }

    section { margin-bottom: 3rem; }

    h2 {
      color: var(--heading);
      font-size: 1.25rem;
      font-weight: 600;
      margin-bottom: 1.25rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    h2::after {
      content: "";
      flex: 1;
      height: 1px;
      background: var(--border);
      margin-left: 0.75rem;
    }

    .item-list { display: flex; flex-direction: column; gap: 1.25rem; }

    .card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.25rem 1.5rem;
    }

    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-bottom: 0.3rem;
    }

    .title {
      color: var(--heading);
      font-size: 1.05rem;
      font-weight: 600;
    }

    .subtitle {
      color: var(--accent);
      font-size: 0.88rem;
      font-weight: 500;
      margin-bottom: 0.6rem;
    }

    figure.project-figure {
      margin: 0.75rem 0 1rem 0;
      background: #090d13;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
    }

    figure.project-figure.white-bg {
      background: #ffffff;
    }

    figure.project-figure a {
      display: block;
      cursor: zoom-in;
      overflow: hidden;
      text-decoration: none;
    }

    figure.project-figure img {
      width: 100%;
      height: auto;
      max-height: 420px;
      display: block;
      transition: transform 0.2s ease;
    }

    figure.project-figure.white-bg img {
      max-height: 340px;
      width: auto;
      max-width: 100%;
      margin: 0 auto;
    }

    figure.project-figure a:hover img {
      transform: scale(1.015);
    }

    figure.project-figure figcaption {
      padding: 0.65rem 1rem;
      font-size: 0.8rem;
      color: var(--text-muted);
      font-family: 'JetBrains Mono', monospace;
      line-height: 1.45;
      background: var(--tag-bg);
      border-top: 1px solid var(--border);
    }

    .date {
      font-size: 0.8rem;
      font-family: 'JetBrains Mono', monospace;
      color: var(--text-muted);
    }

    ul.bullets {
      padding-left: 1.2rem;
      color: var(--text);
      font-size: 0.92rem;
    }

    ul.bullets li { margin-bottom: 0.4rem; }

    .tags {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-top: 0.75rem;
    }

    .tag {
      background: var(--tag-bg);
      color: var(--accent);
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.75rem;
      padding: 0.2rem 0.55rem;
      border-radius: 4px;
      border: 1px solid var(--border);
    }

    .cert-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 0.85rem;
    }

    .cert-card {
      background: var(--tag-bg);
      border: 1px solid var(--border);
      padding: 0.85rem 1rem;
      border-radius: var(--radius);
    }

    .cert-card strong {
      display: block;
      color: var(--heading);
      font-size: 0.9rem;
    }

    .cert-card span {
      display: block;
      font-size: 0.78rem;
      color: var(--text-muted);
      margin-top: 0.2rem;
    }

    dialog {
      margin: auto;
      background: var(--card-bg);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1.75rem;
      max-width: 420px;
      width: 90%;
      box-shadow: 0 10px 35px rgba(0, 0, 0, 0.75);
    }

    dialog::backdrop {
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(4px);
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1.25rem;
    }

    .modal-header h3 { color: var(--heading); font-size: 1.2rem; }

    .close-btn {
      background: transparent;
      border: none;
      color: var(--text-muted);
      font-size: 1.4rem;
      cursor: pointer;
    }

    .close-btn:hover { color: var(--heading); }

    .modal-content { display: flex; flex-direction: column; gap: 1rem; }

    .contact-item {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 0.85rem 1rem;
    }

    .contact-label {
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted);
      margin-bottom: 0.25rem;
      font-family: 'JetBrains Mono', monospace;
    }

    .contact-value {
      color: var(--accent);
      font-size: 0.95rem;
      text-decoration: none;
      word-break: break-all;
    }

    .contact-value:hover { text-decoration: underline; }

    footer {
      border-top: 1px solid var(--border);
      padding-top: 2rem;
      color: var(--text-muted);
      font-size: 0.85rem;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 1rem;
    }

/* Portfolio design system. */
:root {
  --bg: #101719;
  --card-bg: #172124;
  --border: #304044;
  --text: #d1dcdd;
  --text-muted: #a2b4b7;
  --heading: #f4f8f7;
  --accent: #91d6c5;
  --tag-bg: #202e31;
  --radius: 14px;
}
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { background: var(--bg); padding: 0 2rem; }
img { max-width: 100%; }
main, .container, .nav-links, .card, .project-card { min-width: 0; }
.title, .project-title, .contact-value { overflow-wrap: anywhere; }
.container { max-width: 1080px; padding-top: 2rem; }
nav { margin-bottom: 3.5rem; padding-bottom: 1.5rem; gap: 1rem; }
.nav-brand { letter-spacing: -.04em; font-size: 1.3rem; }
.nav-link.active { color: var(--heading); }
.nav-links { gap: 1.5rem; }
.btn { padding: .7rem 1.05rem; border-radius: 8px; line-height: 1.4; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #102622; }
.btn-primary:hover { background: #b7ecde; border-color: #b7ecde; color: #102622; }
header { margin-bottom: 4rem; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.08; letter-spacing: -.055em; }
h2 { font-size: 1.35rem; letter-spacing: -.025em; }
section { margin-bottom: 3.5rem; }
.card, .project-card, .iteration-card { padding: 1.75rem; box-shadow: none; }
.card-header { gap: .5rem 1.25rem; }
.date, .project-meta { font-size: .76rem; }
.subtitle, .project-subtitle { margin-top: .35rem; }
.item-list { gap: 1rem; }
.tag { color: #b6d4cc; border-color: transparent; border-radius: 5px; }
.cert-card { padding: 1.15rem; background: var(--card-bg); }
figure.project-figure { margin-top: 1.25rem; border-radius: 8px; }
figure.project-figure img { object-fit: contain; }
figure.project-figure figcaption { font-family: inherit; }
.eyebrow { color: var(--accent); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.25rem; }
.profile-hero { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 3rem; align-items: center; padding: 1.5rem 0 3rem; border-bottom: 1px solid var(--border); }
.profile-hero .tagline { font-family: inherit; font-size: 1.15rem; color: var(--text); margin-top: 1.25rem; }
.hero-intro { max-width: 600px; color: var(--text-muted); margin-top: 1rem; font-size: 1.03rem; line-height: 1.8; }
.quick-links { margin-top: 1.75rem; gap: .65rem; }
.hero-aside { padding: 1.75rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); }
.hero-aside p { color: var(--text-muted); font-size: .82rem; }
.hero-aside strong { display: block; color: var(--heading); font-size: 1.55rem; letter-spacing: -.035em; margin-bottom: .1rem; }
.hero-aside p + p { border-top: 1px solid var(--border); margin-top: 1.2rem; padding-top: 1.2rem; }
.section-links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin: -2rem 0 3.5rem; }
.section-links a { color: var(--text-muted); text-decoration: none; font-size: .85rem; }
.section-links a:hover { color: var(--accent); }
.skip-link { position: absolute; top: -100px; left: 1rem; z-index: 10; padding: .75rem 1rem; background: var(--accent); color: var(--bg); border-radius: 6px; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
dialog { box-shadow: 0 24px 100px #0008; }
.close-btn { min-width: 44px; min-height: 44px; }
footer { margin-top: 3rem; }
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
@media (min-width: 900px) {
  .home-projects .item-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .home-projects .card { padding: 1.5rem; }
  .home-projects .card-header { min-height: 4rem; align-content: start; }
  .home-projects .subtitle { min-height: 3rem; }
  .home-projects figure.project-figure img { height: 240px; width: 100%; object-fit: contain; }
}
@media (max-width: 650px) {
  body { padding: 0 1.1rem; }
  .container { padding-top: 1.25rem; }
  nav { align-items: flex-start; margin-bottom: 2.25rem; }
  .nav-links { gap: .8rem; flex-wrap: wrap; justify-content: flex-end; }
  .nav-link { font-size: .82rem; }
  nav .btn { font-size: .78rem; padding: .5rem .7rem; }
  .profile-hero { grid-template-columns: 1fr; gap: 1.75rem; padding-top: .5rem; }
  .hero-aside { display: flex; flex-wrap: wrap; gap: 1.25rem; padding: 1.25rem; }
  .hero-aside p { flex: 1 1 90px; }
  .hero-aside p + p { border: 0; margin: 0; padding: 0; }
  .hero-aside strong { font-size: 1.3rem; }
  .card, .project-card, .iteration-card { padding: 1.2rem; }
  .card-header { align-items: flex-start; }
  .section-links { gap: .75rem 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
/* Photography and project-led home page. */
.brand-dot { color: var(--accent); }
.portfolio-header { margin-bottom: 2rem; }
.cover-photo { overflow: hidden; border-radius: 14px; border: 1px solid var(--border); }
.cover-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; }
.identity-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 0 2rem; margin-top: -58px; position: relative; }
.portrait { width: 144px; height: 144px; object-fit: cover; border-radius: 50%; border: 7px solid var(--bg); }
.location { font-size: .8rem; color: var(--text-muted); padding-bottom: .7rem; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 4rem; padding: 1.75rem 0 2.5rem; align-items: center; }
.intro-grid h1 { font-size: clamp(3rem, 6vw, 4.6rem); }
.intro-grid .eyebrow { margin-bottom: .9rem; }
.hero-role { color: var(--heading); font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.45; letter-spacing: -.025em; margin-top: 1.25rem; }
.hero-intro { font-size: .98rem; }
.social-links { display: flex; gap: 1.5rem; margin-top: 1.5rem; }
.social-links a, .text-link { color: var(--accent); font-size: .85rem; font-weight: 500; text-decoration: none; }
.social-links a:hover, .text-link:hover { text-decoration: underline; }
.research-note { border-left: 2px solid var(--accent); padding: .3rem 0 .3rem 1.5rem; }
.research-note .eyebrow { display: block; }
.research-note h2 { margin-bottom: .4rem; font-size: 1.15rem; }
.research-note h2::after { display: none; }
.research-note p { color: var(--text-muted); font-size: .88rem; margin-bottom: 1rem; }
.research-note .note-lab { font-size: .75rem; color: var(--accent); }
.research-note a { color: var(--text); text-decoration: none; font-size: .8rem; }
nav.section-links { justify-content: flex-start; margin: 0 0 3.5rem; padding: 1.1rem 0; border-top: 1px solid var(--border); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading .eyebrow { margin-bottom: .5rem; font-size: .65rem; }
.section-heading h2 { margin-bottom: 0; font-size: 1.65rem; }
.section-heading h2::after { display: none; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem; }
.work-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card-bg); display: flex; flex-direction: column; }
.work-image { display: block; height: 250px; background: #fff; }
.work-image img { width: 100%; height: 100%; display: block; object-fit: contain; padding: 1rem; }
.work-body { padding: 1.6rem; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.project-kicker { font-size: .7rem; color: var(--accent); margin-bottom: .65rem; }
.work-body h3, .engineering-feature h3 { font-size: 1.2rem; line-height: 1.4; letter-spacing: -.025em; color: var(--heading); margin-bottom: .65rem; }
.work-body h3 a { color: inherit; text-decoration: none; }
.work-body h3 a:hover { color: var(--accent); }
.work-body > p:not(.project-kicker):not(.result) { color: var(--text-muted); font-size: .9rem; }
.work-body .result { color: var(--heading); font-size: .85rem; margin-top: 1rem; font-weight: 600; }
.work-body .tags { margin-bottom: 1.25rem; }
.work-body > .text-link { margin-top: auto; }
.pipeline-visual { height: 250px; background: #1c3032; padding: 1.4rem 2rem; display: flex; align-items: center; flex-direction: column; justify-content: center; color: var(--text); text-decoration: none; }
.pipeline-caption { font-family: 'JetBrains Mono', monospace; font-size: .6rem; letter-spacing: .14em; color: var(--accent); margin-bottom: 1rem; }
.pipeline-step { padding: .4rem 1rem; border: 1px solid #4e6c6a; border-radius: 5px; font-size: .78rem; background: #233d3f; width: 100%; max-width: 280px; text-align: center; }
.pipeline-arrow { font-size: .85rem; line-height: 1.5; color: var(--accent); }
.engineering-feature { display: grid; grid-template-columns: 230px 1fr; align-items: center; gap: 2rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); padding: 1.25rem; margin-top: 1.3rem; }
.engineering-feature img { display: block; width: 100%; height: 160px; object-fit: contain; background: #090d13; border-radius: 6px; }
.engineering-feature p:not(.project-kicker) { font-size: .9rem; color: var(--text-muted); margin-bottom: .75rem; }
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); }
.skill-group { padding: 1.5rem; }
.skill-group h3 { color: var(--heading); font-size: .85rem; font-weight: 500; }
.contact-panel { border-top: 1px solid var(--border); padding-top: 2.5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.contact-panel h2 { font-size: 2rem; margin-bottom: .6rem; }
.contact-panel h2::after { display: none; }
.contact-panel p:not(.eyebrow) { color: var(--text-muted); font-size: .9rem; }
.contact-panel .btn { flex-shrink: 0; }
@media (max-width: 750px) {
  .intro-grid { grid-template-columns: 1fr; gap: 2rem; }
  .research-note { max-width: 500px; }
  .work-grid { grid-template-columns: 1fr; }
  .engineering-feature { grid-template-columns: 1fr; gap: 1.25rem; }
  .engineering-feature img { height: 200px; }
}
@media (max-width: 450px) {
  .nav-brand { font-size: 1rem; white-space: nowrap; }
  .nav-links { gap: .6rem; }
  .identity-row { padding: 0 .75rem; margin-top: -36px; }
  .portrait { width: 104px; height: 104px; border-width: 5px; }
  .location { font-size: .66rem; padding-bottom: .4rem; }
  .cover-photo img { aspect-ratio: 3 / 1; object-position: 70% center; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-group { padding: 1rem 1.25rem; }
  .contact-panel { flex-direction: column; align-items: flex-start; }
  .section-heading { align-items: center; }
  .section-heading > .text-link { font-size: .75rem; white-space: nowrap; }
  nav.section-links { gap: .8rem 1.25rem; }
}
@media (max-width: 360px) {
  nav[aria-label="Main navigation"] { flex-direction: column; align-items: stretch; }
  nav[aria-label="Main navigation"] .nav-links { justify-content: space-between; gap: .5rem; }
  .quick-links > .btn { flex: 1 1 auto; }
  .identity-row { padding: 0; }
  .location { max-width: 155px; text-align: right; }
}
@media (pointer: coarse) {
  .nav-link, .social-links a, .section-links a, a.text-link { min-height: 44px; display: inline-flex; align-items: center; }
  .btn { min-height: 44px; }
}
