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

:root {
  --bg: #1f1f1f;
  --card: #181818;
  --border: #2b2b2b;
  --text: #e0e0e0;
  --text-dim: #888;
  --accent: #f7f4be;
  --green: #4ade80;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Inter', sans-serif;
  --radius: 6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

/* === Nav === */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(31,31,31,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px;
}
.nav-logo { font-weight: 700; font-size: 16px; letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 28px; }
.nav-link {
  color: var(--text-dim); font-size: 13px; transition: color .2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); opacity: 1; }
.ext { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); transition: .3s; }

/* === Layout === */
.layout {
  display: flex; max-width: 1200px; margin: 0 auto;
  padding-top: 56px; min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
  width: 280px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  position: sticky; top: 56px; height: calc(100vh - 56px);
  overflow-y: auto;
}
.sidebar-inner { padding: 40px 24px; }
.avatar-wrap { position: relative; width: 96px; height: 96px; margin-bottom: 20px; }
.avatar {
  width: 96px; height: 96px; border-radius: 50%;
  border: 2px solid var(--border); object-fit: cover;
}
.status-dot {
  position: absolute; bottom: 4px; right: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--green); border: 3px solid var(--bg);
}
.sidebar-name { font-family: var(--sans); font-size: 18px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; }
.sidebar-title { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--green);
  border: 1px solid rgba(74,222,128,.25); border-radius: 20px;
  padding: 4px 12px; margin-bottom: 28px;
}
.green-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.sidebar-info { margin-bottom: 24px; display: flex; flex-direction: column; gap: 6px; }
.info-row { display: flex; align-items: center; }
.info-row a { color: var(--text-dim); font-size: 12px; text-decoration: none; transition: color .2s; display: flex; align-items: center; gap: 8px; }
.info-row a:hover { color: var(--accent); }
.info-icon { width: 14px; height: 14px; flex-shrink: 0; stroke: var(--text-dim); }
.info-row a:hover .info-icon { stroke: var(--accent); }

.sidebar-social { display: flex; flex-direction: column; gap: 8px; }
.social-link { font-size: 13px; color: var(--text-dim); }
.social-link:hover { color: var(--accent); }

/* === Main === */
.main-content { flex: 1; min-width: 0; padding: 48px 40px; }

/* === Sections === */
.section { margin-bottom: 72px; }
.comment { color: var(--text-dim); font-size: 12px; margin-bottom: 24px; opacity: .5; }
.section-title {
  font-family: var(--sans); font-size: 28px; font-weight: 700;
  margin-bottom: 32px; letter-spacing: -0.5px;
}

/* === Hero === */
.line-numbers-block {
  position: absolute; left: -36px; top: 60px;
  display: flex; flex-direction: column; gap: 8px;
}
.ln { color: var(--text-dim); font-size: 11px; opacity: .3; }
#hero { position: relative; }
/* removed hero embed */
.hero-heading {
  font-family: var(--sans); font-size: clamp(36px, 5vw, 56px);
  font-weight: 700; line-height: 1.1; letter-spacing: -2px; margin-bottom: 12px;
  white-space: nowrap;
}
.hero-sub { font-size: 18px; color: var(--text-dim); margin-bottom: 20px; }
.hero-bio { max-width: 520px; color: var(--text); margin-bottom: 32px; font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius);
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); cursor: pointer; transition: .2s;
}
.btn-primary { background: var(--accent); color: #111; border-color: var(--accent); }
.btn-primary:hover { opacity: .85; color: #111; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { border-color: var(--text-dim); }

/* === Cards / Services === */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color .3s;
}
.card:hover { border-color: var(--accent); }
.card-num { color: var(--accent); font-size: 12px; margin-bottom: 12px; font-weight: 600; }
.card-title { font-family: var(--sans); font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.card-desc { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  border: 1px solid var(--border); color: var(--text-dim);
}

/* === Timeline === */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex; gap: 28px; padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:first-child { padding-top: 0; }
.timeline-year { min-width: 130px; font-size: 13px; color: var(--text-dim); flex-shrink: 0; }
.timeline-body h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.timeline-body p { color: var(--text-dim); font-size: 13px; }
.dim { color: var(--text-dim); }

/* === Stack === */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.stack-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.stack-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.stack-icon { color: var(--accent); font-size: 14px; }
.stack-name { font-weight: 600; font-size: 14px; }
.stack-desc { color: var(--text-dim); font-size: 12px; margin-bottom: 12px; }
.bar-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 2px; width: 0; transition: width 1s ease; }

/* === Contact Form === */
.contact-form { max-width: 560px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  color: var(--text); font-family: var(--mono); font-size: 13px;
  transition: border-color .2s; outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; }

/* === Footer === */
.footer { padding: 40px 0; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-social { display: flex; gap: 20px; }
.footer-social a { color: var(--text-dim); font-size: 13px; }
.footer-credit { color: var(--text-dim); font-size: 12px; }

/* === Animations === */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* === Accent helper === */
.accent { color: var(--accent); }

/* === Responsive === */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; position: relative; top: 0; height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .sidebar-inner { padding: 28px 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
  .avatar-wrap { margin-bottom: 0; }
  .sidebar-name, .sidebar-title, .status-badge { width: 100%; }
  .main-content { padding: 32px 20px; }
  .line-numbers-block { display: none; }
  .timeline-item { flex-direction: column; gap: 8px; }
  .timeline-year { min-width: auto; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 600px) {
  .nav-links { display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 16px 24px; gap: 12px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero-heading { font-size: 32px; white-space: normal; }
  .services-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
}

/* === Embed Cards === */
.embed-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.embed-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  transition: border-color .3s; text-decoration: none;
}
.embed-card:hover { border-color: var(--accent); opacity: 1; }
.embed-icon { font-size: 20px; flex-shrink: 0; }
.embed-info { display: flex; flex-direction: column; gap: 2px; }
.embed-label { color: var(--text); font-size: 13px; font-weight: 500; }
.embed-link { color: var(--accent); font-size: 12px; }
.embed-caption { color: var(--text-dim); font-size: 12px; font-style: italic; margin-top: 8px; }

/* Timeline bullets & role descriptions */
.role-desc { color: var(--text-dim); font-size: 13px; font-style: italic; margin-bottom: 12px; }
.timeline-bullets { list-style: none; padding: 0; margin: 12px 0 0 0; display: flex; flex-direction: column; gap: 8px; }
.timeline-bullets li { position: relative; padding-left: 16px; color: var(--text); font-size: 14px; line-height: 1.6; }
.timeline-bullets li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }
.timeline-bullets li strong { color: var(--accent); font-weight: 600; }
.timeline-bullets li a { color: var(--accent); text-decoration: none; }
.timeline-bullets li a:hover { text-decoration: underline; }
