 /* ══════════════════════════════════════
       TOKENS
    ══════════════════════════════════════ */

:root { --html: #e34c26; --css: #663399; --js: #ffd343; }
    [data-theme="light"] {
      --bg: #fafafa; --bg2: #f0f0f2; --surface: #ffffff;
      --text: #212129; --text-muted: #666677; --border: rgba(33,33,41,0.12);
    }
    [data-theme="dark"] {
      --bg: #212129; --bg2: #18181f; --surface: #2c2c38;
      --text: #fafafa; --text-muted: #aaaacc; --border: rgba(250,250,250,0.10);
    }

    /* ══════════════════════════════════════
       RESET + BASE
    ══════════════════════════════════════ */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      font-family: Helvetica, Arial, sans-serif;
      background: var(--bg); color: var(--text);
      transition: background 0.3s, color 0.3s; overflow-x: hidden;
    }
    body::before {
      content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.025;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
      background-size: 180px;
    }

    /* ══════════════════════════════════════
       NAV — mobile-first
    ══════════════════════════════════════ */
    nav {
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      display: flex; align-items: center; justify-content: space-between;
      padding: 0.85rem 1.1rem;
      background: var(--bg); border-bottom: 1px solid var(--border);
      backdrop-filter: blur(12px); transition: background 0.3s;
    }
    @media (min-width: 700px) { nav { padding: 1rem 2.5rem; } }

    .nav-logo {
      font-family: 'Montserrat', sans-serif; font-weight: 900;
      font-size: 1.1rem; letter-spacing: 0.08em;
      color: var(--text); text-decoration: none;
      display: flex; align-items: center; gap: 0.45rem;
    }
    @media (min-width: 700px) { .nav-logo { font-size: 1.25rem; } }
    .nav-logo img.logo-img {
      height: 32px; width: 32px; object-fit: contain; border-radius: 50%; display: block;
    }
    .nav-logo .bars { display: none; align-items: flex-end; gap: 3px; height: 18px; }
    .nav-logo .bars span { width: 4px; border-radius: 2px 2px 0 0; display: block; }
    .nav-logo .bars span:nth-child(1) { height: 9px;  background: var(--html); }
    .nav-logo .bars span:nth-child(2) { height: 13px; background: var(--css); }
    .nav-logo .bars span:nth-child(3) { height: 18px; background: var(--js); }

    .nav-links { display: none; gap: 2rem; list-style: none; }
    @media (min-width: 700px) { .nav-links { display: flex; } }
    .nav-links a {
      font-family: 'Space Mono', monospace; font-size: 0.75rem;
      color: var(--text-muted); text-decoration: none;
      letter-spacing: 0.05em; transition: color 0.2s;
    }
    .nav-links a:hover { color: var(--text); }

    .nav-right { display: flex; align-items: center; gap: 0.6rem; }

    .theme-toggle {
      background: none; border: 1px solid var(--border); border-radius: 999px;
      padding: 0.3rem 0.65rem; cursor: pointer;
      font-family: 'Space Mono', monospace; font-size: 0.68rem;
      color: var(--text-muted); transition: all 0.2s;
    }
    .theme-toggle:hover { color: var(--text); border-color: var(--text-muted); }

    .hamburger {
      display: flex; flex-direction: column; justify-content: center; gap: 5px;
      width: 36px; height: 36px; background: none;
      border: 1px solid var(--border); border-radius: 4px;
      cursor: pointer; padding: 7px 8px; transition: border-color 0.2s;
    }
    @media (min-width: 700px) { .hamburger { display: none; } }
    .hamburger:hover { border-color: var(--text-muted); }
    .hamburger span {
      display: block; height: 1.5px; background: var(--text);
      border-radius: 2px; transition: transform 0.3s, opacity 0.3s; transform-origin: center;
    }
    .hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

    .mobile-menu {
      display: flex; flex-direction: column; gap: 0;
      position: fixed; top: 55px; left: 0; right: 0; z-index: 99;
      background: var(--bg); border-bottom: 1px solid var(--border);
      padding: 1rem 1.1rem 1.25rem;
      transform: translateY(-8px); opacity: 0; pointer-events: none;
      transition: transform 0.25s ease, opacity 0.25s ease;
    }
    @media (min-width: 700px) { .mobile-menu { display: none !important; } }
    .mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: all; }
    .mobile-menu a {
      font-family: 'Space Mono', monospace; font-size: 0.8rem;
      color: var(--text-muted); text-decoration: none;
      padding: 0.75rem 0; border-bottom: 1px solid var(--border);
      letter-spacing: 0.05em; transition: color 0.2s;
    }
    .mobile-menu a:last-child { border-bottom: none; }
    .mobile-menu a:hover { color: var(--text); }

    /* ══════════════════════════════════════
       HERO — mobile-first
    ══════════════════════════════════════ */
    .hero {
      min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
      padding: 5.5rem 1.1rem 3rem; position: relative; overflow: hidden;
    }
    @media (min-width: 700px) { .hero { padding: 7rem 2.5rem 4rem; } }

    .hero-bg-text {
      position: absolute; top: 50%; left: -0.05em; transform: translateY(-50%);
      font-family: 'Montserrat', sans-serif; font-weight: 900;
      font-size: clamp(6rem, 28vw, 22rem);
      color: transparent; -webkit-text-stroke: 1px var(--border);
      pointer-events: none; user-select: none; white-space: nowrap; z-index: 0;
    }
    .hero-content { position: relative; z-index: 1; max-width: 820px; }

    .hero-logo-wrap {
      display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem;
    }
    @media (min-width: 700px) { .hero-logo-wrap { gap: 1rem; margin-bottom: 2rem; } }
    .hero-logo-wrap img {
      height: 52px; width: 52px; object-fit: contain; border-radius: 50%;
    }
    @media (min-width: 700px) { .hero-logo-wrap img { height: 64px; width: 64px; } }
    .hero-logo-bars { display: flex; align-items: flex-end; gap: 4px; height: 26px; }
    .hero-logo-bars span { width: 6px; border-radius: 3px 3px 0 0; display: block; }
    .hero-logo-bars span:nth-child(1) { height: 11px; background: var(--html); }
    .hero-logo-bars span:nth-child(2) { height: 18px; background: var(--css); }
    .hero-logo-bars span:nth-child(3) { height: 26px; background: var(--js); }
    .hero-logo-name {
      font-family: 'Montserrat', sans-serif; font-weight: 900;
      font-size: 1.2rem; letter-spacing: 0.08em; color: var(--text);
    }
    .hero-logo-name small {
      display: block; font-family: 'Space Mono', monospace;
      font-size: 0.55rem; font-weight: 400; letter-spacing: 0.2em;
      color: var(--text-muted); margin-top: 2px;
    }

    .hero-tag {
      font-family: 'Space Mono', monospace; font-size: 0.7rem;
      color: var(--html); letter-spacing: 0.12em; text-transform: uppercase;
      margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem;
    }
    .hero-tag::before {
      content: ''; width: 1.5rem; height: 1px;
      background: var(--html); display: inline-block; flex-shrink: 0;
    }
    @media (min-width: 700px) {
      .hero-tag { font-size: 0.75rem; margin-bottom: 1.2rem; }
      .hero-tag::before { width: 2rem; }
    }

    h1 {
      font-family: 'Montserrat', sans-serif; font-weight: 900;
      font-size: clamp(2.4rem, 10vw, 6rem);
      line-height: 1.0; letter-spacing: -0.02em; margin-bottom: 1.25rem;
    }
    @media (min-width: 700px) { h1 { margin-bottom: 1.5rem; } }
    h1 .accent-html { color: var(--html); }
    h1 .accent-css  { color: var(--css); }
    h1 .accent-js   { color: var(--js); }

    .hero-description {
      font-size: 0.95rem; line-height: 1.7;
      color: var(--text-muted); margin-bottom: 2rem;
    }
    @media (min-width: 700px) {
      .hero-description { font-size: 1.1rem; max-width: 520px; margin-bottom: 2.5rem; }
    }

    .hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }

    .btn-primary {
      font-family: 'Space Mono', monospace; font-size: 0.78rem;
      letter-spacing: 0.05em; padding: 0.8rem 1.4rem;
      border-radius: 4px; background: var(--html); color: #fff;
      border: none; cursor: pointer; text-decoration: none;
      transition: opacity 0.2s, transform 0.15s; display: inline-block;
    }
    .btn-primary:hover { opacity: 0.88; transform: translateY(-2px); }
    @media (min-width: 700px) { .btn-primary { padding: 0.85rem 1.8rem; } }

    .btn-ghost {
      font-family: 'Space Mono', monospace; font-size: 0.78rem;
      letter-spacing: 0.05em; padding: 0.8rem 1.4rem;
      border-radius: 4px; background: transparent; color: var(--text);
      border: 1px solid var(--border); cursor: pointer; text-decoration: none;
      transition: border-color 0.2s, transform 0.15s; display: inline-block;
    }
    .btn-ghost:hover { border-color: var(--text-muted); transform: translateY(-2px); }
    @media (min-width: 700px) { .btn-ghost { padding: 0.85rem 1.8rem; } }

    .tech-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 2.5rem; }
    .tech-pill {
      font-family: 'Space Mono', monospace; font-size: 0.62rem;
      padding: 0.28rem 0.65rem; border-radius: 999px;
      border: 1px solid var(--border); color: var(--text-muted); letter-spacing: 0.04em;
    }
    .tech-pill.html { border-color: var(--html); color: var(--html); }
    .tech-pill.css  { border-color: var(--css);  color: var(--css); }
    .tech-pill.js   { border-color: var(--js);   color: var(--js); }

    /* ══════════════════════════════════════
       SECTIONS SHARED — mobile-first
    ══════════════════════════════════════ */
    section { padding: 3.5rem 1.1rem; position: relative; }
    @media (min-width: 700px) { section { padding: 5rem 2.5rem; } }

    .section-label {
      font-family: 'Space Mono', monospace; font-size: 0.68rem;
      letter-spacing: 0.18em; text-transform: uppercase;
      color: var(--text-muted); margin-bottom: 0.65rem;
      display: flex; align-items: center; gap: 0.4rem;
    }
    .section-label span { color: var(--css); }

    .section-title {
      font-family: 'Montserrat', sans-serif; font-weight: 900;
      font-size: clamp(1.7rem, 6vw, 3rem);
      letter-spacing: -0.02em; margin-bottom: 2rem;
    }
    @media (min-width: 700px) { .section-title { margin-bottom: 3rem; } }

    /* ══════════════════════════════════════
       ABOUT — mobile-first
    ══════════════════════════════════════ */
    #about { background: var(--bg2); }
    .about-grid { display: flex; flex-direction: column; gap: 2rem; }
    @media (min-width: 700px) {
      .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
    }
    .about-text p {
      font-size: 0.95rem; line-height: 1.75; color: var(--text-muted); margin-bottom: 1rem;
    }
    .about-text p strong { color: var(--text); font-weight: 600; }
    .about-stack { display: flex; flex-direction: column; gap: 0.75rem; }
    .stack-item {
      display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.1rem;
      border-radius: 6px; background: var(--surface); border: 1px solid var(--border);
      transition: transform 0.2s, border-color 0.2s;
    }
    .stack-item:hover { transform: translateX(4px); }
    .stack-item:hover.html-item { border-color: var(--html); }
    .stack-item:hover.css-item  { border-color: var(--css); }
    .stack-item:hover.js-item   { border-color: var(--js); }
    .stack-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
    .html-item .stack-dot { background: var(--html); }
    .css-item  .stack-dot { background: var(--css); }
    .js-item   .stack-dot { background: var(--js); }
    .stack-name { font-family: 'Space Mono', monospace; font-size: 0.78rem; color: var(--text); }
    .stack-desc { font-size: 0.75rem; color: var(--text-muted); margin-left: auto; }

    /* ══════════════════════════════════════
       PROJECTS — mobile-first
    ══════════════════════════════════════ */
    #projects { background: var(--bg); }
    .projects-header {
      display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem;
    }
    @media (min-width: 600px) {
      .projects-header {
        flex-direction: row; align-items: flex-end;
        justify-content: space-between; margin-bottom: 3rem;
      }
    }
    .projects-header .section-title { margin-bottom: 0; }

    .projects-grid { display: flex; flex-direction: column; gap: 1.1rem; }
    @media (min-width: 560px) {
      .projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
    }
    @media (min-width: 900px) {
      .projects-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
    }

    .project-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 8px; overflow: hidden;
      transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    }
    .project-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(0,0,0,0.16); }
    .project-card:hover              { border-color: var(--html); }
    .project-card:nth-child(2):hover { border-color: var(--css); }
    .project-card:nth-child(3):hover { border-color: var(--js); }
    .card-preview {
      width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--bg2);
    }
    .card-preview-placeholder {
      width: 100%; aspect-ratio: 16/9; background: var(--bg2);
      display: flex; align-items: center; justify-content: center;
      font-family: 'Space Mono', monospace; font-size: 0.68rem;
      color: var(--text-muted); letter-spacing: 0.1em;
    }
    .card-body { padding: 1.1rem 1.2rem 1.3rem; }
    .card-title {
      font-family: 'Montserrat', sans-serif; font-weight: 700;
      font-size: 0.95rem; margin-bottom: 0.45rem; color: var(--text);
    }
    .card-desc { font-size: 0.82rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 0.9rem; }
    .card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
    .tag {
      font-family: 'Space Mono', monospace; font-size: 0.6rem;
      padding: 0.18rem 0.5rem; border-radius: 3px;
      background: var(--bg2); color: var(--text-muted); border: 1px solid var(--border);
      letter-spacing: 0.04em;
    }
    .tag.html { background: rgba(227,76,38,0.08);  color: var(--html); border-color: rgba(227,76,38,0.25); }
    .tag.css  { background: rgba(102,51,153,0.08); color: var(--css);  border-color: rgba(102,51,153,0.25); }
    .tag.js   { background: rgba(255,211,67,0.08); color: #c9a800;     border-color: rgba(255,211,67,0.25); }
    .card-link {
      font-family: 'Space Mono', monospace; font-size: 0.7rem;
      color: var(--html); text-decoration: none;
      display: inline-flex; align-items: center; gap: 0.35rem;
      transition: gap 0.2s; letter-spacing: 0.03em;
    }
    .card-link:hover { gap: 0.6rem; }
    .card-link::after { content: '→'; }

    /* ══════════════════════════════════════
       SERVICES — mobile-first
    ══════════════════════════════════════ */
    #services { background: var(--bg2); }
    .services-grid { display: flex; flex-direction: column; gap: 0.9rem; }
    @media (min-width: 560px) {
      .services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    }
    @media (min-width: 900px) {
      .services-grid { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
    }
    .service-card {
      padding: 1.3rem; border-radius: 6px; border: 1px solid var(--border);
      background: var(--surface); transition: transform 0.2s, border-color 0.2s;
    }
    .service-card:hover { transform: translateY(-3px); }
    .service-icon {
      font-family: 'Space Mono', monospace; font-size: 0.65rem; font-weight: 700;
      padding: 0.28rem 0.55rem; border-radius: 3px;
      display: inline-block; margin-bottom: 0.85rem; letter-spacing: 0.05em;
    }
    .service-icon.h { background: rgba(227,76,38,0.12);  color: var(--html); }
    .service-icon.c { background: rgba(102,51,153,0.12); color: var(--css); }
    .service-icon.j { background: rgba(255,211,67,0.12); color: #c9a800; }
    .service-name {
      font-family: 'Montserrat', sans-serif; font-weight: 700;
      font-size: 0.9rem; margin-bottom: 0.45rem;
    }
    .service-desc { font-size: 0.8rem; line-height: 1.6; color: var(--text-muted); }

    /* ══════════════════════════════════════
       CONTACT — mobile-first
    ══════════════════════════════════════ */
    #contact { background: var(--bg); }
    .contact-inner { max-width: 560px; }
    .contact-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.75rem; }
    .contact-links { display: flex; flex-direction: column; gap: 0.65rem; }
    .contact-row {
      display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.1rem;
      border-radius: 6px; border: 1px solid var(--border); background: var(--surface);
      text-decoration: none; color: var(--text);
      transition: border-color 0.2s, transform 0.2s; font-size: 0.88rem;
    }
    .contact-row:hover { transform: translateX(4px); border-color: var(--css); }
    .contact-row-label {
      font-family: 'Space Mono', monospace; font-size: 0.65rem;
      color: var(--text-muted); letter-spacing: 0.08em; margin-left: auto;
    }

    /* ══════════════════════════════════════
       FOOTER — mobile-first
    ══════════════════════════════════════ */
    footer {
      border-top: 1px solid var(--border); padding: 1.5rem 1.1rem;
      display: flex; flex-direction: column; gap: 0.5rem;
    }
    @media (min-width: 600px) {
      footer { flex-direction: row; justify-content: space-between; align-items: center; padding: 2rem 2.5rem; }
    }
    .foot-logo { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 0.9rem; letter-spacing: 0.08em; }
    .foot-copy { font-family: 'Space Mono', monospace; font-size: 0.62rem; color: var(--text-muted); letter-spacing: 0.05em; }

    /* scroll reveal */
    .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
    .reveal.visible { opacity: 1; transform: translateY(0); }