:root {
    --orange: #FF7A00;
    --orange-light: #FFB347;
    --orange-dim: #cc6200;
    --bg: #0D0D0D;
    --bg2: #161616;
    --bg3: #1f1f1f;
    --text: #F0E6D3;
    --text-muted: #9a8878;
    --pixel: 4px;
  }

  [data-theme="professional"] {
    --orange: #FF7A00;
    --orange-light: #FFB347;
    --orange-dim: #cc6200;
    --bg: #ffffff;
    --bg2: #f8f8f8;
    --bg3: #eeeeee;
    --text: #1a1a1a;
    --text-muted: #777777;
    --pixel: 1px;
  }

  [data-theme="professional"] body::before {
    display: none;
  }

  [data-theme="professional"] body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    --cursor: auto;
  }

  [data-theme="professional"] .pixel-box {
    border: var(--pixel) solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(45deg, var(--orange), var(--orange-light));
    box-shadow:
      0 0 0 var(--pixel) var(--bg),
      0 0 0 calc(var(--pixel)*2) var(--orange-dim),
      0 2px 8px rgba(0,0,0,0.08);
  }

  [data-theme="professional"] nav {
    border-bottom: 2px solid var(--orange);
    border-image: none;
    padding: 14px 40px;
  }

  [data-theme="professional"] .nav-logo {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    letter-spacing: 0;
    animation: none;
  }

  [data-theme="professional"] .section-title::after {
    height: 2px;
    background: linear-gradient(90deg, var(--orange), transparent);
  }

  [data-theme="professional"] .section-title h2 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 1px;
  }

  [data-theme="professional"] .hero-text p,
  [data-theme="professional"] .about-bio,
  [data-theme="professional"] .contact-intro,
  [data-theme="professional"] .stat-card .stat-label {
    font-family: 'IBM Plex Sans', sans-serif;
  }

  [data-theme="professional"] .label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
  }

  [data-theme="professional"] .hero-text h1 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 36px;
    line-height: 1.3;
    font-weight: 700;
  }

  [data-theme="professional"] .stat-card .stat-num {
    font-size: 32px;
  }

  [data-theme="professional"] .hero-cta,
  [data-theme="professional"] .submit-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    border: 2px solid var(--orange);
    box-shadow: none;
    letter-spacing: 0;
  }

  [data-theme="professional"] .hero-cta:hover {
    background: var(--orange-dim);
    box-shadow: none;
    transform: none;
  }

  [data-theme="professional"] .submit-btn:hover {
    background: var(--orange-dim);
    color: #fff;
    box-shadow: none;
    transform: none;
  }

  [data-theme="professional"] .hero-cta:active,
  [data-theme="professional"] .submit-btn:active {
    transform: none;
    box-shadow: none;
  }

  [data-theme="professional"] .nav-links a {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    letter-spacing: 0;
  }



  [data-theme="professional"] footer {
    border-top: 2px solid var(--orange);
    border-image: none;
  }

  [data-theme="cyber"] {
    --orange: #ff00ff;
    --orange-light: #ff7aff;
    --orange-dim: #9d009d;
    --bg: #1a0033;
    --bg2: #240046;
    --bg3: #3c096c;
    --text: #ff9e00;
    --text-muted: #c77dff;
  }

  [data-theme="cyber-inverted"] {
    --orange: #ff9e00;
    --orange-light: #ffc45d;
    --orange-dim: #cc7e00;
    --bg: #3c096c;
    --bg2: #240046;
    --bg3: #1a0033;
    --text: #ff00ff;
    --text-muted: #ff7aff;
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    line-height: 1.8;
    --cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M0 0h2v2H0V0zm2 2h2v2H2V2zm2 2h2v2H4V4zm2 2h2v2H6V6zm2 2h2v2H8V8zm0-4h2v2H8V4zm0-4h2v2H8V0zm2 4h2v2h-2V4zm2 2h2v2h-2V6zm2 2h2v2h-2V8z' fill='%23FF7A00'/%3E%3C/svg%3E") 0 0, auto;
    overflow-x: hidden;
  }

  /* Scanline overlay */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.06) 2px,
      rgba(0,0,0,0.06) 4px
    );
    pointer-events: none;
    z-index: 9999;
  }

  /* ---- PIXEL BORDER MIXIN ---- */
  .pixel-box {
    image-rendering: pixelated;
    border: var(--pixel) solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(45deg, var(--orange), var(--orange-light));
    box-shadow:
      0 0 0 var(--pixel) var(--bg),
      0 0 0 calc(var(--pixel)*2) var(--orange-dim),
      6px 6px 0 calc(var(--pixel)*2) rgba(255,122,0,0.15);
  }

  /* ---- NAV ---- */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 4px solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(90deg, var(--orange-dim), var(--orange), var(--orange-light));
    padding: 18px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-logo {
    color: var(--orange);
    font-size: 13px;
    letter-spacing: 2px;
    text-decoration: none;
    animation: blink-logo 3s step-end infinite;
  }

  @keyframes blink-logo {
    0%, 90%, 100% { opacity: 1; }
    93% { opacity: 0; }
  }

  .nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
    align-items: center;
  }

  .lang-picker {
    display: flex;
    gap: 12px;
    cursor: pointer;
  }

  .lang-flag {
    font-size: 16px;
    transition: opacity 0.2s;
    image-rendering: auto;
  }

  .theme-switch {
    background: var(--bg3);
    border: 2px solid var(--orange);
    color: var(--orange);
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    padding: 4px 8px;
    cursor: pointer;
    image-rendering: pixelated;
  }

  .nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 8px;
    letter-spacing: 1px;
    transition: color 0.1s;
    position: relative;
  }

  .nav-links a::before {
    content: '> ';
    color: var(--orange);
    opacity: 0;
    transition: opacity 0.1s;
  }

  .nav-links a:hover { color: var(--orange); }
  .nav-links a:hover::before { opacity: 1; }

  /* ---- SECTIONS ---- */
  section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 80px;
  }

  .container {
    max-width: 820px;
    width: 100%;
  }

  /* ---- HERO ---- */
  #hero {
    position: relative;
    overflow: hidden;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 60px;
    align-items: center;
  }

  /* Pixel character */
  .pixel-avatar {
    width: 128px;
    height: 128px;
    image-rendering: pixelated;
    flex-shrink: 0;
    animation: float 2s step-end infinite;
  }

  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
  }

  .hero-text .label {
    color: var(--orange);
    font-size: 8px;
    letter-spacing: 3px;
    margin-bottom: 20px;
    display: block;
  }

  .hero-text h1 {
    font-size: 22px;
    line-height: 1.5;
    margin-bottom: 24px;
    color: var(--text);
  }

  .hero-text h1 span {
    color: var(--orange);
  }

  .hero-text p {
    font-family: 'VT323', monospace;
    font-size: 22px;
    color: var(--text-muted);
    margin-bottom: 36px;
    line-height: 1.6;
  }

  .hero-cta {
    display: inline-block;
    background: var(--orange);
    color: var(--bg);
    padding: 14px 28px;
    text-decoration: none;
    font-size: 9px;
    letter-spacing: 1px;
    border: 4px solid var(--orange-dim);
    box-shadow: 4px 4px 0 var(--orange-dim);
    transition: all 0.05s;
    image-rendering: pixelated;
  }

  .hero-cta:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--orange-dim);
  }

  .hero-cta:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--orange-dim);
  }

  /* floating pixel decorations */
  .pixel-deco {
    position: absolute;
    opacity: 0.12;
    image-rendering: pixelated;
  }

  .deco-1 { top: 15%; right: 5%; width: 48px; height: 48px; background: var(--orange); animation: drift1 6s step-end infinite; }
  .deco-2 { top: 60%; right: 15%; width: 16px; height: 16px; background: var(--orange-light); animation: drift2 4s step-end infinite; }
  .deco-3 { bottom: 20%; left: 5%; width: 32px; height: 32px; background: var(--orange); animation: drift1 8s step-end infinite reverse; }

  @keyframes drift1 {
    0%,100% { transform: translate(0,0); }
    25% { transform: translate(8px, -8px); }
    50% { transform: translate(0px, -16px); }
    75% { transform: translate(-8px, -8px); }
  }

  @keyframes drift2 {
    0%,100% { transform: translate(0,0) rotate(0deg); }
    50% { transform: translate(8px,-8px) rotate(90deg); }
  }

  /* ---- ABOUT ---- */
  #about { background: var(--bg2); }

  .section-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
  }

  .section-title h2 {
    font-size: 14px;
    color: var(--orange);
  }

  .section-title::after {
    content: '';
    flex: 1;
    height: 4px;
    background: repeating-linear-gradient(90deg, var(--orange) 0, var(--orange) 8px, transparent 8px, transparent 16px);
  }

  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .stat-card {
    background: var(--bg3);
    padding: 28px;
    position: relative;
  }

  .stat-card .stat-num {
    font-size: 28px;
    color: var(--orange);
    display: block;
    margin-bottom: 10px;
  }

  .stat-card .stat-label {
    font-family: 'VT323', monospace;
    font-size: 20px;
    color: var(--text-muted);
    letter-spacing: 1px;
  }

  .about-bio {
    font-family: 'VT323', monospace;
    font-size: 22px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 32px;
  }

  .skills-sidebar {
    position: fixed;
    right: 12px;
    top: 80px;
    bottom: 40px;
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 10px;
    z-index: 50;
    overflow-y: hidden;
    pointer-events: none;
  }

  .skill-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .skill-header {
    font-size: 6px;
    color: var(--orange-dim);
    border-bottom: 1px solid var(--orange-dim);
    margin-bottom: 4px;
    padding-bottom: 2px;
    letter-spacing: 1px;
    opacity: 0.8;
  }

  .skill-group:nth-child(even) .tag {
    border-color: var(--text-muted);
    color: var(--text-muted);
    background: rgba(154,136,120,0.05);
  }

  .skill-group:nth-child(even) .skill-header {
    color: var(--text-muted);
    border-color: var(--text-muted);
  }

  .tag {
    font-size: 7px;
    padding: 6px 10px;
    border: 2px solid var(--orange-dim);
    color: var(--orange-light);
    letter-spacing: 1px;
    background: var(--bg);
    transition: all 0.1s;
    white-space: nowrap;
    width: fit-content;
    pointer-events: auto;
  }

  .tag:hover {
    background: rgba(255,122,0,0.15);
    border-color: var(--orange);
    transform: scale(1.05);
  }

  @media (max-width: 1100px) {
    .skills-sidebar { display: none !important; }
    #mobileSkills { display: flex !important; min-height: auto; padding: 60px 24px; }
  }

  #mobileSkills {
    display: none;
    background: var(--bg2);
    width: 100%;
  }

  .mobile-skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .mobile-skill-header {
    font-size: 8px;
    color: var(--orange);
    margin-bottom: 12px;
    border-bottom: 2px solid var(--bg3);
    padding-bottom: 4px;
  }

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

  .mobile-skill-tags .tag {
    margin: 0;
  }

  /* ---- CONTACT ---- */
  #contact { background: var(--bg); }

  .contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
  }

  .contact-intro {
    font-family: 'VT323', monospace;
    font-size: 22px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 32px;
  }

  .contact-link {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 8px;
    padding: 16px 0;
    border-bottom: 2px solid var(--bg3);
    transition: all 0.1s;
  }

  .contact-link:hover { color: var(--orange); padding-left: 8px; }

  .contact-link .icon {
    width: 24px;
    height: 24px;
    background: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--bg);
    flex-shrink: 0;
    image-rendering: pixelated;
  }

  /* Pixel form */
  .pixel-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .form-group label {
    display: block;
    font-size: 7px;
    color: var(--orange);
    letter-spacing: 2px;
    margin-bottom: 10px;
  }

  .form-group input,
  .form-group textarea {
    width: 100%;
    background: var(--bg3);
    border: none;
    border-left: 4px solid var(--orange);
    color: var(--text);
    font-family: 'VT323', monospace;
    font-size: 20px;
    padding: 14px 18px;
    outline: none;
    transition: border-left-color 0.1s, background 0.1s;
  }

  .form-group textarea { height: 120px; resize: none; }

  .form-group input:focus,
  .form-group textarea:focus {
    background: #252525;
    border-left-color: var(--orange-light);
  }

  .form-group input::placeholder,
  .form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
  }

  .submit-btn {
    width: 100%;
    background: transparent;
    border: 4px solid var(--orange);
    color: var(--orange);
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    padding: 16px;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.05s;
    box-shadow: 4px 4px 0 var(--orange-dim);
    image-rendering: pixelated;
  }

  .submit-btn:hover {
    background: var(--orange);
    color: var(--bg);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--orange-dim);
  }

  .submit-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--orange-dim);
  }

  /* ---- FOOTER ---- */
  footer {
    background: var(--bg2);
    border-top: 4px solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(90deg, var(--orange-light), var(--orange-dim));
    text-align: center;
    padding: 48px 32px;
    font-size: 7px;
    color: var(--text-muted);
    letter-spacing: 2px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .footer-info {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 8px;
  }

  .footer-info a {
    color: var(--orange);
    text-decoration: none;
  }

  .footer-info a:hover {
    text-decoration: underline;
  }

  footer span { color: var(--orange); }

  /* ---- SCROLL INDICATOR ---- */
  .scroll-line {
    position: fixed;
    top: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--orange-dim), var(--orange-light));
    z-index: 200;
    transition: width 0.1s;
    image-rendering: pixelated;
  }

  /* ---- TOAST ---- */
  .toast {
    position: fixed;
    bottom: 32px; right: 32px;
    background: var(--bg3);
    border: 4px solid var(--orange);
    padding: 20px 28px;
    font-size: 8px;
    color: var(--orange);
    z-index: 999;
    box-shadow: 6px 6px 0 var(--orange-dim);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.2s;
    pointer-events: none;
  }

  .toast.show {
    opacity: 1;
    transform: translateY(0);
  }

  /* ---- RESPONSIVE ---- */
  @media (max-width: 700px) {
    nav { padding: 14px 20px; }
    .nav-links { gap: 16px; }
    .nav-links a { font-size: 6px; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 32px; }
    .pixel-avatar { margin: 0 auto; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-wrap { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 15px; }
    section { padding: 100px 24px 60px; }
  }
