/* Engineering / Studio — Dark Navy + Light Slate, single-page portfolio */
:root, :root[data-theme="light"] {
  color-scheme:light;
  --bg:#F5F8FC; --panel:#FFFFFF; --soft:#E6EEF7;
  --fg:#1A2B40; --muted:#52677E; --accent:#276DA8;
  --hero-accent:#166F91; --hero-button-ink:#FFFFFF;
  --line:#DCE5EF; --hover:#D9E7F5;
  --shadow:0 12px 40px rgba(32,56,83,.045);
}
:root[data-theme="dark"] {
  color-scheme:dark;
  --bg:#142237; --panel:#1C3049; --soft:#263A52;
  --fg:#F0F5FC; --muted:#B9C8DA; --accent:#71B9F4;
  --hero-accent:#76D6E9; --hero-button-ink:#102434;
  --line:#36516F; --hover:#304C6A;
  --shadow:0 12px 40px rgba(3,12,26,.12);
}
@media (prefers-color-scheme:dark) {
  :root:not([data-theme]) {
    color-scheme:dark;
    --bg:#142237; --panel:#1C3049; --soft:#263A52;
    --fg:#F0F5FC; --muted:#B9C8DA; --accent:#71B9F4;
    --hero-accent:#76D6E9; --hero-button-ink:#102434;
    --line:#36516F; --hover:#304C6A;
    --shadow:0 12px 40px rgba(3,12,26,.12);
  }
}
*,*::before,*::after { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  margin:0; background:var(--bg); color:var(--fg);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  font-size:17px; line-height:1.65; text-rendering:optimizeLegibility;
}
a { color:inherit; text-decoration:none; }
button { font:inherit; }
a:focus-visible,button:focus-visible,summary:focus-visible {
  outline:3px solid var(--accent); outline-offset:4px;
}
::selection { background:var(--accent); color:var(--bg); }
.skip-link { position:absolute; top:-100px; left:16px; z-index:20; padding:8px 12px; background:var(--panel); }
.skip-link:focus { top:12px; }
.shell { width:min(calc(100% - 48px),1050px); margin-inline:auto; min-width:0; }
.site-header {
  min-height:82px; display:flex; align-items:center; gap:28px;
  border-bottom:1px solid var(--line);
}
.brand {
  display:inline-flex; align-items:center; flex-shrink:0; white-space:nowrap;
  font-size:21px; font-weight:750; letter-spacing:-.055em;
}
.brand-mark {
  width:11px; height:11px; border:2px solid var(--accent);
  border-radius:3px; transform:rotate(45deg); margin-right:13px;
}
.brand-suffix { color:var(--accent); }
.theme-toggle {
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:8px 12px; min-width:105px; flex-shrink:0;
  background:var(--soft); color:var(--fg); border:1px solid var(--line);
  border-radius:10px; cursor:pointer; font-size:13px; font-weight:680;
  margin-left:auto;
}
.theme-toggle:hover { background:var(--hover); }
#theme-symbol { color:var(--accent); font-size:20px; line-height:1; }
.eyebrow {
  color:var(--accent); font-weight:780; font-size:12px;
  letter-spacing:.15em; margin:0 0 17px; line-height:1.5;
}
.hero { padding:57px 0 41px; }
.hero-name {
  color:var(--muted); font-size:19px; font-weight:700;
  letter-spacing:.01em; line-height:1.45; margin:0 0 14px;
}
.hero h1 {
  margin:0; max-width:950px; font-size:clamp(42px,5.3vw,65px);
  line-height:1.09; letter-spacing:-.056em; font-weight:760;
}
.hero-stack {
  margin:13px 0 0; font-size:21px; line-height:1.45;
  color:var(--hero-accent); font-weight:710;
}
.lead {
  max-width:790px; margin:21px 0 0;
  font-size:18px; line-height:1.62; color:var(--muted);
}
.lead-mobile { display:none; }
.hero-actions {
  display:flex; flex-wrap:wrap; align-items:center;
  gap:16px 22px; margin:25px 0 0;
}
.hero .button-primary { background:var(--hero-accent); color:var(--hero-button-ink); }
.hero-links {
  display:flex; flex-wrap:wrap; align-items:center;
  gap:18px; font-size:15px; font-weight:700;
}
.hero-links a {
  color:var(--accent); padding:8px 0;
  border-bottom:1px solid transparent;
}
.hero-links a:hover { color:var(--fg); border-bottom-color:var(--accent); }
.button {
  display:inline-flex; align-items:center; justify-content:center; gap:12px;
  min-height:45px; padding:10px 17px; border-radius:9px;
  font-size:14px; font-weight:710;
}
.button-primary { background:var(--accent); color:var(--bg); }
.button-primary:hover { filter:brightness(1.07); }
.button-outline { background:var(--panel); color:var(--fg); border:1px solid var(--line); }
.button-outline:hover { background:var(--hover); }
.button-plain { color:var(--accent); border:1px solid transparent; }
.button-plain:hover { text-decoration:underline; }
.hero-facts {
  display:flex; flex-wrap:wrap; gap:2px 12px;
  margin:17px 0 0; padding:0; color:var(--muted);
  font-size:14px; line-height:1.6; font-weight:620;
}
.hero-facts li { list-style:none; padding:0; margin:0; }
.hero-facts li + li::before { content:"·"; color:var(--hero-accent); margin-right:12px; }
.stack-section {
  border-top:1px solid var(--line); padding:25px 0 28px;
}
.stack-section h2 {
  margin:0 0 12px; color:var(--accent);
  font-size:14px; font-weight:780; line-height:1.5;
  letter-spacing:.12em; text-transform:uppercase;
}
.stack-lines { display:grid; gap:2px; max-width:900px; }
.stack-lines p {
  margin:0; color:var(--muted);
  font-size:15.5px; line-height:1.52;
}
.stack-lines .stack-primary { color:var(--fg); font-size:16.5px; font-weight:750; }
.projects-section { border-top:1px solid var(--line); padding:44px 0 68px; }
.section-intro { max-width:850px; margin-bottom:32px; }
h2 {
  font-size:clamp(30px,3.3vw,42px); line-height:1.17;
  letter-spacing:-.045em; font-weight:730; margin:0;
}
.section-intro p:last-child {
  color:var(--muted); max-width:800px; font-size:17px;
  line-height:1.73; margin:19px 0 0;
}
.project-card {
  max-width:940px; scroll-margin-top:22px;
  border:1px solid var(--line); border-radius:15px;
  background:var(--panel); padding:34px 40px; margin:0 0 22px;
  box-shadow:var(--shadow);
}
.project-card:target { outline:2px solid var(--accent); outline-offset:3px; }
.project-meta {
  display:flex; gap:12px; color:var(--accent); font-size:12px;
  font-weight:750; letter-spacing:.04em; margin-bottom:13px;
}
.project-meta span { font-weight:650; letter-spacing:.01em; }
.project-card h3 {
  margin:0 0 18px; font-size:clamp(24px,2.6vw,31px);
  font-weight:740; line-height:1.27; letter-spacing:-.04em;
  overflow-wrap:anywhere;
}
.project-card p {
  font-size:17px; line-height:1.72; margin:0 0 15px;
  max-width:76ch;
}
.project-card .outcome {
  padding:12px 15px; margin:20px 0 0;
  border-left:3px solid var(--accent);
  background:var(--soft); border-radius:0 7px 7px 0;
  font-size:16px; line-height:1.65;
}
.project-card .outcome strong { color:var(--fg); }
.tags { display:flex; flex-wrap:wrap; gap:8px; margin:19px 0 19px; }
.tags span {
  display:inline-block; padding:4px 10px; border-radius:6px;
  background:var(--soft); color:var(--muted); font-size:12px;
  border:1px solid var(--line); font-weight:640;
}
.project-card details { border-top:1px solid var(--line); }
.project-card summary {
  display:flex; justify-content:space-between; gap:12px; align-items:center;
  list-style:none; padding:17px 2px 1px; cursor:pointer;
  font-size:15px; color:var(--accent); font-weight:720;
}
.project-card summary::-webkit-details-marker { display:none; }
.disclosure-arrow { font-size:22px; line-height:1; transition:transform .16s ease; }
details[open] .disclosure-arrow { transform:rotate(180deg); }
.project-extra { padding:20px 0 3px; }
.project-extra p { color:var(--muted); font-size:16px; line-height:1.72; }
.project-extra p:last-child { margin-bottom:0; }
.about-section {
  border-top:1px solid var(--line); padding:49px 0 61px;
}
.about-section > p:not(.eyebrow) {
  max-width:870px; color:var(--muted); font-size:19px; line-height:1.65;
  margin:18px 0 0;
}
.about-section .about-muted { font-size:14px !important; color:var(--accent) !important; }
.contact-section {
  border-top:1px solid var(--line); padding:52px 0 62px;
  display:flex; justify-content:space-between; gap:30px; align-items:center;
}
.contact-section p:last-child { font-size:19px; line-height:1.65; color:var(--muted); margin:12px 0 0; }
.contact-actions { display:flex; flex-wrap:wrap; gap:10px; }
.footer {
  border-top:1px solid var(--line);
  display:flex; justify-content:space-between; flex-wrap:wrap;
  gap:12px; padding:25px 0 40px; font-size:12px; color:var(--muted);
}
@media (max-width:780px) {
  .site-header { gap:14px; padding:13px 0; min-height:68px; }
  .hero { padding:39px 0 33px; }
  .hero-name {
    margin-bottom:12px; font-size:13px;
    letter-spacing:.07em; text-transform:uppercase;
  }
  .hero h1 {
    max-width:640px; font-size:clamp(32px,5.3vw,43px);
    line-height:1.14; letter-spacing:-.049em;
  }
  .hero-stack { margin-top:11px; font-size:17px; }
  .lead { max-width:640px; margin-top:19px; font-size:17px; line-height:1.56; }
  .lead-desktop { display:none; }
  .lead-mobile { display:inline; }
  .hero-actions { gap:12px 17px; margin-top:23px; }
  .hero-links { font-size:14px; gap:16px; }
  .hero-facts { margin-top:16px; font-size:13.5px; }
  .stack-section { padding:23px 0 25px; }
  .stack-section h2 { font-size:12px; letter-spacing:.10em; margin-bottom:10px; }
  .stack-lines p { font-size:14px; line-height:1.52; }
  .stack-lines .stack-primary { font-size:14.5px; }
  .projects-section { padding-top:35px; }
  .project-card { padding:27px 27px; }
  .contact-section { align-items:flex-start; flex-direction:column; }
}
@media (max-width:440px) {
  .shell { width:min(calc(100% - 32px),1050px); }
  .brand { font-size:19px; }
  .theme-toggle { min-width:91px; padding:7px 9px; }
  .hero { padding:32px 0 27px; }
  .hero-name { margin-bottom:12px; font-size:12px; }
  .hero h1 { font-size:clamp(31px,8.4vw,36px); letter-spacing:-.051em; }
  .hero-stack { margin-top:10px; font-size:16px; }
  .lead { margin-top:16px; font-size:16px; line-height:1.54; }
  .hero-actions { gap:10px 16px; margin-top:21px; }
  .hero-actions .button { min-height:44px; padding:9px 12px; font-size:13px; }
  .hero-links { font-size:14px; gap:13px; }
  .hero-facts { flex-wrap:wrap; gap:0 10px; margin-top:15px; font-size:12.8px; }
  .hero-facts li + li::before { margin-right:10px; }
  .stack-section { padding:20px 0 22px; }
  .stack-lines p { font-size:13.6px; }
  .stack-lines .stack-primary { font-size:14.2px; }
  .section-intro p:last-child { font-size:16px; }
  .projects-section { padding-top:28px; }
  .project-card { padding:23px 17px; margin-bottom:16px; }
  .project-card h3 { font-size:24px; }
  .project-card p { font-size:16px; }
  .project-card .outcome { font-size:15px; }
  .about-section > p:not(.eyebrow), .contact-section p:last-child { font-size:18px; }
  .footer { flex-direction:column; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; }
}
@media print {
  :root, :root[data-theme="dark"], :root[data-theme="light"] {
    color-scheme:light;
    --bg:#FFF; --panel:#FFF; --soft:#F2F6FA; --fg:#1A2B40;
    --muted:#52677E; --accent:#276DA8; --hero-accent:#166F91;
    --hero-button-ink:#FFFFFF; --line:#D6DFE8; --shadow:none;
  }
  body { background:#fff !important; }
  .site-header nav,.theme-toggle,.hero-actions,.skip-link { display:none !important; }
  .shell { width:auto; }
  .hero { padding:24px 0; }
  .project-card { break-inside:avoid; box-shadow:none; }
  .project-card details:not([open]) .project-extra { display:none; }
}
