:root {
  --bg: #0c0c0a; --surface: #111110; --surface2: #1a1a18;
  --border: #2a2a27; --border-hi: #3d3d39; --text: #e8e6e0; --muted: #7a7870;
  --accent: #c8f040; --accent2: #40f0a0; --accent3: #f04060; --accent4: #f0a040; --accent5: #4FA3FF; --accent6: #A970FF;
  --mono: 'IBM Plex Mono', monospace; --sans: 'IBM Plex Sans', sans-serif; --display: 'Syne', sans-serif;
  --grain-opacity: 0.025;
  --grid-line: rgba(200,240,64,0.03);
  --scan-line: rgba(0,0,0,0.04);
}
[data-theme="light"] {
  --bg: #f5f4f0; --surface: #eceae4; --surface2: #e2e0d8;
  --border: #d0cec6; --border-hi: #b8b6ae; --text: #1a1a18; --muted: #6a6860;
  --accent: #7aaa00; --accent2: #00a068; --accent3: #d02040; --accent4: #c07800; --accent5: #1a6fd4; --accent6: #7040cc;
  --grain-opacity: 0.012;
  --grid-line: rgba(100,140,0,0.04);
  --scan-line: rgba(0,0,0,0.02);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.7; overflow-x: hidden; cursor: url("../img/cursor-dark.svg") 4 2, auto; transition: background 0.3s ease, color 0.3s ease; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1000; background: repeating-linear-gradient(0deg, transparent, transparent 3px, var(--scan-line) 3px, var(--scan-line) 4px); }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 60px 60px; }

nav { position: fixed; top: 0; left: 0; right: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--border); background: rgba(12,12,10,0.92); backdrop-filter: blur(12px); }
@media (min-width: 1024px) { nav { padding: 0 40px; height: 64px; } }
.nav-logo { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; text-decoration: none; display: flex; align-items: center; }
.nav-logo span { color: var(--muted); }
.nav-logo-mark { display: block; height: 66px; width: auto; aspect-ratio: 300 / 205; background-color: #c8f040; -webkit-mask-image: url("../img/logo-mask.png"); -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center left; mask-image: url("../img/logo-mask.png"); mask-size: contain; mask-repeat: no-repeat; mask-position: center left; transition: background-color 0.2s ease; }
@media (min-width: 1024px) { .nav-logo-mark { height: 78px; } }
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a { font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 20px; }

.lang-switcher { display: flex; align-items: center; gap: 2px; border: 1px solid var(--border); padding: 4px; }
.lang-btn { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); background: none; border: none; cursor: pointer; padding: 4px 8px; transition: all 0.2s; text-transform: uppercase; }
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--accent); color: var(--bg); }

.nav-status { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent2); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 16px 60px; overflow: hidden; z-index: 1; }
@media (min-width: 1024px) { .hero { padding: 0 40px 80px; min-height: 100vh; } }
.hero-bg-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-family: var(--display); font-size: clamp(80px,18vw,220px); font-weight: 800; color: transparent; -webkit-text-stroke: 1px rgba(200,240,64,0.06); white-space: nowrap; pointer-events: none; letter-spacing: -0.03em; user-select: none; }
.hero-tag { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.hero-tag::before { content: ''; display: block; width: 40px; height: 1px; background: var(--accent); }
.hero-title { font-family: var(--display); font-size: clamp(38px,10vw,110px); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em; margin-bottom: 24px; overflow-wrap: break-word; word-break: break-word; max-width: 100%; }
@media (min-width: 1024px) { .hero-title { font-size: clamp(48px,8vw,110px); margin-bottom: 32px; } .hero-meta { flex-direction: row; gap: 60px; align-items: flex-end; } }
.hero-meta { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero-title .accent { color: var(--accent); }
.hero-desc { font-family: var(--sans); font-size: 14px; color: var(--muted); max-width: 100%; line-height: 1.7; }
@media (min-width: 1024px) { .hero-desc { font-size: 15px; max-width: 380px; } }
.hero-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }
@media (min-width: 1024px) { .hero-actions { flex-direction: row; gap: 16px; width: auto; flex-shrink: 0; } }
.btn { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; padding: 14px 28px; min-height: 44px; border: 1px solid; text-decoration: none; transition: all 0.2s; cursor: pointer; background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
@media (min-width: 1024px) { .btn { width: auto; } }
.btn-primary { border-color: var(--accent); color: var(--bg); background: var(--accent); }
.btn-primary:hover { background: transparent; color: var(--accent); }
.btn-ghost { border-color: var(--border-hi); color: var(--muted); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.hero-scroll { display: none; }
@media (min-width: 1024px) { .hero-scroll { display: flex; position: absolute; bottom: 40px; right: 40px; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.1em; writing-mode: vertical-rl; align-items: center; gap: 12px; } }

@media (min-width: 1024px) { .hero-scroll::after { content: ''; width: 1px; height: 60px; background: linear-gradient(to bottom, var(--muted), transparent); } }

.section-header { display: flex; align-items: baseline; gap: 20px; margin-bottom: 60px; }
.section-num { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.1em; }
.section-title { font-family: var(--display); font-size: clamp(28px,4vw,48px); font-weight: 700; letter-spacing: -0.03em; }
.section-line { flex: 1; height: 1px; background: var(--border); margin-bottom: 4px; }

#about { padding: 60px 16px; border-top: 1px solid var(--border); }
@media (min-width: 1024px) { #about { padding: 120px 40px; } }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.about-text p { color: var(--muted); margin-bottom: 20px; font-size: 15px; line-height: 1.8; }
.about-text p strong { color: var(--text); font-weight: 500; }
.principle-list { list-style: none; margin-top: 32px; }
.principle-list li { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; transition: color 0.2s; }
.principle-list li:hover { color: var(--text); }
.principle-list li::before { content: '→'; color: var(--accent); font-size: 14px; }
.skills-panel { border: 1px solid var(--border); padding: 32px; }
.skills-panel-title { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 32px; display: flex; align-items: center; gap: 10px; }
.skills-panel-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.skill-item { margin-bottom: 24px; }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.skill-name { font-family: var(--mono); font-size: 12px; color: var(--text); }
.skill-pct { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.skill-track { height: 2px; background: var(--border); position: relative; overflow: hidden; }
.skill-fill { height: 100%; width: 0; transition: width 1.2s cubic-bezier(0.4,0,0.2,1); position: relative; }
.skill-fill::after { content: ''; position: absolute; right: 0; top: -2px; width: 4px; height: 6px; background: inherit; box-shadow: 0 0 8px var(--accent); }

#systems { padding: 60px 16px; border-top: 1px solid var(--border); background: var(--surface); }
@media (min-width: 1024px) { #systems { padding: 120px 40px; } }
.featured-project { border: 1px solid var(--border-hi); padding: 24px; margin-bottom: 32px; position: relative; overflow: hidden; transition: border-color 0.3s; }
@media (min-width: 1024px) { .featured-project { padding: 48px; } }
.featured-project::before { content: 'FEATURED'; position: absolute; top: 20px; right: 20px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; color: var(--accent4); border: 1px solid var(--accent4); padding: 4px 10px; }
.featured-project:hover { border-color: var(--accent); }
.featured-project::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(to right, var(--accent), transparent); }
.project-name { font-family: var(--display); font-size: clamp(22px,6vw,36px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px; word-break: break-word; }
.project-desc { color: var(--muted); max-width: 600px; line-height: 1.7; margin-bottom: 24px; font-size: 14px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tag { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--border); padding: 4px 12px; letter-spacing: 0.05em; transition: all 0.2s; }
.tag:hover { border-color: var(--accent); color: var(--accent); }
.project-metrics { display: flex; flex-wrap: wrap; gap: 20px; }
@media (min-width: 1024px) { .project-metrics { gap: 40px; } }
.metric { text-align: left; }
.metric-val { font-family: var(--mono); font-size: 28px; font-weight: 500; color: var(--accent); line-height: 1; }
.metric-label { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 4px; }
.projects-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (min-width: 768px) { .projects-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1280px) { .projects-grid { grid-template-columns: repeat(3,1fr); } }

.card-cta { background: var(--bg); padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-decoration: none; color: var(--muted); transition: background 0.2s, color 0.2s; min-height: 180px; border: none; cursor: pointer; }
.card-cta:hover { background: var(--surface2); color: var(--text); }
.card-cta svg { width: 28px; height: 28px; opacity: 0.4; transition: opacity 0.2s; }
.card-cta:hover svg { opacity: 1; color: var(--accent); }
.card-cta-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.project-card:hover { background: var(--surface2); }
.project-card::before { content: ''; position: absolute; top: 0; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.3s ease; }
.project-card:hover::before { width: 100%; }
.card-name { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.card-date { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-bottom: 12px; letter-spacing: 0.08em; }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.card-tag { font-family: var(--mono); font-size: 10px; color: var(--accent2); letter-spacing: 0.05em; }
.card-tag::before { content: '#'; opacity: 0.5; }
.card-perf { position: absolute; bottom: 24px; right: 24px; font-family: var(--mono); font-size: 22px; font-weight: 500; opacity: 0.15; }

.prod-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; color: var(--accent2); border: 1px solid var(--accent2); padding: 2px 8px; margin-left: 12px; vertical-align: middle; position: relative; top: -2px; }
.prod-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent2); animation: blink 1.5s ease-in-out infinite; flex-shrink: 0; }

#stack { padding: 60px 16px; border-top: 1px solid var(--border); }
@media (min-width: 1024px) { #stack { padding: 120px 40px; } }
.stack-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 60px; }
@media (min-width: 1024px) { .stack-grid { grid-template-columns: repeat(4,1fr); } }
.stack-item { background: var(--bg); padding: 20px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; transition: background 0.2s; cursor: default; }
@media (min-width: 1024px) { .stack-item { padding: 32px 24px; } }
.stack-item:hover { background: var(--surface2); }
.stack-item img { height: 36px; max-width: 100%; object-fit: contain; object-position: left; }
@media (min-width: 1024px) { .stack-item img { height: 48px; } }
.stack-name { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; word-break: break-word; }
@media (min-width: 1024px) { .stack-name { font-size: 15px; } }
.stack-cat { font-family: var(--mono); font-size: 10px; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; }
.stack-bar { margin-top: auto; width: 100%; height: 1px; background: var(--border); position: relative; overflow: hidden; }
.stack-bar-fill { height: 100%; background: var(--accent); width: 0; transition: width 1.4s cubic-bezier(0.4,0,0.2,1); }

.terminal { border: 1px solid var(--border); background: var(--surface); overflow: hidden; max-width: 100%; }
.terminal-header { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface2); }
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.td1{background:#ff5f56} .td2{background:#ffbd2e} .td3{background:#27c93f}
.term-title { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 8px; letter-spacing: 0.05em; }
.terminal-body { padding: 28px 24px; font-family: var(--mono); font-size: 13px; line-height: 1.8; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) { .terminal-body { padding: 14px 12px; font-size: 11px; } }
.t-line{display:flex;gap:16px} .t-prompt{color:var(--accent)} .t-cmd{color:var(--text)}
.t-out{color:var(--muted);padding-left:16px} .t-comment{color:var(--muted);opacity:0.5}
.t-green{color:var(--accent2)} .t-orange{color:var(--accent4)} .t-red{color:var(--accent3)} .t-blank{height:8px} .t-blue{color:var(--accent5)} .t-violet{color:var(--accent6)}

#contact { padding: 60px 16px; border-top: 1px solid var(--border); background: var(--surface); }
@media (min-width: 1024px) { #contact { padding: 120px 40px; } }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.contact-headline { font-family: var(--display); font-size: clamp(36px,5vw,64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: 24px; }
.contact-headline .accent { color: var(--accent); }
.contact-sub { color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 380px; }
.contact-links { display: flex; flex-direction: column; gap: 2px; }
.contact-link { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px; border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: all 0.2s; position: relative; overflow: hidden; cursor: pointer; background: transparent; width: 100%; font-family: inherit; font-size: inherit; text-align: left; -webkit-appearance: none; appearance: none; box-sizing: border-box; }
.contact-link::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width 0.3s ease; z-index: 0; }
.contact-link:hover::before { width: 4px; }
.contact-link:hover { border-color: var(--accent); background: rgba(200,240,64,0.04); }
.contact-link-left { display: flex; align-items: center; gap: 16px; z-index: 1; position: relative; }
.contact-link-icon { width: 40px; height: 40px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.contact-link-name { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.contact-link-handle { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.contact-link-handle a { color: inherit; text-decoration: none; }
.contact-link-arrow { font-size: 20px; color: var(--muted); transition: transform 0.2s, color 0.2s; z-index: 1; position: relative; }
.contact-link:hover .contact-link-arrow { transform: translate(4px,-4px); color: var(--accent); }

footer { padding: 24px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; z-index: 1; position: relative; }
@media (min-width: 1024px) { footer { padding: 32px 40px; flex-direction: row; justify-content: space-between; align-items: center; gap: 0; } }
.footer-left { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 8px; }
.footer-mark { width: 60px; height: auto; opacity: 0.9; color: var(--accent); margin-left: 6.5mm; }
.footer-left span { color: var(--accent); }
.footer-right { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1{transition-delay:0.1s} .reveal-delay-2{transition-delay:0.2s} .reveal-delay-3{transition-delay:0.3s}

.modal-overlay { position: fixed; inset: 0; background: rgba(12,12,10,0.96); z-index: 9000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(8px); padding: 16px; }
.modal-overlay.open { display: flex; }
.modal { border: 1px solid var(--border-hi); background: var(--surface); padding: 28px 20px; width: 100%; max-width: 460px; position: relative; animation: modal-in 0.3s ease; }
@media (min-width: 768px) { .modal { padding: 48px; } }
@keyframes modal-in { from{opacity:0;transform:scale(0.95) translateY(10px)} to{opacity:1;transform:scale(1) translateY(0)} }
.modal-close { position: absolute; top: 20px; right: 20px; background: none; border: none; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; font-family: var(--mono); transition: color 0.2s; }
.modal-close:hover { color: var(--accent3); }
.modal-title { font-family: var(--display); font-size: 28px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.03em; }
.modal-sub { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 32px; }

.stats-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 48px; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4,1fr); margin-top: 80px; } }
.stats-cell { background: var(--bg); padding: 24px 16px; text-align: center; }
@media (min-width: 768px) { .stats-cell { padding: 32px 24px; } }
.stats-val { font-family: var(--display); font-size: clamp(32px,7vw,48px); font-weight: 800; letter-spacing: -0.04em; color: var(--accent); }
.stats-label { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 4px; }

.theme-toggle { width: 44px; height: 44px; background: none; border: 1px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color 0.2s, background 0.2s; flex-shrink: 0; color: var(--muted); }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; transition: transform 0.4s cubic-bezier(0.4,0,0.2,1); }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle svg { transform: rotate(180deg); }

nav, section, footer, .modal, .terminal, .featured-project, .project-card, .skills-panel, .stack-item, .contact-link {
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.nav-hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: 1px solid var(--border); cursor: pointer; padding: 10px; flex-shrink: 0; transition: border-color 0.2s; }
.nav-hamburger:hover { border-color: var(--accent); }
.nav-hamburger span { display: block; width: 100%; height: 1px; background: var(--text); transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); background: var(--accent); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background: var(--accent); }

.nav-drawer { position: fixed; top: 56px; left: 0; right: 0; bottom: 0; z-index: 850; background: rgba(12,12,10,0.98); backdrop-filter: blur(16px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; transform: translateY(-100%); opacity: 0; transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.35s ease; pointer-events: none; }
.nav-drawer.open { transform: translateY(0); opacity: 1; pointer-events: all; }
.nav-drawer a { font-family: var(--display); font-size: clamp(28px,8vw,48px); font-weight: 800; color: var(--muted); text-decoration: none; letter-spacing: -0.03em; transition: color 0.2s; padding: 8px 0; }
.nav-drawer a:hover { color: var(--accent); }
.nav-drawer-lang { display: flex; gap: 8px; margin-top: 32px; }
.nav-drawer-lang .lang-btn { font-size: 12px; padding: 6px 14px; border: 1px solid var(--border); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 600px) {
  body { cursor: auto; font-size: 14px; }
  .nav-right { gap: 10px; }
  .nav-status { display: none; }
  .lang-btn { padding: 3px 6px; font-size: 9px; }
  .hero { justify-content: flex-start; padding-top: 90px; }
  .hero-bg-text { display: none; }
  .hero-tag { font-size: 10px; margin-bottom: 14px; }
  .section-header { gap: 12px; margin-bottom: 36px; }
  .about-text p { font-size: 14px; }
  .principle-list li { font-size: 11px; }
  .skills-panel { padding: 20px; }
  .featured-project::before { font-size: 8px; padding: 3px 7px; top: 12px; right: 12px; }
  .project-desc { font-size: 13px; }
  .metric-val { font-size: 22px; }
  .card-name { font-size: 17px; word-break: break-word; }
  .prod-badge { font-size: 8px; margin-left: 6px; }
  .stack-item img { height: 36px; }
  .contact-link { padding: 16px 18px; min-height: 44px; }
  .contact-link-icon { width: 32px; height: 32px; flex-shrink: 0; }
}
@media (max-width: 380px) {
  .hero-title { font-size: clamp(32px, 10vw, 48px); }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}

[data-theme="light"] .hero-bg-text { -webkit-text-stroke: 1px rgba(100,140,0,0.08); }
[data-theme="light"] .btn-primary { color: #1a1a18; }
[data-theme="light"] .nav-drawer { background: rgba(245,244,240,0.98); }
[data-theme="light"] body { cursor: url("../img/cursor-light.svg") 4 2, auto; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-btn { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--border); padding: 6px 14px; letter-spacing: 0.05em; background: transparent; cursor: pointer; transition: all 0.2s; }
.filter-btn:hover { border-color: var(--border-hi); color: var(--text); }
.filter-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(200,240,64,0.06); }
.project-card { background: var(--bg); padding: 20px; position: relative; transition: background 0.2s, opacity 0.25s, transform 0.25s; overflow: hidden; display: flex; flex-direction: column; }
@media (min-width: 1024px) { .project-card { padding: 32px; } }
.project-card.hidden { display: none; }

#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.55; }
[data-theme="light"] #heroCanvas { opacity: 0.35; }

.gh-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.gh-stat { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.05em; border: 1px solid var(--border); padding: 3px 8px; transition: border-color 0.2s, color 0.2s; }
.gh-stat svg { width: 11px; height: 11px; flex-shrink: 0; }
.gh-stat.loaded { border-color: var(--border-hi); color: var(--text); }
.gh-stat.loaded svg { color: var(--accent); }

.chat-btn { position: fixed; bottom: 88px; right: 32px; width: 50px; height: 50px; background: var(--accent); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 801; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 20px rgba(200,240,64,0.3); border-radius: 0; }
.chat-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(200,240,64,0.45); }
.chat-btn svg { width: 22px; height: 22px; color: var(--bg); }
[data-theme="light"] .chat-btn svg { color: #1a1a18; }
.chat-btn-notif { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; background: var(--accent3); border-radius: 50%; display: none; }
.chat-btn-notif.show { display: block; animation: blink 1.5s ease-in-out infinite; }

.chat-panel { position: fixed; bottom: 152px; right: 32px; width: 340px; background: var(--surface); border: 1px solid var(--border-hi); z-index: 802; transform: translateY(16px) scale(0.96); opacity: 0; pointer-events: none; transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease; transform-origin: bottom right; display: flex; flex-direction: column; max-height: 520px; }
.chat-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }

.chat-panel-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-shrink: 0; background: var(--surface2); }
.chat-avatar { width: 34px; height: 34px; background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--display); font-weight: 800; font-size: 13px; color: var(--bg); }
[data-theme="light"] .chat-avatar { color: #1a1a18; }
.chat-panel-name { font-family: var(--display); font-size: 13px; font-weight: 700; }
.chat-panel-status { font-family: var(--mono); font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.chat-panel-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent2); animation: blink 2s ease-in-out infinite; flex-shrink: 0; }
.chat-close-btn { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; display: flex; align-items: center; transition: color 0.2s; }
.chat-close-btn:hover { color: var(--accent3); }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); }

.chat-msg { display: flex; flex-direction: column; gap: 3px; max-width: 88%; }
.chat-msg-ai { align-self: flex-start; }
.chat-msg-user { align-self: flex-end; }
.chat-msg-bubble { padding: 9px 13px; font-size: 13px; line-height: 1.55; }
.chat-msg-ai .chat-msg-bubble { background: var(--surface2); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 2px; }
.chat-msg-user .chat-msg-bubble { background: var(--accent); color: var(--bg); border-bottom-right-radius: 2px; }
[data-theme="light"] .chat-msg-user .chat-msg-bubble { color: #1a1a18; }
.chat-msg-label { font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: 0.05em; padding: 0 2px; }
.chat-msg-user .chat-msg-label { text-align: right; }

.chat-typing { display: flex; align-items: center; gap: 4px; padding: 10px 13px; background: var(--surface2); border: 1px solid var(--border); width: fit-content; }
.chat-typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: typing-dot 1.2s ease-in-out infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot { 0%,60%,100%{transform:translateY(0);opacity:0.4} 30%{transform:translateY(-4px);opacity:1} }

.chat-suggestions { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.chat-suggestion { font-family: var(--mono); font-size: 10px; color: var(--accent); border: 1px solid var(--accent); background: transparent; padding: 6px 10px; cursor: pointer; text-align: left; letter-spacing: 0.04em; transition: all 0.15s; }
.chat-suggestion:hover { background: rgba(200,240,64,0.08); }

.chat-input-row { display: flex; border-top: 1px solid var(--border); flex-shrink: 0; }
.chat-input { flex: 1; background: var(--surface); border: none; padding: 12px 14px; font-family: var(--mono); font-size: 12px; color: var(--text); outline: none; }
.chat-input::placeholder { color: var(--muted); }
.chat-input:focus { background: var(--surface2); }
.chat-send { width: 44px; background: var(--accent); border: none; cursor: pointer; color: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s; }
.chat-send:hover { background: #d4f44a; }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
[data-theme="light"] .chat-send { color: #1a1a18; }
[data-theme="light"] .chat-send:hover { background: #8fc800; color: #fff; }

@media (max-width: 600px) { .chat-panel { width: calc(100vw - 24px); right: 12px; bottom: 148px; max-height: 70vh; } .chat-btn { right: 16px; bottom: 84px; } }

.gh-drawer-overlay { position: fixed; inset: 0; z-index: 9200; background: rgba(12,12,10,.6); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.gh-drawer-overlay.open { opacity: 1; pointer-events: all; }
.gh-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 9201; width: min(760px, 100vw); background: var(--bg); border-left: 1px solid var(--border-hi); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1); overflow: hidden; }
.gh-drawer.open { transform: translateX(0); }
.gh-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 56px; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
@media(min-width:1024px){ .gh-drawer-header { height: 64px; padding: 0 28px; } }
.gh-drawer-title { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.gh-drawer-title svg { width: 16px; height: 16px; }
.gh-drawer-close { width: 36px; height: 36px; background: none; border: 1px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--muted); transition: border-color .2s, color .2s; }
.gh-drawer-close:hover { border-color: var(--accent3); color: var(--accent3); }
.gh-drawer-close svg { width: 14px; height: 14px; }
.gh-drawer-body { flex: 1; overflow-y: auto; padding: 24px 20px; }
@media(min-width:1024px){ .gh-drawer-body { padding: 32px 28px; } }
.gh-drawer-body::-webkit-scrollbar { width: 4px; }
.gh-drawer-body::-webkit-scrollbar-track { background: transparent; }
.gh-drawer-body::-webkit-scrollbar-thumb { background: var(--border); }

.gh-drawer .slabel { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--accent); text-transform: uppercase; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; margin-top: 32px; }
.gh-drawer .slabel:first-child { margin-top: 0; }
.gh-drawer .slabel::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.gh-drawer .widget-full { border: 1px solid var(--border); background: var(--surface); padding: 16px; margin-bottom: 12px; overflow: hidden; }
.gh-drawer .widget-full img { width: 100%; height: auto; display: block; }
.gh-drawer .widget-row { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
@media(min-width:520px){ .gh-drawer .widget-row { grid-template-columns: 1fr 1fr; } }
.gh-drawer .widget-half { border: 1px solid var(--border); background: var(--surface); padding: 16px; overflow: hidden; }
.gh-drawer .widget-half img { width: 100%; height: auto; display: block; }
.gh-drawer .gh-cta { display: flex; justify-content: center; margin: 32px 0 8px; }
.gh-drawer .gh-link { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 12px 28px; border: 1px solid var(--accent); color: var(--bg); background: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; transition: all .2s; }
[data-theme="light"] .gh-drawer .gh-link { color: #1a1a18; }
.gh-drawer .gh-link:hover { background: transparent; color: var(--accent); }
.gh-drawer .gh-link svg { width: 16px; height: 16px; }
.scroll-top { position: fixed; bottom: 32px; right: 32px; width: 44px; height: 44px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 800; opacity: 0; transform: translateY(12px); transition: opacity 0.3s, transform 0.3s, border-color 0.2s, color 0.2s; pointer-events: none; }
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.scroll-top:hover { border-color: var(--accent); color: var(--accent); }
.scroll-top svg { width: 16px; height: 16px; }

.card-copy { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity 0.2s, border-color 0.2s, color 0.2s; z-index: 2; }
.project-card:hover .card-copy { opacity: 1; }
.card-copy:hover { border-color: var(--accent); color: var(--accent); }
.card-copy svg { width: 12px; height: 12px; }
.card-copy.copied { border-color: var(--accent2); color: var(--accent2); opacity: 1; }

.typing-cursor { display: inline-block; width: 3px; height: 0.85em; background: var(--accent); margin-left: 2px; vertical-align: middle; animation: cur-blink 0.8s step-end infinite; }
@keyframes cur-blink { 0%,100%{opacity:1} 50%{opacity:0} }

.proj-modal-overlay { position: fixed; inset: 0; background: rgba(12,12,10,0.96); z-index: 9100; display: none; align-items: flex-start; justify-content: center; backdrop-filter: blur(12px); padding: 16px; overflow-y: auto; }
.proj-modal-overlay.open { display: flex; }
.proj-modal { border: 1px solid var(--border-hi); background: var(--surface); width: 100%; max-width: 820px; margin: auto; position: relative; animation: modal-in 0.3s ease; }
.proj-modal-header { padding: 32px 32px 0; position: relative; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
.proj-modal-close { position: absolute; top: 20px; right: 20px; background: none; border: none; color: var(--muted); font-size: 24px; cursor: pointer; font-family: var(--mono); transition: color 0.2s; line-height: 1; }
.proj-modal-close:hover { color: var(--accent3); }
.proj-modal-tag { font-family: var(--mono); font-size: 10px; color: var(--accent); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 12px; }
.proj-modal-name { font-family: var(--display); font-size: clamp(24px,4vw,36px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.proj-modal-date { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 16px; }
.proj-modal-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.proj-modal-body { padding: 32px 32px 40px; }
.proj-modal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.proj-modal-divider { height: 1px; background: var(--border); margin: 20px 0; }
.proj-modal-links { display: flex; gap: 12px; flex-wrap: wrap; }
.proj-modal-link { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 10px 20px; border: 1px solid var(--border-hi); color: var(--muted); text-decoration: none; transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: transparent; }
.proj-modal-link:hover { border-color: var(--accent); color: var(--accent); }
.proj-modal-link.primary { border-color: var(--accent); color: var(--bg); background: var(--accent); }
.proj-modal-link.primary:hover { background: transparent; color: var(--accent); }
[data-theme="light"] .proj-modal-link.primary { color: #1a1a18; }

.readme-body { margin-top: 28px; font-size: 14px; line-height: 1.8; color: var(--muted); }
.readme-body h1 { font-family: var(--display); font-size: clamp(20px,3vw,28px); font-weight: 800; color: var(--text); letter-spacing: -0.03em; margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.readme-body h1:first-child { margin-top: 0; }
.readme-body h2 { font-family: var(--display); font-size: clamp(16px,2.5vw,22px); font-weight: 700; color: var(--text); letter-spacing: -0.02em; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.readme-body h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--text); margin: 20px 0 8px; }
.readme-body h4 { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; margin: 16px 0 6px; }
.readme-body p { margin: 0 0 14px; }
.readme-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.readme-body a:hover { border-bottom-color: var(--accent); }
.readme-body code { font-family: var(--mono); font-size: 12px; background: var(--surface2); color: var(--accent2); padding: 2px 6px; border: 1px solid var(--border); }
.readme-body pre { background: var(--bg); border: 1px solid var(--border); padding: 16px 20px; overflow-x: auto; margin: 16px 0; -webkit-overflow-scrolling: touch; }
.readme-body pre code { background: none; border: none; padding: 0; font-size: 12px; color: var(--text); line-height: 1.4; white-space: pre; font-family: 'Cascadia Mono', 'Consolas', 'DejaVu Sans Mono', 'Courier New', var(--mono), monospace; font-variant-ligatures: none; }
.readme-body blockquote { border-left: 2px solid var(--accent); padding: 8px 16px; margin: 16px 0; color: var(--muted); font-style: italic; background: rgba(200,240,64,0.03); }
.readme-body ul, .readme-body ol { padding-left: 20px; margin: 0 0 14px; }
.readme-body li { margin-bottom: 4px; }
.readme-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; overflow-x: auto; display: block; }
.readme-body th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); background: var(--surface2); padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.readme-body td { padding: 8px 12px; border: 1px solid var(--border); color: var(--muted); vertical-align: top; }
.readme-body tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
[data-theme="light"] .readme-body tr:nth-child(even) td { background: rgba(0,0,0,0.02); }
.readme-body hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.readme-body img { max-width: 100%; height: auto; }
.readme-body img.readme-badge { display: inline-block; vertical-align: middle; height: 20px; width: auto; margin: 2px 4px 2px 0; }
.readme-body .badge-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.readme-body .badge { font-family: var(--mono); font-size: 10px; border: 1px solid var(--border); padding: 2px 8px; color: var(--muted); letter-spacing: 0.04em; }
.readme-tab-bar { display: flex; border-bottom: 1px solid var(--border); }
.readme-tab { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 10px 20px; color: var(--muted); cursor: pointer; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.2s; }
.readme-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.readme-tab:hover { color: var(--text); }
@media (max-width: 600px) { .proj-modal-header { padding: 20px 16px 16px; } .proj-modal-body { padding: 20px 16px 28px; } }

.grain { position: fixed; inset: -50%; width: 200%; height: 200%; pointer-events: none; z-index: 999; opacity: var(--grain-opacity);
  background-image: url("../img/grain.svg");
  animation: grain 0.4s steps(1) infinite; }
@keyframes grain {
  0%,100%{transform:translate(0,0)} 10%{transform:translate(-2%,-3%)} 20%{transform:translate(2%,1%)}
  30%{transform:translate(-1%,2%)} 40%{transform:translate(3%,-2%)} 50%{transform:translate(-2%,3%)}
  60%{transform:translate(2%,-1%)} 70%{transform:translate(-3%,2%)} 80%{transform:translate(1%,-3%)} 90%{transform:translate(-1%,1%)}
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
