/* ===== Catppuccin Mocha ===== */
:root {
  --base:      #1e1e2e;
  --mantle:    #181825;
  --crust:     #11111b;
  --surface0:  #313244;
  --surface1:  #45475a;
  --surface2:  #585b70;
  --overlay0:  #6c7086;
  --overlay1:  #7f849c;
  --text:      #cdd6f4;
  --subtext1:  #bac2de;
  --subtext0:  #a6adc8;
  --mauve:     #cba6f7;
  --lavender:  #b4befe;
  --blue:      #89b4fa;
  --sapphire:  #74c7ec;
  --sky:       #89dceb;
  --teal:      #94e2d5;
  --green:     #a6e3a1;
  --peach:     #fab387;
  --pink:      #f5c2e7;
  --red:       #f38ba8;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--base);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 28px; }

::selection { background: var(--mauve); color: var(--crust); }

/* ===== animated background orbs ===== */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .28;
  will-change: transform;
}
.orb-1 { width: 460px; height: 460px; background: var(--mauve);   top: -120px; left: -100px; animation: float1 22s var(--ease) infinite; }
.orb-2 { width: 400px; height: 400px; background: var(--blue);    top: 30%; right: -140px; animation: float2 26s var(--ease) infinite; }
.orb-3 { width: 380px; height: 380px; background: var(--teal);    bottom: -120px; left: 20%; animation: float3 30s var(--ease) infinite; }
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px,80px) scale(1.12); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-70px,50px) scale(.9); } }
@keyframes float3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-70px) scale(1.08); } }

/* ===== nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(24, 24, 37, 0.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(203, 166, 247, 0.08);
}
.nav-inner { display: flex; align-items: center; height: 66px; }
.brand {
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 18px;
  color: var(--text); letter-spacing: -.5px;
}
.brand .caret { color: var(--mauve); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.links { display: flex; gap: 28px; margin-left: auto; }
.links a {
  font-size: 14px; color: var(--subtext0); position: relative; padding: 4px 0;
  transition: color .25s var(--ease);
}
.links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--mauve); transition: width .3s var(--ease);
}
.links a:hover { color: var(--text); }
.links a:hover::after { width: 100%; }

/* ===== hero ===== */
.hero { padding: 120px 28px 90px; }
.eyebrow {
  font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--mauve);
  letter-spacing: 1px; margin-bottom: 22px;
}
h1 {
  font-size: clamp(34px, 6.2vw, 62px); line-height: 1.08; font-weight: 800;
  letter-spacing: -1.5px; color: var(--text); margin-bottom: 26px;
}
.grad {
  background: linear-gradient(100deg, var(--mauve), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad2 {
  background: linear-gradient(100deg, var(--blue), var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 19px; color: var(--subtext1); max-width: 620px; margin-bottom: 34px; }

.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }
.btn {
  font-size: 15px; font-weight: 600; padding: 12px 24px; border-radius: 12px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn.primary { background: var(--mauve); color: var(--crust); }
.btn.primary:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(203, 166, 247, 0.3); }
.btn.ghost { border: 1px solid var(--surface1); color: var(--text); }
.btn.ghost:hover { transform: translateY(-3px); border-color: var(--mauve); background: rgba(203,166,247,.06); }

.hero-meta { display: flex; gap: 28px; flex-wrap: wrap; font-size: 14px; color: var(--subtext0); }
.hero-meta b { color: var(--subtext1); font-weight: 600; margin-right: 6px; }

/* ===== blocks ===== */
.block { padding: 70px 28px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 40px; }
.section-head .idx { font-family: "JetBrains Mono", monospace; color: var(--mauve); font-size: 14px; }
.section-head h2 { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }

/* about */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-copy { color: var(--subtext1); font-size: 17px; }
.facts { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.facts li {
  display: flex; justify-content: space-between; gap: 16px; padding: 12px 0;
  border-bottom: 1px solid var(--surface0); font-size: 14px;
}
.facts .k { color: var(--overlay1); font-family: "JetBrains Mono", monospace; }
.facts .v { color: var(--text); text-align: right; }

/* projects */
.project {
  display: flex; align-items: center; gap: 24px;
  padding: 30px; margin-bottom: 18px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(49,50,68,.35), rgba(24,24,37,.25));
  border: 1px solid var(--surface0);
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.project:hover {
  transform: translateY(-4px);
  border-color: var(--mauve);
  background: linear-gradient(180deg, rgba(203,166,247,.08), rgba(24,24,37,.3));
}
.project-main { flex: 1; }
.project-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tag {
  font-size: 12px; color: var(--crust); background: var(--mauve);
  padding: 3px 10px; border-radius: 20px; font-weight: 500;
}
.year { font-size: 12px; color: var(--overlay0); }
.project h3 { font-size: 23px; font-weight: 700; margin-bottom: 10px; letter-spacing: -.4px; }
.project h3 .soon { font-size: 13px; color: var(--overlay0); font-weight: 400; }
.project p { color: var(--subtext0); font-size: 15px; margin-bottom: 16px; max-width: 60ch; }
.stack-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.stack-tags span {
  font-size: 12px; color: var(--subtext1); background: var(--surface0);
  padding: 4px 10px; border-radius: 8px;
}
.project-arrow {
  font-size: 26px; color: var(--overlay0); flex: 0 0 auto;
  transition: transform .35s var(--ease), color .35s var(--ease);
}
.project:hover .project-arrow { color: var(--mauve); transform: translateX(6px); }

/* stack */
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.stack-col h4 { color: var(--mauve); font-size: 13px; margin-bottom: 16px; font-weight: 500; letter-spacing: .5px; }
.chips { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.chips span {
  font-size: 14px; color: var(--subtext1);
  padding: 6px 14px; border-radius: 10px; border: 1px solid var(--surface0);
  background: rgba(49,50,68,.25);
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.chips span:hover { border-color: var(--lavender); color: var(--text); transform: translateX(4px); }

/* contact */
.contact-lead { font-size: 22px; color: var(--text); margin-bottom: 28px; font-weight: 500; }
.contact-links { display: flex; flex-direction: column; gap: 2px; max-width: 460px; }
.contact-links a {
  display: flex; justify-content: space-between; gap: 20px; padding: 16px 4px;
  border-bottom: 1px solid var(--surface0); font-size: 15px;
  transition: padding .25s var(--ease), border-color .25s var(--ease);
}
.contact-links a:hover { padding-left: 14px; border-color: var(--mauve); }
.cl-k { color: var(--overlay1); }
.cl-v { color: var(--text); transition: color .25s var(--ease); }
.contact-links a:hover .cl-v { color: var(--mauve); }

/* more-on-github line */
.more { font-size: 14px; color: var(--overlay1); margin-top: 22px; line-height: 2; }
.more a { color: var(--subtext1); border-bottom: 1px solid var(--surface1); transition: color .2s var(--ease), border-color .2s var(--ease); }
.more a:hover { color: var(--mauve); border-color: var(--mauve); }

/* footer */
footer { padding: 40px 28px 60px; text-align: center; }
footer p { font-size: 13px; color: var(--overlay0); }

/* ===== scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===== responsive ===== */

/* tablet / small laptop */
@media (max-width: 860px) {
  .wrap { padding: 0 22px; }
  .stack-grid { grid-template-columns: 1fr 1fr; gap: 26px 30px; }
}

/* mobile */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }

  .nav-inner { height: 58px; }
  .brand { font-size: 16px; }
  .links { gap: 16px; margin-left: auto; }
  .links a { font-size: 13px; }

  .hero { padding: 64px 18px 52px; }
  h1 { letter-spacing: -1px; }
  h1 br { display: none; }            /* let the headline reflow naturally */
  .lead { font-size: 17px; }
  .cta { gap: 10px; }
  .btn { flex: 1 1 auto; text-align: center; padding: 13px 18px; }
  .hero-meta { flex-direction: column; gap: 10px; }

  .block { padding: 52px 18px; }
  .section-head { margin-bottom: 28px; }
  .section-head h2 { font-size: 24px; }

  .about-grid { grid-template-columns: 1fr; gap: 26px; }
  .facts .v { font-size: 13px; }

  .stack-grid { grid-template-columns: 1fr; gap: 24px; }

  .project { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; }
  .project h3 { font-size: 21px; }
  .project p { font-size: 14.5px; max-width: none; }
  .project-arrow { align-self: flex-end; margin-top: -8px; }
  .project:hover { transform: none; }   /* no lift on touch */
  .project:active { border-color: var(--mauve); }

  .contact-lead { font-size: 19px; }
  .contact-links a { font-size: 14px; }
}

/* very small phones */
@media (max-width: 340px) {
  .links { display: none; }            /* reclaim space when it truly won't fit */
}
@media (max-width: 380px) {
  h1 { font-size: 30px; }
  .stack-tags span, .chips span { font-size: 12px; }
}

/* ===== reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
