:root{
    --bg-base: #130e18;
    --bg-surface: #1d1620;
    --border: #322837;
    --border-soft: #241c28;
    --text-primary: #f5eef1;
    --text-muted: #ab9dac;
    --text-faint: #6b5e6c;

    --indigo: #6a5cff;
    --pink: #ff4f9a;
    --amber: #ffbe5c;

    --gradient: linear-gradient(115deg, var(--indigo), var(--pink));

    --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --font-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

    --max-w: 1160px;
    --radius-s: 4px;
  }

  *{ box-sizing: border-box; }
  html{ scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce){
    html{ scroll-behavior: auto; }
    *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  }

  body{
    margin: 0;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  h1, h2{
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.01em;
    text-wrap: balance;
    margin: 0;
  }
  em{ font-style: italic; font-weight: 400; }
  p{ margin: 0; }
  a{ color: inherit; text-decoration: none; }

  .container{
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px;
  }

  .kicker{
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 1rem;
    color: var(--text-muted);
  }
  .kicker::before{
    content: '';
    width: 36px; height: 1px;
    background: var(--gradient);
    flex: none;
  }

  .grad-text{
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* ---------- ambient blob ---------- */
  .blob{
    position: absolute;
    z-index: -1;
    width: 620px; height: 620px;
    border-radius: 42% 58% 63% 37% / 41% 45% 55% 59%;
    background: radial-gradient(circle at 32% 28%, rgba(106,92,255,0.32), rgba(255,79,154,0.16) 55%, transparent 78%);
    filter: blur(18px);
    pointer-events: none;
    animation: morph 16s ease-in-out infinite;
  }
  .blob-sm{ width: 380px; height: 380px; opacity: 0.75; }
  @keyframes morph{
    0%, 100%{ border-radius: 42% 58% 63% 37% / 41% 45% 55% 59%; transform: rotate(0deg) scale(1); }
    50%{ border-radius: 58% 42% 40% 60% / 55% 60% 40% 45%; transform: rotate(8deg) scale(1.06); }
  }

  /* ---------- ambient particles ---------- */
  .bg-particles{
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
  }
  .bg-particles span{
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    animation: drift ease-in-out infinite;
  }
  @keyframes drift{
    0%, 100%{ transform: translate(0, 0); opacity: var(--p-op, 0.5); }
    50%{ transform: translate(var(--p-x, 20px), var(--p-y, -26px)); opacity: calc(var(--p-op, 0.5) * 0.55); }
  }

  /* ---------- nav ---------- */
  header.site{
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(19,14,24,0.78);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
  }
  .nav-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
  }
  .nav-right{
    display: flex;
    align-items: center;
    gap: 28px;
  }
  .lang-switch{
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
  }
  .lang-btn{
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.04em;
    padding: 5px 11px;
    border-radius: 999px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
  }
  .lang-btn:hover{ color: var(--text-primary); }
  .lang-btn[aria-pressed="true"]{
    background: var(--gradient);
    color: #150f19;
    font-weight: 700;
  }
  .brand{
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text-primary);
  }
  .brand em{ background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

  nav.links{
    display: flex;
    gap: 34px;
    font-size: 14.5px;
    color: var(--text-muted);
  }
  nav.links a{ position: relative; padding: 4px 0; transition: color 0.2s ease; }
  nav.links a:hover, nav.links a:focus-visible{ color: var(--text-primary); }
  nav.links a::after{
    content: '';
    position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px;
    background: var(--gradient);
    transition: right 0.25s ease;
  }
  nav.links a:hover::after, nav.links a:focus-visible::after{ right: 0; }

  .nav-cta{
    font-size: 14px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: border-color 0.2s ease, background 0.2s ease;
  }
  .nav-cta:hover{ border-color: var(--pink); background: rgba(255,79,154,0.08); }

  .menu-btn{
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .menu-btn span{ width: 20px; height: 1.5px; background: var(--text-primary); }

  /* ---------- hero ---------- */
  .hero{ position: relative; overflow: hidden; padding: 96px 0 76px; }
  .hero .blob{ top: -180px; right: -160px; }
  .hero .blob-sm{
    bottom: -140px; left: -100px;
    background: radial-gradient(circle at 40% 60%, rgba(255,190,92,0.24), rgba(255,79,154,0.12) 55%, transparent 78%);
    animation-duration: 20s;
    animation-direction: reverse;
  }
  .hero-inner{ position: relative; z-index: 1; max-width: 760px; }
  .hero h1{
    margin-top: 26px;
    font-size: clamp(2.5rem, 5.6vw, 4.4rem);
    line-height: 1.08;
  }
  .hero .lede{
    margin-top: 28px;
    max-width: 46ch;
    color: var(--text-muted);
    font-size: 1.1rem;
  }
  .hero-actions{
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
  }
  .btn-primary{
    background: var(--gradient);
    color: #150f19;
    font-weight: 700;
    font-size: 15px;
    padding: 15px 28px;
    border-radius: 999px;
    display: inline-flex;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(255,79,154,0.4); }
  .text-link{
    font-size: 15px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 3px;
    transition: border-color 0.2s ease, color 0.2s ease;
  }
  .text-link:hover{ border-color: var(--pink); color: var(--pink); }

  /* ---------- marquee ---------- */
  .marquee{
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg-surface);
    overflow: hidden;
    padding: 18px 0;
  }
  .marquee-track{
    display: flex;
    width: max-content;
    gap: 0;
    animation: scroll-left 32s linear infinite;
  }
  .marquee-track:hover{ animation-play-state: paused; }
  @keyframes scroll-left{
    from{ transform: translateX(0); }
    to{ transform: translateX(-50%); }
  }
  .marquee span{
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    white-space: nowrap;
    padding: 0 22px;
  }
  .marquee span.accent{ color: var(--text-muted); }

  /* ---------- sections ---------- */
  section{ padding: 96px 0; position: relative; overflow: hidden; }
  .section-head{ max-width: 60ch; position: relative; z-index: 1; }
  #about .blob-sm{
    top: -60px; left: -130px;
    background: radial-gradient(circle at 35% 30%, rgba(255,190,92,0.2), rgba(106,92,255,0.12) 55%, transparent 78%);
    animation-duration: 22s;
  }
  #services .blob-sm{
    bottom: -100px; right: -110px;
    background: radial-gradient(circle at 60% 40%, rgba(255,79,154,0.2), rgba(106,92,255,0.1) 55%, transparent 78%);
    animation-duration: 24s;
    animation-direction: reverse;
  }

  .reveal{
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.is-visible{ opacity: 1; transform: translateY(0); }

  /* about */
  .about-grid{
    margin-top: 56px;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 64px;
    align-items: start;
  }
  .portrait{
    position: sticky;
    top: 100px;
    aspect-ratio: 1;
    border-radius: 46% 54% 60% 40% / 45% 40% 60% 55%;
    background: linear-gradient(160deg, rgba(106,92,255,0.35), rgba(255,79,154,0.2));
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .portrait img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: luminosity;
    opacity: 0.94;
  }

  .about-copy p.statement{
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    line-height: 1.5;
    color: var(--text-primary);
  }
  .about-copy p.statement::first-letter{
    font-size: 3.4em;
    float: left;
    line-height: 0.85;
    padding: 0.04em 0.09em 0 0;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .skill-line{
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--text-muted);
  }
  .skill-line span:not(.sep){ transition: color 0.2s ease; }
  .skill-line span:not(.sep):hover{ color: var(--pink); }
  .skill-line .sep{ color: var(--text-faint); }

  /* services */
  .service-row{
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 90px 1.1fr 1.4fr 90px;
    align-items: center;
    gap: 24px;
    padding: 30px 4px;
    transition: background 0.25s ease;
  }
  .card-grid > .service-row:last-child{ border-bottom: 1px solid var(--border); }
  .service-row:hover{ background: rgba(255,79,154,0.04); }
  .service-index{
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 300;
    color: transparent;
    -webkit-text-stroke: 1px var(--border);
    transition: -webkit-text-stroke 0.25s ease;
  }
  .service-row:hover .service-index{ -webkit-text-stroke: 1px var(--pink); }
  .service-row h3{
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.35rem;
  }
  .service-row p{ color: var(--text-muted); font-size: 0.96rem; max-width: 42ch; }
  .service-arrow{
    justify-self: end;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transform: rotate(-45deg);
    transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  }
  .service-row:hover .service-arrow{ transform: rotate(0deg); border-color: var(--pink); color: var(--pink); }

  /* contact */
  .contact-panel{ position: relative; overflow: hidden; }
  .contact-panel .blob{ bottom: -220px; left: -160px; width: 520px; height: 520px; }
  .contact-inner{ position: relative; z-index: 1; text-align: left; }
  .contact-panel h2{ font-size: clamp(2rem, 4.4vw, 3.1rem); max-width: 16ch; }
  .contact-panel .lede{ margin-top: 20px; color: var(--text-muted); max-width: 50ch; font-size: 1.05rem; }
  .contact-actions{
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
  }
  .email-chip{
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 3px;
  }
  .socials{ display: flex; gap: 12px; }
  .socials a{
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    transition: color 0.2s ease, border-color 0.2s ease;
  }
  .socials a:hover{ color: var(--text-primary); border-color: var(--indigo); }

  footer.site{ border-top: 1px solid var(--border-soft); padding: 28px 0; }
  .footer-row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
  }
  .footer-row a{ color: var(--text-muted); }
  .footer-row a:hover{ color: var(--text-primary); }

  @media (max-width: 900px){
    nav.links, .nav-cta{ display: none; }
    .menu-btn{ display: flex; }
    .nav-right{ gap: 14px; }
    .about-grid{ grid-template-columns: 1fr; gap: 40px; }
    .portrait{ position: static; max-width: 280px; aspect-ratio: 1; }
    .service-row{ grid-template-columns: 60px 1fr; row-gap: 8px; }
    .service-row p{ grid-column: 2; }
    .service-arrow{ display: none; }
  }
  @media (max-width: 560px){
    section{ padding: 72px 0; }
    .about-copy p.statement{ font-size: 1.2rem; }
  }
