:root {
  box-sizing: border-box;
  --bg: #f3f6f9; --surface: #ffffff; --ink: #101b26; --muted: #55677a; --line: #dbe3ea;
  --accent: #0b7285; --accent-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1319; --surface: #121c24; --ink: #e8eef3; --muted: #93a5b5; --line: #22313d; --accent: #4fd0e0; --accent-ink: #06222a;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1319; --surface: #121c24; --ink: #e8eef3; --muted: #93a5b5; --line: #22313d; --accent: #4fd0e0; --accent-ink: #06222a;
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a, a:hover { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { font-weight: 800; letter-spacing: -0.01em; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.links { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.links a { color: var(--muted); }
.links a:hover, .links a[aria-current] { color: var(--ink); }
.icon-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px;
  width: 34px; height: 34px; cursor: pointer; font-size: 15px; line-height: 1; flex: none; padding: 0; }
.icon-btn:hover { color: var(--ink); }
.menu { display: none; }

/* buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 10px; font: 600 15px/1.2 "Manrope", system-ui, sans-serif;
  cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn:hover { border-color: var(--accent); color: var(--ink); }
.btn.primary, .btn-primary, .btn-primary:hover, .btn-primary:focus {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover, .btn-primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn img { width: 22px; height: auto; border-radius: 4px; vertical-align: -5px; margin-right: 6px; }

/* home */
.hero { position: relative; overflow: hidden; padding: 96px 0 88px; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.contours { position: absolute; right: -80px; top: 0; width: 720px; max-width: none; height: 100%; opacity: .16; pointer-events: none; }
.contours path { fill: none; stroke: var(--accent); stroke-width: 1.4; }
h1 { margin: 0; font-weight: 800; letter-spacing: -0.045em; line-height: .95; font-size: clamp(48px, 9.5vw, 96px); }
.role { margin: 26px 0 0; font-size: clamp(20px, 3vw, 26px); font-weight: 500; letter-spacing: -0.015em; }
.intro { margin: 14px 0 0; color: var(--muted); max-width: 32em; }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.photo img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 18px; border: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .hero .wrap > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .hero .photo { animation-delay: .15s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
section { padding: 72px 0; border-top: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: 200px 1fr; gap: 24px 48px; }
h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.body p { margin: 0 0 1em; max-width: 38em; }
.body p:last-child { margin-bottom: 0; }
.job { display: grid; grid-template-columns: 124px 1fr; gap: 28px; padding-bottom: 40px; }
.job + .job { padding-top: 40px; border-top: 1px solid var(--line); }
.job:last-child { padding-bottom: 0; }
.logo { width: 124px; aspect-ratio: 1; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.job h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.015em; }
.job .when { margin: 2px 0 12px; color: var(--muted); font-size: 15px; }
.job p:not(.when) { margin: 0; color: var(--muted); max-width: 38em; }
.ask { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; max-width: 640px; }
.ask textarea { width: 100%; min-height: 96px; resize: vertical; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.ask .btn { margin-top: 12px; }
.out { margin: 16px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 16px; }
.out:empty { display: none; }
.hint { margin: 0 0 16px; color: var(--muted); max-width: 34em; }
.press { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; }
.press a { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 15px; }
.press a:hover { border-color: var(--accent); color: var(--accent); }
.contact { display: grid; grid-template-columns: 1fr 240px; gap: 32px; align-items: center; }
.contact .addr { margin: 14px 0 0; color: var(--muted); }
.contact img.shaka { width: 100%; border-radius: 14px; border: 1px solid var(--line); }
footer { padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* inner pages (legacy Bootstrap markup, restyled) */
.page { padding-top: 48px; padding-bottom: 72px; }
.page .row { align-items: flex-start; }
.page .col, .page [class*="col-"] { padding: 12px; }
.page .header { font-size: clamp(34px, 6vw, 56px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; padding: 24px 12px 12px; }
.page .project_header { font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.2; align-items: center; margin-top: 16px; }
.page h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.015em; margin: 1.4em 0 .4em; }
.page a:not(.btn):not(.carousel-control-prev):not(.carousel-control-next) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.page img { max-width: 100%; height: auto; border-radius: 12px; }
.page .btn img { width: 20px; border-radius: 4px; margin-right: 6px; }
.page iframe { max-width: 100%; border: 0; border-radius: 12px; }
.page iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.page video { max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 0 auto; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }
.carousel { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.carousel-inner { aspect-ratio: 16 / 9; }
body[data-page="ski"] .carousel-inner { aspect-ratio: 4 / 3; }
.carousel-item, .carousel-item img { height: 100%; }
.page .carousel-item img { object-fit: contain; width: 100%; border-radius: 0; }
.carousel-control-prev-icon, .carousel-control-next-icon { width: 40px; height: 40px; border-radius: 50%; background-color: rgba(16,27,38,.65); background-size: 45%; }
.carousel-indicators { margin-bottom: 6px; }
.carousel-indicators li { height: 3px; width: 22px; background-color: rgba(255,255,255,.7); mix-blend-mode: difference; }

@media (max-width: 720px) {
  .menu { display: block; }
  .links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 16px; }
  .links.open { display: flex; }
  .links a { padding: 12px 0; font-size: 16px; }
  .hero { padding: 56px 0 56px; }
  .hero .wrap, .grid, .contact { grid-template-columns: 1fr; }
  .hero .wrap { gap: 36px; }
  .photo { max-width: 420px; }
  .contours { right: -300px; }
  section { padding: 56px 0; }
  .job { grid-template-columns: 1fr; gap: 16px; }
  .logo { width: 96px; }
  .contact img.shaka { max-width: 240px; }
}
