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

:root {
  --blue:       #2563EB;
  --blue-glow:  rgba(37,99,235,.18);
  --blue-light: #EFF6FF;
  --blue-mid:   #BFDBFE;
  --blue-dark:  #1D4ED8;
  --bg:         #FAFAFA;
  --card:       #FFFFFF;
  --text:       #0D1117;
  --muted:      #6B7280;
  --faint:      #9CA3AF;
  --border:     #E5E7EB;
  --radius:     12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Geist Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex; flex-direction: column;
  cursor: none;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,.055) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

nav, section, main, footer { position: relative; z-index: 1; }

/* PROGRESS BAR */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
  z-index: 300;
  transition: width .08s linear;
}

/* PAGE LOADER */
.page-loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 999;
  animation: loaderOut .6s .3s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes loaderOut { to { opacity: 0; pointer-events: none; } }

/* CURSOR */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--blue); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s;
}
.cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1.5px solid rgba(37,99,235,.4); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s, opacity .2s;
}
.cursor.grow { width: 14px; height: 14px; }
.cursor-ring.grow { width: 48px; height: 48px; opacity: .5; }
@media (pointer: coarse) { .cursor, .cursor-ring { display: none; } body { cursor: auto; } }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 60px;
  background: rgba(250,250,250,.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: transform .3s ease, border-color .3s;
}
nav.scrolled { border-color: var(--border); }
nav.hidden   { transform: translateY(-100%); }

.nav-name { font-size: .9rem; font-weight: 600; letter-spacing: -.01em; }

.nav-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: .35rem .85rem;
  border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  transition: color .15s, border-color .15s, box-shadow .15s;
}
.nav-btn:hover { color: var(--blue); border-color: var(--blue-mid); box-shadow: 0 2px 12px var(--blue-glow); }
.nav-btn svg { width: 15px; height: 15px; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 6rem 2.5rem 4rem;
  position: relative; overflow: hidden;
}

.blob {
  position: absolute; border-radius: 50%;
  pointer-events: none; filter: blur(70px);
}
.blob-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(37,99,235,.1) 0%, transparent 70%);
  top: -120px; left: -160px;
  animation: blob1 9s ease-in-out infinite alternate;
}
.blob-2 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(99,102,241,.09) 0%, transparent 70%);
  bottom: 40px; right: -100px;
  animation: blob2 12s ease-in-out infinite alternate;
}
@keyframes blob1 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(90px, 70px) scale(1.12); }
}
@keyframes blob2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-70px, -50px) scale(1.15); }
}

.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue); background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  padding: .22rem .7rem; border-radius: 999px; margin-bottom: 1.6rem;
  opacity: 0; animation: fadeUp .5s .3s ease forwards;
}
.hero-tag svg { width: 12px; height: 12px; }

.hero-handle {
  font-size: clamp(4rem, 13vw, 8.5rem);
  font-weight: 700; letter-spacing: -.05em; line-height: 1;
  margin-bottom: 1.5rem; perspective: 600px;
}

.bracket { color: var(--blue); opacity: 0; display: inline-block; animation: bracketIn .4s ease forwards; }
.left-b  { animation-delay: .05s; }
.right-b { animation-delay: .78s; }
@keyframes bracketIn { to { opacity: 1; } }

.char {
  display: inline-block; opacity: 0;
  animation: charReveal .55s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes charReveal {
  from { opacity: 0; transform: translateY(.3em); }
  to   { opacity: 1; transform: none; }
}

.hero-sub {
  font-size: 1.15rem; font-weight: 300; color: var(--muted);
  min-height: 1.8rem; margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp .5s 1.1s ease forwards;
}
.tw-cursor { display: inline-block; animation: blink .9s step-end infinite; color: var(--blue); }
@keyframes blink { 50% { opacity: 0; } }

.hero-meta {
  display: flex; align-items: center; gap: .85rem;
  flex-wrap: wrap; justify-content: center;
  font-size: .8rem; font-weight: 300; color: var(--muted);
  margin-bottom: 2.5rem;
  opacity: 0; animation: fadeUp .5s 1.2s ease forwards;
}
.meta-status { display: flex; align-items: center; gap: .45rem; }
.pulse {
  width: 7px; height: 7px; background: #22C55E;
  border-radius: 50%; display: inline-block;
  animation: ripple 1.8s ease-in-out infinite;
}
@keyframes ripple {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.4); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.sep { color: var(--border); }

/* BROWSE BUTTON */
.browse-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .9rem; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: .75rem 2rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card);
  transition: color .2s, border-color .2s, box-shadow .2s, transform .2s, background .2s;
  opacity: 0; animation: fadeUp .5s 1.4s ease forwards;
}
.browse-btn:hover {
  color: var(--blue); border-color: var(--blue-mid);
  box-shadow: 0 4px 24px var(--blue-glow);
  transform: translateY(-2px); background: var(--blue-light);
}
.browse-btn svg { width: 16px; height: 16px; animation: bounceDown 1.6s ease-in-out infinite; }
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* MAIN */
main {
  flex: 1; max-width: 960px; margin: 0 auto; width: 100%;
  padding: 5rem 2.5rem 6rem;
}

.section-label { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.label-text {
  display: flex; align-items: center; gap: .45rem;
  font-size: .72rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); white-space: nowrap;
}
.label-text svg { width: 12px; height: 12px; }
.label-rule { flex: 1; height: 1px; background: var(--border); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 1.15rem;
}

/* CARD */
.project-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: .75rem;
  opacity: 0; transform: translateY(24px) scale(0.98);
  transition:
    opacity .55s cubic-bezier(0.16,1,0.3,1),
    transform .55s cubic-bezier(0.16,1,0.3,1),
    border-color .2s, box-shadow .2s;
  transition-delay: calc(var(--i, 0) * 75ms);
}
.project-card.visible { opacity: 1; transform: none; }
.project-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), 0 10px 32px var(--blue-glow);
}
.project-card:hover .card-icon svg { color: var(--blue); transform: rotate(-10deg) scale(1.15); }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.card-icon svg { width: 20px; height: 20px; color: var(--faint); stroke-width: 1.5; transition: color .2s, transform .25s; }
.card-actions { display: flex; gap: .15rem; }
.card-link {
  display: flex; align-items: center;
  color: var(--faint); padding: .3rem; border-radius: 6px;
  text-decoration: none; transition: color .15s, background .15s;
}
.card-link:hover { color: var(--blue); background: var(--blue-light); }
.card-link svg { width: 16px; height: 16px; stroke-width: 1.75; }
.card-title { font-size: 1rem; font-weight: 600; color: var(--text); letter-spacing: -.015em; }
.card-desc { font-size: .875rem; font-weight: 300; color: var(--muted); line-height: 1.7; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: auto; padding-top: .4rem; }
.tag {
  font-size: .7rem; font-weight: 500; color: var(--blue-dark);
  background: var(--blue-light); border: 1px solid var(--blue-mid);
  padding: .15rem .55rem; border-radius: 999px;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border); padding: 1.5rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
}
.footer-handle { font-size: .8rem; font-weight: 600; color: var(--faint); }
.footer-links { display: flex; gap: .25rem; }
.footer-links a { display: flex; align-items: center; color: var(--faint); padding: .3rem; border-radius: 6px; text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--blue); }
.footer-links a svg { width: 17px; height: 17px; }

/* RESPONSIVE */
@media (max-width: 600px) {
  nav    { padding: 0 1.25rem; }
  .hero  { padding: 5rem 1.25rem 3rem; }
  main   { padding: 4rem 1.25rem 4rem; }
  footer { padding: 1.25rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-handle { font-size: clamp(3.5rem, 18vw, 5rem); }
}
