/* Root theme variables (Solarized-inspired) */
:root {
    --bg: #fdf6e3;
    --bg-elevated: #f5efdd;
    --bg-strong: #eee8d5;
    --fg: #073642;
    --fg-muted: #657b83;
    --accent: #268bd2;
    --accent-soft: rgba(38, 139, 210, 0.12);
    --border-subtle: rgba(0, 0, 0, 0.06);
    --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.06);
  }
  
  /* Dark mode */
  [data-theme="dark"] {
    --bg: #002b36;
    --bg-elevated: #01313e;
    --bg-strong: #073642;
    --fg: #fdf6e3;
    --fg-muted: #93a1a1;
    --accent: #b58900;
    --accent-soft: rgba(181, 137, 0, 0.16);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.6);
  }
  
  /* Global reset-ish */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html,
  body {
    margin: 0;
    padding: 0;
    height: 100%;
  }
  
  body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  
  /* Layout */
  .page {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    min-height: 100vh;
  }
  
  /* Sidebar */
  .sidebar {
    border-right: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    position: sticky;
    top: 0;
    height: 100vh;
  }
  
  .sidebar-inner {
    padding: 32px 24px 24px;
    max-width: 320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
  }
  
  .sidebar-header .name {
    font-size: 1.7rem;
    margin: 0 0 8px;
  }
  
  .sidebar-header .tagline {
    margin: 0 0 8px;
    font-size: 0.98rem;
  }
  
  .sidebar-header .meta {
    margin: 0;
    font-size: 0.85rem;
    color: var(--fg-muted);
  }
  
  .nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  
  .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--fg-muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
  }
  
  .nav-link::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
  }
  
  .nav-link:hover {
    background: var(--accent-soft);
    color: var(--fg);
    transform: translateX(1px);
  }
  
  .nav-link.active {
    color: var(--accent);
    background: var(--accent-soft);
  }
  
  .nav-link.active::before {
    background: var(--accent);
  }
  
  /* Sidebar footer */
  .sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .sidebar-footer .links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .sidebar-footer .links a {
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    color: var(--fg-muted);
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
  
  .sidebar-footer .links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
  }
  
  /* Theme toggle */
  .theme-toggle {
    align-self: flex-start;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    padding: 4px 10px 4px 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--fg-muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  }
  
  .theme-toggle:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
  }
  
  .theme-icon {
    font-size: 1rem;
  }
  
  /* Main content */
  .content {
    padding: 32px 48px 48px;
    max-width: 840px;
    margin: 0 auto;
  }
  
  .section {
    padding: 40px 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .section-label {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.76rem;
    color: var(--fg-muted);
    margin: 0 0 8px;
  }
  
  .section-title {
    font-size: 1.4rem;
    margin: 0 0 16px;
  }
  
  .section-body p {
    margin: 0 0 12px;
  }
  
  /* Timeline */
  .timeline {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }
  
  .timeline-item {
    padding: 20px 20px 18px;
    border-radius: 16px;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
  }
  
  .timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
  }
  
  .item-title {
    margin: 0 0 4px;
    font-size: 1rem;
  }
  
  .item-meta {
    margin: 0;
    font-size: 0.86rem;
    color: var(--fg-muted);
  }
  
  .item-dates {
    font-size: 0.84rem;
    color: var(--fg-muted);
    white-space: nowrap;
  }
  
  .item-blurb {
    margin: 0 0 8px;
    font-size: 0.93rem;
  }
  
  .item-list {
    margin: 0;
    padding-left: 18px;
    font-size: 0.9rem;
  }
  
  .item-list li + li {
    margin-top: 4px;
  }
  
  /* Cards (Projects) */
  .cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
  }
  
  .card {
    padding: 18px 18px 16px;
    border-radius: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .card-title {
    margin: 0;
    font-size: 1rem;
  }
  
  .card-tagline {
    margin: 0;
    font-size: 0.88rem;
    color: var(--fg-muted);
  }
  
  .card-body {
    margin: 0;
    font-size: 0.9rem;
  }
  
  .card-tech {
    margin: 0;
    font-size: 0.85rem;
    color: var(--fg-muted);
  }
  
  .card-tech span {
    font-weight: 600;
  }
  
  /* Skills */
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 12px;
  }
  
  .skills-group h3 {
    margin: 0 0 8px;
    font-size: 0.98rem;
  }
  
  .pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .pill {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    color: var(--fg-muted);
  }
  
  .skills-note {
    margin: 0;
    font-size: 0.9rem;
  }
  
  /* Education */
  .edu-item {
    padding: 16px 18px 14px;
    border-radius: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
  }
  
  .edu-item .item-title {
    font-size: 1rem;
  }
  
  .edu-item .item-meta {
    font-size: 0.86rem;
    color: var(--fg-muted);
    margin-top: 2px;
  }
  
  .edu-item .item-blurb {
    font-size: 0.9rem;
    margin-top: 8px;
  }
  
  /* Contact */
  .contact-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 12px;
    font-size: 0.92rem;
  }
  
  .contact-list li + li {
    margin-top: 4px;
  }
  
  a {
    color: var(--accent);
  }
  
  a:hover {
    text-decoration: none;
  }
  
  /* Responsive */
  @media (max-width: 900px) {
    .page {
      grid-template-columns: 1fr;
    }
  
    .sidebar {
      position: static;
      height: auto;
      border-right: none;
      border-bottom: 1px solid var(--border-subtle);
    }
  
    .sidebar-inner {
      max-width: none;
    }
  
    .content {
      padding: 24px 20px 32px;
    }
  
    .timeline-item,
    .card,
    .edu-item {
      border-radius: 14px;
    }
  }
  
  @media (max-width: 600px) {
    .sidebar-header .name {
      font-size: 1.5rem;
    }
  
    .content {
      padding: 20px 16px 28px;
    }
  
    .timeline-header {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .item-dates {
      white-space: normal;
    }
  }
  