:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #5f6b76;
  --subtle: #77838e;
  --line: #dfe3e7;
  --page: #f5f7f8;
  --white: #ffffff;
  --accent: #256d73;
  --accent-hover: #1b565b;
  --max-width: 1120px;
  --gutter: clamp(20px, 5vw, 64px);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: #d9ebeb; color: var(--ink); }

.skip-link { position: absolute; z-index: 20; top: 8px; left: 10px; padding: 10px 14px; transform: translateY(-160%); border-radius: 5px; background: var(--ink); color: var(--white); text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.brand { color: var(--ink); font-size: 15px; font-weight: 650; letter-spacing: -.02em; text-decoration: none; }
.primary-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.primary-nav a { color: var(--muted); font-size: 13px; text-decoration: none; }
.primary-nav a:hover { color: var(--accent); }
.menu-toggle { display: none; }

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .72fr); align-items: center; gap: clamp(40px, 9vw, 112px); max-width: var(--max-width); margin: 0 auto; padding: clamp(58px, 9vw, 116px) var(--gutter); }
.hero-copy { max-width: 650px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); }
.hero h1 { max-width: 700px; margin-bottom: 20px; font-size: clamp(40px, 5.8vw, 68px); font-weight: 650; letter-spacing: -.055em; line-height: 1.06; }
.hero-lede { max-width: 570px; margin-bottom: 16px; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); line-height: 1.75; }
.hero-school { margin-bottom: 26px; color: var(--subtle); font-size: 13px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 17px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; font-weight: 600; text-decoration: none; transition: background-color .18s ease, border-color .18s ease; }
.button-primary { background: var(--accent); color: var(--white); }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { border-color: var(--line); background: var(--white); color: var(--ink); }
.button-secondary:hover { border-color: var(--accent); color: var(--accent); }
.hero-photo { overflow: hidden; width: min(100%, 360px); justify-self: center; margin: 0; border: 1px solid var(--line); border-radius: 9px; background: #e7e9ec; }
.hero-photo img { width: 100%; aspect-ratio: .83; object-fit: cover; object-position: 50% 70%; }

.content-section { padding: clamp(55px, 8vw, 88px) var(--gutter); }
.skills-section { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading { max-width: var(--max-width); margin: 0 auto 26px; }
.section-heading h2, .about-copy h2 { margin-bottom: 0; font-size: clamp(29px, 4vw, 42px); font-weight: 620; letter-spacing: -.04em; line-height: 1.15; }
.skills-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; max-width: var(--max-width); margin: auto; }
.skill-card { min-height: 145px; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--page); }
.skill-card h3 { margin-bottom: 8px; font-size: 15px; font-weight: 620; letter-spacing: -.015em; }
.skill-card p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.work-section { background: var(--page); }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-note { max-width: 365px; margin: 0 0 3px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 29px 22px; max-width: var(--max-width); margin: auto; }
.project-card { min-width: 0; }
.project-preview { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--white); text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease; }
.project-preview:hover { border-color: #a8c4c6; box-shadow: 0 5px 18px rgba(25, 45, 55, .09); }
.preview-toolbar { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 11px; border-bottom: 1px solid var(--line); background: var(--white); }
.toolbar-dots { display: inline-flex; gap: 4px; }
.toolbar-dots i { width: 7px; height: 7px; border-radius: 50%; background: #c8ced3; }
.preview-url { overflow: hidden; max-width: calc(100% - 45px); color: var(--subtle); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-preview img { width: 100%; aspect-ratio: 1.5; object-fit: cover; object-position: top center; background: #e8ebee; }
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 1px 0; }
.project-meta > div { min-width: 0; }
.project-number { display: block; margin-bottom: 3px; color: var(--subtle); font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.project-meta h3 { overflow: hidden; margin: 0; font-size: clamp(16px, 1.8vw, 19px); font-weight: 620; letter-spacing: -.025em; text-overflow: ellipsis; }
.visit-link { display: inline-flex; min-height: 38px; flex: 0 0 auto; align-items: center; padding: 0 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; }
.visit-link:hover { border-color: var(--accent); color: var(--accent); }

.hardware-section { background: #fff; border-top: 1px solid var(--line); }
.section-lede { max-width: var(--max-width); margin: 0 auto 23px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: var(--max-width); margin: 0 auto; }
.photo-placeholder, .photo-card, .workflow-placeholder, .workflow-card, .stock-photo, .hardware-overview { overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--page); }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; display: block; }
.photo-placeholder figcaption, .photo-card figcaption, .workflow-placeholder figcaption, .workflow-card figcaption, .stock-photo figcaption, .hardware-overview figcaption { padding: 11px 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.hardware-overview { max-width: var(--max-width); margin: 20px auto 0; }
.hardware-overview img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.stock-photo { max-width: 470px; margin: 20px auto 0; }
.stock-photo img { width: 100%; aspect-ratio: 1.7; object-fit: cover; }
.stock-photo figcaption { font-size: 11px; }

.automation-section { background: var(--page); border-top: 1px solid var(--line); }
.automation-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .95fr); align-items: start; gap: 28px; max-width: var(--max-width); margin: auto; }
.automation-copy { color: var(--muted); font-size: 15px; line-height: 1.8; }
.automation-copy p { max-width: 520px; }
.workflow-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }

.about-section { padding: clamp(55px, 8vw, 92px) var(--gutter); border-top: 1px solid var(--line); background: #fff; }
.about-copy { max-width: 760px; margin: auto; }
.about-copy h2 { max-width: 680px; margin-bottom: 18px; }
.about-copy > p:not(.eyebrow) { max-width: 630px; margin-bottom: 22px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px var(--gutter); border-top: 1px solid var(--line); background: var(--page); color: var(--muted); font-size: 12px; }
.site-footer span:first-child { color: var(--ink); font-weight: 600; }
.site-footer a { color: var(--accent); font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr); gap: 36px; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-list { gap: 25px 16px; }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 66px; }
  .site-header { min-height: 60px; padding-right: max(var(--gutter), env(safe-area-inset-right)); padding-left: max(var(--gutter), env(safe-area-inset-left)); }
  .brand { font-size: 14px; }
  .menu-toggle { display: flex; width: 42px; height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
  .menu-toggle span { width: 17px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .18s ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .primary-nav { position: absolute; top: 59px; right: 12px; left: 12px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 5px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); box-shadow: 0 10px 24px rgba(31,41,51,.1); }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 12px 4px; border-bottom: 1px solid #edf0f2; font-size: 14px; }
  .primary-nav a:last-child { border-bottom: 0; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 52px; padding-bottom: 50px; }
  .hero h1 { font-size: clamp(37px, 10vw, 49px); }
  .hero-lede { font-size: 15px; }
  .hero-school { font-size: 12px; }
  .hero-photo { width: min(100%, 350px); justify-self: start; }
  .hero-photo img { aspect-ratio: 3 / 4; object-fit: contain; object-position: center; }
  .content-section { padding-top: 51px; padding-bottom: 51px; }
  .section-heading { margin-bottom: 20px; }
  .section-heading h2, .about-copy h2 { font-size: 30px; }
  .section-heading-row { display: block; }
  .section-note { margin-top: 11px; font-size: 12px; }
  .skills-grid { grid-template-columns: 1fr; gap: 10px; }
  .skill-card { min-height: 0; padding: 16px; }
  .skill-card h3 { font-size: 15px; }
  .skill-card p { font-size: 13px; }
  .project-list { grid-template-columns: 1fr; gap: 26px; }
  .project-preview { border-radius: 6px; }
  .preview-toolbar { height: 32px; }
  .project-preview img { aspect-ratio: 1280 / 840; object-fit: contain; object-position: center; background: var(--white); }
  .project-meta { padding-top: 10px; }
  .project-meta h3 { font-size: 18px; }
  .visit-link { min-height: 40px; padding: 0 14px; }
  .section-lede { font-size: 14px; }
  .photo-grid { grid-template-columns: 1fr; gap: 12px; }
  .hardware-overview { margin-top: 14px; }
  .automation-layout { grid-template-columns: 1fr; gap: 13px; }
  .automation-copy { font-size: 14px; }
  .about-copy h2 { line-height: 1.2; }
  .about-copy > p:not(.eyebrow) { font-size: 14px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 7px; padding-top: 17px; padding-bottom: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
