/* ===== CSS RESET & VARIABLES ===== */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      color-scheme: dark;
      --bg:               #09090b;
      --bg-soft:          #0d0d10;
      --bg-card:          #18181b;
      --bg-card2:         #27272a;
      --border:           #3f3f46;
      --accent:           #6366f1;
      --accent-glow:      #6366f155;
      --accent2:          #22d3ee;
      --text:             #fafafa;
      --text-muted:       #a1a1aa;
      --text-dim:         #71717a;
      --nav-bg:           rgba(9,9,11,0.75);
      --mobile-nav-bg:    rgba(9,9,11,0.97);
      --badge-green-bg:   #14532d;
      --badge-green-text: #4ade80;
      --badge-blue-bg:    #1e3a5f;
      --badge-blue-text:  #60a5fa;
      --radius:           6px;
      --radius-lg:        8px;
      --transition:       0.25s cubic-bezier(0.4, 0, 0.2, 1);
      --shadow:           0 4px 32px rgba(0,0,0,0.5);
    }

    [data-theme="light"] {
      color-scheme: light;
      --bg:               #f4f6fb;
      --bg-soft:          #e9edf6;
      --bg-card:          #ffffff;
      --bg-card2:         #dde5f3;
      --border:           #c5cfdf;
      --accent:           #3557cf;
      --accent-glow:      #3557cf33;
      --accent2:          #0f766e;
      --text:             #0f172a;
      --text-muted:       #475569;
      --text-dim:         #64748b;
      --nav-bg:           rgba(244,246,251,0.85);
      --mobile-nav-bg:    rgba(244,246,251,0.97);
      --badge-green-bg:   #dcfce7;
      --badge-green-text: #166534;
      --badge-blue-bg:    #dbeafe;
      --badge-blue-text:  #1d4ed8;
      --shadow:           0 8px 28px rgba(15,23,42,0.14);
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.65;
      overflow-x: hidden;
      transition: background-color var(--transition), color var(--transition);
    }

    /* ===== SCROLLBAR ===== */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--bg); }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

    /* ===== TYPOGRAPHY ===== */
    h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
    a { color: inherit; text-decoration: none; }

    /* ===== LAYOUT ===== */
    .container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
    section { padding: 96px 0; }

    /* ===== BACKGROUND GRID ===== */
    .bg-grid {
      display: none;
    }
    [data-theme="light"] .bg-grid { display: none; }

    /* ===== NAV ===== */
    nav {
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      backdrop-filter: blur(20px);
      background: var(--nav-bg);
      border-bottom: 1px solid var(--border);
    }
    .nav-inner {
      display: flex; align-items: center;
      height: 64px; max-width: 1100px; margin: 0 auto; padding: 0 24px;
    }
    .nav-logo {
      font-family: 'JetBrains Mono', monospace;
      font-size: 1.05rem; color: var(--accent); font-weight: 500;
    }
    .nav-links { display: flex; gap: 32px; list-style: none; margin-left: auto; margin-right: 16px; }
    .nav-links a {
      font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
      transition: color var(--transition);
    }
    .nav-links a:hover { color: var(--text); }
    .nav-links a.active { color: var(--text); }
    .nav-cta {
      padding: 8px 20px; border-radius: 8px;
      background: var(--accent); color: #fff !important;
      font-size: 0.875rem; font-weight: 600;
      transition: opacity var(--transition);
    }
    .nav-cta:hover { opacity: 0.85; }
    .theme-toggle {
      width: 40px; height: 40px;
      display: inline-flex; align-items: center; justify-content: center;
      background: var(--bg-card); color: var(--text);
      border: 1px solid var(--border); border-radius: 10px;
      margin-right: 12px; cursor: pointer; transition: all var(--transition);
    }
    .theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
    .theme-toggle:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
    .theme-toggle i { font-size: 0.9rem; }
    .hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
    .hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

    /* ===== HERO ===== */
    #hero {
      min-height: 100vh; display: flex; align-items: center;
      padding-top: 64px; position: relative; overflow: hidden;
    }
    .hero-glow {
      display: none;
    }
    .hero-inner {
      display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 60px; width: 100%;
    }
    .hero-content { min-width: 0; }
    .hero-badge {
      display: inline-flex; align-items: center; gap: 8px;
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: 100px; padding: 6px 16px;
      font-size: 0.8rem; color: var(--text-muted); margin-bottom: 24px;
    }
    .hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: pulse 2s infinite; }
    @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.9)} }

    h1.hero-title { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 12px; }
    .hero-title .hero-last-name {
      color: var(--accent);
      display: inline-block;
    }
    .hero-title.name-transitioning .hero-last-name {
      animation: surname-float 0.95s ease-in-out infinite;
    }
    @keyframes surname-float {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-4px); }
    }
    .hero-title .hero-first-name {
      display: inline-block;
      transition: color 0.3s ease;
    }
    .hero-title .hero-first-name.name-cursor {
      border-right: 2px solid var(--accent2);
      padding-right: 3px;
      animation: blink-caret 0.75s steps(1) infinite;
    }
    @keyframes blink-caret {
      0%, 48% { border-right-color: var(--accent2); }
      49%, 100% { border-right-color: transparent; }
    }
    .hero-sub {
      font-size: clamp(1.05rem, 2.5vw, 1.3rem); color: var(--text-muted);
      font-weight: 400; margin-bottom: 28px; max-width: 560px;
    }
    .hero-location {
      margin: -18px 0 28px;
      font-size: 0.9rem;
      color: var(--text-muted);
      font-weight: 500;
    }
    .hero-desc { color: var(--text-muted); max-width: 520px; margin-bottom: 40px; font-size: 0.95rem; }
    .hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
    .btn {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 12px 28px; border-radius: 6px; font-weight: 600;
      font-size: 0.9rem; transition: all var(--transition); cursor: pointer; border: none;
    }
    .btn-primary { background: var(--accent); color: #fff; }
    .btn-primary:hover { background: #4f52e8; transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }
    .btn-outline {
      background: transparent; color: var(--text);
      border: 1px solid var(--border);
    }
    .btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

    .hero-avatar {
      width: 200px; height: 200px; border-radius: 50%;
      position: relative; flex-shrink: 0;
    }
    .hero-avatar-ring {
      position: absolute; inset: -4px; border-radius: 50%;
      background: transparent; border: 2px solid var(--border);
      animation: none;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .hero-avatar-inner {
      position: absolute; inset: 4px; border-radius: 50%;
      background: var(--bg-card);
      display: flex; align-items: center; justify-content: center;
      overflow: hidden;
    }
    .hero-avatar-inner img { width: 100%; height: 100%; object-fit: cover; display: none; }
    .avatar-initials {
      position: absolute; inset: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 3.5rem; font-weight: 800; color: var(--accent);
      font-family: 'JetBrains Mono', monospace;
      line-height: 1;
    }

    .hero-stats {
      display: flex; gap: 40px; margin-top: 48px;
      padding-top: 32px; border-top: 1px solid var(--border);
    }
    .hero-stats > div { min-width: 110px; }
    .stat-num { font-size: 2rem; font-weight: 800; color: var(--accent); }
    .stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

    /* ===== SECTION HEADER ===== */
    .section-tag {
      display: inline-block;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.78rem; color: var(--accent); letter-spacing: 0.12em;
      text-transform: uppercase; margin-bottom: 12px;
    }
    .section-title {
      font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 16px;
    }
    .section-desc { color: var(--text-muted); max-width: 540px; font-size: 0.95rem; }
    .section-header { margin-bottom: 56px; }

    /* ===== ABOUT ===== */
    #about { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%); }
    .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
    .about-text p { color: var(--text-muted); margin-bottom: 18px; font-size: 0.95rem; }
    .about-text p strong { color: var(--text); }
    .info-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
    .info-list li { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
    .info-list li i { width: 36px; height: 36px; background: var(--bg-card2); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 0.85rem; flex-shrink: 0; }
    .info-list li span { color: var(--text-muted); }
    .info-list li a { color: var(--accent2); transition: opacity var(--transition); }
    .info-list li a:hover { opacity: 0.75; }

    /* ===== EXPERTISE CARDS ===== */
    .expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .exp-card {
      background: transparent; border: 0; border-top: 1px solid var(--border);
      border-radius: 0; padding: 22px 4px 18px;
      transition: border-color var(--transition); position: relative;
    }
    .exp-card::before { display: none; }
    .exp-card:hover { border-top-color: var(--accent); transform: none; box-shadow: none; }
    .exp-icon {
      display: none;
    }
    .exp-card h3 { font-size: 1rem; margin-bottom: 10px; }
    .exp-card p { font-size: 0.855rem; color: var(--text-muted); line-height: 1.6; }

    /* ===== SKILLS ===== */
    #skills { background: var(--bg-soft); }
    .skills-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
    .skill-group h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 20px; }
    .skill-category-list { border-top: 1px solid var(--border); }
    .skill-category {
      padding: 14px 0;
      border-bottom: 1px solid var(--border);
    }
    .skill-category h4 {
      color: var(--text);
      font-size: 0.82rem;
      margin-bottom: 6px;
      letter-spacing: 0.02em;
    }
    .skill-category p {
      color: var(--text-muted);
      font-size: 0.82rem;
      line-height: 1.7;
    }

    /* ===== EXPERIENCE ===== */
    .timeline { position: relative; padding-left: 28px; }
    .timeline::before {
      content: ''; position: absolute; left: 0; top: 8px; bottom: 0;
      width: 1px; background: linear-gradient(180deg, var(--accent), transparent);
    }
    .tl-item { position: relative; margin-bottom: 48px; }
    .tl-dot {
      position: absolute; left: -33px; top: 6px;
      width: 12px; height: 12px; border-radius: 50%;
      background: var(--accent); border: 2px solid var(--bg);
      box-shadow: none;
    }
    .tl-card {
      background: transparent; border: 0; border-top: 1px solid var(--border);
      border-radius: 0; padding: 20px 0;
      transition: border-color var(--transition);
    }
    .tl-card:hover { border-color: var(--accent); }
    .tl-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
    .tl-company { font-size: 0.78rem; color: var(--accent2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
    .tl-title { font-size: 1.05rem; font-weight: 700; }
    .tl-period {
      font-family: 'JetBrains Mono', monospace; font-size: 0.75rem;
      color: var(--text-muted); background: transparent;
      padding: 0; border-radius: 0; white-space: nowrap;
    }
    .tl-desc { font-size: 0.88rem; color: var(--text-muted); margin-top: 12px; }
    .tl-bullets { display: none; }
    .tl-bullets li { font-size: 0.855rem; color: var(--text-muted); padding-left: 18px; position: relative; }
    .tl-bullets li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }
    .badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 0.72rem; font-weight: 600; }
    .badge-green { background: var(--badge-green-bg); color: var(--badge-green-text); }
    .badge-blue  { background: var(--badge-blue-bg); color: var(--badge-blue-text); }

    /* ===== PROJECTS ===== */
    #projects { background: var(--bg-soft); }
    .projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .proj-card {
      background: transparent; border: 0; border-top: 1px solid var(--border);
      border-radius: 0; padding: 22px 4px 18px;
      display: flex; flex-direction: column; gap: 14px;
      transition: border-color var(--transition);
    }
    .proj-card:hover { border-top-color: var(--accent); transform: none; box-shadow: none; }
    .proj-header { display: flex; justify-content: space-between; align-items: flex-start; }
    .proj-icon { font-size: 1.6rem; }
    .proj-links { display: flex; gap: 10px; }
    .proj-link {
      width: 32px; height: 32px; border-radius: 4px;
      background: transparent; border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      color: var(--text-muted); font-size: 0.8rem;
      transition: all var(--transition);
    }
    .proj-link:hover { border-color: var(--accent); color: var(--accent); }
    .proj-card h3 { font-size: 1rem; }
    .proj-card p { font-size: 0.855rem; color: var(--text-muted); flex: 1; }
    .proj-tags { display: flex; flex-wrap: wrap; gap: 8px; }
    .proj-tag {
      padding: 3px 8px; border-radius: 3px; font-size: 0.75rem;
      background: transparent; color: var(--text-muted); border: 1px solid var(--border);
    }

    /* ===== EDUCATION ===== */
    .edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
    .edu-card {
      background: transparent; border: 0; border-top: 1px solid var(--border);
      border-radius: 0; padding: 22px 4px 18px;
      transition: border-color var(--transition);
    }
    .edu-card:hover { border-color: var(--accent); }
    .edu-icon { font-size: 1.8rem; margin-bottom: 14px; }
    .edu-deg { font-size: 0.78rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
    .edu-card h3 { font-size: 1rem; margin-bottom: 4px; }
    .edu-school { font-size: 0.88rem; color: var(--text-muted); }
    .edu-period { font-size: 0.78rem; color: var(--text-dim); margin-top: 8px; font-family: 'JetBrains Mono', monospace; }
    .edu-note { font-size: 0.83rem; color: var(--text-muted); margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }

    /* ===== CERTIFICATIONS ===== */
    #certifications { background: var(--bg-soft); }
    .cred-group { margin-bottom: 34px; }
    .cred-group:last-child { margin-bottom: 0; }
    .cred-group-title {
      font-size: 0.78rem; color: var(--text-muted);
      text-transform: uppercase; letter-spacing: 0.12em;
      margin-bottom: 10px; padding-bottom: 8px;
      border-bottom: 1px solid var(--border);
    }
    .cert-grid {
      display: block; list-style: none; margin: 0;
      border-top: 1px solid var(--border);
    }
    .cert-card {
      position: relative; display: flex; align-items: flex-start;
      justify-content: space-between; gap: 18px;
      background: transparent; border: 0; border-bottom: 1px solid var(--border);
      border-radius: 0; padding: 16px 0 16px 24px;
      transition: border-color var(--transition);
    }
    .cert-card::before {
      content: '•'; position: absolute; left: 6px; top: 14px;
      color: var(--accent); font-size: 1rem;
    }
    .cert-card:hover { border-bottom-color: var(--accent); transform: none; }
    .cert-content { min-width: 0; }
    .cert-card h3 { font-size: 0.92rem; margin-bottom: 4px; line-height: 1.45; }
    .cert-meta { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
    .cert-link {
      display: inline-flex; align-items: center; gap: 6px;
      flex-shrink: 0; margin-top: 2px; font-size: 0.8rem; font-weight: 600;
      color: var(--accent); transition: opacity var(--transition);
    }
    .cert-link:hover { opacity: 0.75; }

    /* ===== CONTACT ===== */
    .contact-wrapper {
      background: transparent; border: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
      border-radius: 0; padding: 56px 24px;
      text-align: center; position: relative; overflow: hidden;
    }
    .contact-wrapper::before { display: none; }
    .contact-wrapper h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 12px; }
    .contact-wrapper p { color: var(--text-muted); max-width: 480px; margin: 0 auto 36px; font-size: 0.95rem; }
    .contact-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
    .contact-link {
      display: inline-flex; align-items: center; gap: 10px;
      padding: 12px 24px; border-radius: 10px;
      background: var(--bg-card2); border: 1px solid var(--border);
      font-size: 0.9rem; font-weight: 500;
      transition: all var(--transition);
    }
    .contact-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
    .contact-link i { font-size: 1rem; }

    /* ===== FOOTER ===== */
    footer {
      border-top: 1px solid var(--border);
      padding: 32px 0; text-align: center;
      color: var(--text-dim); font-size: 0.83rem;
    }
    footer span { color: var(--accent); }

    /* ===== SCROLL REVEAL ===== */
    .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.65s ease, transform 0.65s ease; }
    .reveal.visible { opacity: 1; transform: none; }

    @media (max-width: 920px) {
      .nav-links { gap: 22px; }
      .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; }
      .hero-avatar { margin: 0 auto; }
      .hero-badge { margin-left: auto; margin-right: auto; }
      .hero-desc, .hero-sub { margin-left: auto; margin-right: auto; max-width: 640px; }
      .hero-actions { justify-content: center; }
      .hero-stats { justify-content: center; flex-wrap: wrap; gap: 24px; }
      .expertise-grid { grid-template-columns: repeat(2, 1fr); }
    }

    /* ===== MOBILE NAV ===== */
    @media (max-width: 768px) {
      .container { padding: 0 20px; }
      section { padding: 76px 0; }
      .nav-inner { padding: 0 20px; }
      .nav-logo { font-size: 0.92rem; }
      .nav-links { display: none; flex-direction: column; gap: 0; position: absolute; top: 64px; left: 0; right: 0; background: var(--mobile-nav-bg); border-bottom: 1px solid var(--border); }
      .nav-links.open { display: flex; }
      .nav-links li { padding: 14px 20px; border-bottom: 1px solid var(--border); }
      .theme-toggle { width: 36px; height: 36px; margin-left: auto; margin-right: 12px; flex-shrink: 0; }
      .hamburger { display: flex; }
      #hero { min-height: auto; padding-top: 96px; padding-bottom: 48px; }
      .hero-glow { width: 520px; height: 380px; top: -130px; }
      .hero-inner { gap: 32px; }
      .hero-avatar { width: 168px; height: 168px; }
      .hero-desc { max-width: 100%; font-size: 0.92rem; margin-bottom: 28px; }
      .hero-actions { justify-content: center; gap: 12px; }
      .hero-stats { justify-content: center; gap: 18px; }
      .section-header { margin-bottom: 36px; }
      .about-grid { grid-template-columns: 1fr; gap: 40px; }
      .expertise-grid { grid-template-columns: 1fr; }
      .skills-wrapper { grid-template-columns: 1fr; }
      .projects-grid { grid-template-columns: 1fr; }
      .edu-grid { grid-template-columns: 1fr; }
      .timeline { padding-left: 22px; }
      .tl-dot { left: -27px; }
      .tl-header { flex-direction: column; align-items: flex-start; }
      .exp-card, .proj-card, .edu-card, .tl-card, .contact-wrapper { padding: 22px 4px; }
      .cert-card { padding: 16px 0 16px 24px; }
      .cert-card { flex-direction: column; gap: 8px; }
      .cert-link { margin-top: 0; }
      .info-list li { align-items: flex-start; }
      .info-list li span,
      .contact-link,
      .tl-title,
      .proj-card h3,
      .edu-card h3,
      .cert-card h3 { overflow-wrap: anywhere; }
      .contact-links { flex-direction: column; align-items: stretch; }
      .contact-link { width: 100%; justify-content: center; }
    }

    @media (max-width: 640px) {
      .container { padding: 0 16px; }
      section { padding: 64px 0; }
      .hero-actions { flex-direction: column; align-items: stretch; }
      .hero-actions .btn { width: 100%; justify-content: center; }
      .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
      }
      .hero-stats > div:last-child { grid-column: 1 / -1; }
      .stat-num { font-size: 1.65rem; }
      .timeline { padding-left: 18px; }
      .tl-dot { left: -23px; }
      .exp-card, .proj-card, .edu-card, .tl-card, .contact-wrapper { padding: 20px 4px; }
      .cert-card { padding: 14px 0 14px 24px; }
    }

    @media (max-width: 420px) {
      .nav-logo { font-size: 0.84rem; }
      .hero-badge { width: 100%; justify-content: center; }
      .hero-avatar { width: 148px; height: 148px; }
      .hero-stats { grid-template-columns: 1fr; }
      .hero-stats > div:last-child { grid-column: auto; }
    }
