:root {
  --bg: #38383f;
  --text: #e0e0e0;
  --text-muted: #999999;
  --accent: #a78bfa;
  --border: #222222;
  --sidebar-width: 220px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── LAYOUT ── */
.layout {
  display: flex;
  min-height: 100vh;
  max-width: 1050px;
  margin: 0 auto;
  align-items: flex-start;
}

/* ── SIDEBAR ── */
.sidebar {
  position: sticky;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 2.5rem 1.75rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-header {
  margin-bottom: 2.5rem;
}

.site-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}

.site-name:hover {
  color: var(--accent);
}

.site-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.sidebar nav {
  flex: 1;
}

.sidebar nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.sidebar nav a {
  display: block;
  padding: 0.3rem 0.6rem;
  margin-left: -0.6rem;
  border-radius: 5px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: var(--accent);
  background: rgba(167, 139, 250, 0.1);
}

.sidebar-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.sidebar-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.sidebar-footer a svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  display: block;
}

.sidebar-footer a:hover {
  color: var(--text);
}

/* ── MAIN ── */
main {
  flex: 1;
  padding: 4rem;
  min-width: 0;
}

/* ── SECTIONS ── */
section {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.section-label {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

/* ── ABOUT ── */
.about-body p {
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  max-width: 560px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.skill-tag {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── EXPERIENCE ── */
.exp-list {
  border-left: 1px solid var(--border);
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
}

.exp-item {
  position: relative;
  padding-bottom: 2rem;
}

.exp-item:last-child {
  padding-bottom: 0;
}

.exp-item::before {
  content: '';
  position: absolute;
  left: -1.58rem;
  top: 0.48rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.exp-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.exp-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.exp-company {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.exp-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
}

/* ── PROJECTS ── */
.projects-group {
  margin-bottom: 2rem;
}

.projects-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s;
}

.project-card:hover {
  border-color: #444;
}

.project-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.project-wip {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  vertical-align: middle;
  margin-left: 0.4rem;
  letter-spacing: 0.03em;
}

.project-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  max-width: 500px;
  line-height: 1.6;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
}

.stack-tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(167, 139, 250, 0.12);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.project-link:hover {
  color: var(--text);
}

/* ── FOOTER ── */
footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
  }

  .sidebar-header {
    margin-bottom: 0;
  }

  .site-tagline {
    display: none;
  }

  .sidebar nav ul {
    flex-direction: row;
  }

  .sidebar nav a {
    padding: 0.25rem 0.6rem;
  }

  .sidebar-footer {
    display: none;
  }

  main {
    padding: 2rem 1.25rem;
  }
}
