
/* RC13 - direct source cleanup based on actual DOM */

:root{
  --paper:#0d1b1e;
  --paper-2:#102429;
  --ink:#edf3f1;
  --muted:#b9c8c5;
  --line:#315159;
  --line-dark:#527178;
  --accent:#82c7c0;
  --accent-2:#8bc7d2;
  --shell:1160px;
}

body{
  background:
    radial-gradient(circle at 84% -8%,rgba(139,199,210,.08),transparent 34rem),
    #0d1b1e;
  color:var(--ink);
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    linear-gradient(rgba(139,199,210,.024) 1px,transparent 1px),
    linear-gradient(90deg,rgba(139,199,210,.024) 1px,transparent 1px);
  background-size:32px 32px;
}

.site-header{
  background:rgba(13,27,30,.94);
  border-color:var(--line);
}
.wordmark{color:var(--ink)}
.main-nav{color:#a9c1c5}
.main-nav a:hover{color:#d7f1f3}

/* Hero: actual class is intro-grid, not hero-grid */
.intro{padding:82px 0 74px}
.intro-grid{
  display:block;
  margin-top:22px;
}
.intro h1{
  max-width:920px;
  font-size:clamp(42px,6vw,74px);
}
.intro-copy{
  max-width:760px;
  margin-top:30px;
  font-size:18px;
  color:var(--muted);
}
.intro-copy p{margin:0}

/* Avoid a two-column motif for every section heading */
.section-title-row{
  display:block;
  margin-bottom:38px;
}
.section-title-row>p{
  max-width:720px;
  margin:18px 0 0;
  color:var(--muted);
  font-size:15px;
}

/* Cards */
.featured-projects{border-color:var(--line)}
.featured-card{
  background:#112a2f;
  border-color:var(--line);
}
.featured-image{
  background:#0a1518;
  border-color:var(--line);
}
.featured-card p{color:var(--muted)}
.featured-link{
  color:#9bdce7;
  font-weight:700;
}
.featured-card:hover .featured-link{color:#d2f4f8}
.project-meta{color:#a7c8cd}

.project-list{border-color:var(--line-dark)}
.project-row{border-color:var(--line)}
.project-row:hover{background:rgba(139,199,210,.045)}
.project-row .row-year{color:#9fb7ba}
.project-row p{color:var(--muted)}
.row-category{
  color:#8bc7d2;
  font-weight:600;
}
.filter{color:#9fb7ba}
.filter:hover,.filter.active{
  color:var(--ink);
  border-bottom-color:#8bc7d2;
}

/* Experience */
.section-alt{background:#102429}
.experience-list{border-color:var(--line-dark)}
.experience-row{border-color:var(--line)}
.experience-row .dates{color:#9fb7ba}
.experience-row .role{color:#8bc7d2}
.experience-row p{color:var(--muted)}

/* About: full editorial flow, not split columns */
.about{
  display:block;
  padding-bottom:96px;
}
.about-heading{
  max-width:900px;
}
.about h2{
  max-width:900px;
  margin-bottom:34px;
}
.about-copy{
  max-width:900px;
  color:var(--muted);
  font-size:17px;
  line-height:1.78;
}
.about-copy p{margin:0 0 1.35rem}
.about-rule{
  width:74px;
  height:3px;
  background:linear-gradient(90deg,#82c7c0,#c8a46c);
  margin:0 0 34px;
}

/* Project page: single-column content rhythm */
.project-header{
  padding:72px 0 42px;
  border-color:var(--line);
}
.project-header h1{
  max-width:960px;
}
.project-summary{
  max-width:820px;
  color:var(--muted);
}
.project-snapshot{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-top:38px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.snapshot-item{
  padding:17px 22px 18px 0;
}
.snapshot-item+.snapshot-item{
  border-left:1px solid var(--line);
  padding-left:22px;
}
.snapshot-item span{
  display:block;
  margin-bottom:6px;
  font-family:Consolas,"Courier New",monospace;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.11em;
  color:#8bc7d2;
}
.snapshot-item strong{
  display:block;
  font-size:14px;
  line-height:1.35;
  color:var(--ink);
}

/* Technologies is now its own horizontal section */
.project-technologies{
  padding:30px 0 34px;
  border-bottom:1px solid var(--line);
}
.project-technologies .section-kicker{margin-bottom:14px}
.tech-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.tech-item{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:6px 10px;
  color:#dff3f2;
  background:rgba(130,199,192,.08);
  border:1px solid rgba(130,199,192,.34);
  font-size:12px;
  border-radius:4px;
}

/* Main project content gets full readable width */
.project-content{
  display:block;
  padding:0 0 80px;
}
.project-main{
  width:100%;
}
.project-main section{
  position:relative;
  padding:52px 0;
  border-bottom:0;
}
.project-main section::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:0;
  width:100vw;
  height:1px;
  transform:translateX(-50%);
  background:var(--line);
}
.project-main h2{
  max-width:820px;
}
.project-main p,
.project-main li{
  max-width:820px;
  color:var(--muted);
  font-size:15px;
}

/* Let media extend wider than prose */
.media-grid{
  width:min(100%,1080px);
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:28px;
}
.media-item{
  background:#102429;
  border-color:var(--line);
}
.media-item figcaption{
  color:#a9bdbd;
  border-color:var(--line);
}

.process-table{
  max-width:920px;
  border-color:var(--line-dark);
}
.process-row{border-color:var(--line)}
.process-row span{color:var(--muted)}

.next-project{
  border-color:var(--line-dark);
}
.next-project span{color:#8bc7d2}

.site-footer{
  border-color:var(--line);
}
.footer-inner{
  justify-content:flex-end;
}
.footer-inner a{color:#9bdce7}

@media(max-width:920px){
  .featured-projects{grid-template-columns:1fr 1fr}
  .featured-card:last-child{grid-column:1/-1}
  .project-row{grid-template-columns:90px 1fr;gap:10px 20px}
  .project-row p{grid-column:2}
  .row-category{display:none}
  .experience-row{grid-template-columns:130px 1fr}
  .experience-row p{grid-column:2}
  .project-snapshot{grid-template-columns:1fr}
  .snapshot-item+.snapshot-item{
    border-left:0;
    border-top:1px solid var(--line);
    padding-left:0;
  }
}
@media(max-width:640px){
  .intro h1{font-size:42px}
  .featured-projects{grid-template-columns:1fr}
  .featured-card:last-child{grid-column:auto}
  .experience-row{grid-template-columns:1fr;gap:6px}
  .experience-row p{grid-column:auto}
  .media-grid{grid-template-columns:1fr}
}


/* RC14 - project-tab hardening; homepage selectors intentionally untouched */

.case-section h2{
  max-width:900px;
  font-size:clamp(28px,3.2vw,42px);
  margin-bottom:18px;
}

.case-section > p,
.case-section > ul{
  max-width:860px;
}

.case-section > ul{
  padding-left:20px;
}

.case-section > ul li{
  margin-bottom:9px;
}

.project-snapshot{
  background:rgba(16,36,41,.45);
}

.snapshot-item strong{
  font-size:15px;
}

.project-technologies{
  background:rgba(16,36,41,.28);
}

.tech-item{
  color:#e8f6f5;
  background:rgba(130,199,192,.10);
  border-color:rgba(139,199,210,.42);
}

.media-item.wide{
  grid-column:1/-1;
}

.media-item.wide img,
.media-item.wide video{
  max-height:720px;
  object-fit:contain;
  background:#091416;
}

.case-process .media-grid,
.case-results .media-grid{
  margin-top:34px;
}

@media(min-width:980px){
  /* Vary rhythm without reverting to a universal two-column template. */
  .case-role > ul{
    columns:2;
    column-gap:50px;
    max-width:1000px;
  }
  .case-role > ul li{
    break-inside:avoid;
    padding-right:20px;
  }
}


/* RC15 - project media rhythm and compact technology placement */

/* Technologies belong to the project introduction, not a separate tall section. */
.project-tech-inline{
  max-width:1080px;
  margin-top:26px;
  padding-top:22px;
  border-top:1px solid var(--line);
}
.project-tech-inline .section-kicker{
  margin-bottom:13px;
}
.project-tech-inline .tech-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

/* The snapshot now follows technologies without the previous dead zone. */
.project-tech-inline + .project-snapshot{
  margin-top:28px;
}

/* Retire the older standalone technology-section treatment if inherited anywhere. */
.project-technologies{
  padding:0!important;
  margin:0!important;
  border:0!important;
  min-height:0!important;
}

/* Visual evidence should interrupt the narrative at useful points. */
.case-section .media-grid{
  margin-top:30px;
  margin-bottom:4px;
}
.case-objectives .media-grid,
.case-role .media-grid{
  width:min(100%,980px);
}
.case-overview .media-grid,
.case-process .media-grid,
.case-results .media-grid{
  width:min(100%,1080px);
}

/* Single pieces of evidence get breathing room without becoming giant empty bands. */
.media-grid:has(.media-item:only-child){
  grid-template-columns:minmax(0,900px);
}

/* Keep section rhythm compact when a visual closes the section. */
.project-main section{
  padding-top:48px;
  padding-bottom:48px;
}
.project-main section .media-grid:last-child{
  margin-bottom:-4px;
}


/* RC16 - centered evidence + infographic polish */
.case-section .media-grid{
  margin-left:auto;
  margin-right:auto;
  justify-content:center;
  justify-items:center;
}
.media-item{
  width:100%;
  margin-left:auto;
  margin-right:auto;
}
.media-item.wide{
  width:min(100%,1180px);
}
.media-button{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  background:#091416;
}
.media-item img,
.media-item video{
  display:block;
  margin-left:auto;
  margin-right:auto;
}
.media-item img[src$=".svg"]{
  width:100%;
  max-width:1180px;
  height:auto;
  object-fit:contain;
}
.media-item:has(img[src$=".svg"]){
  max-width:1180px;
  background:#091619;
  border-color:rgba(139,199,210,.28);
}
.media-item:has(img[src$=".svg"]) figcaption{
  max-width:900px;
  margin:0 auto;
  text-align:center;
}
.media-grid:has(.media-item:only-child){
  width:min(100%,1180px)!important;
  grid-template-columns:minmax(0,1180px)!important;
  justify-content:center;
}


/* RC17 — evidence, ownership, engineering decisions */

/* Make direct ownership legible before the reader reaches the long case study. */
.ownership-band{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  max-width:1080px;
  margin-top:28px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.ownership-band>div{
  padding:18px 24px 18px 0;
}
.ownership-band>div+div{
  border-left:1px solid var(--line);
  padding-left:24px;
}
.ownership-band span{
  display:block;
  margin-bottom:7px;
  color:#8bc7d2;
  font:700 10px/1.2 Consolas,"Courier New",monospace;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.ownership-band strong{
  display:block;
  max-width:620px;
  color:var(--ink);
  font-size:14px;
  line-height:1.55;
  font-weight:600;
}

/* Decision cards intentionally look like technical notes, not SaaS cards. */
.decision-section{
  padding-top:56px!important;
}
.decision-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  margin-top:28px;
}
.decision-card{
  position:relative;
  min-height:100%;
  padding:24px 22px 20px;
  border-top:2px solid #82c7c0;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,rgba(130,199,192,.045),rgba(16,36,41,.12));
}
.decision-number{
  color:#6e969d;
  font:700 11px/1 Consolas,"Courier New",monospace;
  letter-spacing:.12em;
}
.decision-card h3{
  margin:13px 0 21px;
  color:var(--ink);
  font-size:20px;
  line-height:1.25;
}
.decision-card dl,
.decision-card dd{
  margin:0;
}
.decision-card dl>div{
  padding:13px 0;
  border-top:1px solid rgba(49,81,89,.7);
}
.decision-card dt{
  margin-bottom:5px;
  color:#8bc7d2;
  font:700 10px/1.2 Consolas,"Courier New",monospace;
  text-transform:uppercase;
  letter-spacing:.1em;
}
.decision-card dd{
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}

/* Failure/iteration evidence is a flow, not another generic bullet list. */
.iteration-strip{
  display:grid;
  grid-template-columns:1fr 34px 1fr 34px 1fr;
  align-items:start;
  gap:12px;
  max-width:1080px;
  margin:36px auto 0;
  padding:22px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.iteration-strip span{
  display:block;
  margin-bottom:8px;
  color:#c8a46c;
  font:700 10px/1.2 Consolas,"Courier New",monospace;
  text-transform:uppercase;
  letter-spacing:.11em;
}
.iteration-strip p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}
.iteration-arrow{
  align-self:center;
  color:#557780;
  font-size:22px;
  text-align:center;
}

/* Media should read as evidence. */
.media-item figcaption{
  padding:12px 14px 13px;
  font-size:12px;
  line-height:1.5;
}
.media-item img[src$=".svg"]{
  max-height:none!important;
}
.media-item:has(img[src$=".svg"]){
  box-shadow:0 12px 34px rgba(0,0,0,.16);
}

/* Top-line facts should stay compact. */
.project-snapshot{
  margin-top:26px;
}
.snapshot-item strong{
  line-height:1.45;
}

@media(max-width:900px){
  .ownership-band{
    grid-template-columns:1fr;
  }
  .ownership-band>div+div{
    border-left:0;
    border-top:1px solid var(--line);
    padding-left:0;
  }
  .decision-grid{
    grid-template-columns:1fr;
  }
  .iteration-strip{
    grid-template-columns:1fr;
    gap:0;
  }
  .iteration-strip>div:not(.iteration-arrow){
    padding:14px 0;
  }
  .iteration-arrow{
    display:none;
  }
}

/* RC18 — generated visuals now read as engineering schematics */
.media-item:has(img[src$=".svg"]){
  background:#091619;
  border:1px solid rgba(139,199,210,.20);
  box-shadow:none;
}
.media-item:has(img[src$=".svg"]) .media-button{
  padding:0;
  background:#091619;
}
.media-item:has(img[src$=".svg"]) figcaption{
  color:#9fb6b5;
  border-top:1px solid rgba(49,81,89,.65);
  text-align:left;
}
\n/* RC19 — evidence sizing and hierarchy */\n.media-item.real-evidence{width:min(100%,920px);max-width:920px;margin-left:auto;margin-right:auto;background:#0b171a;}\n.media-item.real-evidence img,.media-item.real-evidence video{display:block;width:auto;max-width:100%;height:auto;max-height:min(64vh,640px);margin:0 auto;object-fit:contain;background:#091416;}\n.media-item.diagram-evidence{width:min(100%,980px);max-width:980px;margin-left:auto;margin-right:auto;}\n.media-item.diagram-evidence img{width:100%;height:auto;max-height:min(56vh,560px)!important;object-fit:contain;}\n.media-item figcaption{max-width:none!important;font-size:12px;line-height:1.5;text-align:left!important;}\n.media-grid:has(.media-item:only-child){width:min(100%,980px)!important;grid-template-columns:minmax(0,980px)!important;}\n.media-grid:has(.real-evidence:nth-child(2)){grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;}\n.media-grid:has(.real-evidence:nth-child(2)) .real-evidence{max-width:100%;}\n.media-grid:has(.real-evidence:nth-child(2)) .real-evidence img,.media-grid:has(.real-evidence:nth-child(2)) .real-evidence video{max-height:min(48vh,480px);}\n@media(max-width:760px){.media-grid:has(.real-evidence:nth-child(2)){grid-template-columns:1fr}.media-item.real-evidence img,.media-item.real-evidence video,.media-item.diagram-evidence img{max-height:70vh!important;}}\n

/* RC20 — screen-fit evidence */
.media-item.real-evidence,
.media-item.compact{
  width:min(100%,820px);
  max-width:820px;
}

.media-item.real-evidence img,
.media-item.real-evidence video{
  max-height:min(48vh,500px)!important;
}

.media-item.compact img,
.media-item.compact video{
  display:block;
  width:auto;
  max-width:100%;
  height:auto;
  max-height:min(46vh,470px)!important;
  margin:0 auto;
  object-fit:contain;
}

.media-item.portrait{
  width:min(100%,620px)!important;
  max-width:620px!important;
}
.media-item.portrait img,
.media-item.portrait video{
  max-height:min(52vh,540px)!important;
  width:auto!important;
  max-width:100%!important;
  margin:0 auto;
  object-fit:contain;
}

/* Give the project hero more authority without changing the frozen homepage. */
.project-header .project-summary{
  max-width:900px;
  font-size:clamp(17px,1.6vw,21px);
  line-height:1.58;
}


/* RC21 — paired engineering evidence */
.media-grid{
  align-items:start;
}
.media-item.pair{
  width:100%!important;
  max-width:none!important;
  align-self:stretch;
}
.media-grid:has(.media-item.pair){
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.media-grid:has(.media-item.pair) .media-item.pair img{
  width:100%!important;
  height:auto!important;
  max-height:min(48vh,500px)!important;
  object-fit:contain;
}
@media(max-width:760px){
  .media-grid:has(.media-item.pair){
    grid-template-columns:1fr;
  }
}


/* RC22 — requested media sizing */

/* One primary evidence image should nearly fill a normal laptop viewport,
   without requiring the viewer to scroll to understand the image. */
.media-item.screenfill{
  width:min(100%,1080px)!important;
  max-width:1080px!important;
  margin-left:auto;
  margin-right:auto;
}
.media-item.screenfill img,
.media-item.screenfill video{
  display:block;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  max-height:min(68vh,680px)!important;
  margin:0 auto;
  object-fit:contain;
}

/* Aerospace 2-photo + 2-video evidence grid. */
.media-grid:has(.media-item.quadrant){
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  width:min(100%,1080px)!important;
  gap:14px;
}
.media-item.quadrant{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}
.media-item.quadrant .media-button,
.media-item.quadrant video{
  width:100%!important;
}
.media-item.quadrant img,
.media-item.quadrant video{
  width:100%!important;
  aspect-ratio:16/10;
  height:auto!important;
  max-height:none!important;
  object-fit:cover!important;
  background:#091416;
}

/* PCB schematic + board model intentionally form a matched pair. */
.media-grid:has(.media-item.pair){
  width:min(100%,1080px)!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
.media-item.pair img{
  aspect-ratio:4/3;
  object-fit:contain!important;
  background:#091416;
}

@media(max-width:760px){
  .media-grid:has(.media-item.quadrant),
  .media-grid:has(.media-item.pair){
    grid-template-columns:1fr!important;
  }
  .media-item.screenfill img,
  .media-item.screenfill video{
    max-height:72vh!important;
  }
}
