/* ================================================================
   TOKENS
================================================================ */
:root {
  --bg:          #080808;
  --surface:     #101010;
  --surface-2:   #141414;
  --border:      #1c1c1c;
  --border-2:    #252525;
  --text:        #e2e2e2;
  --text-muted:  #606060;
  --text-dim:    #909090;
  --accent:      #e8c547;
  --accent-low:  rgba(232, 197, 71, 0.07);
  --accent-mid:  rgba(232, 197, 71, 0.18);

  --sans:  'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  --nav-h:    64px;
  --max-w:    1080px;
  --r:        6px;
  --ease:     200ms ease;
}

/* ================================================================
   RESET
================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}

a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
img  { max-width: 100%; display: block; }
button { font-family: inherit; cursor: none; }

.mono { font-family: var(--mono); }
.accent { color: var(--accent); }

/* ================================================================
   CUSTOM CURSOR
================================================================ */
.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9000;
  transform: translate(-50%, -50%);
  transition: width .18s ease, height .18s ease, background .18s ease;
  will-change: transform;
}

body.cursor-hover .cursor-dot {
  width: 32px;
  height: 32px;
  background: var(--accent-mid);
  border: 1px solid var(--accent);
}

@media (hover: none) {
  .cursor-dot { display: none; }
  body { cursor: auto; }
  button { cursor: pointer; }
  a { cursor: pointer; }
}

/* ================================================================
   SCROLLBAR
================================================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ================================================================
   NAV
================================================================ */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 200;
  transition: background var(--ease), border-color var(--ease);
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: rgba(8, 8, 8, 0.9);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color var(--ease);
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  position: relative;
  transition: color var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--ease);
}
.nav-link:hover        { color: var(--text); }
.nav-link:hover::after { width: 100%; }

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--text);
  transition: transform var(--ease), opacity var(--ease);
}

/* ================================================================
   SECTION BASE
================================================================ */
section { padding: 120px 0; }

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 3rem;
}

/* ================================================================
   HERO
================================================================ */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  width: 100%;
}

.hero-greeting {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.hero-name {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.0;
  margin-bottom: 1.1rem;
  color: #fff;
}

.hero-role {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1.6rem;
  height: 1.4em;
}

.type-cursor {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-bio {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.75;
  max-width: 460px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--r);
  transition: all var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-solid {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-solid:hover {
  background: transparent;
  color: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--accent);
}

/* ── code block ─── */
.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--mono);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.mac-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mac-dot.red    { background: #ff5f57; }
.mac-dot.yellow { background: #ffbd2e; }
.mac-dot.green  { background: #28c840; }

.code-filename {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.code-body {
  padding: 1.5rem 1.75rem;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--text-dim);
  white-space: pre;
  overflow-x: auto;
}

.cb-brace  { color: var(--text-muted); }
.cb-key    { color: #7ec8e3; }
.cb-colon  { color: var(--text-muted); }
.cb-str    { color: #98d982; }
.cb-bool   { color: #ff9855; }
.cb-comma  { color: var(--text-muted); }
.cb-bracket{ color: var(--text-muted); }

/* scroll indicator */
.hero-scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 2rem;
  margin-top: auto;
}

.hero-scroll-indicator span {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 52px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}
.scroll-line-fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 45%;
  background: var(--accent);
  animation: scrollDown 1.6s ease-in-out infinite;
}
@keyframes scrollDown {
  0%   { top: -45%; }
  100% { top: 145%; }
}

/* ================================================================
   ABOUT
================================================================ */
#about {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 6rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.85;
  margin-bottom: 1.3rem;
}
.about-text p:last-child { margin-bottom: 0; }

.about-meta { display: flex; flex-direction: column; }

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.about-meta .meta-row:first-child { border-top: 1px solid var(--border); }
.meta-row.last { border-bottom: none; }

.meta-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.meta-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.status-open {
  color: #5adb8a;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.status-open::before {
  content: '';
  width: 6px; height: 6px;
  background: #5adb8a;
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(90, 219, 138, 0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(90, 219, 138, 0); }
}

.meta-link {
  color: var(--text);
  transition: color var(--ease);
}
.meta-link:hover { color: var(--accent); }

/* ================================================================
   SKILLS
================================================================ */
#skills { background: var(--bg); }

.skills-filter {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.skills-filter::-webkit-scrollbar { display: none; }

.filter-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-muted);
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.65rem 1.2rem;
  transition: color var(--ease), border-color var(--ease);
  white-space: nowrap;
}
.filter-btn:hover  { color: var(--text); }
.filter-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color var(--ease), background var(--ease), transform var(--ease);
}
.skill-card:hover {
  border-color: var(--accent);
  background: var(--accent-low);
  transform: translateY(-3px);
}

.skill-card.hidden {
  display: none;
}

.skill-abbr {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-low);
  border: 1px solid rgba(232, 197, 71, 0.2);
  border-radius: 4px;
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.03em;
  transition: background var(--ease), border-color var(--ease);
}
.skill-card:hover .skill-abbr {
  background: var(--accent-mid);
  border-color: rgba(232, 197, 71, 0.4);
}

.skill-name {
  font-size: 0.77rem;
  color: var(--text-muted);
  text-align: center;
  transition: color var(--ease);
}
.skill-card:hover .skill-name { color: var(--text); }

/* ================================================================
   CONTACT
================================================================ */
#contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.contact-lead {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-top: -1.5rem;
  margin-bottom: 3rem;
  max-width: 480px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  max-width: 580px;
}

.contact-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left var(--ease);
}
.contact-row:first-child { border-top: 1px solid var(--border); }
.contact-row:hover { padding-left: 0.75rem; }
.contact-row:hover .contact-arrow {
  color: var(--accent);
  transform: translateX(5px);
}

.contact-type {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.contact-val {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text);
}

.contact-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: color var(--ease), transform var(--ease);
}

/* ================================================================
   FOOTER
================================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer span {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ================================================================
   REVEAL ANIMATION
================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* stagger siblings */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-visual { display: none; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 640px) {
  section { padding: 80px 0; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-toggle     { display: flex; }

  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .contact-row {
    grid-template-columns: 80px 1fr 24px;
    gap: 1rem;
  }
}

@media (max-width: 420px) {
  .hero-name { font-size: 2.4rem; }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .contact-arrow { display: none; }
}
