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

    :root {
      --bg: #000000;
      --bg-card: #1a1a1a;
      --border: #2a2a2a;
      --text-primary: #e8e8e8;
      --text-secondary: #888888;
      --accent: #888888;
      --accent-name: #888;
      --btn-bg: #1e1e1e;
      --btn-border: #333;
    }

    html { scroll-behavior: smooth; }

    body {
      background: var(--bg);
      color: var(--text-primary);
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
      font-size: 16px;
      line-height: 1.6;
      min-height: 100vh;
    }

    /* Layout */
    .container {
      max-width: 100%;
      padding: 0 4rem;
    }

    /* ── Hero ── */
    .hero {
      padding: 5rem 0 4rem;
    }

    .eyebrow {
      font-size: 0.7rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--text-secondary);
      margin-bottom: 1.5rem;
    }

    .hero-heading {
      font-size: clamp(2.8rem, 6vw, 4.5rem);
      font-weight: 700;
      line-height: 1.05;
      letter-spacing: -0.02em;
      color: var(--text-primary);
      margin-bottom: 1.5rem;
    }

    .hero-heading .name {
      color: #4ade80;
      font-weight: 700;
      font-family: 'JetBrains Mono', 'Fira Mono', 'Courier New', monospace;
      position: relative;
      display: inline-block;
    }

    @keyframes typing {
      0%   { width: 0; }
      30%  { width: 7ch; }
      70%  { width: 7ch; }
      95%  { width: 0; }
      100% { width: 0; }
    }

    @keyframes caret {
      0%, 100% { border-color: #4ade80; }
      50%      { border-color: transparent; }
    }

    .typewriter {
      display: inline-block;
      overflow: hidden;
      white-space: nowrap;
      width: 0;
      border-right: 3px solid #4ade80;
      animation:
        typing 3.5s steps(7, end) infinite,
        caret  0.7s step-end infinite;
      vertical-align: bottom;
      text-shadow: none;
    }

    .hero-sub {
      font-size: 1rem;
      color: var(--text-secondary);
      max-width: 520px;
      line-height: 1.65;
      margin-bottom: 2.5rem;
    }

    /* Social buttons */
    .social-links {
      display: flex;
      gap: 0.6rem;
      flex-wrap: wrap;
    }

    .social-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 42px;
      height: 42px;
      border-radius: 10px;
      background: var(--btn-bg);
      border: 1px solid var(--btn-border);
      color: var(--text-secondary);
      text-decoration: none;
      transition: border-color 0.2s, color 0.2s;
    }

    .social-btn:hover {
      border-color: #555;
      color: var(--text-primary);
    }

    /* Colores de marca en hover */
    .social-btn.btn-github:hover   { background: #000000; border-color: #6e7681; color: #fff; }
    .social-btn.btn-linkedin:hover { background: #0a66c2; border-color: #0a66c2; color: #fff; }
    .social-btn.btn-x:hover        { background: #000;    border-color: #555;    color: #fff; }
    .social-btn.btn-email:hover    { background: #ea4335; border-color: #ea4335; color: #fff; }

    .social-btn svg {
      width: 17px;
      height: 17px;
      fill: currentColor;
    }

    /* ── Sections ── */
    section {
      padding: 4rem 0;
    }

    .section-title {
      font-size: 1.15rem;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 1.25rem;
    }

    .section-body {
      font-size: 0.97rem;
      color: var(--text-secondary);
      max-width: 560px;
      line-height: 1.75;
    }

    /* ── Projects ── */
    .projects-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5rem;
      margin-top: 1.5rem;
    }

    .project-item {
      position: relative;
      display: grid;
    }

    .project-card {
      position: relative;
      display: flex;
      flex-direction: column;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1.4rem 1.4rem 1.2rem;
      transition: border-color 0.2s;
    }

    .project-card:hover {
      border-color: #3a3a3a;
    }

    a.project-card {
      color: inherit;
      text-decoration: none;
    }

    a.project-card:hover .project-title,
    a.project-card:focus-visible .project-title {
      text-decoration: underline;
      text-underline-offset: 0.2em;
    }

    a.project-card:focus-visible {
      outline: 2px solid var(--text-secondary);
      outline-offset: 3px;
    }

    .project-favorite {
      position: absolute;
      top: 1rem;
      right: 1rem;
    }

    .project-title {
      padding-right: 2.5rem;
      font-size: 0.97rem;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 0.55rem;
    }

    .project-desc {
      font-size: 0.875rem;
      color: var(--text-secondary);
      line-height: 1.6;
      margin-bottom: 1rem;
    }

    /* ── Skills ── */
    .skills-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.5rem;
      margin-top: 1.5rem;
    }

    .skills-category {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1.4rem;
      transition: border-color 0.2s;
    }

    .skills-category:hover { border-color: #3a3a3a; }

    .skills-category-title {
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--text-secondary);
      margin-bottom: 1rem;
    }

    .skill-list {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .skill-item {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-size: 0.875rem;
      color: var(--text-primary);
    }

    .skill-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #4ade80;
      flex-shrink: 0;
    }

    /* ── CV Button ── */
    .cv-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      margin-top: 1.5rem;
      padding: 0.6rem 1.2rem;
      border-radius: 8px;
      background: rgba(74, 222, 128, 0.12);
      border: 1px solid #4ade80;
      color: #4ade80;
      font-size: 0.875rem;
      font-weight: 500;
      text-decoration: none;
      transition: background 0.2s, border-color 0.2s, color 0.2s;
    }

    .cv-btn:hover {
      background: #4ade80;
      border-color: #4ade80;
      color: #0b1410;
    }

    .cv-btn svg {
      width: 15px;
      height: 15px;
      fill: currentColor;
    }

    /* ── Divider ── */
    .divider {
      border: none;
      border-top: 1px solid var(--border);
    }

    /* ── Contact ── */
    .contact-sub {
      font-size: 0.92rem;
      color: var(--text-secondary);
      margin-bottom: 1.5rem;
    }

    /* ── Contacto row ── */
    .contacto-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 2rem;
      flex-wrap: wrap;
    }

    .btn-icon {
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 8px;
      border-radius: 8px;
      color: var(--text-secondary);
      transition: all 0.2s ease;
      display: flex; align-items: center; justify-content: center;
    }

    .btn-icon:not(:disabled):hover {
      background: rgba(255,255,255,0.1);
      color: #fff;
      transform: translateY(-2px);
    }

    .icon { width: 20px; height: 20px; fill: currentColor; }

    .btn-icon:not(:disabled):hover .icon.star {
      color: #fbbf24;
      filter: drop-shadow(0 0 6px rgba(251,191,36,0.5));
    }

    .badge-symbols { position: absolute; }

    .project-technologies {
      display: flex;
      flex-wrap: wrap;
      gap: 0.65rem;
      margin-top: auto;
      padding-top: 0.9rem;
    }

    .project-tech {
      display: grid;
      width: 16px;
      height: 18px;
      place-items: center;
    }

    .project-tech-icon {
      display: block;
      width: 14px;
      height: 14px;
    }

    /* ── Hero + Sobre mí en dos columnas ── */
    .hero-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4rem;
      align-items: start;
      padding: 5rem 0 4rem;
    }

    /* En móvil vuelven a apilarse */
    @media (max-width: 700px) {
      .hero-row { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 0 3rem; }
    }

    /* ── Responsive ── */
    @media (max-width: 600px) {
      .hero { padding: 3.5rem 0 3rem; }
      section { padding: 3rem 0; }
      .projects-grid { grid-template-columns: 1fr; }
    }

    @media (prefers-reduced-motion: reduce) {
      * { transition: none !important; }
    }

    .project-favorite:disabled {
      opacity: 0.45;
      cursor: default;
    }

    .project-favorite.is-opening .star {
      color: #f7df1e;
      filter: drop-shadow(0 0 7px rgb(247 223 30 / 0.55));
    }

    @media (prefers-reduced-motion: no-preference) {
      .project-favorite.is-opening .star {
        animation: star-pop 0.45s ease-out;
      }

      @keyframes star-pop {
        40% { transform: scale(1.38) rotate(-12deg); }
        72% { transform: scale(0.93) rotate(4deg); }
      }
    }
