  :root {
    --bg: #0e0e0f;
    --bg2: #151517;
    --bg3: #1c1c1f;
    --border: rgba(255,255,255,0.07);
    --border2: rgba(255,255,255,0.13);
    --text: #e8e6e1;
    --muted: #7a7875;
    --accent: #a3e635;
    --accent2: #4ade80;
    --nav-bg: rgba(14,14,15,0.85);
    --btn-primary-text: #0e0e0f;
    --mono: 'DM Mono', monospace;
    --sans: 'DM Sans', sans-serif;
  }
  html[data-theme="light"] {
    --bg: #f7f5f2;
    --bg2: #ffffff;
    --bg3: #f0ede8;
    --border: rgba(0,0,0,0.08);
    --border2: rgba(0,0,0,0.16);
    --text: #1a1a1a;
    --muted: #6b6b6b;
    --accent: #65a30d;
    --accent2: #84cc16;
    --nav-bg: rgba(247,245,242,0.85);
    --btn-primary-text: #0e0e0f;
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  /* ── CURSOR ── */
  .cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--accent);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
  }
  @keyframes blink { 50% { opacity: 0; } }

  /* ── NAV ── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1.2rem 3rem;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
  }

  .nav-logo {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--accent);
    letter-spacing: 0.05em;
  }

  nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin-left: auto;
  }

  nav a {
    text-decoration: none;
    font-size: 13px;
    color: var(--muted);
    font-family: var(--mono);
    letter-spacing: 0.03em;
    transition: color 0.2s;
  }
  nav a:hover { color: var(--text); }

  /* ── SECTIONS ── */
  section {
    max-width: 860px;
    margin: 0 auto;
    padding: 7rem 2rem;
  }

  /* ── HERO ── */
  .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 8rem;
    position: relative;
  }

  .hero-tag {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeup 0.6s 0.2s forwards;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
    opacity: 0;
    animation: fadeup 0.6s 0.4s forwards;
  }

  .hero h1 em {
    font-style: normal;
    color: var(--muted);
  }

  .hero-subtitle {
    margin-top: 1.8rem;
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 520px;
    font-weight: 300;
    opacity: 0;
    animation: fadeup 0.6s 0.6s forwards;
  }

  .hero-links {
    margin-top: 3rem;
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeup 0.6s 0.8s forwards;
  }

  .hero-photo {
    position: absolute;
    top: 8.5rem;
    right: 2.5rem;
    width: clamp(110px, 18vw, 170px);
    height: clamp(110px, 18vw, 170px);
    border-radius: 50%;
    padding: 8px;
    background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.04), rgba(12, 12, 12, 0.98) 65%, #0a0a0a 100%);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    z-index: 0;
  }

  .hero-photo img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    object-position: 65% 50%;
    filter: saturate(0.98) contrast(1.04);
  }

  @media (max-width: 900px) {
    .hero-photo {
      display: none;
    }
  }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1.4rem;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
  }

  .btn-primary {
    background: var(--accent);
    color: var(--btn-primary-text);
    font-weight: 500;
  }
  .btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }

  .btn-ghost {
    border: 1px solid var(--border2);
    color: var(--muted);
  }
  .btn-ghost:hover { border-color: var(--text); color: var(--text); transform: translateY(-1px); }

  @keyframes fadeup {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── BLOG ── */
  .blog h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 300;
    color: var(--text);
    margin-bottom: 0.5rem;
  }

  .blog-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: flex-start;
    gap: 2rem;
  }

  .blog-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-self: end;
  }
  .blog-actions .label-short { display: none; }
  .blog-actions .label-full { display: inline; }

  @media (max-width: 820px) {
    .blog-header {
      grid-template-columns: 1fr;
    }
    .blog-actions {
      justify-self: start;
    }
  }

  .blog-list {
    margin-top: 2.5rem;
    display: grid;
    gap: 1.6rem;
  }

  .blog-item {
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--border2);
    border-radius: 8px;
    background: transparent;
  }

  .blog-meta {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .blog-title {
    margin: 0.6rem 0 0.4rem;
    font-size: 1.4rem;
    font-weight: 400;
  }

  .blog-title a {
    color: var(--text);
    text-decoration: none;
  }

  .blog-title a:hover {
    color: var(--accent);
  }

  .blog-excerpt {
    margin: 0;
    color: var(--muted);
  }

  .blog-empty {
    color: var(--muted);
  }

  .blog-content {
    margin-top: 1.8rem;
    color: var(--muted);
    line-height: 1.7;
  }

  .blog-content h2,
  .blog-content h3 {
    color: var(--text);
    font-weight: 400;
    margin-top: 2rem;
  }

  .blog-content a {
    color: var(--accent);
  }
  .blog-content strong {
    color: var(--text);
    font-weight: 600;
  }
  .blog-content em {
    font-style: italic;
    font-weight: 500;
  }
  .blog-content blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.1rem;
    border-left: 3px solid var(--accent);
    background: var(--bg2);
    color: var(--text);
    font-style: italic;
  }
  .blog-content blockquote p {
    margin: 0;
  }

  .blog-post {
    position: relative;
  }

  .blog-post-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2.2rem;
  }

  .blog-home {
    position: absolute;
    top: 3rem;
    right: 2rem;
  }

  .blog-back {
    display: inline-flex;
    margin-top: 2.5rem;
    text-decoration: none;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.03em;
  }

  .blog-post-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
  }

  .blog-post-actions .blog-back {
    margin-top: 0;
  }

  @media (max-width: 820px) {
    .blog-home {
      position: static;
      margin-top: 1.5rem;
      align-self: flex-start;
    }
  }

  /* ── SECTION HEADER ── */
  .sec-label {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
  }

  .sec-title {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    color: var(--text);
  }

  /* ── ABOUT ── */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }

  .about-text p {
    color: var(--muted);
    font-weight: 300;
    margin-bottom: 1rem;
  }
  .about-text p strong {
    color: var(--text);
    font-weight: 400;
  }

  .about-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }

  .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
  }
  .detail-row:last-child { border-bottom: none; }

  .detail-key {
    font-family: var(--mono);
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.05em;
  }

  .detail-val {
    color: var(--text);
    font-weight: 300;
  }

  /* ── SKILLS ── */
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  .skill-card {
    background: var(--bg);
    padding: 1.5rem;
    transition: background 0.2s;
  }
  .skill-card:hover { background: var(--bg3); }

  .skill-category {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
  }

  .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .tag {
    font-family: var(--mono);
    font-size: 12px;
    padding: 4px 10px;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: 3px;
    color: var(--muted);
    transition: all 0.2s;
  }
  .tag:hover { border-color: var(--accent); color: var(--accent); }

  /* ── PROJECTS ── */
  .projects-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  .project-item {
    padding: 1.8rem 2rem;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: start;
    transition: background 0.2s;
  }
  .project-item:last-child { border-bottom: none; }
  .project-item:hover { background: var(--bg2); }

  .project-number {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
  }

  .project-name {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
  }

  .project-desc {
    font-size: 14px;
    color: var(--muted);
    font-weight: 300;
    max-width: 540px;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .tech-badge {
    font-family: var(--mono);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(163, 230, 53, 0.08);
    color: var(--accent);
    border: 1px solid rgba(163, 230, 53, 0.2);
  }

  .project-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
  }

  .project-link {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    white-space: nowrap;
  }
  .project-link:hover { color: var(--accent); }
  .project-link svg { flex-shrink: 0; }
  .project-link.is-disabled {
    opacity: 0.7;
    cursor: default;
  }
  .project-link.is-disabled:hover {
    color: var(--accent);
    opacity: 1;
  }

  /* ── EXPERIENCE ── */
  .exp-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
  }

  .exp-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
  }
  .exp-item:last-child { border-bottom: none; }

  .exp-date {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    padding-top: 3px;
    line-height: 1.5;
  }

  .exp-role {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 2px;
  }
  .exp-company {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 0.8rem;
  }
  .exp-desc {
    font-size: 14px;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.7;
  }
  .exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.9rem;
  }

  /* ── CONTACT ── */
  .contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }

  .contact-text,
  .contact-links {
    align-self: start;
  }

  .contact-text p {
    color: var(--muted);
    font-weight: 300;
    font-size: 1.05rem;
    margin-bottom: 2rem;
  }

  .contact-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0;
  }

  .contact-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background 0.2s;
  }
  .contact-link-row:last-child { border-bottom: none; }
  .contact-link-row:hover { background: var(--bg2); }

  .contact-link-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .contact-link-icon {
    width: 32px;
    height: 32px;
    background: var(--bg3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .contact-link-name {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text);
  }
  .contact-link-handle {
    font-size: 12px;
    color: var(--muted);
  }
  .contact-arrow {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 14px;
    transition: color 0.2s, transform 0.2s;
  }
  .contact-link-row:hover .contact-arrow { color: var(--accent); transform: translateX(3px); }

  /* ── FOOTER ── */
  footer {
    border-top: 1px solid var(--border);
    padding: 2rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
  }
  .footer-text {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
  }
  .footer-text span { color: var(--accent); }

  /* ── DIVIDER ── */
  .section-divider {
    max-width: 860px;
    margin: 0 auto;
    height: 1px;
    background: var(--border);
  }

  /* ── SCROLL REVEAL ── */
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 640px) {
    nav {
      position: sticky;
      padding: 1rem 1.5rem;
      flex-wrap: wrap;
      flex-direction: row;
      align-items: center;
      row-gap: 0.75rem;
      transition: transform 0.25s ease;
      will-change: transform;
    }
    .nav-hidden { transform: translateY(-100%); }
    .nav-logo { font-size: 12px; }
    .nav-actions {
      position: absolute;
      top: 0.65rem;
      right: 1.5rem;
      flex-wrap: nowrap;
      justify-content: flex-end;
      gap: 0.5rem;
      flex: none;
      margin-left: 0;
    }
    nav ul {
      flex-basis: 100%;
      order: 3;
      gap: 0.75rem 1.1rem;
      flex-wrap: wrap;
      padding: 0;
      margin: 0;
    }
    .theme-toggle,
    .lang-toggle {
      padding: 0.35rem 0.7rem;
    }
    section { padding: 5rem 1.5rem; }
    .hero { padding-top: clamp(1.5rem, 6vh, 3rem); }
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .contact-inner { grid-template-columns: 1fr; }
    .project-item { grid-template-columns: 1fr; }
    .project-links { flex-direction: row; align-items: flex-start; }
    .exp-item { grid-template-columns: 1fr; gap: 0.5rem; }
    footer { flex-direction: column; gap: 0.5rem; text-align: center; }
    .detail-row {
      display: grid;
      grid-template-columns: 1fr 1.2fr;
      align-items: start;
      column-gap: 1rem;
    }
    .detail-val { text-align: right; }
    .hero-links {
      margin-top: 2rem;
      flex-direction: column;
      gap: 0.75rem;
      width: 100%;
    }
    .hero-links .btn {
      width: 100%;
      justify-content: center;
    }
    .blog {
      padding-top: 6rem;
    }
    .blog-post {
      padding-top: 6rem;
    }
    .blog-actions {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      padding: 0.9rem 1.5rem;
      background: var(--nav-bg);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      justify-content: flex-start;
      flex-wrap: nowrap;
      gap: 0.6rem;
      transition: transform 0.25s ease;
      will-change: transform;
    }
  .blog-actions .btn,
  .blog-actions .theme-toggle,
  .blog-actions .lang-toggle {
    padding: 0.35rem 0.7rem;
    font-size: 11px;
    white-space: nowrap;
  }
    @media (max-width: 420px) {
      .blog-actions .label-full { display: none; }
      .blog-actions .label-short { display: inline; }
    }
  }
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: 1.5rem;
  }

  .theme-toggle,
  .lang-toggle {
    border: 1px solid var(--border2);
    background: transparent;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, transform 0.2s;
  }
  .theme-toggle:hover,
  .lang-toggle:hover {
    color: var(--text);
    border-color: var(--text);
    transform: translateY(-1px);
  }
  .theme-toggle:focus-visible,
  .lang-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
