:root {
  color-scheme: light dark;
  --bg: light-dark(#f4faff, #071018);
  --panel: light-dark(#ffffff, #111f2b);
  --ink: light-dark(#0b2132, #f1faff);
  --muted: light-dark(#405d70, #aac2d3);
  --accent: light-dark(#00618a, #8ee7ff);
  --headline-accent: light-dark(#006d9a, #83e4ff);
  --line: light-dark(#d1e2ed, #243d50);
  --link-line: light-dark(#56869f, #5ab9d6);
  --button: light-dark(#006d98, #8ee7ff);
  --button-hover: light-dark(#005c83, #b4f1ff);
  --button-ink: light-dark(#ffffff, #092335);
  --outline: light-dark(#f5fbffe6, #0d1b278c);
  --outline-hover: light-dark(#e4f4fd, #163247);
  --control-line: light-dark(#6c8da3, #52758c);
  --tint: light-dark(#e9f7ff, #102b3e);
  --section: light-dark(#eaf4fc, #0b1721);
  --hero-wash: light-dark(var(--section), transparent);
  --field: light-dark(#edf5fa, #091620);
  --surface-shadow: 0 4px 14px light-dark(#214b6510, #00000038), 0 18px 42px light-dark(#214b651b, #00000049);
  --field-shadow: inset 0 2px 4px light-dark(#23496018, #00000035);
  --hero-image: url("hero.jpg");
  --text: "Inter", "Helvetica Neue", Arial, sans-serif;
  --display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; --hero-image: url("hero-light.jpg"); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { --hero-image: url("hero-light.jpg"); }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.65 var(--text); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1; }
h1, h2 { text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 1.5rem; }
.wrap { width: min(100% - 7.5rem, 1248px); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 10px; left: 10px; translate: 0 -160%; padding: 10px 16px; background: var(--button); color: var(--button-ink); }
.skip:focus { translate: 0; }
.header { position: relative; z-index: 1; background: light-dark(#dcecf5, var(--bg)); border-bottom: 1px solid var(--line); }
.home-header { background: light-dark(var(--section), var(--bg)); }
.header-inner { min-height: 83px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; width: fit-content; font-family: var(--display); font-weight: 500; font-size: 1.74rem; letter-spacing: -.055em; text-decoration: none; white-space: nowrap; }
.brand img { display: block; flex: none; margin-top: 5px; }
.brand-accent { color: var(--accent); font-weight: 400; }
nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.4rem); }
nav a { color: var(--muted); text-decoration: none; font-size: .92rem; white-space: nowrap; }
nav a:hover, .text-link:hover, .direct a:hover { color: var(--ink); }
.button { min-height: 50px; display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: 9px; padding: .75rem 1.18rem; font: 680 .92rem/1.2 var(--text); text-decoration: none; text-align: center; cursor: pointer; transition: background-color .2s, border-color .2s, box-shadow .2s; }
.button-outline { background-color: var(--outline); border-color: var(--control-line); color: var(--ink); }
.button-outline:hover { background-color: var(--outline-hover); border-color: var(--accent); }
.button-primary { color: var(--button-ink); background: var(--button); }
.button-primary:hover { background-color: var(--button-hover); box-shadow: 0 0 28px #32b8eb3b; }
.button:disabled { cursor: wait; opacity: .65; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: .5rem; }
.nav-action { min-height: 43px; }
.theme-toggle { flex: none; width: 43px; min-height: 43px; padding: 0; color: var(--accent); font: 1.3rem/1 system-ui, sans-serif; }
.theme-sun, [data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
.hero { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, var(--hero-wash), transparent 48%), radial-gradient(ellipse at 77% 48%, var(--tint) 0%, var(--bg) 62%); }
.hero-inner { position: relative; min-height: clamp(590px, 49vw, 710px); display: flex; flex-direction: column; justify-content: center; padding-block: 5rem 6.5rem; }
.hero-content { position: relative; z-index: 1; max-width: 785px; }
.hero-art { position: absolute; z-index: -1; width: min(78vw, 1100px); right: max(-170px, -11vw); top: -5%; bottom: -4%; pointer-events: none; background: var(--hero-image) 58% center / cover no-repeat; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--hero-wash) 6%, transparent 34%), linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg), transparent 10%) 13%, color-mix(in srgb, var(--bg), transparent 65%) 43%, transparent 70%), linear-gradient(0deg, var(--bg) 3%, transparent 25%, transparent 82%, var(--bg) 100%); }
.eyebrow { display: flex; align-items: center; gap: .62rem; color: var(--accent); font: 600 .77rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 1.25rem; }
.eyebrow span { width: 15px; height: 1px; background: currentColor; }
.hero h1 { font-size: clamp(3.5rem, 7.2vw, 7rem); letter-spacing: -.082em; font-weight: 710; }
.hero h1 em { font-style: normal; color: var(--headline-accent); }
.hero-copy { max-width: 31rem; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.25rem); margin-top: 1.45rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.85rem; }
.hero-foot { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; gap: 1.25rem; border-top: 1px solid var(--line); padding-block: .95rem; color: var(--muted); font: .73rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.section { padding-block: clamp(4.6rem, 8vw, 8rem); }
.section h2 span { color: var(--accent); }
.section-intro { display: grid; grid-template-columns: 1.5fr 0.7fr; gap: 2rem; align-items: end; margin-bottom: 2.5rem; }
.section-intro > p, .profile-copy p, .contact-info > p:not(.eyebrow) { color: var(--muted); max-width: 39rem; }
.section h2 { font-size: clamp(2.55rem, 5.15vw, 5.25rem); font-weight: 700; letter-spacing: -.077em; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.service { padding: clamp(1.2rem, 2.4vw, 2.2rem); display: flex; flex-direction: column; align-items: flex-start; background: linear-gradient(130deg, var(--tint), var(--panel) 69%); border-radius: 18px; box-shadow: var(--surface-shadow); }
.service h3 { font-size: clamp(1.42rem, 2.4vw, 2.05rem); letter-spacing: -.055em; margin-block: 1.3rem .7rem; }
.service p { color: var(--muted); margin-bottom: 1.3rem; }
.service .service-note { margin: auto 0 0; padding-top: .9rem; border-top: 1px solid var(--line); width: 100%; font-size: .84rem; color: var(--accent); }
.service-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 11px; background: light-dark(#dceef9, #133247); color: var(--accent); }
.service-icon i { width: 23px; height: 16px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.icon-web i::before { content: ""; position: absolute; inset: 4px 0 auto; border-top: 1px solid currentColor; }
.icon-app i { width: 13px; height: 23px; }
.icon-app i::before { content: ""; position: absolute; width: 4px; height: 1px; background: currentColor; bottom: 2px; left: 3px; }
.icon-stack i { width: 17px; height: 17px; rotate: 45deg; transform: skew(-8deg, -8deg); }
.icon-stack i::before { content: ""; position: absolute; inset: 4px -5px -5px 4px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; border-radius: 2px; }
.project-section { background: var(--section); border-block: 1px solid var(--line); }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.project { display: flex; flex-direction: column; min-width: 0; border-radius: 18px; overflow: hidden; background: var(--panel); box-shadow: var(--surface-shadow); }
.project-art { position: relative; height: clamp(230px, 28vw, 370px); min-height: 17.5rem; overflow: hidden; isolation: isolate; }
.siteabo-art { container-type: inline-size; background: radial-gradient(ellipse at 25% 15%, #4365a7, #1a2f61 50%, #162249); color: #111c42; }
.browser-mock { position: absolute; top: max(14%, calc(100% - 26px - 56cqw)); left: 6%; width: 88%; transform-origin: center top; background: #f5f8ff; transform: rotate(-8deg); border-radius: 11px; box-shadow: 0 22px 56px #0814309c; overflow: hidden; }
.browser-top { display: flex; align-items: center; gap: 4px; padding: 8px 10px; height: 29px; background: #e7ebf7; }
.browser-top i { width: 5px; height: 5px; border-radius: 50%; background: #8c9ab9; }
.browser-top span { position: absolute; left: 50%; translate: -50%; color: #46577c; font: .55rem var(--mono); }
.browser-screenshot { display: block; width: 100%; height: auto; }
.siteabo-mark { position: absolute; bottom: 9%; right: 7%; display: grid; place-items: center; width: 16%; aspect-ratio: 1; border-radius: 24%; color: #203b4c; background: #f5fbff; font: 800 clamp(1.4rem, 4vw, 3.4rem)/1 system-ui, sans-serif; letter-spacing: -.06em; rotate: 11deg; box-shadow: 0 12px 26px #0c183b70; }
.siteabo-mark > span > span { color: #d45542; }
.about-art { background: radial-gradient(ellipse at 50% 3%, #f2dddd, #dcb9d6 50%, #9a81b6); }
.weekmate-art { background: radial-gradient(ellipse at 72% 5%, #4e9b85, #1e665f 55%, #124542); }
.app-device { position: absolute; top: 10%; left: 50%; translate: -50%; transform-origin: center top; height: 150%; aspect-ratio: 168 / 346; border: 5px solid #20262a; border-radius: 22px; background: #fff; box-shadow: 0 16px 34px #15222b66; overflow: hidden; }
.app-device img { display: block; width: 100%; height: 100%; object-fit: cover; }
.about-art .app-device { background: #f2f4f5; rotate: 5deg; }
.weekmate-art .app-device { rotate: -5deg; }
.device-status { position: relative; height: 8.5%; display: flex; justify-content: space-between; align-items: flex-start; padding: 5% 7% 0; color: #20262a; font: 700 .6rem/1 system-ui, sans-serif; }
.device-camera { position: absolute; top: 14%; left: 50%; translate: -50%; width: 30%; aspect-ratio: 4; border-radius: 999px; background: #20262a; }
.device-signal { font-size: .55rem; letter-spacing: .04em; }
.device-status + img { height: 91.5%; }
.project-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: clamp(1.3rem, 2.8vw, 2.35rem); }
.project-type { color: var(--accent); font: .75rem/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.project-copy h3 { font-size: clamp(2.1rem, 3.7vw, 3.65rem); font-weight: 700; letter-spacing: -.067em; margin-block: .45rem .65rem; }
.project-copy > p:not(.project-type) { color: var(--muted); margin-bottom: 1rem; }
.project-copy > .text-link, .project-links { margin-top: auto; }
.project-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.text-link { color: var(--accent); font-weight: 650; text-decoration-color: var(--link-line); text-underline-offset: .3em; }
.profile { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; }
.profile-copy p + p { margin-top: 1rem; }
.technology { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.35rem; }
.technology span { padding: .25rem .6rem; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: .8rem/1.5 var(--mono); }
.contact-section { border-top: 1px solid var(--line); background: radial-gradient(ellipse at 6% 45%, var(--tint), var(--section) 60%); }
.contact-layout { display: grid; grid-template-columns: .86fr 1.14fr; gap: clamp(1.5rem, 5.5vw, 5rem); align-items: start; }
.contact-info { padding-top: 1.3rem; }
.contact-info > p:not(.eyebrow) { margin-top: 1.15rem; }
.direct { margin-top: 2rem; display: grid; gap: .14rem; }
.direct span { color: var(--muted); font-size: .83rem; }
.direct a { color: var(--accent); font-size: 1.15rem; font-weight: 650; text-underline-offset: .25em; width: fit-content; }
.inquiry { display: grid; gap: 1.05rem; background: var(--panel); border-radius: 19px; box-shadow: var(--surface-shadow); padding: clamp(1.15rem, 3.2vw, 2.5rem); }
.inquiry fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.inquiry legend, .inquiry label { font-size: .92rem; font-weight: 620; }
.inquiry legend { margin-bottom: .48rem; padding: 0; }
.choices { display: flex; gap: .45rem; flex-wrap: wrap; }
.choices label { position: relative; }
.choices input { appearance: none; position: absolute; inset: 0; margin: 0; border-radius: 6px; cursor: pointer; }
.choices span { display: block; padding: .44rem .72rem; border-radius: 8px; color: var(--ink); background: var(--field); box-shadow: var(--field-shadow); font-size: .85rem; }
.choices input:checked + span { color: var(--button-ink); background: var(--button); box-shadow: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.inquiry label { min-width: 0; }
.inquiry label > span:not(.choices span) { color: var(--accent); }
.inquiry label small { color: var(--muted); font-weight: 450; }
.inquiry input:not([type="radio"]), .inquiry select, .inquiry textarea { margin-top: .32rem; width: 100%; border: 1px solid transparent; border-radius: 8px; background: var(--field); box-shadow: var(--field-shadow); color: var(--ink); padding: .62rem .72rem; font: 400 1rem/1.35 var(--text); min-height: 45px; }
.inquiry select { appearance: none; padding-right: 2.1rem; background: linear-gradient(45deg, transparent 49%, var(--accent) 50%) right 16px center / 5px 5px no-repeat, linear-gradient(135deg, var(--accent) 50%, transparent 51%) right 11px center / 5px 5px no-repeat, var(--field); }
@media (forced-colors: active) {
  .inquiry input:not([type="radio"]), .inquiry select, .inquiry textarea { border-color: ButtonText; }
  .choices span { border: 1px solid ButtonText; }
  .choices input:checked + span { border-color: Highlight; color: Highlight; }
}
.inquiry textarea { resize: vertical; display: block; }
.inquiry textarea::placeholder { color: var(--muted); }
.form-note, .form-status { color: var(--muted); font-size: .86rem; }
.form-note a { color: var(--accent); text-underline-offset: .2em; }
.inquiry .button, .form-fallback { justify-self: start; }
.form-status[data-state="ok"] { color: light-dark(#17623d, #b9edcd); }
.form-status[data-state="error"] { color: light-dark(#a22a49, #ffd0db); }
.footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 112px; display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; }
.footer small { color: var(--muted); }
.legal-page { background-image: linear-gradient(180deg, var(--hero-wash), transparent 24rem); }
.legal-page .header { background: transparent; }
.legal { width: min(100% - 3rem, 760px); margin-inline: auto; min-height: 68vh; padding-block: clamp(3rem, 7vw, 7rem); }
.legal h1 { font-size: clamp(2.35rem, 7.5vw, 4.7rem); letter-spacing: -.07em; margin-bottom: 2.25rem; overflow-wrap: anywhere; }
.legal h2 { margin-block: 2rem .55rem; font-size: 1.4rem; line-height: 1.24; letter-spacing: -.035em; }
.legal p, .legal address, .legal ul { color: var(--muted); margin-bottom: .75rem; }
.legal address { font-style: normal; }
.legal .todo { color: light-dark(#805000, #fcddac); }
@media (min-width: 1080px) {
  .projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-art { height: clamp(228px, 20vw, 300px); }
  .project-copy { padding: clamp(1.25rem, 2.05vw, 1.9rem); }
  .project-copy h3 { font-size: clamp(2.1rem, 3.3vw, 3.05rem); }
}
@media (min-width: 651px) and (max-width: 1079px) {
  .weekmate-project { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weekmate-project .project-copy { justify-content: center; }
  .weekmate-project .project-links { margin-top: 0; }
}
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 4rem); }
  .hero-art { width: 88vw; right: -21vw; }
  .hero-inner { min-height: 590px; }
  .section-intro { grid-template-columns: 1.2fr .8fr; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 2.5rem); }
  .header-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; padding-block: .75rem .6rem; }
  .header-inner nav { order: 3; width: 100%; gap: 1.35rem; padding-top: .45rem; }
  .brand { font-size: 1.22rem; }
  .brand img { width: 25px; height: 25px; margin-top: 2px; }
  .footer .brand img { margin-top: 5px; }
  .theme-toggle { width: 40px; min-height: 40px; }
  .nav-action { min-height: 40px; padding: .53rem .65rem; font-size: .8rem; }
  .hero-inner { justify-content: flex-start; min-height: 0; padding-block: 2.9rem 4.1rem; }
  .hero-art { width: calc(100% + 2.5rem); height: clamp(230px, 64vw, 390px); top: auto; bottom: 2.5rem; right: -1.25rem; }
  .hero-art { background-position: 67% 52%; }
  .hero-art::after { background: linear-gradient(180deg, var(--bg), transparent 35%, transparent 80%, var(--bg)); }
  .hero-content { padding-bottom: clamp(165px, 48vw, 300px); }
  .hero h1 { font-size: clamp(2.65rem, 10.5vw, 4.9rem); }
  .hero-copy { margin-top: 1rem; }
  .hero-actions { margin-top: 1.35rem; }
  .hero-actions .button { padding-inline: .85rem; }
  .hero-foot { gap: .7rem; font-size: .63rem; letter-spacing: .035em; }
  .hero-foot span:last-child { text-align: right; }
  .section-intro, .contact-layout, .profile { grid-template-columns: 1fr; gap: 1.15rem; }
  .services-grid { grid-template-columns: 1fr; gap: .7rem; }
  .project-art { height: clamp(190px, 45vw, 320px); }
  .project-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 1.2rem; }
  .footer-inner { padding-block: 1.5rem; flex-wrap: wrap; min-height: 0; }
}
@media (max-width: 650px) {
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 530px) {
  .form-row { grid-template-columns: 1fr; }
  .project-art { height: clamp(220px, 61vw, 325px); }
  .footer small { order: 3; width: 100%; }
}
@media (max-width: 365px) {
  .header-actions .nav-action { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
