:root {
  --bg: #f3f5f2;
  --ink: #111412;
  --muted: #69706d;
  --line: rgba(17, 20, 18, 0.18);
  --line-strong: rgba(17, 20, 18, 0.42);
  --glass: rgba(255, 255, 255, 0.54);
  --accent: #53ff18;
  --accent-dark: #1fb900;
  --danger: #ff6a00;
  --shadow: 0 24px 80px rgba(17, 20, 18, 0.12);
  --font: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(circle at 18% 8%, rgba(83,255,24,.13), transparent 27%),
              radial-gradient(circle at 80% 18%, rgba(17,20,18,.08), transparent 32%),
              var(--bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.noise, .grid-bg, .scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.noise {
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.grid-bg {
  background-image:
    linear-gradient(rgba(17,20,18,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,20,18,.055) 1px, transparent 1px),
    linear-gradient(rgba(17,20,18,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,20,18,.035) 1px, transparent 1px);
  background-size: 72px 72px, 72px 72px, 12px 12px, 12px 12px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
}
.scanline {
  opacity: .22;
  background: repeating-linear-gradient(to bottom, transparent 0 7px, rgba(17,20,18,.05) 8px);
  animation: scan 9s linear infinite;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  margin-top: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(243,245,242,.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.brand { display: flex; align-items: center; height: 100%; border-right: 1px solid var(--line); }
.brand-mark {
  display: grid; place-items: center;
  width: 70px; height: 56px;
  background: var(--ink); color: var(--accent);
  font-weight: 900; letter-spacing: -.08em;
}
.brand-text { padding: 0 20px; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.nav { display: flex; gap: 6px; justify-content: center; }
.nav a { padding: 16px 14px; font-size: 11px; font-weight: 800; letter-spacing: .16em; border-left: 1px solid transparent; border-right: 1px solid transparent; }
.nav a:hover { background: rgba(83,255,24,.16); border-color: var(--line); }
.nav span { color: var(--accent-dark); margin-right: 7px; }
.system-state { display: flex; align-items: center; gap: 9px; padding: 0 18px; font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.system-state i { width: 9px; height: 9px; background: var(--accent); box-shadow: 0 0 16px var(--accent); }

main { padding: 72px 0 44px; }
.section-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.hero { position: relative; min-height: 720px; align-items: center; padding: 30px 0 80px; }
.hero::before,
.hero::after {
  content: ""; position: absolute; pointer-events: none;
}
.hero::before { width: 52vw; height: 3px; left: 31%; top: 21%; background: var(--accent); transform: rotate(-13deg); box-shadow: 0 0 34px rgba(83,255,24,.7); }
.hero::after { width: 270px; height: 270px; right: 3%; bottom: 14%; border: 1px solid var(--line); border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(17,20,18,.14) 0 5deg, transparent 5deg 17deg); mask: radial-gradient(transparent 0 55%, #000 56%); }
.hero-copy { grid-column: 1 / 8; position: relative; z-index: 3; }
.block-label { display: inline-flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.54); font-size: 11px; letter-spacing: .16em; font-weight: 900; }
.block-label span, .block-label em { color: var(--accent-dark); font-style: normal; }
.glitch-title {
  position: relative;
  margin: 20px 0 0;
  font-size: clamp(92px, 16vw, 238px);
  line-height: .78;
  font-weight: 950;
  letter-spacing: -.12em;
  text-transform: uppercase;
}
.glitch-title::before {
  content: attr(data-text); position: absolute; inset: 0;
  color: transparent; -webkit-text-stroke: 1px rgba(17,20,18,.24);
  transform: translate(18px, 20px); z-index: -1;
}
.glitch-title::after {
  content: ""; position: absolute; left: 2%; right: 15%; top: 44%; height: 16px;
  background: var(--accent); mix-blend-mode: multiply; opacity: .82;
  animation: reveal 3.8s ease-in-out infinite;
}
.hero-subtitle { margin: 18px 0 10px; max-width: 780px; font-size: clamp(20px, 3vw, 42px); line-height: 1; font-weight: 900; letter-spacing: -.05em; }
.hero-line { max-width: 560px; color: #343a36; font-size: 17px; line-height: 1.8; }
.command-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cmd-button {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 18px;
  border: 1px solid var(--ink); background: rgba(255,255,255,.45);
  font-weight: 900; font-size: 13px; letter-spacing: .08em;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: transform .22s ease, background .22s ease;
  overflow: hidden;
}
.cmd-button::before { content: ""; position: absolute; inset: 0; transform: translateX(-115%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transition: transform .45s ease; }
.cmd-button:hover { transform: translate(-3px, -3px); background: var(--accent); }
.cmd-button:hover::before { transform: translateX(115%); }
.cmd-button span { padding: 4px 7px; background: var(--ink); color: var(--accent); font-size: 10px; }
.cmd-button em { font-style: normal; margin-left: 10px; }
.cmd-button.primary { background: var(--ink); color: #fff; }
.cmd-button.primary:hover { background: var(--accent); color: var(--ink); }

.glass-panel {
  position: relative;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}
.hero-panel { grid-column: 8 / 13; min-height: 520px; padding: 22px; transform: perspective(1000px) rotateY(-7deg) rotateX(2deg); }
.panel-corners::before, .panel-corners::after { content:""; position:absolute; width:36px; height:36px; border-color: var(--accent-dark); border-style: solid; }
.panel-corners::before { top: 12px; left: 12px; border-width: 2px 0 0 2px; }
.panel-corners::after { right: 12px; bottom: 12px; border-width: 0 2px 2px 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.panel-head b { color: var(--accent-dark); }
.avatar-core { position: relative; height: 300px; display: grid; place-items: center; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(12px); opacity: .48; }
.orb-a { width: 170px; height: 170px; background: var(--accent); left: 14%; top: 18%; }
.orb-b { width: 110px; height: 110px; background: var(--danger); right: 16%; bottom: 24%; }
.cube-wrap { position: relative; width: 118px; height: 118px; transform-style: preserve-3d; animation: cube 14s linear infinite; }
.cube-face { position: absolute; inset: 0; border: 2px solid var(--ink); background: rgba(255,255,255,.14); box-shadow: inset 0 0 28px rgba(83,255,24,.18); }
.front { transform: translateZ(59px); } .back { transform: rotateY(180deg) translateZ(59px); } .right { transform: rotateY(90deg) translateZ(59px); } .left { transform: rotateY(-90deg) translateZ(59px); } .top { transform: rotateX(90deg) translateZ(59px); } .bottom { transform: rotateX(-90deg) translateZ(59px); }
.ring { position: absolute; border: 1px solid rgba(17,20,18,.35); border-radius: 50%; }
.ring-one { width: 240px; height: 240px; animation: spin 22s linear infinite; }
.ring-two { width: 180px; height: 180px; border-style: dashed; animation: spin 16s linear reverse infinite; }
.status-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.status-list div { padding: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.35); }
.status-list dt { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.status-list dd { margin: 7px 0 0; font-size: 13px; font-weight: 900; }
.barcode { height: 52px; margin-top: 16px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 8px, transparent 8px 16px); opacity: .82; }
.hero-meta { position: absolute; left: 0; bottom: 26px; right: 0; display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .18em; }

.section-title { grid-column: 1 / 5; align-self: start; }
.section-title span { display: inline-block; margin-bottom: 12px; color: var(--accent-dark); font-size: 11px; font-weight: 950; letter-spacing: .2em; }
.section-title h2 { margin: 0; font-size: clamp(32px, 5vw, 72px); line-height: .9; letter-spacing: -.08em; }
.offset-title { margin-bottom: 28px; }
.profile-section, .skills-section { padding: 90px 0; }
.profile-card { grid-column: 5 / 10; padding: 20px; }
.ops-card { grid-column: 10 / 13; padding: 20px; min-height: 420px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { min-height: 165px; padding: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.34); }
.field span { color: var(--accent-dark); font-size: 10px; font-weight: 950; letter-spacing: .18em; }
.field strong { display: block; margin: 12px 0; font-size: 20px; line-height: 1.15; }
.field p { color: var(--muted); line-height: 1.7; margin: 0; }
.ops-poster {
  position: relative;
  min-height: 178px;
  margin-top: 18px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, transparent 0 38%, rgba(83,255,24,.78) 38% 41%, transparent 41%),
    repeating-linear-gradient(90deg, rgba(17,20,18,.18) 0 1px, transparent 1px 14px),
    linear-gradient(120deg, rgba(17,20,18,.96), rgba(17,20,18,.72) 48%, rgba(255,255,255,.2));
  overflow: hidden;
}
.ops-poster::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255,255,255,.34);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 82% 72%, 82% 100%, 0 100%);
}
.poster-code {
  position: absolute;
  left: 14px;
  top: 12px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .22em;
}
.poster-title {
  position: absolute;
  left: 14px;
  bottom: 16px;
  color: #fff;
  font-size: 34px;
  line-height: .82;
  font-weight: 950;
  letter-spacing: -.08em;
}
.poster-slice { position: absolute; border: 1px solid rgba(83,255,24,.7); background: rgba(83,255,24,.13); }
.slice-a { width: 88px; height: 46px; right: 18px; top: 28px; transform: skewX(-16deg); }
.slice-b { width: 132px; height: 16px; right: -18px; bottom: 34px; transform: skewX(-24deg); }
.deploy-list { display: grid; gap: 8px; margin-top: 14px; }
.deploy-list a {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-areas: "num title" "num type";
  gap: 2px 10px;
  padding: 11px 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.38);
  transition: background .2s ease, transform .2s ease;
}
.deploy-list a:hover { background: rgba(83,255,24,.16); transform: translateX(4px); }
.deploy-list span { grid-area: num; color: var(--accent-dark); font-size: 18px; line-height: 1; font-weight: 950; }
.deploy-list b { grid-area: title; font-size: 12px; letter-spacing: .04em; }
.deploy-list em { grid-area: type; color: var(--muted); font-style: normal; font-size: 10px; font-weight: 900; letter-spacing: .16em; }


.works-section, .log-section { padding: 80px 0; }
.works-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.works-grid.expanded { align-items: start; }
.poster-card { position: relative; }
.poster-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(17,20,18,.12);
  pointer-events: none;
}
.poster-card::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 6px);
  opacity: .58;
}
.work-visual i {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 8px;
  background: var(--ink);
  color: var(--accent);
  font-style: normal;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .18em;
}
.flat-poster-strip {
  display: grid;
  grid-template-columns: auto 1fr 120px;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(90deg, var(--ink) 0 32%, rgba(255,255,255,.5) 32%);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.flat-poster-strip span { color: var(--accent); font-size: 11px; font-weight: 950; letter-spacing: .2em; }
.flat-poster-strip b { font-size: 12px; letter-spacing: .16em; }
.flat-poster-strip i { height: 36px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 6px, var(--ink) 6px 10px, transparent 10px 15px); opacity: .75; }

.work-card { grid-column: span 4; min-height: 430px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.48); backdrop-filter: blur(14px); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); transition: transform .22s ease, border-color .22s ease; }
.work-card:hover { transform: translateY(-8px); border-color: var(--accent-dark); }
.work-card.featured { grid-column: span 6; }
.work-card.tall { transform: translateY(50px); }
.work-card.tall:hover { transform: translateY(42px); }
.work-visual { position: relative; height: 210px; border-bottom: 1px solid var(--line); overflow: hidden; }
.work-visual::before { content:""; position:absolute; inset:0; background: linear-gradient(135deg, transparent 0 48%, rgba(83,255,24,.8) 48% 51%, transparent 51%), repeating-linear-gradient(90deg, rgba(17,20,18,.18) 0 1px, transparent 1px 18px); }
.work-visual span { position: absolute; right: 16px; bottom: 6px; font-size: 84px; font-weight: 950; letter-spacing: -.1em; color: rgba(17,20,18,.16); }
.visual-a { background: radial-gradient(circle at 26% 40%, rgba(83,255,24,.5), transparent 30%), #dfe5df; }
.visual-b { background: linear-gradient(120deg, #101410, #dfe5df); }
.visual-c { background: repeating-linear-gradient(-45deg, #f4f5f2 0 12px, #d2d8d0 12px 24px); }
.visual-d { background: radial-gradient(circle, #f4f5f2 0 12%, #111412 12% 13%, transparent 14%), #dfe5df; }
.visual-e { background: linear-gradient(90deg, #f4f5f2 0 46%, #111412 46% 48%, #dfe5df 48%), repeating-linear-gradient(0deg, rgba(17,20,18,.18) 0 1px, transparent 1px 12px); }
.visual-f { background: radial-gradient(circle at 70% 35%, rgba(83,255,24,.42), transparent 28%), linear-gradient(135deg, #111412, #dfe5df 62%, #f4f5f2); }
.work-body { padding: 18px; }
.work-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.work-meta span, .tech-row b { border: 1px solid var(--line); padding: 5px 7px; font-size: 10px; font-weight: 950; letter-spacing: .12em; background: rgba(255,255,255,.46); }
.work-card h3 { font-size: 26px; line-height: 1; margin: 0 0 12px; letter-spacing: -.05em; }
.work-card p { color: var(--muted); line-height: 1.7; }
.tech-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.module-array { grid-column: 5 / 10; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.module-array span { padding: 16px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.48); font-weight: 900; font-size: 13px; letter-spacing: .08em; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); }
.module-array span:nth-child(3n) { background: rgba(83,255,24,.16); }
.metric-stack { grid-column: 10 / 13; padding: 18px; }
.metric-stack div { display: flex; justify-content: space-between; align-items: end; padding: 14px 0; border-bottom: 1px solid var(--line); }
.metric-stack span { color: var(--muted); font-size: 10px; font-weight: 950; letter-spacing: .18em; }
.metric-stack b { font-size: 42px; line-height: .8; }
.timeline { position: relative; list-style: none; padding: 0 0 0 220px; margin: 30px 0 0; }
.timeline::before { content:""; position:absolute; left: 182px; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.timeline li { position: relative; display: grid; grid-template-columns: 160px 1fr auto; gap: 20px; align-items: start; min-height: 118px; padding: 0 0 34px; }
.timeline li::before { content:""; position:absolute; left: -44px; top: 0; width: 14px; height: 14px; background: var(--accent); border: 3px solid var(--ink); }
.timeline time { position: absolute; left: -220px; top: -2px; font-weight: 950; letter-spacing: .12em; }
.timeline strong { font-size: 24px; letter-spacing: -.04em; }
.timeline p { margin: 0; color: var(--muted); line-height: 1.7; }
.timeline span { justify-self: end; border: 1px solid var(--line); padding: 7px 9px; font-size: 10px; font-weight: 950; letter-spacing: .14em; }
.contact-section { margin: 80px 0 40px; padding: 34px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; }
.contact-copy h2 { margin: 24px 0 12px; font-size: clamp(38px, 6vw, 92px); line-height: .92; letter-spacing: -.08em; }
.contact-copy p { max-width: 640px; color: var(--muted); line-height: 1.8; }
.contact-console { display: grid; align-content: center; gap: 12px; }
.console-line { display: flex; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.36); font-size: 13px; font-weight: 900; }
.console-line span { color: var(--accent-dark); letter-spacing: .16em; }
.wide-btn { justify-content: space-between; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .16em; }

@keyframes scan { to { transform: translateY(32px); } }
@keyframes reveal { 0%,100% { transform: translateX(-10%) scaleX(.72); } 50% { transform: translateX(24%) scaleX(.45); } }
@keyframes cube { to { transform: rotateX(360deg) rotateY(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal-item { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal-item.is-visible { opacity: 1; transform: none; }
.topbar[data-compact='true'] { box-shadow: 0 14px 44px rgba(17,20,18,.16); }

@keyframes radar { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .page-shell { width: min(100% - 24px, 760px); }
  .topbar { grid-template-columns: 1fr auto; }
  .nav { grid-column: 1 / -1; order: 3; justify-content: start; overflow-x: auto; border-top: 1px solid var(--line); }
  .brand-text { display: none; }
  main { padding-top: 38px; }
  .section-grid, .hero, .profile-section, .skills-section { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-bottom: 54px; }
  .hero-copy, .hero-panel, .section-title, .profile-card, .ops-card, .module-array, .metric-stack { grid-column: auto; }
  .hero-panel { transform: none; min-height: 470px; }
  .hero-meta { position: static; margin-top: 26px; flex-wrap: wrap; gap: 10px; }
  .field-grid { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: 1fr; }
  .work-card, .work-card.featured, .work-card.tall { grid-column: auto; transform: none; }
  .flat-poster-strip { grid-template-columns: 1fr; background: rgba(255,255,255,.48); }
  .work-card.tall:hover { transform: translateY(-8px); }
  .timeline { padding-left: 32px; }
  .timeline::before { left: 7px; }
  .timeline li { display: block; padding-bottom: 34px; }
  .timeline li::before { left: -31px; }
  .timeline time { position: static; display: block; margin-bottom: 10px; color: var(--accent-dark); }
  .timeline p { margin: 10px 0; }
  .timeline span { display: inline-block; }
  .contact-section { grid-template-columns: 1fr; padding: 22px; }
}

@media (max-width: 560px) {
  .page-shell { width: min(100% - 16px, 100%); }
  .topbar { top: 8px; margin-top: 8px; }
  .brand-mark { width: 58px; }
  .system-state { padding-right: 12px; }
  .nav a { padding: 12px 10px; font-size: 10px; }
  .glitch-title { font-size: clamp(76px, 26vw, 126px); letter-spacing: -.11em; }
  .hero-subtitle { font-size: 24px; }
  .command-row { flex-direction: column; }
  .cmd-button { width: 100%; justify-content: space-between; }
  .status-list { grid-template-columns: 1fr; }
  .avatar-core { height: 240px; }
  .section-title h2 { font-size: 40px; }
  .module-array { grid-template-columns: 1fr; }
  .console-line { flex-direction: column; }
  .footer { flex-direction: column; }
}

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