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

:root {
  --bg:         #F9F8F5;
  --bg-alt:     #F3F2EE;
  --surface:    #FFFFFF;
  --text:       #0E0E0C;
  --muted:      #87877F;
  --faint:      #C5C4BC;
  --border:     #E2E0D8;
  --accent:     #0055FF;
  --accent-t:   rgba(0, 85, 255, 0.07);
  --accent-s:   rgba(0, 85, 255, 0.12);
  --mono:       'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --display:    'Space Grotesk', 'Inter', sans-serif;
  --max-w:      820px;
  --radius-sm:  6px;
  --radius:     14px;
  --radius-lg:  22px;
  --radius-xl:  32px;
  --radius-full:9999px;
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 8px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.09);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 2px; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 300;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 1.1rem 2.5rem;
  gap: 2rem;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background 0.3s, border-color 0.3s;
}

.navbar.scrolled {
  background: rgba(249, 248, 245, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
}

.nav-logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.nav-links { list-style: none; display: flex; gap: 1.75rem; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s;
  position: relative;
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active { color: var(--text); }

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  text-decoration: none;
  padding: 0.42rem 1.2rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.01em;
  transition: background 0.15s, box-shadow 0.15s;
}

.nav-cta:hover {
  background: #2a2a28;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 2.5rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* dot-grid backdrop */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--faint) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

/* blurred accent blob top-right */
.hero::after {
  content: '';
  position: absolute;
  top: -15%;
  right: -12%;
  width: min(680px, 70vw);
  height: min(680px, 70vw);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(0,85,255,0.10) 0%, transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding-top: 5rem;
  padding-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-name {
  font-family: var(--display);
  font-size: clamp(3.2rem, 8.5vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.93;
  color: var(--text);
}

.hero-rule {
  width: 100%;
  height: 2px;
  background: var(--text);
  margin: 1.6rem 0;
}

.hero-sub {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-role-wrap {
  font-size: 1rem;
  color: var(--muted);
  min-height: 1.65rem;
}

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-location {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.hero-bio {
  font-size: 0.975rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.76;
  margin-bottom: 2rem;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius-full);
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.btn-primary:hover {
  background: #2a2a28;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: var(--mono);
  border: 1px solid var(--border);
  padding: 0.62rem 1.4rem;
  border-radius: var(--radius-full);
  transition: color 0.15s, border-color 0.15s;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text);
}

.hero-social {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0;
}

.social-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.15s;
}

.social-link:hover { color: var(--accent); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 3rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.stat:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-num {
  display: block;
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5.5rem 2.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 72px;
}

.section:first-of-type { border-top: none; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2.5rem;
}

.section-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.14em;
}

.section-title {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ============================================================
   EXPERIENCE & EDUCATION  — card grid
   ============================================================ */
.exp-grid { display: flex; flex-direction: column; gap: 1rem; }

.exp-entry {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0 2.5rem;
  padding: 1.75rem 1.75rem 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  border-left: 3px solid transparent;
}

.exp-entry:has(.badge-current) {
  border-left-color: var(--accent);
}

.exp-entry:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.exp-left { padding-top: 3px; }

.exp-date {
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.exp-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.exp-company {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.badge-current {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-t);
  border: 1px solid rgba(0, 85, 255, 0.22);
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-full);
}

.badge-past {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-full);
}

.exp-role {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.exp-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.72;
  margin-bottom: 0.875rem;
}

.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.875rem;
}

.exp-list li {
  position: relative;
  font-size: 0.865rem;
  color: var(--muted);
  line-height: 1.65;
  padding-left: 1rem;
}

.exp-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  top: 0.06em;
  color: var(--faint);
  font-size: 0.7rem;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

/* ============================================================
   TAG CHIP
   ============================================================ */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.03em;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  transition: background 0.15s, border-color 0.15s;
}

.tag:hover {
  background: var(--accent-t);
  border-color: rgba(0,85,255,0.2);
  color: var(--accent);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.project-list { display: flex; flex-direction: column; gap: 0.85rem; }

.proj-entry {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0 2rem;
  padding: 1.5rem 1.75rem 1.5rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.22s, transform 0.22s;
}

.proj-entry:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.proj-left { padding-top: 2px; }

.proj-cat {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.proj-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.proj-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.68;
  margin-bottom: 0.6rem;
}

.proj-stack { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.proj-links { display: flex; gap: 1rem; margin-top: 0.5rem; }

.proj-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

.proj-link:hover { opacity: 0.65; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-content { display: flex; flex-direction: column; gap: 0.85rem; }

.skills-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
}

.skills-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.skills-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ============================================================
   CONTACT
   ============================================================ */
.section-contact { background: var(--bg-alt); }

.contact-content {
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.contact-email {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.025em;
  border-bottom: 2px solid var(--text);
  padding-bottom: 1px;
  margin-bottom: 1.5rem;
  transition: color 0.15s, border-color 0.15s;
}

.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-social { display: flex; gap: 1.5rem; }

.contact-social a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}

.contact-social a:hover { color: var(--accent); }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   SKELETON LOADERS
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skel {
  display: block;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    var(--bg-alt) 25%,
    rgba(0, 0, 0, 0.04) 50%,
    var(--bg-alt) 75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 2.5rem 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}

.footer a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.footer a:hover { color: var(--text); }
.sep { opacity: 0.3; }

/* ============================================================
   KBD HINT
   ============================================================ */
.kbd-hint {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 32px;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.kbd-hint:hover { border-color: var(--text); color: var(--text); }

/* ============================================================
   SHORTCUTS TOAST
   ============================================================ */
.shortcuts-toast {
  position: fixed;
  bottom: 4rem;
  right: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  z-index: 200;
  min-width: 175px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: var(--shadow-md);
}

.shortcuts-toast.visible { opacity: 1; transform: translateY(0); }

.toast-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.toast-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.toast-row:last-child { margin-bottom: 0; }

kbd {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text);
}

/* ============================================================
   KONAMI
   ============================================================ */
.konami-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(249, 248, 245, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.konami-overlay.active { opacity: 1; }

.konami-msg {
  text-align: center;
  font-size: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.konami-msg span {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--accent);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .hero    { padding: 0 1.25rem; }
  .section { padding: 3.5rem 1.25rem; }
  .navbar  { padding: 1rem 1.25rem; }
  .nav-links, .nav-cta { display: none; }

  .hero-name { font-size: clamp(2.4rem, 11vw, 3.5rem); }
  .hero-sub  { flex-direction: column; gap: 0.25rem; }

  .hero-stats { grid-template-columns: repeat(2, 1fr); }

  .exp-entry {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 1.25rem;
    border-left-width: 3px;
  }
  .exp-left { padding-bottom: 0.4rem; }

  .proj-entry { grid-template-columns: 1fr; gap: 0.3rem; padding: 1.25rem; }

  .contact-content { padding: 1.5rem; }

  .footer { padding: 1.75rem 1.25rem 2.5rem; }
}
