:root {
    --blue: #0B3D91;
    --blue-dark: #061F4D;
    --blue-bright: #2F6BFF;
    --blue-light: #EAF1FB;
    --line: #C9D6EA;
    --text: #14213D;
    --muted: #4A5A78;
    --white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--white);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
}

button, input { font-family: Arial, Helvetica, sans-serif; font-size: inherit; color: inherit; }
button { cursor: pointer; }

a { color: var(--blue); text-decoration: none; }

:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.sr {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 700; letter-spacing: 0.04em; color: var(--blue); }
.logo span { font-weight: 400; color: var(--muted); }
.nav-links { display: flex; list-style: none; }
.nav-links a {
    display: block; padding: 20px 18px; color: var(--text);
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
    position: relative;
}
.nav-links a::after {
    content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 4px;
    background: var(--blue-bright); transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-toggle { display: none; background: var(--white); border: 1px solid var(--blue); color: var(--blue); padding: 8px 16px; font-weight: 700; }

/* Hero */
.hero { background: var(--blue); color: var(--white); position: relative; overflow: hidden; }
.hero-inner { padding-top: 96px; padding-bottom: 40px; position: relative; z-index: 1; }
.eyebrow {
    display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em;
    border-top: 4px solid var(--white); padding-top: 14px; margin-bottom: 28px;
}
.hero h1 { font-size: clamp(52px, 11vw, 132px); line-height: 0.95; letter-spacing: -0.03em; font-weight: 700; }
.lede { font-size: 20px; max-width: 520px; margin-top: 28px; opacity: 0.92; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.wave { display: block; width: 100%; height: 160px; position: relative; }

.btn {
    display: inline-block; padding: 14px 26px; font-weight: 700; font-size: 15px;
    background: var(--white); color: var(--blue); border: 2px solid var(--white);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--blue-bright); color: var(--white); border-color: var(--blue-bright); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--white); }
.btn.ghost:hover { background: var(--white); color: var(--blue); border-color: var(--white); }
.btn.small { padding: 8px 16px; font-size: 14px; background: var(--blue); color: var(--white); border-color: var(--blue); }

/* Sections */
.section { padding: 96px 0; }
.section.alt { background: var(--blue-light); }
.section-title {
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--blue);
    border-bottom: 2px solid var(--blue); margin-bottom: 48px; padding-bottom: 12px;
}
.section-title span::before { content: ""; display: inline-block; width: 12px; height: 12px; background: var(--blue-bright); margin-right: 12px; }
.lead { color: var(--muted); max-width: 620px; margin-bottom: 24px; }

/* About */
.about { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; }
.about-img { width: 100%; display: block; box-shadow: 14px 14px 0 var(--blue-bright); }
.about p + p { margin-top: 16px; }
.about .big { font-size: 28px; line-height: 1.3; color: var(--blue-dark); font-weight: 700; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.facts li { border: 1px solid var(--blue); color: var(--blue); padding: 6px 14px; font-size: 14px; font-weight: 700; }

/* Work */
.work { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 32px; align-items: start; }
.index { position: sticky; top: 76px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; min-height: 0; }

.search { position: relative; }
.search input {
    width: 100%; padding: 14px 44px 14px 16px; border: 2px solid var(--blue); background: var(--white);
}
.search input::placeholder { color: var(--muted); }
.search kbd {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    border: 1px solid var(--line); padding: 0 8px; font: 700 13px Arial, Helvetica, sans-serif; color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { background: var(--white); border: 1px solid var(--blue); color: var(--blue); padding: 6px 12px; font-size: 13px; font-weight: 700; transition: background 0.15s, color 0.15s; }
.chip:hover { background: var(--blue-light); }
.chip.on { background: var(--blue); color: var(--white); }
.status { font-size: 13px; color: var(--muted); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.08em; }

.list { list-style: none; overflow-y: auto; border-top: 1px solid var(--blue); min-height: 0; background: var(--white); }
.row {
    width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr) 20px; gap: 12px; text-align: left;
    padding: 16px 14px; background: var(--white); border: 0; border-bottom: 1px solid var(--line);
    position: relative; transition: background 0.2s, color 0.2s, padding 0.2s;
}
.row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--blue-bright); transition: width 0.2s; }
.row:hover { background: var(--blue-light); padding-left: 20px; }
.row:hover::before { width: 6px; }
.row.on { background: var(--blue); color: var(--white); padding-left: 20px; }
.row.on::before { width: 6px; background: var(--white); }
.idx { font-size: 13px; font-weight: 700; color: var(--blue-bright); padding-top: 2px; }
.row.on .idx { color: var(--white); opacity: 0.75; }
.txt { display: block; min-width: 0; }
.txt strong { display: block; font-size: 16px; line-height: 1.3; }
.txt small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; margin-top: 2px; }
.sum { display: block; font-size: 14px; line-height: 1.45; margin-top: 8px; opacity: 0.85; }
.go { opacity: 0; transition: opacity 0.2s, transform 0.2s; transform: translateX(-6px); }
.row:hover .go, .row.on .go { opacity: 1; transform: none; }
.none { padding: 24px 0; }
.none p { margin-bottom: 12px; }

/* Detail */
.pane { min-width: 0; scroll-margin-top: 76px; }
.detail { background: var(--white); border: 1px solid var(--line); animation: rise 0.35s ease both; }
.detail.empty { padding: 48px; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.detail-head { padding: 32px 32px 24px; border-bottom: 1px solid var(--line); }
.kicker { font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--blue-bright); font-weight: 700; margin-bottom: 8px; }
.detail-head h3 { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; color: var(--blue-dark); }
.detail-body { padding: 28px 32px 36px; max-width: 760px; }
.detail-body p + p { margin-top: 16px; }

.plate {
    background: var(--blue); color: var(--white); min-height: 240px; padding: 28px 32px;
    display: flex; flex-direction: column; justify-content: space-between;
    background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 32px 32px;
}
.plate span { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.plate b { font-size: clamp(28px, 4vw, 48px); line-height: 1.1; max-width: 520px; }

.gallery { background: var(--blue-light); border-bottom: 1px solid var(--line); }
.stage { position: relative; min-height: 260px; max-height: 560px; display: flex; align-items: center; justify-content: center; padding: 20px 64px; background: var(--white); }
.stage-img { max-width: 100%; max-height: 520px; height: auto; display: block; animation: fade 0.3s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.arrow {
    position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0;
    background: var(--blue); color: var(--white); font-size: 26px; line-height: 1; transition: background 0.2s;
}
.arrow:hover { background: var(--blue-bright); }
.prev { left: 10px; }
.next { right: 10px; }
.caption { display: flex; justify-content: space-between; gap: 16px; padding: 10px 20px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.count { font-weight: 700; color: var(--blue); white-space: nowrap; font-variant-numeric: tabular-nums; }
.thumbs { display: flex; gap: 6px; padding: 0 20px 16px; overflow-x: auto; }
.thumb { flex: 0 0 auto; width: 84px; height: 56px; border: 2px solid var(--line); background: var(--white); padding: 0; opacity: 0.7; transition: opacity 0.2s, border-color 0.2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { opacity: 1; }
.thumb.on { border-color: var(--blue); opacity: 1; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.tags button { background: var(--blue-light); border: 1px solid var(--blue-light); color: var(--blue); padding: 4px 12px; font-size: 13px; font-weight: 700; }
.tags button:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }
.links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.links a { font-weight: 700; border-bottom: 2px solid var(--blue-bright); }
.links a:hover { background: var(--blue-light); }
.hint { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Blog and contact */
iframe { border: 1px solid var(--line); background: var(--white); display: block; max-width: 100%; }
.contact { background: var(--blue-dark); color: var(--white); }
.contact .section-title { color: var(--white); border-color: var(--white); }
.contact .lead { color: rgba(255,255,255,0.8); margin-top: 12px; }
.huge { font-size: clamp(36px, 7vw, 84px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
.foot { background: var(--blue-dark); color: rgba(255,255,255,0.7); border-top: 1px solid rgba(255,255,255,0.15); padding: 24px 0; font-size: 14px; }

@media (max-width: 900px) {
    .work { grid-template-columns: minmax(0, 1fr); }
    .index { position: static; max-height: none; }
    .list { max-height: 420px; }
    .about { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .about-img { max-width: 220px; }
}

@media (max-width: 720px) {
    .section { padding: 64px 0; }
    .hero-inner { padding-top: 64px; }
    .wave { height: 110px; }
    .nav-toggle { display: block; }
    .nav-links { display: none; flex-direction: column; width: 100%; padding-bottom: 12px; }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 0; }
    .nav-links a::after { display: none; }
    .stage { padding: 16px 52px; }
    .detail-head, .detail-body { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Experience timeline */
.timeline { list-style: none; position: relative; max-width: 900px; }
.timeline::before { content: ""; position: absolute; left: 150px; top: 8px; bottom: 8px; width: 2px; background: var(--blue); }
.tl-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0; position: relative; padding-bottom: 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 144px; top: 8px; width: 14px; height: 14px; background: var(--white); border: 3px solid var(--blue); z-index: 1; }
.tl-item.lead-item::before { background: var(--blue-bright); border-color: var(--blue-bright); }
.tl-when { padding: 4px 28px 0 0; text-align: right; font-weight: 700; color: var(--blue); font-size: 15px; font-variant-numeric: tabular-nums; }
.tl-card { margin-left: 32px; background: var(--white); border: 1px solid var(--line); padding: 24px 28px; transition: border-color 0.2s, transform 0.2s; }
.tl-card:hover { border-color: var(--blue); transform: translateX(4px); }
.lead-item .tl-card { border-left: 6px solid var(--blue-bright); }
.tl-card h3 { font-size: 22px; line-height: 1.25; color: var(--blue-dark); margin-bottom: 12px; }
.tl-points { margin: 0 0 4px 18px; }
.tl-points li + li { margin-top: 8px; }
.tl-tags { margin-top: 16px; }

@media (max-width: 720px) {
    .timeline::before { left: 7px; }
    .tl-item { grid-template-columns: minmax(0, 1fr); }
    .tl-item::before { left: 0; }
    .tl-when { text-align: left; padding: 0 0 8px 32px; }
    .tl-card { margin-left: 32px; padding: 20px 16px; }
}
