/* ============================================================
   Steven Lu — Portfolio · nextlvl.win
   Anime key-visual aesthetic · dark (night) / light (day) themes

   Theming is driven entirely by data-theme on the root element, which the
   inline bootstrap in index.html sets before first paint. Dark is default.
   ============================================================ */

:root {
  color-scheme: dark;
  --sky-1: #120a2a;
  --sky-2: #2a1550;
  --sky-3: #5b2a63;
  --sky-4: #a34d70;
  --bg: #0c0819;
  --bg-alt: #100b21;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-hi: rgba(255, 143, 177, 0.55);
  --text: #f3ecff;
  --text-dim: #b6aad4;
  --text-faint: #8477a8;
  --pink: #ff8fb1;
  --cyan: #7fe3f5;
  --violet: #b39dff;
  --gold: #ffd9a0;
  --grad: linear-gradient(95deg, #ff8fb1, #b39dff 55%, #7fe3f5);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --bldg-top: #241243;
  --bldg-bottom: #0c0819;
  --window: #ffd9a0;
  --petal: 255, 143, 177;
  --glare: rgba(255, 255, 255, 0.13);
  --star-op: 1;
  --cloud-op: 0;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Outfit", "Inter", system-ui, sans-serif;
  --jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 20px;
  --nav-h: 70px;
}

:root[data-theme="light"] {
  --sky-1: #a9dcff;
  --sky-2: #cfe3ff;
  --sky-3: #ffd9e6;
  --sky-4: #ffd0b0;
  --bg: #fef8fb;
  --bg-alt: #fdeef4;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-2: rgba(255, 255, 255, 0.95);
  --border: rgba(90, 55, 110, 0.13);
  --border-hi: rgba(255, 92, 138, 0.55);
  --text: #2a2040;
  --text-dim: #5f5480;
  --text-faint: #8a7fa6;
  --pink: #ff5c8a;
  --cyan: #159cc4;
  --violet: #7b5cf0;
  --gold: #e08a2e;
  --grad: linear-gradient(95deg, #ff5c8a, #7b5cf0 55%, #159cc4);
  --shadow: 0 22px 50px rgba(120, 80, 140, 0.16);
  --bldg-top: #c9b7e8;
  --bldg-bottom: #fdeef4;
  --window: #fff6d8;
  --petal: 255, 122, 160;
  --glare: rgba(255, 255, 255, 0.55);
  --star-op: 0;
  --cloud-op: 1;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}

.container { width: min(1120px, 91%); margin-inline: auto; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
::selection { background: rgba(255, 143, 177, 0.35); color: var(--text); }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

/* ============ decor layers ============ */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.amb {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(120px); opacity: 0.16; transition: opacity 0.6s ease;
}
.amb-1 { width: 46vw; height: 46vw; top: -8vw; left: -12vw; background: var(--violet); }
.amb-2 { width: 40vw; height: 40vw; bottom: -10vw; right: -10vw; background: var(--pink); }
.amb-3 { width: 30vw; height: 30vw; top: 42%; left: 55%; background: var(--cyan); opacity: 0.09; }
:root[data-theme="light"] .amb { opacity: 0.22; }
:root[data-theme="light"] .amb-3 { opacity: 0.14; }

#petals {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none; opacity: 0.85;
}
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 340px; height: 340px; z-index: 0;
  margin: -170px 0 0 -170px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 143, 177, 0.16), transparent 65%);
  opacity: 0; transition: opacity 0.4s ease;
}
:root[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(255, 92, 138, 0.13), transparent 65%);
}

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: transparent;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: var(--grad); box-shadow: 0 0 12px rgba(255, 143, 177, 0.7);
}

.toast {
  position: fixed; bottom: 32px; left: 50%; z-index: 300;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  padding: 11px 22px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-hi);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--text); font-size: 0.88rem; font-weight: 600;
  box-shadow: var(--shadow);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ nav ============ */
.nav-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav-wrap.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 12px; background: var(--grad); color: #17102b;
  font-family: var(--display); font-weight: 800; font-size: 0.86rem; letter-spacing: 0.02em;
  box-shadow: 0 6px 20px rgba(255, 143, 177, 0.35);
}
.brand-text { font-family: var(--display); font-weight: 800; font-size: 1.06rem; letter-spacing: -0.02em; }
.brand-jp { font-family: var(--jp); font-size: 0.6rem; color: var(--text-faint); margin-left: 5px; letter-spacing: 0.08em; }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 6px 15px; border-radius: 12px; text-decoration: none;
  color: var(--text-dim); font-size: 0.9rem; font-weight: 600; line-height: 1.25;
  transition: color 0.25s ease, background 0.25s ease;
}
.nav-jp {
  font-family: var(--jp); font-size: 0.56rem; letter-spacing: 0.1em;
  color: var(--text-faint); opacity: 0.75;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }
.nav-links a.active .nav-jp { color: var(--pink); opacity: 1; }
.nav-links a.active::after {
  content: ""; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 2px; border-radius: 2px; background: var(--grad);
}

.nav-actions { display: flex; align-items: center; gap: 9px; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 11px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.icon-btn:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.icon-btn svg { width: 17px; height: 17px; fill: currentColor; }
.ico-sun { display: none; }
:root[data-theme="light"] .ico-sun { display: block; }
:root[data-theme="light"] .ico-moon { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 27px; border-radius: 14px; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: 0.94rem; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.btn svg { width: 15px; height: 15px; fill: currentColor; }
.btn-sm { padding: 9px 16px; font-size: 0.84rem; border-radius: 11px; }
.btn-primary {
  background: var(--grad); color: #17102b;
  box-shadow: 0 10px 30px rgba(255, 143, 177, 0.32);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(255, 143, 177, 0.45); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--border-hi); color: var(--pink); transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(0.98); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  margin: 5px 0; border-radius: 2px; transition: transform 0.28s ease, opacity 0.28s ease;
}

/* ============ hero ============ */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 130px; overflow: hidden; isolation: isolate;
}
.sky {
  position: absolute; inset: 0; z-index: -3;
  background: linear-gradient(178deg, var(--sky-1) 0%, var(--sky-2) 38%, var(--sky-3) 72%, var(--sky-4) 100%);
  transition: background 0.6s ease;
}
.horizon-glow {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: radial-gradient(ellipse 70% 100% at 50% 100%, rgba(255, 190, 160, 0.5), transparent 70%);
  opacity: 0.75;
}

.celestial {
  position: absolute; top: 11%; right: 11%; width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #fff8e7, #ffe0b8 62%, #ffc9a0);
  box-shadow: 0 0 70px 26px rgba(255, 224, 184, 0.30), 0 0 160px 60px rgba(255, 200, 170, 0.18);
  animation: float 9s ease-in-out infinite;
}
.moon-crater { position: absolute; border-radius: 50%; background: rgba(190, 160, 130, 0.22); }
.c1 { width: 26px; height: 26px; top: 26%; left: 26%; }
.c2 { width: 16px; height: 16px; top: 56%; left: 54%; }
.c3 { width: 11px; height: 11px; top: 30%; left: 64%; }
:root[data-theme="light"] .celestial {
  background: radial-gradient(circle at 40% 38%, #fffef4, #ffe98a 55%, #ffc95c);
  box-shadow: 0 0 90px 34px rgba(255, 220, 120, 0.5), 0 0 200px 80px rgba(255, 200, 90, 0.25);
}
:root[data-theme="light"] .moon-crater { opacity: 0; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.stars { position: absolute; inset: 0; opacity: var(--star-op); transition: opacity 0.6s ease; }
.star {
  position: absolute; border-radius: 50%; background: #fff;
  animation: twinkle var(--dur, 3s) ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.15; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }

.cloud {
  position: absolute; border-radius: 999px; filter: blur(26px);
  background: rgba(255, 255, 255, 0.85);
  opacity: calc(var(--cloud-op) * 0.85); transition: opacity 0.6s ease;
}
.cloud-1 { width: 340px; height: 78px; top: 20%; left: -12%; animation: drift 46s linear infinite; }
.cloud-2 { width: 260px; height: 62px; top: 36%; left: 40%; animation: drift 62s linear infinite; }
.cloud-3 { width: 400px; height: 88px; top: 12%; left: 62%; animation: drift 78s linear infinite; }
@keyframes drift { from { transform: translateX(-10vw); } to { transform: translateX(115vw); } }

.skyline {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: -2;
  width: 100%; height: min(38vh, 330px);
}
.skyline-shape { fill: url(#bldg); }
.bldg-top { stop-color: var(--bldg-top); }
.bldg-bottom { stop-color: var(--bldg-bottom); }
.win { fill: var(--window); }
.win.lit { animation: winTwinkle var(--d, 5s) ease-in-out infinite alternate; }
@keyframes winTwinkle { from { opacity: 0.25; } to { opacity: 0.95; } }

.hero-inner { position: relative; z-index: 2; }

.badge {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px;
  padding: 7px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 0.79rem; font-weight: 600; color: var(--text-dim); letter-spacing: 0.01em;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--pink);
  box-shadow: 0 0 0 0 rgba(255, 143, 177, 0.7); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 143, 177, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(255, 143, 177, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 143, 177, 0); }
}

.hero-jp {
  font-family: var(--jp); font-size: clamp(0.8rem, 1.6vw, 0.95rem); font-weight: 500;
  letter-spacing: 0.42em; color: var(--pink); margin-bottom: 8px; text-transform: none;
}
.hero-name {
  position: relative; font-family: var(--display); font-weight: 900;
  font-size: clamp(3.2rem, 11vw, 7rem); line-height: 0.98; letter-spacing: -0.035em;
  margin-bottom: 12px;
  background: linear-gradient(178deg, #ffffff 8%, #ffe4ef 45%, #ffc3d8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 12px 44px rgba(0, 0, 0, 0.22);
}
:root[data-theme="light"] .hero-name {
  background: linear-gradient(178deg, #3d2b58 8%, #6b3f7a 50%, #b04a72 100%);
  -webkit-background-clip: text; background-clip: text;
  text-shadow: 0 8px 24px rgba(255, 255, 255, 0.5);
}
.hero-role {
  min-height: 2.5em; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.15rem, 3.2vw, 1.95rem); letter-spacing: -0.015em; margin-bottom: 16px;
}
.hero-role #typed {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.caret {
  display: inline-block; width: 3px; height: 1.05em; vertical-align: -0.16em; margin-left: 4px;
  background: var(--pink); animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-blurb {
  max-width: 620px; color: var(--text-dim); font-size: clamp(0.98rem, 2vw, 1.08rem); margin-bottom: 34px;
}
:root[data-theme="light"] .hero-blurb { color: #4a3d66; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 38px; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 11px 26px; list-style: none; }
.hero-meta li { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 0.9rem; font-weight: 500; }
:root[data-theme="light"] .hero-meta li { color: #4a3d66; }
.hero-meta svg { width: 16px; height: 16px; fill: var(--pink); flex-shrink: 0; }
.hero-meta a { text-decoration: none; transition: color 0.25s ease; }
.hero-meta a:hover { color: var(--pink); }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 25px; height: 41px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 14px;
}
:root[data-theme="light"] .scroll-cue { border-color: rgba(60, 40, 80, 0.35); }
.scroll-cue span {
  position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  background: var(--pink); border-radius: 3px; animation: cueDot 1.9s ease-in-out infinite;
}
@keyframes cueDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(15px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ stats ============ */
.stats {
  position: relative; z-index: 2; padding: 52px 0;
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.stat { position: relative; text-align: center; }
.stat + .stat::before {
  content: ""; position: absolute; left: -13px; top: 12%; bottom: 12%; width: 1px;
  background: linear-gradient(180deg, transparent, var(--border), transparent);
}
.stat-num {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.1; letter-spacing: -0.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--text-dim); font-size: 0.83rem; font-weight: 600; }

/* ============ sections ============ */
.section { padding: 104px 0; position: relative; z-index: 2; }
.section-head { display: flex; align-items: center; gap: 18px; margin-bottom: 46px; }
.section-index {
  font-family: var(--display); font-weight: 800; font-size: 1.5rem;
  padding: 6px 14px; border-radius: 12px; transform: skewX(-9deg);
  background: var(--grad); color: #17102b; box-shadow: 0 8px 22px rgba(255, 143, 177, 0.3);
}
.section-jp {
  display: block; font-family: var(--jp); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.28em; color: var(--pink); margin-bottom: -2px;
}
.section-head h2 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.025em;
  font-size: clamp(1.7rem, 4.2vw, 2.4rem); line-height: 1.2;
}
.section-head::after {
  content: ""; flex: 1; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--border-hi), transparent);
}
.mini-head {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.19em; color: var(--pink); margin-bottom: 14px;
}

/* shared card surface */
.profile-card, .job-card, .skill-card, .edu-card, .contact-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.12s ease;
  transform-style: preserve-3d;
}
.profile-card::before, .job-card::before, .skill-card::before, .edu-card::before, .contact-card::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hi), transparent);
  opacity: 0.65;
}
.profile-card:hover, .job-card:hover, .skill-card:hover, .edu-card:hover, .contact-card:hover {
  border-color: var(--border-hi); box-shadow: var(--shadow);
}
.pc-glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 50%), var(--glare), transparent 62%);
  transition: opacity 0.35s ease;
}
.tilt:hover .pc-glare { opacity: 1; }

/* ============ about ============ */
.about-grid { display: grid; grid-template-columns: 1.25fr 0.95fr; gap: 46px; align-items: start; }
.about-text p { color: var(--text-dim); margin-bottom: 18px; font-size: 1.02rem; }
.about-text strong { color: var(--text); font-weight: 700; }
.about-text .mini-head { margin-top: 30px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; }
.chip-list li {
  font-size: 0.81rem; font-weight: 600; color: var(--text-dim);
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.chip-list li:hover {
  color: var(--pink); border-color: var(--border-hi); transform: translateY(-3px); background: var(--surface-2);
}

.profile-card { padding: 26px 26px 30px; }
.pc-head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px dashed var(--border); }
.pc-avatar {
  display: grid; place-items: center; width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 17px; background: var(--grad); color: #17102b;
  font-family: var(--display); font-weight: 800; font-size: 1.2rem;
  box-shadow: 0 8px 24px rgba(255, 143, 177, 0.35);
}
.pc-name { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.pc-role { color: var(--pink); font-size: 0.85rem; font-weight: 600; }
.pc-rows { padding: 18px 0; display: grid; gap: 11px; }
.pc-rows > div { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.pc-rows dt { font-family: var(--mono); font-size: 0.71rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); }
.pc-rows dd { font-size: 0.88rem; font-weight: 600; text-align: right; }
.pc-bars { padding-top: 18px; border-top: 1px dashed var(--border); }
.bar { margin-bottom: 12px; }
.bar-label { display: block; font-size: 0.79rem; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.bar-track { display: block; height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.bar-track i {
  display: block; height: 100%; width: 0; border-radius: 99px; background: var(--grad);
  transition: width 1.15s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(255, 143, 177, 0.5);
}

/* ============ experience ============ */
.timeline { position: relative; padding-left: 38px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--pink), var(--violet) 55%, transparent);
  opacity: 0.55;
}
.job { position: relative; margin-bottom: 34px; }
.job:last-child { margin-bottom: 0; }
.job-marker {
  position: absolute; left: -38px; top: 30px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--pink);
  box-shadow: 0 0 0 6px rgba(255, 143, 177, 0.13);
}
.job-card { padding: 30px 32px; }
.job-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.job-top h3 { font-family: var(--display); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.job-org { color: var(--pink); font-weight: 700; font-size: 0.95rem; margin-top: 3px; }
.job-loc { color: var(--text-faint); font-weight: 500; }
.job-dates {
  font-family: var(--mono); font-size: 0.75rem; color: var(--text-dim); white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; height: fit-content;
  background: var(--surface-2); border: 1px solid var(--border);
}
.job-bullets { list-style: none; display: grid; gap: 11px; margin-bottom: 20px; }
.job-bullets li { position: relative; padding-left: 24px; color: var(--text-dim); font-size: 0.95rem; }
.job-bullets li::before {
  content: "✦"; position: absolute; left: 0; top: 0; color: var(--pink); font-size: 0.8rem;
}
.job-bullets strong {
  color: var(--text); font-weight: 700;
  background: linear-gradient(transparent 66%, rgba(255, 143, 177, 0.28) 66%);
}
.job-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.job-tags span {
  font-family: var(--mono); font-size: 0.71rem; color: var(--violet);
  padding: 4px 11px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
}

/* ============ skills ============ */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.skill-card { padding: 26px 22px 28px; }
.skill-icon {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.skill-icon svg { width: 22px; height: 22px; fill: var(--pink); }
.skill-card:hover .skill-icon { transform: translateY(-3px) rotate(-7deg); box-shadow: 0 10px 26px rgba(255, 143, 177, 0.28); }
.skill-card h3 { font-family: var(--display); font-size: 1.02rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.015em; }
.skill-card p { color: var(--text-dim); font-size: 0.86rem; line-height: 1.6; }

/* ============ education ============ */
.edu-card { display: flex; gap: 24px; align-items: flex-start; padding: 32px; }
.edu-icon {
  display: grid; place-items: center; width: 58px; height: 58px; flex-shrink: 0;
  border-radius: 17px; background: var(--surface-2); border: 1px solid var(--border);
}
.edu-icon svg { width: 28px; height: 28px; fill: var(--pink); }
.edu-card h3 { font-family: var(--display); font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.02em; }
.edu-school { color: var(--text-dim); font-weight: 600; margin-bottom: 4px; }
.edu-meta { color: var(--text-faint); font-size: 0.9rem; }

/* ============ contact ============ */
.contact-section { padding-bottom: 120px; }
.contact-blurb { color: var(--text-dim); max-width: 560px; margin-bottom: 34px; font-size: 1.02rem; }
.hint { display: block; font-size: 0.83rem; color: var(--text-faint); margin-top: 6px; font-style: italic; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 26px 24px; text-decoration: none;
}
.contact-card svg { width: 24px; height: 24px; fill: var(--pink); margin-bottom: 11px; transition: transform 0.3s ease; }
.contact-card:hover svg { transform: translateY(-3px) scale(1.1); }
.contact-label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.17em; color: var(--text-faint); }
.contact-value { font-weight: 700; font-size: 0.95rem; word-break: break-all; }

/* ============ footer ============ */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--border); padding: 30px 0; background: var(--bg-alt); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer p { color: var(--text-faint); font-size: 0.85rem; }
.footer-jp { font-family: var(--jp); }
.footer-domain { font-family: var(--mono); color: var(--pink); margin-left: 10px; }

.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 140;
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--pink);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.to-top svg { width: 18px; height: 18px; fill: currentColor; }

/* ============ reveal ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.75s ease, transform 0.75s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============ responsive ============ */
@media (max-width: 1080px) {
  .nav-links { gap: 0; }
  .nav-links a { padding: 6px 11px; font-size: 0.85rem; }
}
@media (max-width: 940px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg); box-shadow: 0 22px 44px rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid var(--border); padding: 14px 4.5vw 20px;
    transform: translateY(-14px); opacity: 0; pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { flex-direction: row; align-items: baseline; gap: 10px; padding: 12px 14px; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: block; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .stat:nth-child(3)::before { display: none; }
}
@media (max-width: 620px) {
  .section { padding: 76px 0; }
  .section-head { gap: 13px; margin-bottom: 34px; }
  .celestial { width: 92px; height: 92px; top: 9%; right: 8%; }
  .hero-jp { letter-spacing: 0.3em; }
  .hero-actions .btn { flex: 1 1 100%; }
  .timeline { padding-left: 28px; }
  .job-marker { left: -28px; width: 15px; height: 15px; }
  .job-card { padding: 24px 20px; }
  .skills-grid { grid-template-columns: 1fr; }
  .edu-card { flex-direction: column; padding: 26px 22px; }
  .btn-sm span, #printBtn { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ============ motion / print ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .celestial, .cloud, .star, .scroll-cue span, .caret, .badge-dot, .win.lit { animation: none !important; }
  .bar-track i { transition: none; }
}

@media print {
  #petals, .cursor-glow, .scroll-progress, .nav-wrap, .to-top, .toast,
  .sky, .skyline, .scroll-cue, .pc-glare, .badge, .hero-actions, .footer-jp { display: none !important; }
  body { background: #fff; color: #111; }
  .hero { min-height: auto; padding: 0 0 24px; }
  .hero-name { color: #111 !important; -webkit-text-fill-color: #111; font-size: 2.4rem; }
  .hero-jp, .section-jp, .job-tags, .chip-list li:hover { color: #555; }
  .section { padding: 20px 0; break-inside: avoid; }
  .job, .skill-card, .edu-card, .profile-card { break-inside: avoid; }
  .stat-num, .section-index { color: #111 !important; -webkit-text-fill-color: #111; background: none; box-shadow: none; }
  .job-card, .skill-card, .edu-card, .profile-card, .contact-card {
    border: 1px solid #ccc; box-shadow: none; background: #fff; backdrop-filter: none;
  }
  .job-bullets li, .about-text p, .skill-card p { color: #333; }
  .job-bullets strong { background: none; }
}
