:root {
  --black: #111;
  --ink: #212121;
  --white: #fff;
  --gray: #8a8a8a;
  --line: #e2e2e2;
  --gold: #d8b45f;
  --gold-deep: #9c7a2c;
  --red: #c0272d;
  --wine: #7b1e2b;
  --en: "Jost", "Futura", "Century Gothic", sans-serif;
  --jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--jp);
  font-weight: 400;
  line-height: 2;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--gold); color: var(--black); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* top bar */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 10; background: rgba(17,17,17,.88); backdrop-filter: blur(8px); color: var(--white); }
.bar .wrap { display: flex; justify-content: space-between; align-items: center; height: 60px; font-family: var(--en); font-size: .82rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.bar nav { display: flex; gap: 28px; }
.bar a { text-decoration: none; transition: color .2s; }
.bar a:hover { color: var(--gold); }

/* hero */
.hero { background: var(--black); color: var(--white); }
.hero .inner { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 80px; }
.hero .eyebrow { font-family: var(--en); font-size: .85rem; font-weight: 500; letter-spacing: .4em; color: var(--gold); margin: 0 0 28px; text-transform: uppercase; }
.hero h1 { font-family: var(--en); font-weight: 500; font-size: clamp(3rem, 11vw, 8rem); line-height: 1.02; letter-spacing: .02em; margin: 0 0 28px; text-transform: uppercase; }
.hero .jp { font-size: clamp(1rem, 2vw, 1.25rem); letter-spacing: .5em; margin: 0 0 56px; color: #ddd; }
.hero .rule { width: 56px; height: 2px; background: var(--gold); margin-bottom: 28px; }
.hero .lead { font-size: clamp(1rem, 1.8vw, 1.15rem); line-height: 2.1; margin: 0 0 24px; max-width: 30em; }
.hero .affil { font-family: var(--en); font-size: .78rem; letter-spacing: .2em; color: var(--gray); margin: 0; text-transform: uppercase; line-height: 1.9; }

/* sections */
section { padding: 112px 0 0; }
.row { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.label { position: sticky; top: 90px; align-self: start; }
.label h2 { font-family: var(--en); font-weight: 500; font-size: 1.9rem; letter-spacing: .08em; text-transform: uppercase; margin: 0; line-height: 1.1; }
.label h2::after { content: ""; display: block; width: 36px; height: 2px; background: var(--gold); margin-top: 14px; }

h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.6; margin: 0 0 .4em; }
h3 small { font-family: var(--en); font-weight: 500; font-size: .7rem; color: var(--gold-deep); letter-spacing: .18em; margin-left: .9em; text-transform: uppercase; }
h4 { font-family: var(--en); font-size: .75rem; letter-spacing: .24em; color: var(--gold-deep); font-weight: 500; margin: 2.4em 0 .6em; text-transform: uppercase; }
p { margin: 0 0 1em; }
.meta { font-size: .8rem; color: var(--gray); letter-spacing: .06em; }

.about p.big { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 500; line-height: 2.1; margin-bottom: 2em; }
.points { list-style: none; margin: 0; padding: 0; }
.points li { display: grid; grid-template-columns: 11em 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); font-size: .93rem; }
.points li:last-child { border-bottom: 1px solid var(--line); }
.points b { font-weight: 700; }

.item { padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.badge { display: inline-block; background: var(--black); color: var(--gold); font-family: var(--en); font-size: .7rem; font-weight: 500; letter-spacing: .2em; padding: 2px 12px; margin-right: .8em; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 12px 0; border-top: 1px solid var(--line); font-size: .93rem; }
.plain li:last-child { border-bottom: 1px solid var(--line); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline time { font-family: var(--en); font-weight: 500; font-size: .95rem; letter-spacing: .08em; color: var(--gold-deep); }
.timeline h3 { font-size: 1.02rem; margin-bottom: .2em; }
.timeline p { font-size: .9rem; margin: 0; }

/* app */
.app { display: grid; grid-template-columns: 112px 1fr; gap: 28px; align-items: start; }
.app img { width: 112px; height: 112px; border-radius: 25px; display: block; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.link { display: inline-block; font-family: var(--en); font-size: .85rem; font-weight: 500; letter-spacing: .16em; text-decoration: none; text-transform: uppercase; border-bottom: 2px solid var(--gold); padding-bottom: 2px; transition: color .2s; }
.link:hover { color: var(--gold-deep); }
.link::after { content: " →"; }

.skills { font-family: var(--en); font-weight: 500; font-size: 1.1rem; letter-spacing: .06em; line-height: 2.3; margin: 0; }
.skills span { white-space: nowrap; }
.skills span:not(:last-child)::after { content: "／"; color: var(--gold); margin: 0 .5em; }

footer { margin-top: 128px; background: var(--black); color: var(--gray); padding: 36px 0 44px; font-family: var(--en); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; }
footer .wrap { display: flex; justify-content: space-between; }
footer a { text-decoration: none; }
footer a:hover { color: var(--gold); }

/* reveal */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .9s ease, transform .9s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

@media (max-width: 760px) {
  .bar nav { gap: 14px; font-size: .7rem; }
  .row { grid-template-columns: 1fr; gap: 28px; }
  .label { position: static; }
  .points li, .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .app { grid-template-columns: 88px 1fr; gap: 18px; }
  .app img { width: 88px; height: 88px; border-radius: 20px; }
}

/* ---------- motion ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; z-index: 20; }

.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 35%), rgba(216,180,95,.16), transparent 70%);
  transition: background .15s;
}
.hero .inner { position: relative; }

.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: block; transform: translateY(110%); animation: rise 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
.line:nth-child(2) > span { animation-delay: .12s; }
@keyframes rise { to { transform: none; } }

.hero .eyebrow, .hero .jp, .hero .lead, .hero .affil { opacity: 0; animation: fade 1s ease forwards; }
.hero .eyebrow { animation-delay: .1s; }
.hero .jp { animation-delay: .55s; }
.hero .lead { animation-delay: .95s; }
.hero .affil { animation-delay: 1.15s; }
.hero .rule { transform: scaleX(0); transform-origin: 0 50%; animation: draw .9s cubic-bezier(.2,.8,.2,1) .8s forwards; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { transform: none; } }

/* staggered rows */
.rv .timeline li, .rv .plain li, .rv .points li { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.rv.in .timeline li, .rv.in .plain li, .rv.in .points li { opacity: 1; transform: none; }
.rv.in li:nth-child(2) { transition-delay: .1s; }
.rv.in li:nth-child(3) { transition-delay: .2s; }
.rv.in li:nth-child(4) { transition-delay: .3s; }
.rv.in li:nth-child(5) { transition-delay: .4s; }

/* hover: gold line grows */
.timeline li, .plain li, .points li { position: relative; }
.timeline li::before, .plain li::before, .points li::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--gold); transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.timeline li:hover::before, .plain li:hover::before, .points li:hover::before { width: 100%; }

/* app icon */
.app img { transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s; }
.app:hover img { transform: translateY(-6px) rotate(-3deg); box-shadow: 0 16px 32px rgba(0,0,0,.25); }
.label h2::after { width: 0; transition: width .8s cubic-bezier(.2,.8,.2,1) .2s; }
.rv.in .label h2::after { width: 36px; }

@media (prefers-reduced-motion: reduce) {
  .line > span, .hero .eyebrow, .hero .jp, .hero .lead, .hero .affil, .hero .rule { animation: none; opacity: 1; transform: none; }
  .rv .timeline li, .rv .plain li, .rv .points li { opacity: 1; transform: none; transition: none; }
  .label h2::after { width: 36px; transition: none; }
  .hero::before { display: none; }
}

/* hero network background */
#net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; animation: fade 1.8s ease .3s forwards; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(transparent, var(--black)); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #net { animation: none; opacity: 1; } }

/* ---------- crimson accents (use sparingly) ---------- */
.hero .rule { position: relative; }
.hero .rule::after { content: ""; position: absolute; left: 56px; top: 0; width: 18px; height: 2px; background: var(--red); }
.label h2::after { background: linear-gradient(90deg, var(--gold) 0 75%, var(--red) 75% 100%); }
.progress { background: linear-gradient(90deg, var(--gold) 0 85%, var(--red)); }
.badge { background: var(--wine); color: #fff; }
.timeline li.now time::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 10px; vertical-align: 2px; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
footer { border-top: 2px solid var(--wine); }
::selection { background: var(--wine); color: #fff; }
@media (prefers-reduced-motion: reduce) { .timeline li.now time::before { animation: none; } }

/* ---------- wine rulers & dividers ---------- */
:root {
  --ruler: linear-gradient(var(--wine), var(--wine)) 0 0 / 100% 2px no-repeat,
           repeating-linear-gradient(90deg, var(--wine) 0 1px, transparent 1px 12px) 0 100% / 100% 6px no-repeat;
}
main section { position: relative; padding-top: 104px; }
main section:not(:first-child)::before {
  content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 8px; background: var(--ruler);
}
main section:not(:first-child)::after {
  content: ""; position: absolute; top: -3px; left: 50%; width: 9px; height: 9px; margin-left: -4px;
  background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 5px var(--white);
}
main section:first-child { padding-top: 96px; }

/* item separators: short wine bar + hairline */
.item { border-bottom: 0; position: relative; }
.item:not(:last-child)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(var(--wine), var(--wine)) 0 0 / 48px 2px no-repeat, linear-gradient(var(--line), var(--line)) 0 1px / 100% 1px no-repeat;
}

/* hero & footer rulers */
.hero::after {
  height: 34%;
  background: linear-gradient(transparent, var(--black));
}
.hero .inner::after {
  content: ""; position: absolute; left: 24px; right: 24px; bottom: 0; height: 8px;
  background: linear-gradient(var(--wine), var(--wine)) 0 100% / 100% 2px no-repeat,
              repeating-linear-gradient(90deg, var(--wine) 0 1px, transparent 1px 12px) 0 0 / 100% 6px no-repeat;
  z-index: 1;
}
footer { border-top: 0; position: relative; }
footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: var(--ruler); }
footer .wrap { padding-top: 6px; }

/* ---------- mobile fixes ---------- */
.bar .wrap > a { white-space: nowrap; }
.hero .affil { color: #a8a8a8; }
@media (max-width: 760px) {
  .bar .wrap { height: 52px; justify-content: center; }
  .bar .wrap > a { display: none; }
  .bar nav { width: 100%; justify-content: space-between; gap: 0; font-size: .66rem; letter-spacing: .12em; }
  .hero .inner { padding-top: 96px; }
  main section { padding-top: 80px; }
  main section:first-child { padding-top: 72px; }
  main section:not(:first-child)::before { left: 24px; right: 24px; }
}
main section { padding-bottom: 48px; }
@media (max-width: 760px) { main section { padding-bottom: 36px; } }

/* ---------- geometric band (thick bar + chained diamonds) ---------- */
:root {
  --band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='16' viewBox='0 0 36 16'%3E%3Crect width='36' height='4' fill='%237b1e2b'/%3E%3Cpath d='M6 4l6 6-6 6-6-6zM30 4l6 6-6 6-6-6z' fill='%237b1e2b'/%3E%3Cpath d='M18 6.5l3.5 3.5-3.5 3.5-3.5-3.5z' fill='%23d8b45f'/%3E%3C/svg%3E");
  --band-flip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='16' viewBox='0 0 36 16'%3E%3Cg transform='translate(0 16) scale(1 -1)'%3E%3Crect width='36' height='4' fill='%237b1e2b'/%3E%3Cpath d='M6 4l6 6-6 6-6-6zM30 4l6 6-6 6-6-6z' fill='%237b1e2b'/%3E%3Cpath d='M18 6.5l3.5 3.5-3.5 3.5-3.5-3.5z' fill='%23d8b45f'/%3E%3C/g%3E%3C/svg%3E");
}
main section:not(:first-child)::before { height: 16px; background: var(--band) 0 0 / 36px 16px repeat-x; }
main section:not(:first-child)::after { top: 1px; width: 13px; height: 13px; margin-left: -6px; box-shadow: 0 0 0 6px var(--white); border: 2px solid var(--black); background: var(--gold); }
.hero .inner::after { height: 16px; background: var(--band-flip) 0 0 / 36px 16px repeat-x; }
footer::before { height: 16px; background: var(--band) 0 0 / 36px 16px repeat-x; }
footer .wrap { padding-top: 16px; }
.item:not(:last-child)::after { height: 4px; background: linear-gradient(var(--wine), var(--wine)) 0 0 / 56px 4px no-repeat, linear-gradient(var(--line), var(--line)) 0 1px / 100% 1px no-repeat; }
main section { padding-top: 112px; }
@media (max-width: 760px) { main section { padding-top: 88px; } main section:first-child { padding-top: 72px; } }

/* ---------- dividers removed ---------- */
main section::before, main section::after { content: none !important; }
.hero .inner::after { content: none; }
footer::before { content: none; }
footer { border-top: 0; padding-top: 36px; }
footer .wrap { padding-top: 0; }
.item:not(:last-child)::after { content: none; }
.item { border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
main section, main section:first-child { padding-top: 112px; padding-bottom: 0; }
@media (max-width: 760px) { main section, main section:first-child { padding-top: 80px; } }

/* ---------- more crimson spots (no lines) ---------- */
.hero .eyebrow::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--red); margin-right: 14px; vertical-align: 1px; }
.hero h1 .line:last-child > span::after { content: "."; color: var(--red); }
.label h2::before { content: ""; display: block; width: 11px; height: 11px; background: var(--red); margin-bottom: 14px; }
.points b::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--red); transform: rotate(45deg); margin-right: .7em; vertical-align: 2px; }
h3 small { color: var(--wine); }
.plain .meta { color: var(--wine); font-weight: 500; }
.timeline li:not(.now) time { color: var(--wine); }
.skills span:nth-child(even)::after { color: var(--red); }
.link::after { color: var(--red); }
.link:hover { color: var(--wine); }
.app:hover h3 { color: var(--wine); }
footer a:hover { color: var(--red); }

/* ---------- hero: slanted bottom edge ---------- */
.hero { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 56px), 0 100%); padding-bottom: 0; }
.hero::after { display: none; }
.hero .inner { padding-bottom: 150px; }
.hero .slant { position: absolute; left: 0; bottom: 0; width: 100%; height: 56px; display: block; pointer-events: none; }
main section:first-child { padding-top: 96px; }
@media (max-width: 760px) {
  .hero { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), 0 100%); }
  .hero .slant { height: 32px; }
  .hero .inner { padding-bottom: 110px; }
}

/* ---------- timeline with a vertical line and dots ---------- */
.timeline li { grid-template-columns: 150px 1fr; column-gap: 48px; padding: 24px 0 24px; border: 0; position: relative; }
.timeline li:first-child { padding-top: 24px; }
.timeline li:last-child { border: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 174px; top: 0; bottom: 0; width: 1px; height: auto;
  background: var(--line); transition: none;
}
.timeline li:hover::before { width: 1px; }
.timeline li:first-child::before { top: 40px; background: linear-gradient(var(--gold-deep), var(--line) 120px); }
.timeline li:last-child::before { bottom: auto; height: 40px; }
.timeline li:only-child::before { display: none; }
.timeline li::after {
  content: ""; position: absolute; left: 168.5px; top: 34px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--gold-deep); z-index: 1;
}
.timeline li.now::after { background: var(--red); border-color: var(--red); animation: glow 2.4s ease-out infinite; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(192,39,45,.55); } 70%, 100% { box-shadow: 0 0 0 12px rgba(192,39,45,0); } }
.timeline li.now time::before { content: none; }
@media (max-width: 760px) {
  .timeline li { grid-template-columns: 1fr; padding-left: 30px; column-gap: 0; }
  .timeline li::before { left: 5px; }
  .timeline li::after { left: 0; top: 33px; }
  .timeline li time { margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) { .timeline li.now::after { animation: none; } }

/* ---------- skill levels ---------- */
h4 .note { font-style: normal; color: var(--gray); letter-spacing: .08em; text-transform: none; margin-left: 1em; font-family: var(--jp); }
.levels { list-style: none; margin: 0 0 .5rem; padding: 0; max-width: 460px; }
.levels li { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 11px 0; border-top: 1px solid var(--line); margin: 0; }
.levels li:last-child { border-bottom: 1px solid var(--line); }
.levels .name { font-family: var(--en); font-weight: 500; font-size: 1.05rem; letter-spacing: .06em; }
.meter { display: inline-flex; gap: 5px; }
.meter i { display: block; width: 30px; height: 6px; background: var(--line); position: relative; overflow: hidden; }
.meter i::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.meter[data-level="1"] i:nth-child(-n+1)::after, .meter[data-level="2"] i:nth-child(-n+2)::after,
.meter[data-level="3"] i:nth-child(-n+3)::after, .meter[data-level="4"] i:nth-child(-n+4)::after,
.meter[data-level="5"] i:nth-child(-n+5)::after { transform: scaleX(0); }
.rv.in .meter[data-level="1"] i:nth-child(-n+1)::after, .rv.in .meter[data-level="2"] i:nth-child(-n+2)::after,
.rv.in .meter[data-level="3"] i:nth-child(-n+3)::after, .rv.in .meter[data-level="4"] i:nth-child(-n+4)::after,
.rv.in .meter[data-level="5"] i:nth-child(-n+5)::after { transform: none; }
.rv.in .meter i:nth-child(2)::after { transition-delay: .1s; } .rv.in .meter i:nth-child(3)::after { transition-delay: .2s; }
.rv.in .meter i:nth-child(4)::after { transition-delay: .3s; } .rv.in .meter i:nth-child(5)::after { transition-delay: .4s; }
@media (max-width: 480px) { .meter i { width: 22px; } }
@media (prefers-reduced-motion: reduce) { .meter i::after { transition: none; } }

/* ---------- patent box ---------- */
.patent { position: relative; background: var(--black); color: var(--white); padding: 22px 26px 8px; margin: 1.4em 0 1.6em; overflow: hidden; }
.patent::before { content: ""; position: absolute; top: 0; left: 0; width: 5px; height: 100%; background: linear-gradient(var(--red), var(--wine)); }
.patent::after { content: ""; position: absolute; right: -28px; top: -28px; width: 84px; height: 84px; border: 1px solid rgba(216,180,95,.45); transform: rotate(45deg); }
.patent .badge { background: transparent; border: 1px solid var(--gold); color: var(--gold); margin: 0 0 12px; }
.patent p { font-size: .93rem; line-height: 1.95; margin: 0 0 14px; position: relative; z-index: 1; }
.hero .inner { padding-bottom: 104px; }
@media (max-width: 760px) { .hero .inner { padding-bottom: 96px; } }

/* ---------- decorative gold outlines on the white area ---------- */
main { position: relative; }
body { overflow-x: hidden; }
main section { z-index: 1; }
.deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; margin: 0 -24px; }
.deco .d { position: absolute; display: block; border: 1.5px solid var(--gold); opacity: .38; }
.deco i { position: absolute; inset: 18%; border: 1px solid var(--gold); display: block; }

.d1 { width: 240px; height: 240px; right: -90px; top: 3%; transform: rotate(45deg); animation: drift1 26s ease-in-out infinite; }
.d2 { width: 170px; height: 170px; left: -60px; top: 21%; border-radius: 50%; opacity: .3; animation: drift2 30s ease-in-out infinite; }
.d2 i { border-radius: 50%; }
.d3 { width: 130px; height: 130px; right: 3%; top: 41%; transform: rotate(45deg); opacity: .3; animation: drift1 34s ease-in-out infinite reverse; }
.d4 { width: 150px; height: 150px; left: 1%; top: 60%; border: 0; opacity: .34; animation: drift2 32s ease-in-out infinite reverse; }
.d5 { width: 34px; height: 34px; right: 9%; top: 75%; transform: rotate(45deg); background: rgba(216,180,95,.12); opacity: .7; animation: drift1 22s ease-in-out infinite; }
.d6 { width: 210px; height: 210px; right: -70px; top: 88%; border-radius: 50%; opacity: .28; }
.d6 i { border-radius: 50%; inset: 22%; }

@keyframes drift1 { 50% { translate: -14px 18px; } }
@keyframes drift2 { 50% { translate: 16px -14px; } }
@media (prefers-reduced-motion: reduce) { .deco .d { animation: none; } }
@media (max-width: 760px) {
  .d1 { width: 150px; height: 150px; right: -70px; }
  .d2 { width: 110px; height: 110px; left: -50px; }
  .d3 { width: 80px; height: 80px; right: -20px; }
  .d4 { width: 100px; height: 100px; left: -20px; }
  .d6 { width: 140px; height: 140px; right: -60px; }
}

/* squares and diamonds only: □ ◇ ◆ ■ */
.d2, .d6, .d2 i, .d6 i { border-radius: 0; }
.d2 { transform: none; }                                 /* □ */
.d4 { border: 1.5px solid var(--gold); transform: rotate(45deg); width: 110px; height: 110px; left: 4%; top: 60%; } /* ◇ */
.d5 { background: var(--gold); opacity: .45; }          /* ◆ */
.d6 { transform: none; }                                 /* □ (nested) */
.d3 { background: rgba(216,180,95,.10); }               /* ◇ with faint fill */
.d1 i { inset: 16%; }
.d6 i { inset: 16%; }
.deco .d7 { border: 0; width: 22px; height: 22px; left: 8%; top: 12%; background: var(--wine); opacity: .55; animation: drift2 24s ease-in-out infinite; } /* ■ */

/* wine ■ : static, no floating */
.deco .d7, .deco .d8, .deco .d9 { border: 0; background: var(--wine); opacity: .6; animation: none; transform: none; }
.deco .d7 { width: 22px; height: 22px; left: 8%; top: 12%; }
.deco .d8 { width: 12px; height: 12px; right: 14%; top: 33%; }
.deco .d9 { width: 16px; height: 16px; left: 5%; top: 82%; }

/* gold □ partly overlapped by a wine ■ */
.deco .d10 { width: 96px; height: 96px; right: 7%; top: 57%; opacity: 1; border: 1.5px solid rgba(216,180,95,.55); animation: none; transform: none; }
.deco .d10::after { content: ""; position: absolute; right: -26px; bottom: -26px; width: 52px; height: 52px; background: rgba(123,30,43,.6); }
@media (max-width: 760px) { .deco .d10 { width: 64px; height: 64px; right: 10%; } .deco .d10::after { width: 34px; height: 34px; right: -16px; bottom: -16px; } }

/* gold ■ partly overlapped by a wine □ */
.deco .d11 { width: 72px; height: 72px; left: 6%; top: 40%; opacity: 1; border: 0; background: rgba(216,180,95,.42); animation: none; transform: none; }
.deco .d11::after { content: ""; position: absolute; right: -26px; bottom: -26px; width: 52px; height: 52px; border: 1.5px solid rgba(123,30,43,.7); }

/* wine ◇ partly overlapped by a gold ◆ */
.deco .d12 { width: 66px; height: 66px; left: 3%; top: 71%; opacity: 1; border: 1.5px solid rgba(123,30,43,.6); transform: rotate(45deg); animation: none; }
.deco .d12::after { content: ""; position: absolute; right: -22px; bottom: -22px; width: 38px; height: 38px; background: rgba(216,180,95,.55); }

@media (max-width: 760px) {
  .deco .d11 { width: 48px; height: 48px; left: 4%; }
  .deco .d11::after { width: 34px; height: 34px; right: -16px; bottom: -16px; }
  .deco .d12 { width: 46px; height: 46px; left: 2%; }
  .deco .d12::after { width: 26px; height: 26px; right: -14px; bottom: -14px; }
}

/* section-title red squares removed */
.label h2::before { content: none; }

/* name: no trailing period */
.hero h1 .line:last-child > span::after { content: none; }

/* ---------- name: thin / bold contrast ---------- */
.hero h1 .line:first-child > span { font-weight: 300; letter-spacing: .03em; }
.hero h1 .line:last-child > span { font-weight: 600; }

/* ---------- selection & scrollbar in gold / wine ---------- */
.hero ::selection { background: var(--gold); color: var(--black); }
html { scrollbar-color: var(--wine) var(--black); scrollbar-width: thin; }
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: var(--black); }
html::-webkit-scrollbar-thumb { background: var(--wine); border: 2px solid var(--black); border-radius: 0; }
html::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* ---------- scroll indicator ---------- */
.scroll {
  position: absolute; right: 24px; bottom: 84px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-family: var(--en); font-size: .68rem; font-weight: 500; letter-spacing: .4em; text-transform: uppercase;
  color: var(--gold); text-decoration: none; writing-mode: vertical-rl;
  opacity: 0; animation: fade 1s ease 1.6s forwards;
}
.scroll::after { content: ""; display: block; width: 1px; height: 64px; background: linear-gradient(var(--gold) 50%, rgba(216,180,95,.25) 50%) 0 0 / 1px 200% no-repeat; animation: sc 2.2s cubic-bezier(.6,0,.3,1) infinite; }
.scroll:hover { color: var(--white); }
@keyframes sc { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } }
@media (max-width: 760px) { .scroll { right: 20px; bottom: 60px; } .scroll::after { height: 48px; } }
@media (prefers-reduced-motion: reduce) { .scroll { animation: none; opacity: 1; } .scroll::after { animation: none; } }

.scroll::after {
  background: linear-gradient(rgba(216,180,95,0), var(--gold) 60%, rgba(216,180,95,0)) 0 -100% / 100% 60% no-repeat, rgba(216,180,95,.28);
  animation: sc2 2s cubic-bezier(.6,0,.3,1) infinite;
}
@keyframes sc2 { to { background-position: 0 200%; } }

/* ---------- portrait ---------- */
.hero .portrait {
  position: absolute; z-index: 1; right: max(24px, calc(50% - 496px)); bottom: 40px;
  width: min(30vw, 360px); aspect-ratio: 3 / 4; pointer-events: none;
  opacity: 0; animation: fade 1.4s ease .9s forwards;
}
.hero .portrait::before {            /* thin gold ◇ behind the head */
  content: ""; position: absolute; left: 50%; top: 40%; width: 84%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(45deg);
  border: 1.5px solid rgba(216,180,95,.55);
}
.hero .portrait::after {             /* wine ■ overlapping the ◇'s lower corner */
  content: ""; position: absolute; left: 50%; top: 40%; width: 18%; aspect-ratio: 1; background: rgba(123,30,43,.75);
  transform: translate(-50%, -50%) translate(0, 74%) rotate(45deg) translate(-50%, -50%);
}
.hero .portrait img {
  position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 78%, transparent 100%), linear-gradient(to right, transparent 0, #000 22%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 78%, transparent 100%), linear-gradient(to right, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-composite: intersect;
}
.about-photo { display: none; margin: 28px 0 0; position: relative; width: 132px; }
.about-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; box-shadow: 9px 9px 0 rgba(216,180,95,.55); }
.about-photo::after { content: ""; position: absolute; right: -22px; bottom: -22px; width: 20px; height: 20px; background: rgba(123,30,43,.75); }
@media (max-width: 999px) {
  .hero .portrait { display: none; }
  .about-photo { display: block; }
}
@media (prefers-reduced-motion: reduce) { .hero .portrait { animation: none; opacity: 1; } }

.hero .portrait::after {
  left: 109.4%; top: 40%; width: 15%; transform: translate(-50%, -50%); background: rgba(160,36,50,.85);
}

/* ---------- portrait: original photo in a frame (no cut-out) ---------- */
.hero .portrait { width: min(24vw, 290px); bottom: 110px; }
.hero .portrait::before {
  left: 18px; top: 18px; width: auto; aspect-ratio: auto; right: -18px; bottom: -18px; transform: none;
  border: 1.5px solid rgba(216,180,95,.7);
}
.hero .portrait::after { left: auto; top: auto; right: -30px; bottom: -30px; width: 34px; height: 34px; transform: none; background: rgba(160,36,50,.88); }
.hero .portrait img { -webkit-mask-image: none; mask-image: none; filter: grayscale(1) contrast(1.06) brightness(.96); object-position: center top; }

.hero .portrait { right: max(70px, calc(50% - 466px)); }
.about-photo img { filter: grayscale(1) contrast(1.06) brightness(.96); }

/* colour photo with a gray backdrop */
.hero .portrait img { filter: none; }
.about-photo img { filter: none; }

.scroll { right: auto; left: 50%; margin-left: -6px; bottom: 76px; }
@media (max-width: 760px) { .scroll { left: auto; right: 20px; margin-left: 0; bottom: 56px; } }

/* ---------- About: text + portrait side by side ---------- */
.hero .portrait { display: none !important; }
.about { display: grid; grid-template-columns: 1fr 250px; gap: 56px; align-items: start; }
.about-photo { display: block !important; position: sticky; top: 96px; width: auto; margin: 6px 0 0; }
.about-photo::after { content: none; }
.about-photo .frame { position: relative; }
.about-photo .frame::before {               /* gold outline offset behind the photo */
  content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1.5px solid var(--gold); z-index: 0;
}
.about-photo .frame::after {                /* wine ■ overlapping the frame corner */
  content: ""; position: absolute; right: -24px; bottom: -24px; width: 30px; height: 30px; background: rgba(160,36,50,.9); z-index: 2;
}
.about-photo img { position: relative; z-index: 1; display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; box-shadow: none; }
.about-photo figcaption { margin-top: 30px; font-family: var(--en); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gray); line-height: 1.8; }
.about-photo figcaption b { display: block; font-weight: 500; color: var(--ink); letter-spacing: .26em; }
@media (max-width: 999px) { .about { grid-template-columns: 1fr 200px; gap: 40px; } }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; gap: 44px; }
  .about-photo { position: static; width: 210px; margin: 0 14px 20px 0; }
}

.about-text .points li { grid-template-columns: 1fr; gap: 2px; }

/* ---------- portrait: smaller, no follow, framed by geometry ---------- */
.about { grid-template-columns: 1fr 200px; gap: 64px; }
.about-photo { position: relative !important; top: auto !important; width: 176px; margin: 28px 0 0 auto; }
.about-photo::before {                       /* gold dot grid behind, top-left */
  content: ""; position: absolute; left: -46px; top: -46px; width: 110px; height: 110px; z-index: 0;
  background: radial-gradient(circle, rgba(216,180,95,.75) 1.4px, transparent 1.6px) 0 0 / 11px 11px;
}
.about-photo::after {                        /* small gold ◆ on the top-right corner */
  content: "" !important; position: absolute; right: -8px; top: -8px; width: 15px; height: 15px; background: var(--gold); transform: rotate(45deg); z-index: 3;
}
.about-photo .frame::before { inset: 16px -16px -16px 16px; }          /* offset gold □ */
.about-photo img { outline: 1px solid rgba(216,180,95,.55); outline-offset: 7px; filter: saturate(.88) brightness(.97); }
.about-photo .frame::after { right: -30px; bottom: -30px; width: 34px; height: 34px; }  /* wine ■ */
.about-photo figcaption { margin-top: 34px; font-size: .66rem; }
@media (max-width: 999px) { .about { grid-template-columns: 1fr 176px; gap: 44px; } }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .about-photo { width: 150px; margin: 8px 0 0 46px; }
}

/* ---------- prevent sideways scrolling on phones ---------- */
html, body { overflow-x: hidden; max-width: 100%; }
main { overflow-x: clip; }
@media (max-width: 760px) {
  .about-photo .frame::before { inset: 12px -12px -12px 12px; }
  .about-photo .frame::after { right: -14px; bottom: -14px; width: 26px; height: 26px; }
  .about-photo::before { left: -14px; top: -34px; width: 90px; height: 90px; }
}

/* ---------- phones: calmer background shapes, never hide content ---------- */
@media (max-width: 760px) {
  .deco .d2, .deco .d3, .deco .d4, .deco .d5, .deco .d6, .deco .d11, .deco .d12 { display: none; }
  .deco .d1 { opacity: .28; }
  .deco .d10 { right: 4%; top: 80%; opacity: .8; }
}
.no-io .rv, .no-io .rv .timeline li, .no-io .rv .plain li, .no-io .rv .points li { opacity: 1 !important; transform: none !important; }

/* ---------- content additions ---------- */
.theme { font-weight: 700; font-size: 1.02rem; line-height: 1.8; margin: 0 0 .9em; padding-left: 14px; border-left: 3px solid var(--red); }
ol.bg { margin: 0 0 1.4em; padding: 0; list-style: none; counter-reset: bg; }
ol.bg li { counter-increment: bg; position: relative; padding: 0 0 .9em 2.4em; font-size: .93rem; }
ol.bg li::before { content: counter(bg); position: absolute; left: 0; top: 0; width: 1.6em; height: 1.6em; line-height: 1.6em; text-align: center; font-family: var(--en); font-weight: 500; font-size: .8rem; background: var(--black); color: var(--gold); }
sup { font-family: var(--en); font-size: .7em; color: var(--gold-deep); margin-left: 2px; }
ol.refs { margin: 0; padding-left: 1.6em; font-size: .78rem; color: var(--gray); line-height: 1.8; }
ol.refs li { margin-bottom: .3em; }
ol.refs a, a.inline { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--gold); }
ol.refs a:hover, a.inline:hover { color: var(--wine); }
a.inline { font-size: .8rem; letter-spacing: .06em; }
.about-text .points b::before { margin-right: .7em; }

/* ---------- contact ---------- */
.contact p { font-size: .95rem; margin-bottom: 1.2em; }
.mail { display: inline-block; font-family: var(--en); font-weight: 500; font-size: clamp(1.25rem, 4.6vw, 2.1rem); letter-spacing: .04em; color: var(--ink); text-decoration: none; border-bottom: 3px solid var(--gold); padding-bottom: 4px; word-break: break-all; transition: color .2s, border-color .2s; }
.mail:hover { color: var(--wine); border-color: var(--red); }

/* ---------- fix: keep the side padding in the hero (was reset to 0) ---------- */
.hero .inner { padding-left: 24px; padding-right: 24px; }

/* ---------- opening ---------- */
.intro { display: none; }
.intro-on .intro {
  display: grid; place-items: center; align-content: center; gap: 34px;
  position: fixed; inset: 0; z-index: 100; background: var(--black); color: var(--white);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path 1s cubic-bezier(.7, 0, .2, 1);
}
.intro-on .intro.out, .intro.out { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); }
.intro-on, .intro-on body { overflow: hidden; }
.intro .mark { position: relative; width: 74px; height: 74px; }
.intro .mark i { position: absolute; display: block; opacity: 0; }
.intro .m1 { inset: 0; border: 1.5px solid var(--gold); transform: rotate(45deg) scale(.4); animation: m1 1s cubic-bezier(.2,.8,.2,1) .15s forwards; }
.intro .m2 { inset: 22px; background: var(--gold); transform: rotate(45deg) scale(0); animation: m2 .7s cubic-bezier(.2,.8,.2,1) .55s forwards; }
.intro .m3 { width: 12px; height: 12px; right: -14px; bottom: -14px; background: var(--red); animation: m3 .5s ease .95s forwards; }
@keyframes m1 { to { opacity: 1; transform: rotate(225deg) scale(1); } }
@keyframes m2 { to { opacity: 1; transform: rotate(45deg) scale(1); } }
@keyframes m3 { to { opacity: 1; } }
.intro .t { display: flex; margin: 0; font-family: var(--en); font-weight: 500; font-size: clamp(.95rem, 3.6vw, 1.25rem); letter-spacing: .5em; text-transform: uppercase; padding-left: .5em; }
.intro .t span { opacity: 0; transform: translateY(10px); animation: ch .6s ease forwards; }
.intro .t .sp { width: .9em; }
.intro .t span:nth-child(1) { animation-delay: .9s; }  .intro .t span:nth-child(2) { animation-delay: .94s; }
.intro .t span:nth-child(3) { animation-delay: .98s; } .intro .t span:nth-child(4) { animation-delay: 1.02s; }
.intro .t span:nth-child(5) { animation-delay: 1.06s; } .intro .t span:nth-child(6) { animation-delay: 1.10s; }
.intro .t span:nth-child(8) { animation-delay: 1.18s; } .intro .t span:nth-child(9) { animation-delay: 1.22s; }
.intro .t span:nth-child(10) { animation-delay: 1.26s; } .intro .t span:nth-child(11) { animation-delay: 1.30s; }
.intro .t span:nth-child(12) { animation-delay: 1.34s; } .intro .t span:nth-child(13) { animation-delay: 1.38s; }
.intro .t span:nth-child(14) { animation-delay: 1.42s; } .intro .t span:nth-child(15) { animation-delay: 1.46s; }
@keyframes ch { to { opacity: 1; transform: none; } }
/* hold the hero's own animations until the opening is over */
.intro-on .hero *, .intro-on .hero *::before, .intro-on .hero *::after { animation: none !important; }

/* touch screens: the hero glow stays put */
@media (hover: none) { .hero::before { transition: none; } }

/* patent details */
.patent dl { margin: 0 0 12px; position: relative; z-index: 1; }
.patent dl > div { display: grid; grid-template-columns: 6.5em 1fr; gap: 14px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: .93rem; }
.patent dl > div:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.patent dt { font-family: var(--en); font-size: .7rem; letter-spacing: .18em; color: var(--gold); padding-top: .25em; }
.patent dt, .patent dd { margin: 0; }
.patent dd { font-weight: 500; }
.patent .note { font-size: .82rem; color: #bdbdbd; margin-bottom: 14px; }
@media (max-width: 480px) { .patent dl > div { grid-template-columns: 1fr; gap: 0; } }

/* patent box: gold outline */
.patent { border: 1.5px solid var(--gold); }

/* small labels next to headings never break inside; they drop to the next line as a unit */
h3 small { display: inline-block; white-space: nowrap; }
.nw { white-space: nowrap; }
.links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
.app h3 .nw { margin-right: .9em; }
.app h3 small { margin-left: 0; }

/* ---------- phones: keep the key lines on one row, give the nav some air ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.one { white-space: nowrap; font-size: clamp(.8rem, 4.2vw, 1.25rem); }
@media (max-width: 760px) {
  .hero .lead { font-size: clamp(.78rem, 3.9vw, 1.15rem); }
  .bar nav { font-size: .6rem; letter-spacing: .08em; }
}

/* ---------- phones: app entry stacks (icon on top) so nothing can run off the screen ---------- */
.row > *, .app > * { min-width: 0; }
.app p, .app .meta { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; gap: 16px; }
  .app img { width: 72px; height: 72px; border-radius: 16px; }
}
