

:root {
  
  --bg:          #eef3f9;
  --bg-2:        #e5edf7;
  --surface:     #ffffff;
  --surface-2:   #f6f9fd;
  --ink:         #0f2742;   
  --ink-2:       #41597a;   
  --ink-3:       #7d93b0;   
  --brand:       #1f5fc4;   
  --brand-deep:  #143a7e;
  --brand-soft:  #dde9fb;
  --brand-tint:  #eef4fd;
  --line:        #d8e2ee;
  --line-soft:   #e7eef6;

  --shadow-sm: 0 1px 2px rgba(15,39,66,.05), 0 1px 3px rgba(15,39,66,.06);
  --shadow-md: 0 6px 16px rgba(15,39,66,.07), 0 2px 6px rgba(15,39,66,.05);
  --shadow-lg: 0 20px 50px rgba(15,39,66,.12), 0 6px 16px rgba(15,39,66,.06);

  
  --font-display: 'Space Grotesk', 'Noto Sans SC', sans-serif;
  --font-body:    'Manrope', 'Noto Sans SC', sans-serif;

  
  --maxw: 1180px;
  --nav-h: 76px;
  --radius: 16px;
  --radius-sm: 10px;
}


*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }


.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 32px; }
.section { padding-block: 100px; }
.section-tight { padding-block: 72px; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.section-title { font-size: clamp(30px, 4vw, 42px); color: var(--ink); margin-top: 18px; }
.section-lead { font-size: 18px; color: var(--ink-2); max-width: 60ch; margin-top: 16px; line-height: 1.7; }


.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(238,243,249,.82);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.nav.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav-inner {
  height: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 32px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(31,95,196,.35);
}
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-links a {
  position: relative; padding: 9px 14px; border-radius: 9px;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--brand); background: var(--brand-tint); }
.nav-links a.active { color: var(--brand); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--brand); border-radius: 2px;
}
.nav-tools { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); padding: 3px; font-family: var(--font-body);
}
.lang-toggle button {
  border: 0; background: transparent; cursor: pointer; font-weight: 700;
  font-size: 13px; color: var(--ink-3); padding: 5px 12px; border-radius: 999px;
  transition: color .2s, background .2s; font-family: inherit;
}
.lang-toggle button.active { background: var(--brand); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  padding: 12px 22px; border-radius: 11px; cursor: pointer; border: 1px solid transparent;
  transition: transform .18s, box-shadow .2s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(31,95,196,.28); }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(31,95,196,.34); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

.menu-btn { display: none; }


.hero { position: relative; overflow: hidden; padding-top: 64px; padding-bottom: 96px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(680px 420px at 88% -8%, rgba(31,95,196,.13), transparent 60%),
    radial-gradient(560px 360px at 6% 12%, rgba(31,95,196,.07), transparent 60%);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.25fr .9fr; gap: 64px; align-items: center;
}
.hero h1 { font-size: clamp(40px, 6vw, 68px); color: var(--ink); }
.hero h1 .accent { color: var(--brand); }
.hero .role { font-size: clamp(19px, 2.4vw, 24px); font-weight: 600; color: var(--ink-2); margin-top: 16px; font-family: var(--font-display); }
.hero .tagline { font-size: 18px; color: var(--ink-2); margin-top: 22px; max-width: 48ch; line-height: 1.75; }
.hero-cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.hero-meta .stat .n { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--brand); }
.hero-meta .stat .l { font-size: 13.5px; color: var(--ink-2); letter-spacing: .02em; margin-top: 2px; }


.portrait-wrap { position: relative; }
.portrait {
  aspect-ratio: 4/5; border-radius: 22px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.portrait-badge {
  position: absolute; left: -18px; bottom: 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 14px;
}
.portrait-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 4px rgba(43,182,115,.16); }


.ph {
  width: 100%; height: 100%;
  background-color: var(--brand-tint);
  background-image: repeating-linear-gradient(135deg, transparent 0 11px, rgba(31,95,196,.08) 11px 22px);
  display: grid; place-items: center;
  color: var(--brand); font-family: 'Space Grotesk', monospace; font-size: 13px;
  letter-spacing: .05em; text-align: center; padding: 16px; white-space: pre-line;
}


.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-top: 44px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-soft); }
.skill-card .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand); font-family: var(--font-display); font-weight: 700; font-size: 19px;
  margin-bottom: 16px;
}
.skill-card .ico svg { width: 30px; height: 30px; }

.ico.brand-java  { background: #fdf0e2; color: #d9740a; }
.ico.brand-react { background: #e1f6fd; color: #0a93bd; }
.ico.brand-php   { background: #ececf8; color: #5d61a8; }
.ico.brand-cpp   { background: #e1effa; color: #00599c; }
.skill-card h3 { font-size: 19px; }
.skill-card p { color: var(--ink-2); font-size: 14.5px; margin-top: 7px; }
.skill-card .bar { height: 6px; border-radius: 999px; background: var(--line-soft); margin-top: 16px; overflow: hidden; }
.skill-card .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-deep)); }

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.tag {
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  transition: color .2s, border-color .2s, background .2s;
}
.tag:hover { color: var(--brand); border-color: var(--brand-soft); background: var(--brand-tint); }


.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-top: 44px; }
.proj-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .22s, box-shadow .22s, border-color .22s;
  display: flex; flex-direction: column;
}
.proj-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--brand-soft); }
.proj-thumb { aspect-ratio: 16/9; border-bottom: 1px solid var(--line); overflow: hidden; }
.proj-body { padding: 26px 26px 24px; display: flex; flex-direction: column; flex: 1; }
.proj-kicker { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.proj-card h3 { font-size: 23px; margin-top: 12px; }
.proj-card .desc { color: var(--ink-2); font-size: 15px; margin-top: 12px; line-height: 1.7; flex: 1; }
.proj-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.proj-stack span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; }
.proj-links { display: flex; gap: 18px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.proj-links a { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; color: var(--ink); transition: color .2s, gap .2s; }
.proj-links a:hover { color: var(--brand); gap: 10px; }
.proj-links a.gh svg { color: #1b1f24; }
.proj-links a svg { width: 16px; height: 16px; }


.timeline { margin-top: 44px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-left: 44px; padding-bottom: 38px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 1px; top: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 4px solid var(--brand); box-shadow: 0 0 0 4px var(--brand-tint);
}
.tl-item .when { font-size: 13.5px; font-weight: 700; color: var(--brand); letter-spacing: .03em; }
.tl-item h3 { font-size: 21px; margin-top: 7px; }
.tl-item .org { font-size: 15px; color: var(--ink-2); font-weight: 600; margin-top: 3px; }
.tl-item .detail { font-size: 15px; color: var(--ink-2); margin-top: 12px; line-height: 1.7; }
.tl-item .detail li { position: relative; padding-left: 18px; margin-top: 6px; }
.tl-item .detail li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }


.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.prose p { font-size: 17px; color: var(--ink-2); line-height: 1.8; margin-top: 16px; }
.prose p:first-child { margin-top: 0; }

.fact-list { display: grid; gap: 2px; margin-top: 8px; }
.fact { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.fact .k { width: 120px; flex: none; font-weight: 700; color: var(--ink); font-size: 14.5px; }
.fact .v { color: var(--ink-2); font-size: 14.5px; }


.os-band {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  border-radius: 24px; padding: 56px; color: #fff; position: relative; overflow: hidden;
}
.os-band::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: radial-gradient(420px 280px at 90% 0%, rgba(255,255,255,.16), transparent 60%);
}
.os-band .inner { position: relative; z-index: 1; }
.os-band .eyebrow { color: rgba(255,255,255,.85); }
.os-band .eyebrow::before { background: rgba(255,255,255,.85); }
.os-band h2 { color: #fff; font-size: clamp(28px,3.5vw,38px); }
.os-band p { color: rgba(255,255,255,.86); font-size: 17px; margin-top: 16px; max-width: 54ch; }
.os-stats { display: flex; gap: 48px; margin-top: 38px; flex-wrap: wrap; }
.os-stats .n { font-family: var(--font-display); font-size: 38px; font-weight: 700; }
.os-stats .l { font-size: 14px; color: rgba(255,255,255,.78); margin-top: 4px; }
.os-band .btn-primary { background: #fff; color: var(--brand-deep); box-shadow: 0 8px 20px rgba(0,0,0,.18); margin-top: 36px; }
.os-band .btn-primary:hover { background: #fff; color: var(--brand-deep); }


.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
  display: block;
}
.contact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--brand-soft); }
.contact-card .ico { width: 48px; height: 48px; border-radius: 13px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.contact-card .ico svg { width: 23px; height: 23px; }
.contact-card .ico.gh { background: #edeef0; color: #1b1f24; }
.contact-card .ico.li { background: #e4eefb; color: #0a66c2; }
.contact-card .k { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.contact-card .v { font-size: 17px; font-weight: 700; color: var(--ink); margin-top: 6px; word-break: break-all; }


.footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 44px; margin-top: 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer .brand { font-size: 16px; }
.footer .copy { font-size: 14px; color: var(--ink-3); }
.footer-soc { display: flex; gap: 10px; }
.footer-soc a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); transition: color .2s, border-color .2s, transform .2s; }
.footer-soc a:hover { color: var(--brand); border-color: var(--brand-soft); transform: translateY(-2px); }
.footer-soc a.gh:hover { color: #1b1f24; border-color: #d4d7da; }
.footer-soc a.li:hover { color: #0a66c2; border-color: #bcd6f7; }
.footer-soc svg { width: 18px; height: 18px; }


.page-head { padding-top: 72px; padding-bottom: 24px; position: relative; overflow: hidden; }
.page-head::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(620px 360px at 85% -20%, rgba(31,95,196,.12), transparent 60%);
}
.page-head .wrap { position: relative; z-index: 1; }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); color: var(--ink); margin-top: 16px; }
.page-head p { font-size: 18px; color: var(--ink-2); margin-top: 18px; max-width: 58ch; line-height: 1.75; }

.skill-band,
.contact-band { background: var(--surface-2); border-block: 1px solid var(--line); }
.more-link { margin-top: 40px; }
.portrait-small { max-width: 340px; }


.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}


[data-en] { transition: opacity .2s; }


@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .portrait-wrap { max-width: 360px; }
  .proj-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .os-band { padding: 40px 30px; }
}
@media (max-width: 720px) {
  .wrap { padding-inline: 22px; }
  .nav-inner { padding-inline: 22px; }
  .section { padding-block: 70px; }
  .nav-links { display: none; }
  .menu-btn {
    display: grid; place-items: center; margin-left: auto;
    width: 42px; height: 42px; border-radius: 10px; background: var(--surface);
    border: 1px solid var(--line); cursor: pointer; color: var(--ink);
  }
  .menu-btn svg { width: 22px; height: 22px; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 14px 22px; box-shadow: var(--shadow-md); margin: 0;
  }
  .nav.open .nav-links a { padding: 12px 14px; }
  .hero-meta { gap: 22px; }
}
