/* 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); }
.nav-links {
  display:flex; gap:25px; margin-left:auto; align-items:center;
  font-size:14px; font-weight:620; color:var(--muted);
}
.nav-links a:hover { 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;
}
.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:76px 0 77px; }
.hero-identity {
  color:var(--hero-accent); font-size:12px; font-weight:730;
  letter-spacing:.09em; line-height:1.55; text-transform:uppercase;
  margin:0 0 24px;
}
.hero-identity span { padding:0 7px; opacity:.65; }
.hero h1 {
  margin:0; font-size:clamp(38px,7vw,78px);
  line-height:1.07; letter-spacing:-.065em; font-weight:760;
}
.hero-motto {
  margin:24px 0 0; color:var(--hero-accent); font-size:clamp(24px,2.9vw,32px);
  line-height:1.28; letter-spacing:-.035em; font-weight:690;
}
.lead { max-width:720px; margin:22px 0 0; font-size:19px; line-height:1.62; color:var(--muted); }
.hero-actions { display:flex; flex-wrap:wrap; align-items:center; gap:20px; margin:30px 0 0; }
.hero .button-primary { background:var(--hero-accent); color:var(--hero-button-ink); }
.hero-contact {
  color:var(--fg); font-size:15px; font-weight:690;
  border-bottom:1px solid var(--hero-accent); padding:7px 0 4px;
}
.hero-contact:hover { color:var(--hero-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:3px 12px;
  margin:23px 0 0; padding:0; color:var(--fg);
  font-size:16px; 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; }
.projects-section { border-top:1px solid var(--line); padding:53px 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, .stack-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; }
.stack-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:27px; }
.stack-grid > div {
  min-width:0; background:var(--panel); padding:22px;
  border:1px solid var(--line); border-radius:11px;
}
.stack-grid h3 { font-size:16px; line-height:1.35; margin:0 0 8px; }
.stack-grid p { font-size:14px; line-height:1.65; color:var(--muted); margin:0; }
.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 { flex-wrap:wrap; gap:14px; padding:17px 0 12px; }
  .nav-links { order:3; width:100%; margin-left:0; justify-content:space-between; border-top:1px solid var(--line); padding-top:10px; }
  .theme-toggle { margin-left:auto; }
  .hero { padding:55px 0 45px; }
  .lead { font-size:17px; }
  .project-card { padding:27px 27px; }
  .contact-section { align-items:flex-start; flex-direction:column; }
  .stack-grid { grid-template-columns:1fr; }
}
@media (max-width:440px) {
  .shell { width:min(calc(100% - 32px),1050px); }
  .brand { font-size:19px; }
  .theme-toggle { min-width:91px; padding:7px 9px; }
  .hero h1 { font-size:clamp(31px,8vw,38px); letter-spacing:-.055em; }
  .hero-identity { font-size:10px; letter-spacing:.055em; margin-bottom:20px; }
  .hero-identity span { padding:0 3px; }
  .hero { padding:43px 0 42px; }
  .hero-motto { font-size:23px; margin-top:19px; }
  .lead { margin-top:22px; }
  .hero-actions { gap:16px; }
  .hero-actions .button { min-height:43px; padding:9px 12px; font-size:13px; }
  .hero-facts { display:grid; gap:3px; font-size:15px; }
  .hero-facts li + li::before { content:none; }
  .section-intro p:last-child { font-size:16px; }
  .projects-section { padding-top:37px; }
  .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; }
  .nav-links { font-size:13px; }
  .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; }
}
