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

:root {
  --bg: #f9f9f9;
  --surface: #ffffff;
  --text: #1a1c1c;
  --text-dim: #5a4136;
  --text-muted: #8e7164;
  --border: #000000;
  --border-soft: #e2e2e2;
  --accent: #ff6b00;
  --accent-dark: #a04100;
  --sans: 'Space Grotesk', sans-serif;
  --mono: 'Courier Prime', monospace;
  --max-w: 1200px;
  --gutter: 24px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  cursor: crosshair;
  overflow-x: hidden;
}

/* subtle scanline texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.012) 3px,
    rgba(0,0,0,0.012) 4px
  );
  pointer-events: none;
  z-index: 9000;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── CURSOR ───────────────────────────────────────── */
#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

/* ── KEYFRAMES ────────────────────────────────────── */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes barFillAnim {
  from { width: 0; }
}

/* ── NAV ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 48px;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.nav-blink { animation: blink 1s steps(1) infinite; }

.nav-links {
  display: flex;
  gap: 0;
}

.nav-link {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0 14px;
  color: var(--text);
  border-left: 1px solid var(--border);
  height: 48px;
  display: flex;
  align-items: center;
  transition: background 0.12s, color 0.12s;
}

.nav-link:last-child { border-right: 1px solid var(--border); }
.nav-link:hover { background: var(--accent); color: #fff; }

.nav-hamburger {
  display: none;
  font-family: var(--mono);
  font-size: 20px;
  background: none;
  border: 1px solid var(--border);
  padding: 4px 10px;
  cursor: pointer;
  line-height: 1;
}

/* ── HERO ─────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding-top: 80px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.hero-status {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  padding: 5px 12px;
  width: fit-content;
}

.status-label { color: var(--accent); font-weight: 700; }
.status-sep { opacity: 0.3; }

/* ASCII ART */
.ascii-wrapper { overflow-x: auto; }

.ascii-art {
  font-family: var(--mono);
  font-size: clamp(5.5px, 1.05vw, 13px);
  line-height: 1.22;
  color: var(--text);
  white-space: pre;
  display: block;
}

.ascii-cursor {
  display: inline-block;
  width: 0.55em;
  background: var(--accent);
  animation: blink 0.7s steps(1) infinite;
  vertical-align: text-bottom;
  height: 1em;
}

/* Hero sub + cta — hidden until ASCII done */
.hero-sub,
.hero-cta {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-sub.visible,
.hero-cta.visible {
  opacity: 1;
  transform: translateY(0);
}

.mono-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent-dark);
  font-weight: 700;
  display: block;
  margin-bottom: 10px;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── BUTTONS ──────────────────────────────────────── */
.btn-primary {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 11px 22px;
  background: var(--text);
  color: #fff;
  border: 2px solid var(--text);
  display: inline-flex;
  align-items: center;
  box-shadow: 3px 3px 0 var(--accent);
  transition: background 0.12s, box-shadow 0.12s, transform 0.08s;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 3px 3px 0 var(--text);
}

.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--text);
}

.btn-ghost {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 11px 22px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
  display: inline-flex;
  align-items: center;
  transition: background 0.12s, color 0.12s;
}

.btn-ghost:hover { background: var(--text); color: #fff; }

/* ── THINKING TERMINAL ────────────────────────────── */
.thinking-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.thinking-shell.visible {
  opacity: 1;
  transform: translateY(0);
}

.terminal-win {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--border);
  max-width: 680px;
}

.terminal-chrome {
  background: var(--border);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.t-dots { display: flex; gap: 6px; }

.t-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.t-dot-red    { background: #ff5f57; }
.t-dot-yellow { background: #febc2e; }
.t-dot-green  { background: #28c840; }

.t-title {
  font-family: var(--mono);
  font-size: 11px;
  color: #888;
  letter-spacing: 0.04em;
}

.terminal-body {
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2;
  min-height: 100px;
}

.t-line { display: block; }
.t-prompt { color: var(--accent); margin-right: 8px; font-weight: 700; }
.t-cmd    { color: var(--text); }
.t-ok     { color: #28c840; }
.t-dim    { color: #888; }
.t-spin   { color: var(--accent); }

/* ── MAIN CONTENT ─────────────────────────────────── */
.main-content {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.main-content.visible { opacity: 1; }

/* ── SECTIONS ─────────────────────────────────────── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--gutter);
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(22px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.section-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ── PROJECT CARDS ────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 3px 3px 0 var(--border);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.15s, transform 0.15s;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  box-shadow: 5px 5px 0 var(--accent);
  transform: translate(-2px, -2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.card-id { color: var(--text-muted); }
.card-status { color: var(--text-dim); font-weight: 700; }
.card-status.active { color: #28c840; }

.project-title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 18px 18px 10px;
}

.project-desc {
  padding: 0 18px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
  flex: 1;
}

.project-stack {
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.project-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
}

.project-link {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: letter-spacing 0.15s;
}

.project-link:hover { letter-spacing: 0.1em; }

.project-company {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

/* ── SKILLS ───────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.skill-group-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.skill-item { margin-bottom: 18px; }

.skill-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 5px;
}

.skill-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-bar-text {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  flex: 1;
  transition: color 0.2s;
}

/* Filled blocks in accent color */
.skill-bar-text .filled { color: var(--accent); }

.skill-pct {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  min-width: 30px;
  letter-spacing: 0.04em;
}

/* ── EXPERIENCE LOG ───────────────────────────────── */
.exp-log { display: flex; flex-direction: column; }

.exp-entry {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-soft);
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.exp-entry.visible {
  opacity: 1;
  transform: translateX(0);
}

.exp-entry:last-child { border-bottom: none; }

.exp-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 3px;
}

.exp-date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  line-height: 1.5;
}

.exp-level {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 2px 6px;
  width: fit-content;
}

.exp-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.exp-role {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.exp-company {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-dark);
  font-weight: 700;
}

.exp-bullets {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.exp-bullets li {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
}

.exp-bullets strong { color: var(--text); font-weight: 600; }

.exp-stack {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
}

/* ── CONTACT ──────────────────────────────────────── */
.contact-wrapper { max-width: 560px; }

.contact-card {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--border);
}

.contact-terminal {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
}

.ct-prompt { color: var(--accent); font-weight: 700; }

.contact-links {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.contact-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  transition: color 0.12s;
}

.contact-link:last-child { border-bottom: none; }
.contact-link:hover { color: var(--accent); }

.cl-icon {
  width: 22px; height: 22px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--mono);
}

.contact-cta { padding: 18px 20px; }

/* ── FOOTER ───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--text);
  color: #fff;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy,
.footer-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.footer-status { color: #28c840; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; align-items: center; }

  .ascii-art { font-size: clamp(4px, 2.1vw, 10px); }

  .skills-grid { grid-template-columns: 1fr; gap: 32px; }

  .exp-entry { grid-template-columns: 1fr; gap: 10px; }

  .projects-grid { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }

  .hero-desc { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .thinking-shell,
  .main-content,
  .exp-entry,
  .project-card,
  .hero-sub,
  .hero-cta {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .nav-blink,
  .ascii-cursor { animation: none; }
}
