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

[data-theme="light"]{
  --bg:#ffffff;
  --bg2:#f7f6f2;
  --bg3:#efede7;
  --card:#fcfbf8;
  --text:#111111;
  --text2:#50504a;
  --text3:#77756d;
  --border:#e5e1d8;
  --border2:#d3cec4;
  --accent:#161616;
  --accent-soft:#f4f0e6;
  --shadow:rgba(17,17,17,.04);
  --glass:rgba(255,255,255,.78);
  --glow:rgba(17,17,17,.08);
}

[data-theme="dark"]{
  --bg:#0f0f0d;
  --bg2:#161614;
  --bg3:#1d1d1a;
  --card:#141412;
  --text:#f3f2ee;
  --text2:#b8b7b2;
  --text3:#7f7e78;
  --border:#262621;
  --border2:#34342e;
  --accent:#f3f2ee;
  --accent-soft:#1d1d18;
  --shadow:rgba(0,0,0,.28);
  --glass:rgba(15,15,13,.74);
  --glow:rgba(0,0,0,.46);
}

:root{
  --sidebar-w:220px;
  --sidebar-collapsed-w:78px;
  --topbar-h:38px;
  --header-h:72px;
  --font:'Inter',sans-serif;
  --font-serif:'Playfair Display',serif;
  --font-mono:'JetBrains Mono',monospace;
  --ease-out:cubic-bezier(.16,1,.3,1);
  --ease-soft:cubic-bezier(.22,.61,.36,1);
}

html{
  scroll-behavior:smooth;
  scrollbar-gutter:stable;
}

::selection{
  background:var(--text);
  color:var(--bg);
}

::-webkit-scrollbar{width:12px}
::-webkit-scrollbar-track{background:var(--bg)}
::-webkit-scrollbar-thumb{
  border:3px solid var(--bg);
  border-radius:999px;
  background:var(--border2);
}
::-webkit-scrollbar-thumb:hover{background:var(--text3)}

body{
  background:
    linear-gradient(180deg,var(--bg) 0%,var(--bg) 42%,var(--bg2) 100%),
    var(--bg);
  color:var(--text);
  font-family:var(--font);
  font-size:14px;
  line-height:1.65;
  overflow-x:hidden;
  transition:background .25s ease,color .25s ease;
  --mx:50%;
  --my:18%;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    linear-gradient(135deg,rgba(210,205,190,.22),transparent 28%),
    linear-gradient(225deg,rgba(185,192,188,.14),transparent 32%),
    linear-gradient(180deg,transparent 0%,rgba(0,0,0,.025) 100%);
  opacity:.82;
}

a{color:inherit}

.scroll-progress{
  position:fixed;
  top:0;
  left:0;
  z-index:9999;
  width:100%;
  height:3px;
  transform:scaleX(0);
  transform-origin:left;
  background:var(--text);
  box-shadow:0 0 18px var(--glow);
  pointer-events:none;
}

#topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:500;
  height:var(--topbar-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
  background:var(--glass);
  border-bottom:1px solid var(--border);
  backdrop-filter:blur(18px);
  transition:background .25s ease,border-color .25s ease,box-shadow .25s ease;
}

.topbar-links,.topbar-actions{
  display:flex;
  align-items:center;
  gap:18px;
}

.topbar-links a,.topbar-actions a{
  text-decoration:none;
  color:var(--text3);
  font-size:12px;
  letter-spacing:.01em;
  transition:color .18s ease;
}

.topbar-links a:hover,.topbar-actions a:hover,.topbar-links a.tactive{color:var(--text)}

#header{
  position:fixed;
  top:var(--topbar-h);
  left:0;
  right:0;
  z-index:400;
  height:var(--header-h);
  display:flex;
  align-items:center;
  gap:18px;
  padding:0 28px;
  background:var(--glass);
  border-bottom:1px solid var(--border);
  backdrop-filter:blur(18px);
  transition:background .25s ease,border-color .25s ease,box-shadow .25s ease;
}

body.is-scrolled #topbar,
body.is-scrolled #header{
  border-color:var(--border2);
  box-shadow:0 14px 38px var(--shadow);
}

.header-logo{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  flex-shrink:0;
}

.logo-box{
  width:42px;
  height:42px;
  border-radius:10px;
  background:
    linear-gradient(135deg,var(--text),var(--text2));
  color:var(--bg);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:13px;
  letter-spacing:.02em;
  font-family:var(--font-mono);
  box-shadow:0 14px 30px var(--shadow);
}

.logo-words{
  display:flex;
  flex-direction:column;
  line-height:1.18;
}

.logo-name{
  font-size:13px;
  font-weight:700;
  text-transform:lowercase;
}

.logo-role{
  color:var(--text3);
  font-size:11px;
  letter-spacing:.01em;
}

.header-pill{
  flex:1;
  min-width:0;
  display:flex;
  align-items:center;
  padding:0 4px;
}

.pill-text{
  min-width:0;
  color:var(--text2);
  font-size:13px;
}

.header-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.h-btn,.theme-toggle{
  height:40px;
  border-radius:999px;
  border:1px solid var(--border2);
  background:var(--bg);
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 16px;
  text-decoration:none;
  font-size:12.5px;
  font-weight:600;
  transition:transform .28s var(--ease-out),background .22s ease,border-color .22s ease,color .22s ease,box-shadow .22s ease;
  cursor:pointer;
}

.h-btn:hover,.theme-toggle:hover{
  border-color:var(--text3);
  background:var(--bg2);
  transform:translateY(-1px);
  box-shadow:0 10px 24px var(--shadow);
}

.h-btn-dark{
  background:var(--text);
  color:var(--bg);
  border-color:var(--text);
}

.h-btn-dark:hover{
  opacity:.88;
  background:var(--text);
}

.theme-toggle{
  width:40px;
  padding:0;
}

#zone-a{margin-top:calc(var(--topbar-h) + var(--header-h))}
#layout{display:flex;min-height:calc(100vh - var(--topbar-h) - var(--header-h))}

#sidebar{
  position:fixed;
  top:calc(var(--topbar-h) + var(--header-h));
  left:0;
  bottom:0;
  width:var(--sidebar-w);
  padding:26px 18px 18px;
  border-right:1px solid var(--border);
  background:var(--bg);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow-y:auto;
  scrollbar-width:none;
  transition:width .34s var(--ease-out),padding .34s var(--ease-out),background .25s ease,border-color .25s ease;
}

#sidebar::-webkit-scrollbar{display:none}

.sb-top{overflow:visible}

.sidebar-toggle{
  position:absolute;
  top:18px;
  right:16px;
  z-index:5;
  width:32px;
  height:32px;
  border:1px solid var(--border2);
  border-radius:0;
  background:var(--bg);
  color:var(--text2);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 10px 24px var(--shadow);
  transition:transform .28s var(--ease-out),background .2s ease,color .2s ease,border-color .2s ease;
}

.sidebar-toggle:hover{
  background:var(--bg2);
  color:var(--text);
  border-color:var(--text3);
}

.sidebar-toggle span{
  display:block;
  transform:translateY(-1px);
  transition:transform .28s var(--ease-out);
}

.sb-section-label,.sb-ql{
  color:var(--text3);
  font-size:11px;
  font-weight:600;
  letter-spacing:.01em;
  margin-bottom:12px;
  transition:opacity .2s ease,transform .28s var(--ease-out);
}

.sb-section-divider{
  height:1px;
  background:var(--border);
  margin:18px 0;
  transition:margin .34s var(--ease-out);
}

.sb-nav{list-style:none}
.sb-nav li+li{margin-top:3px}

.sb-nav a{
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  padding:8px 0;
  color:var(--text3);
  transition:color .22s ease,transform .28s var(--ease-out);
}

.sb-nav a:hover,.sb-nav a.active{color:var(--text)}
.sb-nav a:hover{transform:translateX(4px)}

.sb-nav a::before{
  content:"";
  position:absolute;
  left:-18px;
  top:50%;
  width:3px;
  height:0;
  border-radius:999px;
  background:var(--text);
  transform:translateY(-50%);
  transition:height .26s var(--ease-out),opacity .2s ease;
  opacity:0;
}

.sb-nav a.active::before,
.sb-nav a:hover::before{
  height:22px;
  opacity:1;
}

.sb-index{
  width:24px;
  height:24px;
  color:var(--text3);
  font-size:10px;
  font-family:var(--font-mono);
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  transition:background .22s ease,color .22s ease,width .28s var(--ease-out);
}

.sb-label{
  font-size:13px;
  white-space:nowrap;
  transition:opacity .2s ease,transform .28s var(--ease-out);
}

.sb-socials{
  display:flex;
  flex-direction:column;
  gap:6px;
  transition:opacity .2s ease,transform .28s var(--ease-out);
}

.sb-socials a{
  text-decoration:none;
  color:var(--text2);
  font-size:13px;
}

.sb-socials a:hover{color:var(--text)}

#main{
  margin-left:var(--sidebar-w);
  width:calc(100% - var(--sidebar-w));
  transition:margin-left .34s var(--ease-out),width .34s var(--ease-out);
}

footer{
  transition:margin-left .34s var(--ease-out);
}

body.sidebar-collapsed #sidebar{
  width:var(--sidebar-collapsed-w);
  padding:22px 12px 18px;
}

body.sidebar-collapsed .sb-top{
  padding-top:48px;
}

body.sidebar-collapsed .sidebar-toggle span{
  transform:translateY(-1px) rotate(180deg);
}

body.sidebar-collapsed .sidebar-toggle{
  right:50%;
  transform:translateX(50%);
}

body.sidebar-collapsed .sb-section-label,
body.sidebar-collapsed .sb-ql,
body.sidebar-collapsed .sb-label,
body.sidebar-collapsed .sb-socials{
  opacity:0;
  transform:translateX(-8px);
  pointer-events:none;
}

body.sidebar-collapsed .sb-label{
  position:absolute;
  width:1px;
  overflow:hidden;
}

body.sidebar-collapsed .sb-bottom{
  display:none;
}

body.sidebar-collapsed .sb-section-label,
body.sidebar-collapsed .sb-ql{
  height:0;
  margin:0;
  overflow:hidden;
}

body.sidebar-collapsed .sb-section-divider{
  margin:20px 10px;
}

body.sidebar-collapsed .sb-nav a{
  justify-content:center;
  gap:0;
  padding:12px 0;
  transform:none;
}

body.sidebar-collapsed .sb-nav a:hover{
  transform:none;
}

body.sidebar-collapsed .sb-nav a::before{
  left:-14px;
}

body.sidebar-collapsed .sb-index{
  width:38px;
  height:38px;
  color:var(--text3);
  background:transparent;
}

body.sidebar-collapsed .sb-nav a.active .sb-index,
body.sidebar-collapsed .sb-nav a:hover .sb-index{
  color:var(--bg);
  background:var(--text);
}

body.sidebar-collapsed #main,
body.sidebar-collapsed footer{
  margin-left:var(--sidebar-collapsed-w);
}

body.sidebar-collapsed #main{
  width:calc(100% - var(--sidebar-collapsed-w));
}

body.layout-settling #main .reveal.visible{
  animation:layoutSettle .64s var(--ease-out) both;
}

body.layout-settling .mast-card-photo,
body.layout-settling .hero-robot,
body.layout-settling .proj-item,
body.layout-settling .val-card,
body.layout-settling .skill-group,
body.layout-settling .tl-item,
body.layout-settling .th-item{
  animation:softLift .72s var(--ease-out) both;
}

body.layout-settling .proj-item:nth-child(2),
body.layout-settling .val-card:nth-child(2),
body.layout-settling .skill-group:nth-child(2){animation-delay:.04s}

body.layout-settling .proj-item:nth-child(3),
body.layout-settling .val-card:nth-child(3),
body.layout-settling .skill-group:nth-child(3){animation-delay:.08s}

@keyframes layoutSettle{
  from{opacity:.76;transform:translateY(12px);filter:blur(5px)}
  to{opacity:1;transform:none;filter:blur(0)}
}

@keyframes softLift{
  from{opacity:.82;transform:translateY(10px)}
  to{opacity:1;transform:none}
}

.mast,.sec{
  position:relative;
  padding:44px 56px;
  border-bottom:1px solid var(--border);
  scroll-margin-top:124px;
}

.mast{
  min-height:calc(100vh - var(--topbar-h) - var(--header-h));
  display:flex;
  align-items:center;
  overflow:hidden;
}

.mast::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg,transparent 0 20%,rgba(125,122,109,.08) 20% calc(20% + 1px),transparent calc(20% + 1px) 100%),
    linear-gradient(90deg,transparent 0 64%,rgba(125,122,109,.07) 64% calc(64% + 1px),transparent calc(64% + 1px) 100%),
    linear-gradient(180deg,transparent 0 74%,rgba(125,122,109,.07) 74% calc(74% + 1px),transparent calc(74% + 1px) 100%);
  mask-image:linear-gradient(90deg,rgba(0,0,0,.55),transparent 86%);
  opacity:.75;
}

.mast::after{
  content:"";
  position:absolute;
  right:7%;
  top:18%;
  width:1px;
  height:58%;
  background:linear-gradient(180deg,transparent,var(--border2),transparent);
  opacity:.7;
  transform:rotate(12deg);
  transform-origin:center;
}

.mast-grid{
  position:relative;
  z-index:1;
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);
  gap:42px;
  align-items:start;
}

.mast-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:var(--text3);
  font-size:13px;
  letter-spacing:.01em;
  margin-bottom:18px;
}

.mast-eyebrow::before{
  content:"";
  width:34px;
  height:1px;
  background:var(--border2);
}

.mast-title{
  max-width:840px;
  font-size:56px;
  line-height:1.02;
  letter-spacing:0;
  font-weight:400;
  margin-bottom:20px;
  background:linear-gradient(135deg,var(--text) 0%,var(--text) 58%,var(--text3) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.mast-text{
  max-width:700px;
  color:var(--text2);
  font-size:16px;
  line-height:1.9;
}

.mast-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:28px;
}

.mast-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border-radius:999px;
  border:1px solid var(--border2);
  background:var(--bg);
  color:var(--text);
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  transition:transform .28s var(--ease-out),background .22s ease,border-color .22s ease,box-shadow .22s ease,opacity .22s ease;
}

.mast-btn:hover{
  background:var(--bg2);
  transform:translateY(-2px);
  box-shadow:0 14px 30px var(--shadow);
}
.mast-btn-dark{background:var(--text);color:var(--bg);border-color:var(--text)}
.mast-btn-dark:hover{opacity:.88;background:var(--text)}

.hero-visual{
  width:min(430px,64%);
  min-height:330px;
  display:grid;
  place-items:center;
  margin:18px auto -8px;
  pointer-events:auto;
  perspective:1100px;
  transform:translateY(-4px);
}

.mast-side{
  display:flex;
  flex-direction:column;
  gap:14px;
  perspective:1000px;
}

.mast-card{
  border:1px solid var(--border);
  border-radius:24px;
  background:var(--card);
  box-shadow:0 24px 60px var(--shadow);
}

.mast-card-photo{
  position:relative;
  padding:0;
  overflow:hidden;
  min-height:640px;
  transition:transform .5s var(--ease-out),box-shadow .3s ease;
}

.mast-card-photo:hover{
  box-shadow:0 34px 86px var(--shadow);
}

.mast-card-photo img{
  width:100%;
  height:640px;
  display:block;
  object-fit:cover;
  object-position:center 18%;
  transform:scale(1.02);
  transition:transform .9s var(--ease-out),filter .35s ease;
}

.mast-card-photo:hover img{
  transform:scale(1.055);
  filter:saturate(1.04) contrast(1.02);
}

.visual-stage{
  position:relative;
  width:100%;
  aspect-ratio:1;
  display:grid;
  place-items:center;
  transform-style:preserve-3d;
  transform:rotateX(var(--visual-rx,0deg)) rotateY(var(--visual-ry,0deg));
  transition:transform .28s var(--ease-out);
}

.visual-glow{
  position:absolute;
  width:76%;
  height:76%;
  border-radius:50%;
  background:
    radial-gradient(circle at 50% 48%,rgba(255,255,255,.82),rgba(213,223,239,.28) 36%,transparent 68%),
    conic-gradient(from 160deg,transparent,rgba(71,101,140,.08),transparent,rgba(17,17,17,.05),transparent);
  opacity:.8;
  transform:rotateX(68deg) translateY(26px);
}

[data-theme="dark"] .visual-glow{
  background:
    radial-gradient(circle at 50% 48%,rgba(179,222,255,.14),rgba(255,255,255,.04) 34%,transparent 68%),
    conic-gradient(from 160deg,transparent,rgba(131,199,255,.08),transparent,rgba(255,255,255,.04),transparent);
  opacity:.62;
}

.visual-core{
  position:relative;
  width:178px;
  height:178px;
  transform-style:preserve-3d;
  transform:translate3d(var(--visual-shift-x,0px),var(--visual-shift-y,0px),0);
  animation:visualFloat 5.6s var(--ease-soft) infinite;
}

.visual-ring{
  position:absolute;
  inset:0;
  border-radius:50%;
  border:1px solid rgba(120,145,174,.26);
  background:
    radial-gradient(circle at 50% 50%,rgba(255,255,255,.28),transparent 58%),
    linear-gradient(145deg,rgba(255,255,255,.68),rgba(180,186,194,.22));
  box-shadow:inset 0 0 0 16px rgba(255,255,255,.08),0 24px 44px rgba(0,0,0,.08);
}

.visual-chip{
  position:absolute;
  left:50%;
  top:50%;
  width:96px;
  height:96px;
  border-radius:28px;
  background:
    radial-gradient(circle at 24% 20%,rgba(255,255,255,.88),rgba(255,255,255,.1) 28%,transparent 36%),
    linear-gradient(145deg,#f7f8fa 0%,#d0d4da 44%,#8f99a5 78%,#515b67 100%);
  transform:translate(-50%,-50%) rotate(-8deg);
  box-shadow:inset 10px 10px 16px rgba(255,255,255,.28),inset -12px -12px 18px rgba(30,40,54,.18),0 24px 34px rgba(0,0,0,.1);
}

.visual-chip-dot{
  position:absolute;
  width:12px;
  height:12px;
  border-radius:50%;
  background:linear-gradient(145deg,#9bf3ff,#dfffff);
  box-shadow:0 0 16px rgba(129,233,255,.4);
}

.visual-chip-dot:first-child{left:18px;top:18px}
.visual-chip-dot:nth-child(2){right:18px;top:18px}
.visual-chip-dot:nth-child(3){left:18px;bottom:18px}

.visual-card{
  position:absolute;
  width:132px;
  padding:14px 14px 16px;
  border:1px solid rgba(150,161,176,.22);
  border-radius:18px;
  background:rgba(255,255,255,.66);
  backdrop-filter:blur(14px);
  box-shadow:0 18px 34px rgba(0,0,0,.08);
}

[data-theme="dark"] .visual-card{
  background:rgba(21,24,28,.58);
}

.visual-card-left{
  left:10px;
  top:54px;
  transform:translate3d(calc(var(--visual-shift-x,0px) * -.35),calc(var(--visual-shift-y,0px) * -.35),18px) rotate(-10deg);
}

.visual-card-right{
  right:0;
  bottom:44px;
  transform:translate3d(calc(var(--visual-shift-x,0px) * .35),calc(var(--visual-shift-y,0px) * .35),18px) rotate(8deg);
}

.visual-card-label{
  display:block;
  color:var(--text3);
  font-size:10px;
  letter-spacing:.12em;
  margin-bottom:12px;
}

.visual-card-line{
  display:block;
  width:100%;
  height:10px;
  border-radius:999px;
  background:linear-gradient(90deg,rgba(98,140,191,.88),rgba(178,218,255,.35));
}

.visual-card-line-short{
  width:62%;
  margin-top:10px;
  background:linear-gradient(90deg,rgba(48,58,74,.8),rgba(171,184,198,.28));
}

.visual-card-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
  margin-top:4px;
}

.visual-card-grid::before,
.visual-card-grid::after{
  content:"";
  display:block;
}

.visual-card-grid{
  height:36px;
  background:
    radial-gradient(circle,rgba(134,228,255,.7) 0 24%,transparent 26%) 0 0/18px 18px,
    radial-gradient(circle,rgba(134,228,255,.32) 0 24%,transparent 26%) 9px 9px/18px 18px;
}

.visual-orbit{
  position:absolute;
  border-radius:50%;
  border:1px solid rgba(125,145,170,.18);
}

.visual-orbit-one{
  width:290px;
  height:210px;
  transform:rotate(18deg);
}

.visual-orbit-two{
  width:234px;
  height:270px;
  transform:rotate(-24deg);
}

.visual-node{
  position:absolute;
  width:14px;
  height:14px;
  border-radius:50%;
  background:linear-gradient(145deg,#c5f8ff,#6fdcff);
  box-shadow:0 0 18px rgba(109,220,255,.42);
}

.visual-node-one{top:28px;right:62px}
.visual-node-two{left:54px;bottom:64px}
.visual-node-three{right:46px;bottom:34px}

.robot-shadow{
  position:absolute;
  left:50%;
  bottom:17%;
  width:218px;
  height:38px;
  border-radius:50%;
  background:rgba(0,0,0,.16);
  filter:blur(18px);
  transform:translateX(-50%);
}

@keyframes visualFloat{
  0%,100%{transform:translate3d(var(--visual-shift-x,0px),var(--visual-shift-y,0px),0) rotateZ(-1deg)}
  50%{transform:translate3d(var(--visual-shift-x,0px),calc(var(--visual-shift-y,0px) - 12px),0) rotateZ(1deg)}
}

.sec-hdr{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:8px;
}

.sec-hdr-stack{
  align-items:flex-start;
}

.sec-title{
  font-size:28px;
  line-height:1.12;
  font-weight:500;
  letter-spacing:0;
}

.sec-tag{
  color:var(--text3);
  font-size:12px;
  white-space:nowrap;
}

.sec-sub{
  max-width:720px;
  color:var(--text2);
  font-size:15px;
  line-height:1.85;
  margin-bottom:28px;
}

.about-layout{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);
  gap:34px;
}

.about-story p{
  color:var(--text2);
  font-size:15px;
  line-height:1.95;
}

.about-story p+p{margin-top:14px}

.about-aside{
  padding-top:4px;
}

.about-note{
  position:relative;
  padding:22px 0 0 28px;
  border-left:1px solid var(--border2);
}

.about-note::before{
  content:"";
  position:absolute;
  left:-1px;
  top:22px;
  width:1px;
  height:54px;
  background:var(--text);
}

.about-note-title{
  font-size:15px;
  font-weight:600;
  margin-bottom:10px;
}

.about-note-list{
  padding-left:18px;
  color:var(--text2);
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size:14px;
  line-height:1.7;
}

.skill-group{
  border:none;
  border-top:1px solid var(--border);
  border-radius:0;
  background:transparent;
  padding:18px 0 0;
}

.skill-group-title{
  color:var(--text);
  font-size:14px;
  letter-spacing:0;
  text-transform:none;
  font-family:var(--font);
  margin-bottom:10px;
}

.skill-copy{
  color:var(--text2);
  font-size:14px;
  line-height:1.85;
}

.values-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px 34px;
}

.val-card{
  position:relative;
  min-height:auto;
  padding:0 0 14px;
  border:none;
  border-bottom:1px solid var(--border);
  border-radius:0;
  background:transparent;
  transition:transform .3s var(--ease-out),border-color .24s ease;
}

.val-card::before{
  content:"";
  position:absolute;
  left:0;
  bottom:-1px;
  width:0;
  height:1px;
  background:var(--text);
  transition:width .36s var(--ease-out);
}

.val-card:hover{
  transform:translateY(-3px);
  border-color:transparent;
}

.val-card:hover::before{width:100%}

.val-title{
  font-size:18px;
  line-height:1.3;
  font-weight:600;
  margin-bottom:8px;
}

.proj-hero-title{
  max-width:860px;
  font-size:38px;
  line-height:1.22;
  font-weight:400;
  letter-spacing:0;
}

.proj-filters{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:30px;
  padding-bottom:14px;
  border-bottom:1px solid var(--border);
}

.proj-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:34px;
  row-gap:28px;
}

.proj-item{
  position:relative;
  cursor:pointer;
  padding:0 0 22px;
  border:none;
  border-bottom:1px solid var(--border);
  border-radius:0;
  background:transparent;
  transform:translate3d(0,0,0);
  transition:transform .34s var(--ease-out),opacity .24s ease,border-color .24s ease;
}

.proj-item:hover{
  transform:translate3d(0,-4px,0);
  border-color:var(--border);
  box-shadow:none;
  opacity:1;
}

.proj-item::before{
  content:"";
  position:absolute;
  inset:-14px -16px;
  z-index:-1;
  border-radius:18px;
  background:linear-gradient(135deg,rgba(255,255,255,.66),rgba(255,255,255,.08));
  border:1px solid transparent;
  opacity:0;
  transform:scale(.98);
  transition:opacity .28s ease,transform .34s var(--ease-out),border-color .28s ease;
}

[data-theme="dark"] .proj-item::before{
  background:linear-gradient(135deg,rgba(255,255,255,.06),rgba(255,255,255,.015));
}

.proj-item:hover::before{
  opacity:1;
  transform:scale(1);
  border-color:var(--border);
}

.proj-item.is-filtered-out{
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
}

.proj-logo-wrap{
  width:56px;
  height:56px;
  overflow:hidden;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--bg);
}

.proj-hero-title strong{font-weight:700}

.proj-filter{
  border:none;
  background:transparent;
  color:var(--text3);
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  font-family:var(--font);
  transition:color .2s ease,transform .24s var(--ease-out);
}

.proj-filter:hover,.proj-filter.active{color:var(--text)}
.proj-filter:hover{transform:translateY(-1px)}
.proj-filter-dot{color:var(--text3)}

.proj-logo-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .5s var(--ease-out),filter .25s ease;
}

.proj-item:hover .proj-logo-wrap img{transform:scale(1.08)}

.proj-meta-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:8px;
}

.proj-name{
  font-size:21px;
  font-weight:600;
  transition:transform .3s var(--ease-out);
}

.proj-item:hover .proj-name{transform:translateX(2px)}

.proj-tags{
  color:var(--text3);
  font-size:12px;
  margin-bottom:10px;
}

.proj-desc{
  color:var(--text2);
  font-size:14px;
  line-height:1.8;
  margin-bottom:14px;
}

#proj-overlay{
  position:fixed;
  inset:0;
  z-index:9000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(8px);
}

#proj-overlay.open{
  display:flex;
  animation:overlayIn .24s ease both;
}

#proj-modal{
  width:100%;
  max-width:820px;
  max-height:88vh;
  overflow:auto;
  position:relative;
  border-radius:22px;
  border:1px solid var(--border);
  background:var(--bg);
  box-shadow:0 28px 60px rgba(0,0,0,.3);
  animation:modalIn .42s var(--ease-out) both;
}

.proj-modal-close{
  position:absolute;
  top:16px;
  right:16px;
  width:38px;
  height:38px;
  border-radius:50%;
  border:1px solid var(--border2);
  background:var(--bg2);
  color:var(--text2);
  cursor:pointer;
  transition:transform .24s var(--ease-out),background .2s ease,color .2s ease;
}

.proj-modal-close:hover{
  transform:rotate(90deg) scale(1.04);
  background:var(--text);
  color:var(--bg);
}

.pm-header{
  display:flex;
  gap:20px;
  padding:46px 42px 28px;
  border-bottom:1px solid var(--border);
}

.pm-logo{
  width:72px;
  height:72px;
  overflow:hidden;
  border-radius:18px;
  border:1px solid var(--border);
  flex-shrink:0;
}

.pm-logo img,.pm-logo-fallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  object-fit:cover;
}

.pm-title{
  font-size:26px;
  font-weight:700;
  margin-bottom:4px;
}

.pm-tags{
  color:var(--text3);
  font-size:12px;
  margin-bottom:10px;
}

.pm-desc{
  color:var(--text2);
  font-size:14px;
  line-height:1.8;
}

.pm-screen{
  padding:30px 42px;
  border-bottom:1px solid var(--border);
}

.pm-screen-label{
  color:var(--text3);
  font-size:10px;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-family:var(--font-mono);
  margin-bottom:16px;
}

.pm-screen-placeholder{
  aspect-ratio:16/9;
  border-radius:18px;
  border:1px solid var(--border);
  background:var(--bg2);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:var(--text3);
}

.pm-screen-placeholder-text{
  font-size:13px;
  font-family:var(--font-mono);
}

.pm-gallery{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.pm-shot{
  overflow:hidden;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--bg2);
}

.pm-shot img{
  width:100%;
  height:auto;
  display:block;
  object-fit:contain;
}

.pm-footer{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:24px 42px 36px;
}

.pm-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:11px 18px;
  border-radius:999px;
  border:1px solid var(--border2);
  background:var(--bg);
  color:var(--text);
  text-decoration:none;
  font-size:13px;
  font-weight:600;
}

.pm-btn:hover{background:var(--bg2)}
.pm-btn-primary{background:var(--text);color:var(--bg);border-color:var(--text)}
.pm-btn-primary:hover{opacity:.88;background:var(--text)}

.timeline{
  display:flex;
  flex-direction:column;
  gap:26px;
}

.tl-item{
  position:relative;
  padding:0 0 18px;
  border:none;
  border-bottom:1px solid var(--border);
  border-radius:0;
  background:transparent;
}

.tl-item::before{
  content:"";
  position:absolute;
  left:-16px;
  top:6px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--text);
  opacity:.18;
  transition:opacity .25s ease,transform .25s var(--ease-out);
}

.tl-item:hover::before{
  opacity:.65;
  transform:scale(1.28);
}

.tl-period{
  color:var(--text3);
  font-size:11px;
  letter-spacing:.1em;
  text-transform:uppercase;
  font-family:var(--font-mono);
  margin-bottom:8px;
}

.tl-role{
  font-size:18px;
  font-weight:600;
  margin-bottom:4px;
}

.tl-company{
  color:var(--text);
  font-size:14px;
  font-weight:600;
  margin-bottom:8px;
}

.tl-detail{
  color:var(--text2);
  font-size:14px;
  line-height:1.85;
}

.thoughts-list{
  border-top:1px solid var(--border);
}

.th-item{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:0;
  align-items:start;
  padding:22px 0;
  text-decoration:none;
  border-bottom:1px solid var(--border);
  transition:opacity .18s ease,transform .28s var(--ease-out);
}

.th-item:last-child{border-bottom:1px solid var(--border)}
.th-item:hover{
  opacity:1;
  transform:translateX(6px);
}

.th-tag{
  color:var(--text3);
  font-size:12px;
  margin-bottom:8px;
}

.th-title{
  font-size:17px;
  line-height:1.4;
  font-weight:600;
  margin-bottom:6px;
}

.th-excerpt{
  color:var(--text2);
  font-size:14px;
  line-height:1.8;
}

.contact-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,.7fr);
  gap:28px;
}

.ct-heading{
  font-size:22px;
  font-weight:600;
  margin-bottom:10px;
}

.ct-desc{
  color:var(--text2);
  font-size:15px;
  line-height:1.85;
  margin-bottom:16px;
  max-width:620px;
}

.ct-email{
  display:inline-block;
  color:var(--text);
  text-decoration:none;
  font-size:16px;
  font-weight:700;
  margin-bottom:18px;
}

.ct-socials{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.csoc{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid var(--border2);
  background:var(--bg);
  color:var(--text2);
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  transition:transform .24s var(--ease-out),background .2s ease,color .2s ease,border-color .2s ease;
}

.csoc:hover{
  background:var(--bg2);
  color:var(--text);
  transform:translateY(-2px);
}

.contact-card{
  padding:6px 0 0 28px;
  border-left:1px solid var(--border2);
  background:transparent;
}

.contact-form{
  padding:6px 0 0 28px;
  border-left:1px solid var(--border2);
}

.contact-mini-title{
  color:var(--text3);
  font-size:12px;
  margin-bottom:14px;
}

.contact-mini-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  color:var(--text2);
  font-size:14px;
}

.form-row{
  margin-bottom:14px;
}

.form-label{
  display:block;
  font-size:12px;
  color:var(--text2);
  margin-bottom:6px;
}

.form-input,.form-textarea{
  width:100%;
  border:none;
  border-bottom:1px solid var(--border2);
  background:transparent;
  color:var(--text);
  font-size:14px;
  font-family:var(--font);
  padding:10px 0;
  outline:none;
  transition:border-color .18s ease;
}

.form-input:focus,.form-textarea:focus{
  border-color:var(--text);
}

.form-row:focus-within .form-label{
  color:var(--text);
}

.form-textarea{
  min-height:140px;
  resize:vertical;
}

.form-submit{
  margin-top:6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:11px 16px;
  border-radius:10px;
  border:1px solid var(--border2);
  background:var(--bg);
  color:var(--text);
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:transform .24s var(--ease-out),background .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.form-submit:hover{
  background:var(--bg2);
  border-color:var(--text3);
  transform:translateY(-2px);
  box-shadow:0 12px 26px var(--shadow);
}

.form-note{
  margin-top:10px;
  color:var(--text3);
  font-size:12px;
  line-height:1.7;
}

#zone-b-main{
  display:block;
  border-top:1px solid var(--border);
}

.zb-panel{display:none}
.zb-panel.active{
  display:block;
  animation:panelIn .42s var(--ease-out) both;
}
.zb-panel-inner{padding:44px 56px}

.zb-empty{
  padding:8px 0 12px;
}

.zb-empty-title{
  font-size:18px;
  font-weight:600;
  margin-bottom:8px;
}

.zb-empty-sub{
  max-width:560px;
  color:var(--text2);
  font-size:14px;
  line-height:1.8;
}

footer{
  margin-left:var(--sidebar-w);
  padding:22px 32px;
  border-top:1px solid var(--border);
  background:var(--bg2);
}

.ft-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.ft-left,.ft-right a{
  color:var(--text3);
  font-size:12px;
  text-decoration:none;
}

.ft-right{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}

.ft-right a:hover{color:var(--text)}

.reveal{
  opacity:0;
  transform:translateY(24px);
  transition:opacity .8s var(--ease-soft),transform .8s var(--ease-out),filter .8s var(--ease-out);
  filter:blur(8px);
  will-change:opacity,transform,filter;
}

.reveal.visible{
  opacity:1;
  transform:none;
  filter:blur(0);
}

.reveal.visible .mast-eyebrow,
.reveal.visible .mast-title,
.reveal.visible .mast-text,
.reveal.visible .mast-actions,
.reveal.visible .sec-hdr,
.reveal.visible .sec-sub,
.reveal.visible .about-story,
.reveal.visible .about-aside,
.reveal.visible .skill-group,
.reveal.visible .val-card,
.reveal.visible .proj-item,
.reveal.visible .tl-item,
.reveal.visible .th-item,
.reveal.visible .contact-card,
.reveal.visible .contact-form{
  animation:riseIn .72s var(--ease-out) both;
}

.reveal.visible .mast-title,
.reveal.visible .sec-sub,
.reveal.visible .about-story,
.reveal.visible .skill-group:nth-child(2),
.reveal.visible .val-card:nth-child(2),
.reveal.visible .proj-item:nth-child(2),
.reveal.visible .tl-item:nth-child(2),
.reveal.visible .th-item:nth-child(2),
.reveal.visible .contact-form{animation-delay:.07s}

.reveal.visible .mast-text,
.reveal.visible .about-aside,
.reveal.visible .skill-group:nth-child(3),
.reveal.visible .val-card:nth-child(3),
.reveal.visible .proj-item:nth-child(3),
.reveal.visible .tl-item:nth-child(3),
.reveal.visible .th-item:nth-child(3){animation-delay:.14s}

.reveal.visible .mast-actions,
.reveal.visible .val-card:nth-child(4),
.reveal.visible .th-item:nth-child(4){animation-delay:.21s}

.reveal.visible .val-card:nth-child(5){animation-delay:.28s}
.reveal.visible .val-card:nth-child(6){animation-delay:.35s}

@keyframes riseIn{
  from{opacity:0;transform:translateY(18px)}
  to{opacity:1;transform:none}
}

@keyframes panelIn{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:none}
}

@keyframes overlayIn{
  from{opacity:0}
  to{opacity:1}
}

@keyframes modalIn{
  from{opacity:0;transform:translateY(18px) scale(.98)}
  to{opacity:1;transform:none}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    scroll-behavior:auto!important;
    transition-duration:.01ms!important;
  }
}

@media(max-width:1100px){
  .mast-grid,.about-layout,.contact-grid{grid-template-columns:1fr}
  .skill-columns,.values-grid,.proj-list{grid-template-columns:1fr 1fr}
  .contact-card,.contact-form,.about-note{padding-left:0;border-left:none;border-top:1px solid var(--border);padding-top:18px}
}

@media(max-width:900px){
  .sidebar-toggle{display:none}

  #sidebar{
    position:relative;
    top:0;
    width:100%;
    height:auto;
    border-right:none;
    border-bottom:1px solid var(--border);
    padding:18px 20px;
    gap:18px;
  }

  #layout{display:block}
  #main,footer,
  body.sidebar-collapsed #main,
  body.sidebar-collapsed footer{
    margin-left:0;
    width:100%;
  }

  body.sidebar-collapsed #sidebar{
    width:100%;
    padding:18px 20px;
  }

  body.sidebar-collapsed .sb-top{
    padding-top:0;
  }

  body.sidebar-collapsed .sb-section-label,
  body.sidebar-collapsed .sb-ql,
  body.sidebar-collapsed .sb-label,
  body.sidebar-collapsed .sb-socials{
    opacity:1;
    transform:none;
    pointer-events:auto;
  }

  body.sidebar-collapsed .sb-label{
    position:static;
    width:auto;
    overflow:visible;
  }

  body.sidebar-collapsed .sb-bottom{
    display:block;
  }

  body.sidebar-collapsed .sb-section-label,
  body.sidebar-collapsed .sb-ql{
    height:auto;
    margin-bottom:12px;
    overflow:visible;
  }

  body.sidebar-collapsed .sb-nav a{
    justify-content:flex-start;
    gap:12px;
    padding:8px 0;
  }

  body.sidebar-collapsed .sb-index{
    width:24px;
    height:24px;
    color:var(--text3);
    background:transparent;
  }

  .mast,.sec,.zb-panel-inner{padding:32px 20px}
  #header{
    flex-wrap:wrap;
    align-items:flex-start;
    height:auto;
    padding:16px 20px;
  }
  .header-pill{order:3;width:100%}
  #zone-a{margin-top:calc(var(--topbar-h) + 132px)}
  .mast-title{font-size:36px}
  .mast{min-height:auto}
  .mast::after{display:none}
.hero-robot{
    width:min(340px,74%);
    min-height:292px;
    margin-top:18px;
  }
  .mast-card-photo{min-height:520px}
  .mast-card-photo img{height:520px}
  .skill-columns,.values-grid,.proj-list{grid-template-columns:1fr}
  .pm-gallery{grid-template-columns:1fr}
  .topbar-actions{display:none}
  .pm-header,.pm-screen,.pm-footer{padding-left:20px;padding-right:20px}
}

@media(max-width:640px){
  #topbar{
    padding:0 14px;
  }

  .topbar-links{
    gap:10px;
    overflow:auto;
  }

  #header{
    gap:12px;
  }

  .header-right{
    width:100%;
    justify-content:flex-start;
  }

  .mast-title{font-size:31px}
.hero-robot{
    width:min(280px,88%);
    min-height:258px;
    margin-bottom:2px;
  }
  .robot-model{--robot-scale:.82}
  .mast-card-photo{min-height:420px}
  .mast-card-photo img{height:420px}
  .proj-hero-title{font-size:28px}
  .sec-hdr,.ft-inner{flex-direction:column;align-items:flex-start}
}
