/* ==========================================================================
   杨瑞 · 面试作品集  —  视觉系统
   深蓝夜空 / 单一冰蓝强调色 / 非对称排版 / 真实 3D 交互
   ========================================================================== */

:root {
  --bg: #0b1424;
  --bg-soft: #101c30;
  --bg-deep: #080f1b;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(168, 198, 232, 0.16);
  --line-soft: rgba(168, 198, 232, 0.09);
  --text: #e9eef6;
  --muted: #9bacc4;
  --muted-2: #71839d;
  --accent: #8dbde8;
  --accent-deep: #5a92c9;
  --accent-dim: rgba(141, 189, 232, 0.14);
  --warm: #d4b8a8;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --display: "Bahnschrift", "DIN Alternate", "PingFang SC", var(--sans);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background:
    radial-gradient(900px 600px at 82% 8%, rgba(63, 105, 158, 0.20), transparent 70%),
    radial-gradient(700px 520px at 6% 62%, rgba(39, 75, 120, 0.16), transparent 72%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol, dl, dd { margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
::selection { background: rgba(141, 189, 232, 0.28); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }

.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; position: relative; z-index: 1; }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 4px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- scroll progress + header ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; background: transparent; }
.scroll-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); transform-origin: left; }

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
}
.site-header.is-scrolled {
  background: rgba(11, 20, 36, 0.78);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line-soft);
}
.header-inner {
  width: min(var(--container), calc(100% - 48px)); margin-inline: auto;
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--accent); border-radius: 50%;
  font-family: var(--display); font-size: 12px; letter-spacing: .08em; color: var(--accent);
  background: rgba(141, 189, 232, 0.06);
}
.brand-text { font-weight: 600; letter-spacing: .04em; line-height: 1.25; }
.brand-text small { display: block; font-weight: 400; font-size: 11px; color: var(--muted-2); letter-spacing: .14em; }

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.site-nav a {
  position: relative; font-size: 13px; color: var(--muted); letter-spacing: .06em;
  padding: 8px 0; transition: color .25s var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px;
  background: var(--accent); transition: right .35s var(--ease);
}
.site-nav a:hover, .site-nav a.is-active { color: var(--text); }
.site-nav a:hover::after, .site-nav a.is-active::after { right: 0; }
.site-nav .nav-contact {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text);
}
.site-nav .nav-contact::after { display: none; }
.site-nav .nav-contact:hover { border-color: var(--accent); background: var(--accent-dim); }

.menu-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  background: transparent; border-radius: 8px; cursor: pointer;
  place-items: center; align-content: center; gap: 5px;
}
.menu-toggle span { display: block; width: 18px; height: 1px; background: var(--text); transition: transform .3s var(--ease), opacity .3s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: min(100dvh, 920px);
  display: flex; align-items: center; isolation: isolate; overflow: hidden;
  padding: 130px 0 96px;
}
#starfield { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
.hero-grid {
  position: absolute; inset: 0; z-index: -2; opacity: .42;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 15%, transparent 78%);
}
.hero-glow {
  position: absolute; z-index: -1; width: 620px; height: 620px; border-radius: 50%;
  right: -120px; top: 4%; background: radial-gradient(circle, rgba(68, 116, 171, .16), transparent 66%);
  filter: blur(12px); pointer-events: none;
}
.hero-inner {
  width: min(var(--container), calc(100% - 48px)); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(40px, 6vw, 96px); align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .18em; color: var(--accent);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(141, 189, 232, .05);
}
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(141, 189, 232, .12); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .5; } }

.hero h1 {
  margin-top: 30px;
  font-size: clamp(42px, 5.6vw, 76px); line-height: 1.16; letter-spacing: -.045em;
  font-weight: 650; text-wrap: balance;
}
.accent-text { color: var(--accent); position: relative; white-space: nowrap; }
.accent-text::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 7px;
  background: linear-gradient(90deg, rgba(141,189,232,.28), rgba(141,189,232,0));
  z-index: -1;
}
.hero-lead {
  margin-top: 26px; max-width: min(52ch, 100%); color: var(--muted); font-size: clamp(15px, 1.15vw, 17px); line-height: 1.9;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 50px; padding: 0 24px; border-radius: 4px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; letter-spacing: .04em; cursor: pointer;
  transition: transform .35s var(--ease), background .3s, border-color .3s, color .3s, box-shadow .3s;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
}
.btn i { font-style: normal; font-size: 17px; transition: transform .3s var(--ease); }
.btn:hover i { transform: translate(3px, -2px); }
.btn:active { scale: .98; }
.btn-primary { background: var(--accent); color: #0b1424; box-shadow: 0 10px 30px rgba(141, 189, 232, .14); }
.btn-primary:hover { background: #a7d0ef; box-shadow: 0 14px 36px rgba(141, 189, 232, .22); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-dim); }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 0; margin-top: 52px;
  border-top: 1px solid var(--line); padding-top: 22px;
}
.hero-meta div { padding: 0 28px; border-left: 1px solid var(--line); }
.hero-meta div:first-child { padding-left: 0; border-left: 0; }
.hero-meta dt { font-size: 11px; letter-spacing: .16em; color: var(--muted-2); }
.hero-meta dd { font-family: var(--display); font-size: 17px; letter-spacing: .02em; margin-top: 2px; }

/* portrait stage: real CSS 3D */
.portrait-stage {
  position: relative; min-height: 520px; perspective: 1100px;
  display: grid; place-items: center; touch-action: pan-y;
}
.portrait-card {
  position: relative; width: min(100%, 400px); aspect-ratio: 0.86;
  border-radius: 220px 220px 12px 12px; overflow: hidden;
  border: 1px solid rgba(180, 210, 240, .28);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .18s var(--ease), box-shadow .4s;
  box-shadow: 0 30px 90px rgba(2, 8, 18, .55), inset 0 1px 0 rgba(255,255,255,.12);
  will-change: transform;
}
.portrait-card picture { position: absolute; inset: 0; display: block; }
.portrait-card img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%;
  transform: scale(1.06) translate3d(var(--ix, 0px), var(--iy, 0px), 0);
  transition: transform .25s var(--ease);
}
.portrait-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(6, 14, 27, .78) 100%);
}
.portrait-caption {
  position: absolute; left: 26px; right: 26px; bottom: 22px; z-index: 2;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-family: var(--display); font-size: 12px; letter-spacing: .18em; color: rgba(255,255,255,.82);
  transform: translateZ(40px);
}
.portrait-caption span:first-child { font-size: 15px; letter-spacing: .24em; }
.portrait-caption span:last-child { color: var(--accent); letter-spacing: .1em; font-family: var(--sans); font-size: 11px; }

.orbit {
  position: absolute; left: 50%; top: 50%; width: 540px; height: 540px;
  margin: -270px 0 0 -270px; border-radius: 50%; border: 1px solid var(--line-soft);
  transform-style: preserve-3d; pointer-events: none;
}
.orbit-a { transform: rotateX(64deg) rotateZ(18deg); animation: orbitSpin 24s linear infinite; }
.orbit-b { width: 460px; height: 460px; margin: -230px 0 0 -230px; transform: rotateX(68deg) rotateZ(-32deg); border-color: rgba(141,189,232,.18); animation: orbitSpin 18s linear infinite reverse; }
@keyframes orbitSpin { to { transform: rotateX(64deg) rotateZ(378deg); } }

.float-chip {
  position: absolute; z-index: 3; display: grid; gap: 2px;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px;
  background: rgba(13, 24, 42, .78); backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(2, 8, 18, .38), inset 0 1px 0 rgba(255,255,255,.08);
  transform: translate3d(var(--fx, 0px), var(--fy, 0px), 60px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .22s var(--ease); pointer-events: none;
}
.float-chip strong { font-family: var(--display); font-size: 22px; line-height: 1; letter-spacing: .02em; color: var(--accent); }
.float-chip strong span { font-size: 13px; margin-left: 1px; }
.float-chip small { font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.chip-a { left: -12px; top: 20%; }
.chip-b { right: -18px; top: 40%; }
.chip-c { left: -6%; bottom: 4%; }
.stage-hint {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .16em; color: var(--muted-2); white-space: nowrap;
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 8px;
  font-family: var(--display); font-size: 10px; letter-spacing: .24em; color: var(--muted-2);
}
.scroll-cue i { display: block; width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: scaleY(.45); opacity: .5; transform-origin: top; } 50% { transform: scaleY(1); opacity: 1; transform-origin: top; } }

/* ---------- generic sections ---------- */
.section { position: relative; padding: clamp(88px, 10vw, 148px) 0; }
.section-proof { background: linear-gradient(180deg, var(--bg), var(--bg-deep) 82%, var(--bg)); }
.section-strength { background: var(--bg-deep); }
.section-journey { background: linear-gradient(180deg, var(--bg-deep), var(--bg-soft)); }
.section-craft { background: var(--bg-soft); }
.section-contact { background: var(--bg); overflow: hidden; padding-bottom: 130px; }

.section-head { max-width: 760px; margin-bottom: clamp(46px, 6vw, 78px); }
.section-num {
  display: inline-block; font-family: var(--display); font-size: 11px; letter-spacing: .22em;
  color: var(--accent); margin-bottom: 18px;
}
.section-head h2 {
  font-size: clamp(32px, 4vw, 52px); line-height: 1.3; letter-spacing: -.035em;
  font-weight: 620; text-wrap: balance;
}
.section-head p { margin-top: 18px; max-width: min(62ch, 100%); color: var(--muted); font-size: 15px; line-height: 1.9; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .85s var(--ease), transform .85s var(--ease); transition-delay: var(--delay, 0ms); }
[data-reveal].in-view { opacity: 1; transform: none; }

/* ---------- stats ---------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line-soft);
}
.stat { padding: clamp(26px, 3.4vw, 44px); border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); position: relative; overflow: hidden; }
.stat::after {
  content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease);
}
.stat:hover::after { transform: scaleX(1); }
.stat-value { display: flex; align-items: baseline; gap: 6px; font-family: var(--display); }
.stat-value strong { font-size: clamp(40px, 4.1vw, 58px); font-weight: 500; letter-spacing: -.04em; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 15px; color: var(--accent); letter-spacing: .04em; }
.stat p { margin-top: 16px; font-size: 15px; font-weight: 600; }
.stat small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted-2); line-height: 1.6; }

/* ---------- strength ---------- */
.strength-layout { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: clamp(36px, 5vw, 76px); align-items: start; }
.radar-panel {
  border: 1px solid var(--line); border-radius: 10px; padding: 26px 26px 24px;
  background: linear-gradient(150deg, rgba(141,189,232,.055), rgba(255,255,255,.012));
  position: sticky; top: 100px;
}
.panel-topline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.panel-topline h3 { font-size: 16px; font-weight: 600; letter-spacing: .04em; }
.panel-topline span { font-size: 11px; color: var(--muted-2); letter-spacing: .08em; }
#radar { width: 100%; height: auto; margin: 12px auto 4px; display: block; overflow: visible; }
.radar-grid { fill: none; stroke: rgba(168,198,232,.13); stroke-width: 1; }
.radar-axis { stroke: rgba(168,198,232,.12); stroke-width: 1; }
.radar-data { fill: rgba(141,189,232,.16); stroke: var(--accent); stroke-width: 1.6; transform-origin: 150px 150px; transform: scale(.15); opacity: 0; transition: transform 1.1s var(--ease), opacity .8s; }
.in-view .radar-data { transform: scale(1); opacity: 1; }
.radar-point { fill: var(--bg-deep); stroke: var(--accent); stroke-width: 2; cursor: pointer; transition: r .25s var(--ease), fill .25s; }
.radar-point:hover, .radar-point:focus-visible, .radar-point.is-active { fill: var(--accent); r: 7; outline: none; }
.radar-label { fill: var(--muted); font-size: 11px; font-family: var(--sans); cursor: pointer; }
.radar-label:hover, .radar-label.is-active { fill: var(--accent); }
.radar-detail { border-top: 1px solid var(--line-soft); padding-top: 16px; min-height: 92px; }
.radar-detail strong { display: block; font-size: 13px; color: var(--accent); letter-spacing: .05em; }
.radar-detail p { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.8; }

.strength-list { list-style: none; border-top: 1px solid var(--line); }
.strength-item {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 18px; align-items: start;
  padding: 28px 0; border-bottom: 1px solid var(--line);
  transition: padding-left .35s var(--ease), background .35s;
}
.strength-item:hover { padding-left: 12px; }
.strength-index { font-family: var(--display); font-size: 13px; color: var(--accent); letter-spacing: .08em; padding-top: 5px; }
.strength-item h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.strength-item p { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.9; max-width: min(56ch, 100%); }
.strength-tag { font-size: 11px; letter-spacing: .08em; color: var(--muted-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; white-space: nowrap; margin-top: 3px; }

.quote-band {
  margin-top: clamp(48px, 6vw, 84px); padding: 34px 40px;
  border-left: 2px solid var(--accent); background: rgba(141,189,232,.045);
  position: relative;
}
.quote-band > span { position: absolute; left: 10px; top: 0; font-size: 70px; line-height: 1; color: rgba(141,189,232,.18); font-family: Georgia, serif; }
.quote-band p { font-size: clamp(17px, 1.7vw, 22px); line-height: 1.7; letter-spacing: -.01em; padding-left: 32px; }
.quote-band cite { display: block; margin-top: 14px; padding-left: 32px; font-size: 12px; font-style: normal; letter-spacing: .1em; color: var(--muted-2); }

/* ---------- timeline ---------- */
.timeline { border-top: 1px solid var(--line); }
.timeline-item { border-bottom: 1px solid var(--line); }
.timeline-item summary {
  list-style: none; cursor: pointer; display: grid;
  grid-template-columns: 170px 1fr 28px; gap: 24px; align-items: start;
  padding: 26px 0; transition: color .3s;
}
.timeline-item summary::-webkit-details-marker { display: none; }
.timeline-item summary:hover .tl-main strong { color: var(--accent); }
.tl-date { font-family: var(--display); font-size: 13px; letter-spacing: .06em; color: var(--accent); padding-top: 4px; }
.tl-main strong { display: block; font-size: 18px; font-weight: 600; transition: color .3s; }
.tl-main em { display: block; margin-top: 4px; font-style: normal; font-size: 13px; color: var(--muted); }
.tl-toggle { position: relative; width: 22px; height: 22px; justify-self: end; margin-top: 2px; }
.tl-toggle::before, .tl-toggle::after { content: ""; position: absolute; background: var(--muted); transition: transform .35s var(--ease), opacity .3s; }
.tl-toggle::before { left: 0; right: 0; top: 10px; height: 1px; }
.tl-toggle::after { top: 0; bottom: 0; left: 10px; width: 1px; }
.timeline-item[open] .tl-toggle::after { transform: rotate(90deg); opacity: 0; }
.timeline-item[open] .tl-toggle::before { background: var(--accent); }
.tl-body { padding: 0 0 28px 194px; animation: bodyIn .45s var(--ease); }
@keyframes bodyIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.tl-body ul { list-style: none; display: grid; gap: 9px; }
.tl-body li { position: relative; padding-left: 18px; font-size: 14px; color: var(--muted); line-height: 1.85; max-width: min(82ch, 100%); }
.tl-body li::before { content: ""; position: absolute; left: 0; top: 12px; width: 6px; height: 1px; background: var(--accent); }
.tl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tl-tags span { font-size: 11px; color: var(--muted-2); border: 1px solid var(--line-soft); border-radius: 3px; padding: 4px 10px; }

.edu-line {
  margin-top: 56px; display: grid; grid-template-columns: 170px 1fr; gap: 24px;
  padding: 26px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
}
.edu-date { font-family: var(--display); font-size: 13px; color: var(--accent); padding-top: 3px; }
.edu-line strong { font-size: 17px; font-weight: 600; }
.edu-line p { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.8; }

/* ---------- craft ---------- */
.craft-layout { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, .68fr); gap: clamp(30px, 4vw, 60px); align-items: start; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button {
  border: 0; background: transparent; cursor: pointer; padding: 14px 20px;
  font-size: 13px; letter-spacing: .06em; color: var(--muted-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .3s, border-color .3s, background .3s;
}
.tabs button:hover { color: var(--text); background: rgba(255,255,255,.02); }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.panels { position: relative; min-height: 310px; perspective: 900px; }
.project-panel {
  position: absolute; inset: 0; padding: 34px 0 0;
  transform: rotateY(-13deg) translateZ(-30px); opacity: 0; pointer-events: none;
  transition: transform .6s var(--ease), opacity .45s var(--ease);
}
.project-panel.is-active { transform: rotateY(0) translateZ(0); opacity: 1; pointer-events: auto; position: relative; }
.panel-kicker { font-family: var(--display); font-size: 11px; letter-spacing: .2em; color: var(--accent); }
.project-panel h3 { margin-top: 14px; font-size: clamp(23px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.025em; }
.project-panel p { margin-top: 16px; max-width: min(60ch, 100%); color: var(--muted); font-size: 14px; line-height: 1.95; }
.panel-metrics { display: flex; flex-wrap: wrap; gap: 0; margin-top: 30px; border-top: 1px solid var(--line); padding-top: 20px; }
.panel-metrics span { padding: 0 26px; border-left: 1px solid var(--line); display: grid; gap: 2px; font-size: 11px; color: var(--muted-2); letter-spacing: .08em; }
.panel-metrics span:first-child { padding-left: 0; border-left: 0; }
.panel-metrics strong { font-family: var(--display); font-size: 21px; color: var(--text); font-weight: 500; letter-spacing: 0; }

.cube-block { border: 1px solid var(--line); border-radius: 10px; padding: 24px; background: rgba(255,255,255,.015); }
.cube-scene {
  width: 172px; height: 172px; margin: 44px auto 38px; perspective: 760px;
  cursor: grab; touch-action: none; outline-offset: 12px;
}
.cube-scene:active { cursor: grabbing; }
.cube {
  width: 172px; height: 172px; position: relative; transform-style: preserve-3d;
  transform: rotateX(var(--cx, -18deg)) rotateY(var(--cy, -24deg));
  will-change: transform;
}
.cube-face {
  position: absolute; inset: 0; display: grid; place-items: center;
  border: 1px solid rgba(141,189,232,.36); background: rgba(24, 42, 67, .86);
  color: var(--text); font-size: 14px; letter-spacing: .1em;
  box-shadow: inset 0 0 30px rgba(141,189,232,.05);
  backface-visibility: visible; user-select: none;
}
.face-front  { transform: translateZ(86px); }
.face-back   { transform: rotateY(180deg) translateZ(86px); }
.face-right  { transform: rotateY(90deg) translateZ(86px); }
.face-left   { transform: rotateY(-90deg) translateZ(86px); }
.face-top    { transform: rotateX(90deg) translateZ(86px); }
.face-bottom { transform: rotateX(-90deg) translateZ(86px); }
.cube-hint { text-align: center; font-size: 11px; color: var(--muted-2); letter-spacing: .1em; }

.toolbox { margin-top: clamp(52px, 6vw, 80px); border-top: 1px solid var(--line); }
.tool-row {
  display: grid; grid-template-columns: 150px 1fr; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--line-soft);
}
.tool-row h3 { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: .06em; }
.tool-row p { font-size: 14px; color: var(--muted); line-height: 1.8; }

/* ---------- contact ---------- */
.contact-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact-copy h2 { font-size: clamp(40px, 5vw, 68px); line-height: 1.2; letter-spacing: -.045em; margin-top: 6px; font-weight: 650; }
.contact-copy p { margin: 24px 0 34px; color: var(--muted); max-width: min(50ch, 100%); font-size: 15px; line-height: 1.95; }
.contact-orbit {
  position: absolute; right: -260px; top: -140px; width: 720px; height: 720px; border-radius: 50%;
  border: 1px solid var(--line-soft); pointer-events: none;
  box-shadow: 0 0 0 90px rgba(141,189,232,.012), 0 0 0 190px rgba(141,189,232,.008);
}
.contact-card {
  border-top: 1px solid var(--line); padding: 18px 0 22px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
}
.contact-label { grid-column: 1 / -1; font-size: 11px; letter-spacing: .18em; color: var(--muted-2); }
.contact-card strong { font-family: var(--display); font-size: clamp(20px, 2.1vw, 26px); font-weight: 500; letter-spacing: .02em; overflow-wrap: anywhere; }
.copy-btn {
  border: 1px solid var(--line); background: transparent; border-radius: 4px;
  padding: 7px 12px; font-size: 11px; letter-spacing: .08em; color: var(--muted); cursor: pointer;
  transition: color .25s, border-color .25s, background .25s, transform .2s;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.copy-btn:active { transform: scale(.96); }
.contact-meta { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 24px; margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--line); }
.contact-meta dt { font-size: 11px; letter-spacing: .12em; color: var(--muted-2); }
.contact-meta dd { margin-top: 4px; font-size: 14px; color: var(--text); }

/* ---------- footer + toast ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; background: var(--bg-deep); }
.site-footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 12px; color: var(--muted-2); letter-spacing: .06em; }
.site-footer a { color: var(--accent); }
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border: 1px solid var(--accent); border-radius: 6px;
  background: rgba(13, 24, 42, .95); color: var(--text); font-size: 13px;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-top: 120px; }
  .hero-copy { max-width: 680px; }
  .portrait-stage { min-height: 500px; }
  .portrait-card { width: min(92%, 380px); }
  .chip-a { left: 6%; }
  .chip-b { right: 4%; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .strength-layout, .craft-layout, .contact-inner { grid-template-columns: 1fr; }
  .radar-panel { position: static; max-width: 460px; width: 100%; }
  .cube-block { max-width: 460px; width: 100%; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 70px; }
  .container, .hero-inner, .header-inner { width: min(100% - 32px, var(--container)); }
  .menu-toggle { display: grid; }
  .site-nav {
    position: absolute; top: 70px; left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 18px 18px; border: 1px solid var(--line); border-radius: 10px;
    background: rgba(11, 20, 36, .96); backdrop-filter: blur(18px);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .site-nav .nav-contact { margin-top: 10px; text-align: center; border: 1px solid var(--line); border-radius: 4px; }
  .hero { min-height: auto; padding: 118px 0 80px; }
  .hero h1 { font-size: clamp(36px, 9vw, 52px); }
  .hero-meta { margin-top: 36px; }
  .hero-meta div { padding: 0 16px; }
  .hero-meta dd { font-size: 15px; }
  .portrait-stage { min-height: 440px; }
  .portrait-card { width: min(84%, 330px); }
  .orbit { width: 420px; height: 420px; margin: -210px 0 0 -210px; }
  .orbit-b { width: 350px; height: 350px; margin: -175px 0 0 -175px; }
  .float-chip { padding: 9px 12px; }
  .float-chip strong { font-size: 18px; }
  .chip-a { left: 0; top: 14%; }
  .chip-b { right: 0; top: 46%; }
  .chip-c { left: -2%; bottom: 3%; }
  .stage-hint { display: none; }
  .scroll-cue { display: none; }
  .section { padding: 84px 0; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat { padding: 24px 20px; }
  .strength-item { grid-template-columns: 36px 1fr; gap: 12px; }
  .strength-tag { grid-column: 2; justify-self: start; margin-top: 12px; }
  .quote-band { padding: 26px 22px; }
  .timeline-item summary { grid-template-columns: 1fr 24px; gap: 10px; }
  .tl-date { grid-column: 1 / -1; }
  .tl-body { padding-left: 0; }
  .edu-line { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .tabs { overflow-x: auto; }
  .tabs button { padding: 12px 14px; white-space: nowrap; }
  .panel-metrics span { padding: 0 14px; }
  .tool-row { grid-template-columns: 1fr; gap: 6px; }
  .contact-meta { grid-template-columns: 1fr; gap: 14px; }
  .site-footer .container { justify-content: flex-start; }
  .site-footer .container span { width: 100%; }
}

@media (max-width: 380px) {
  .hero-actions .btn { width: 100%; }
  .hero-meta div { padding: 0 10px; }
  .contact-card strong { font-size: 19px; }
}

/* ---------- reduced motion / coarse pointer ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .radar-data { transform: scale(1); opacity: 1; }
  .portrait-card, .float-chip { transform: none !important; }
}
@media (pointer: coarse) {
  .portrait-card { transform: none !important; }
  .stage-hint { display: none; }
}

/* ---------- print: a clean one-page-ish resume ---------- */
@media print {
  :root { --bg: #fff; --text: #111; --muted: #444; --line: #ccc; --line-soft: #ddd; --accent: #2f5f8f; }
  body { background: #fff; color: #111; }
  body::before, .site-header, .scroll-progress, #starfield, .hero-grid, .hero-glow,
  .portrait-stage, .scroll-cue, .toast, .btn, .copy-btn, .cube-block, .tabs,
  .contact-orbit, .site-footer { display: none !important; }
  .hero { min-height: auto; padding: 0 0 20px; }
  .hero-inner, .strength-layout, .craft-layout, .contact-inner { display: block; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .section { padding: 24px 0; break-inside: avoid; }
  .section-head { margin-bottom: 18px; }
  details:not([open]) > *:not(summary) { display: block !important; }
  details::details-content { content-visibility: visible !important; }
  .project-panel { position: relative !important; opacity: 1 !important; transform: none !important; }
  .project-panel[hidden] { display: none !important; }
  .stat, .strength-item, .timeline-item, .tool-row { break-inside: avoid; }
}
