:root {
    --bg: #f5f5f7;
    --bg-elevated: #ffffff;
    --text: #0f172a;
    --muted: #6b7280;
    --accent: #7c3aed; /* purple */
    --accent-soft: rgba(124, 58, 237, 0.12);
    --border-subtle: rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius-large: 1.5rem;
    --radius-medium: 1.1rem;
  }
  
  html[data-theme="dark"] {
    --bg: #020617;
    --bg-elevated: #020617;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #a855f7;
    --accent-soft: rgba(168, 85, 247, 0.18);
    --border-subtle: rgba(148, 163, 184, 0.28);
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.7);
  }
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #fee2e2 0, transparent 45%),
      radial-gradient(circle at bottom right, #e0e7ff 0, transparent 50%),
      var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
  }
  
  .page-wrapper {
    max-width: 1120px;
    margin: 1.5rem auto 3rem;
    padding: 0 1.2rem 2rem;
  }
  
  /* Top bar */
  
  .top-bar {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.1rem 1.4rem;
    border-radius: var(--radius-large);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
  }
  
  html[data-theme="dark"] .top-bar {
    background: rgba(15, 23, 42, 0.93);
  }
  
  .top-bar__left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
  }
  
  .name {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
  }
  
  .role {
    margin: 0.1rem 0 0.1rem;
    font-size: 0.9rem;
    color: var(--muted);
  }
  
  .tagline {
    margin: 0;
    font-size: 0.95rem;
    color: var(--accent);
  }
  
  .top-bar__right {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .nav {
    display: flex;
    gap: 0.9rem;
    font-size: 0.85rem;
  }
  
  .nav a {
    text-decoration: none;
    color: var(--muted);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  }
  
  .nav a:hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(124, 58, 237, 0.2);
  }
  
  .controls {
    display: flex;
    align-items: center;
    gap: 0.45rem;
  }
  
  /* Avatar / photo */
  
  .avatar-wrapper {
    position: relative;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(148, 163, 184, 0.5);
  }
  
  .avatar-initials {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    background: radial-gradient(circle at 30% 20%, #f97373, #7c3aed);
    color: #f9fafb;
  }
  
  .profile-photo {
    width: 100%;
    height: 100%;
    object-fit:cover;
    display: black; /* set to block when you add a real photo */
  }
  
  /* Buttons, chips */
  
  .primary-button {
    border: none;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #ef4444);
    color: #f9fafb;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 12px 25px rgba(248, 113, 113, 0.4);
  }
  
  .primary-button:hover {
    filter: brightness(1.05);
  }
  
  .icon-button {
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.02);
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 1.1rem;
  }
  
  .icon-button:hover {
    background: var(--accent-soft);
  }
  
  .chip {
    display: inline-flex;
    align-items: center;
    padding: 0.17rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    font-size: 0.75rem;
    white-space: nowrap;
  }
  
  .chip--toggle {
    background: transparent;
    cursor: pointer;
  }
  
  .chip--toggle.active {
    border-color: transparent;
    background: var(--accent-soft);
    color: var(--accent);
  }
  
  .lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.15rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
  }
  
  /* Layout */
  
  .layout {
    margin-top: 1.8rem;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
    gap: 1.75rem;
    align-items: flex-start;
  }
  
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
  }
  
  .main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  
  /* Cards & sections */
  
  .card,
  .item {
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-medium);
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.10);
  }
  
  html[data-theme="dark"] .card,
  html[data-theme="dark"] .item {
    background: rgba(15, 23, 42, 0.96);
  }
  
  .card__title {
    margin: 0 0 0.7rem;
    font-size: 0.95rem;
    font-weight: 600;
  }
  
  .section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }
  
  .section__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
  }
  
  .section__body p {
    margin: 0 0 0.4rem;
    font-size: 0.9rem;
    color: var(--muted);
  }
  
  /* Contact list */
  
  .contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.45rem;
    font-size: 0.85rem;
  }
  
  .contact-list .label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.05rem;
  }
  
  .contact-list a {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
  }
  
  .contact-list a:hover {
    text-decoration: underline;
  }
  
  /* Skills */
  
  .skills-block {
    margin-bottom: 0.7rem;
  }
  
  .skills-block__title {
    margin: 0 0 0.15rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
  }
  
  .skills-block__text {
    margin: 0;
    font-size: 0.85rem;
  }
  
  /* Chips list */
  
  .chip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  
  /* Progress list */
  
  .progress-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.55rem;
    font-size: 0.84rem;
  }
  
  .progress-list__header {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.22rem;
  }
  
  .progress {
    width: 100%;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    overflow: hidden;
  }
  
  .progress__bar {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #ef4444);
  }
  
  /* Lists */
  
  .bullet-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.85rem;
  }
  
  .bullet-list li {
    margin-bottom: 0.2rem;
  }
  
  /* Items (experience, projects, edu) */
  
  .item__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.3rem;
  }
  
  .item__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
  }
  
  .item__meta {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  
  .item__summary {
    margin: 0.4rem 0 0.35rem;
    font-size: 0.87rem;
    color: var(--muted);
  }
  
  .item__list {
    margin: 0.25rem 0 0.3rem;
    padding-left: 1.1rem;
    font-size: 0.86rem;
  }
  
  .item__list li {
    margin-bottom: 0.2rem;
  }
  
  .item__tech {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
  }
  
  .item__tech span:first-child {
    font-weight: 600;
    color: var(--text);
    font-size: 0.78rem;
  }
  
  /* Responsive */
  
  @media (max-width: 900px) {
    .top-bar {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .top-bar__right {
      width: 100%;
      justify-content: space-between;
    }
  
    .nav {
      flex-wrap: wrap;
    }
  
    .layout {
      grid-template-columns: 1fr;
    }
  
    .top-bar {
      position: static;
    }
  }
  
  @media (max-width: 600px) {
    .name {
      font-size: 1.4rem;
    }
  
    .primary-button {
      display: none; /* hide PDF button on very small screens if you want */
    }
  }
  
  /* Print */
  
  @media print {
    body {
      background: #ffffff !important;
    }
  
    .top-bar {
      position: static;
      box-shadow: none;
      background: #ffffff;
    }
  
    .icon-button,
    .lang-toggle,
    #print-btn {
      display: none !important;
    }
  
    .page-wrapper {
      max-width: 100%;
      margin: 0;
      padding: 0.5rem;
    }
  
    .layout {
      grid-template-columns: 1fr 2fr;
    }
  }
  
