/* ============ TOKENS ============ */
:root{
  --bg: #06050c;
  --bg-panel: #100e1c;
  --bg-panel-2: #15122480;
  --line: rgba(167,139,250,0.16);
  --line-strong: rgba(167,139,250,0.32);
  --text: #f4f2fa;
  --text-muted: #948fae;
  --text-dim: #5f5a78;
  --accent: #a78bfa;
  --accent-strong: #7c3aed;
  --accent-glow: #c4b5fd;

  --font-display: 'Clash Display', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-w: 1180px;
  --edge: clamp(24px, 6vw, 72px);
}

*{ box-sizing: border-box; margin:0; padding:0; }
html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

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


a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display:block; }

::selection{ background: var(--accent-strong); color: #fff; }

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============ BACKDROP ============ */
#stars{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, #1c1638 0%, transparent 60%),
    var(--bg);
}

.cursor-glow{
  position: fixed;
  width: 420px; height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(124,58,237,0.10) 0%, transparent 70%);
  transform: translate(-50%,-50%);
  left: 50%; top: 30%;
  transition: left 0.25s ease-out, top 0.25s ease-out;
  display: none;
}
@media (hover:hover){ .cursor-glow{ display:block; } }

/* ============ PROGRESS BAR ============ */
.progress-bar{
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent-glow));
  z-index: 50;
  transition: width 0.1s ease-out;
}

main, .site-header, .site-footer{ position: relative; z-index: 2; }

/* ============ HEADER ============ */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 22px var(--edge);
  max-width: var(--max-w);
  margin: 0 auto;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0px);
  transition: background 0.35s ease, border-color 0.35s ease, padding 0.35s ease, backdrop-filter 0.35s ease;
}
.site-header.scrolled{
  background: rgba(6,5,12,0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  padding: 14px var(--edge);
}

.logo{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}
.logo .dot{ color: var(--accent); }

.main-nav{
  display:flex;
  gap: 32px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.main-nav a{ transition: color 0.2s ease; position: relative; }
.main-nav a:hover{ color: var(--text); }
.main-nav a::after{
  content:"";
  position:absolute; left:0; bottom:-6px;
  width:0; height:1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.main-nav a:hover::after{ width:100%; }
.main-nav a.active{ color: var(--accent-glow); }
.main-nav a.active::after{ width: 100%; background: var(--accent-glow); }

.nav-cta{
  border: 1px solid var(--line-strong);
  padding: 9px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.nav-cta:hover{ background: var(--accent-strong); border-color: var(--accent-strong); }

.nav-toggle{
  display:none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span{
  width: 22px; height: 1.5px;
  background: var(--text);
  display:block;
}

/* ============ HERO ============ */
.hero{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6vw var(--edge) 10vw;
  position: relative;
  min-height: 88vh;
  display:flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom: 28px;
}
.status-dot{
  width:7px; height:7px; border-radius:50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
  70%{ box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100%{ box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

.hero-name{
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.01em;
  font-size: clamp(3rem, 10vw, 7.5rem);
  text-transform: uppercase;
}
.hero-name .line{ display:block; }
.hero-name .accent{
  background: linear-gradient(100deg, var(--accent-glow), var(--accent-strong) 40%, var(--accent-glow) 70%, var(--accent-strong) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s ease-in-out infinite;
}
@keyframes shimmer{
  0%, 100%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
}

.hero-sub{
  margin-top: 32px;
  max-width: 560px;
}
.hero-sub .role{
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 10px;
}
.hero-sub .sep{ color: var(--accent); margin: 0 2px; }
.hero-sub .location{
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-actions{
  display:flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.btn{
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  display:inline-block;
  will-change: transform;
}
.btn-primary{
  background: var(--accent-strong);
  color: #fff;
}
.btn-primary:hover{ transform: translateY(-2px); background: #6d28d9; }
.btn-ghost{
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover{ transform: translateY(-2px); border-color: var(--accent); }

.hero-photo{
  position: absolute;
  right: var(--edge);
  top: 8vw;
  width: clamp(140px, 18vw, 230px);
  height: clamp(140px, 18vw, 230px);
}
.photo-frame{
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  position: relative;
  animation: float 5s ease-in-out infinite;
}
@keyframes float{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-10px); }
}
.photo-frame img{
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(15%) contrast(1.05);
}
.orbit-ring{
  position: absolute;
  inset: -14px;
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 8;
  animation: spin 40s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

.scroll-cue{
  position: absolute;
  left: var(--edge);
  bottom: 4vw;
  display:flex;
  align-items:center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}
.scroll-cue i{
  width: 1px; height: 34px;
  background: linear-gradient(var(--accent), transparent);
  display:block;
}

/* ============ SECTION SHELL ============ */
.section{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(60px, 10vw, 120px) var(--edge);
  border-top: 1px solid var(--line);
}

.section-label{
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 48px;
  text-transform: uppercase;
}

.accent-text{ color: var(--accent-glow); }

/* ============ SERVICES ============ */
.services-list{ border-top: 1px solid var(--line); }
.service-row{ border-bottom: 1px solid var(--line); }

.service-head{
  display:flex;
  align-items: center;
  gap: 28px;
  padding: 28px 0;
  cursor: pointer;
}
.service-num{
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.9rem;
  width: 28px;
}
.service-head h3{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 2rem);
  flex: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}
.service-plus{
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: transform 0.3s ease, color 0.3s ease;
  font-weight: 300;
}
.service-row.open .service-plus{ transform: rotate(45deg); color: var(--accent); }
.service-row:hover h3{ color: var(--accent-glow); transform: translateX(6px); }

.service-body{
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 0 0 56px;
}
.service-row.open .service-body{ max-height: 200px; padding-bottom: 28px; }
.service-body p{ color: var(--text-muted); max-width: 620px; margin-bottom: 16px; }

.tag-row{ display:flex; flex-wrap: wrap; gap: 8px; }
.tag-row span{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-glow);
  border: 1px solid var(--line-strong);
  padding: 5px 12px;
  border-radius: 100px;
}

/* ============ ABOUT ============ */
.about-grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
}
.about-text h2{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 24px;
}
.about-text p{
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 16px;
}

.stack-panel{
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.stack-row{
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.stack-row:last-child{ border-bottom: none; }
.stack-key{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display:block;
  margin-bottom: 10px;
}
.stack-chips{ display:flex; flex-wrap: wrap; gap: 8px; }
.stack-chips span{
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  color: var(--text);
}

/* ============ PROJECTS ============ */
.project-row{
  display:grid;
  grid-template-columns: 60px 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.project-row:first-of-type{ border-top: 1px solid var(--line); }
.project-row.reverse{ grid-template-columns: 60px 0.9fr 1.1fr; }
.project-row.reverse .project-visual{ order: -1; }

.project-num{
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-dim);
}
.project-info h3{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  margin-bottom: 14px;
}
.project-info p{
  color: var(--text-muted);
  margin-bottom: 18px;
  max-width: 460px;
}

.project-visual{
  aspect-ratio: 4/3;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pc1), var(--pc2));
  border: 1px solid var(--line);
  display:flex;
  align-items:flex-end;
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.project-visual::before{
  content:"";
  position: absolute;
  inset:0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.12), transparent 60%);
}
.project-row:hover .project-visual{ transform: translateY(-4px); }
.visual-tag{
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.3);
  padding: 6px 12px;
  border-radius: 100px;
  position: relative;
  z-index: 1;
}

/* ============ CONTENT CREATION ============ */
.content-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.content-text h2{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 16px;
}
.content-text p{ color: var(--text-muted); max-width: 460px; }

.content-cards{ display:flex; flex-direction: column; gap: 16px; }
.content-card{
  display:flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-panel);
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.content-card:hover{ border-color: var(--accent); transform: translateX(6px); }
.content-platform{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.content-handle{ font-size: 1.05rem; font-weight: 500; }
.content-arrow{
  position: absolute;
  right: 24px; top: 24px;
  color: var(--text-dim);
  transition: color 0.2s ease, transform 0.2s ease;
}
.content-card:hover .content-arrow{ color: var(--accent); transform: translate(2px,-2px); }

/* ============ CONTACT ============ */
.contact-section{ text-align: left; }
.contact-headline{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 1.02;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.contact-copy{
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 48px;
  font-size: 1.02rem;
}

.contact-links{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.contact-link{
  background: var(--bg-panel);
  padding: 26px 28px;
  display:flex;
  align-items: center;
  gap: 18px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.contact-link:hover{ background: #1a1530; transform: translateX(4px); }
.contact-icon{
  width: 44px; height: 44px;
  flex-shrink: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.contact-icon svg{ width: 19px; height: 19px; }
.contact-link:hover .contact-icon{
  color: #fff;
  border-color: var(--accent);
  background: var(--accent-strong);
  transform: rotate(-8deg) scale(1.08);
}
.contact-text{ display:flex; flex-direction: column; gap: 6px; }
.contact-text span{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contact-text strong{ font-size: 1.1rem; font-weight: 500; }

/* ============ FOOTER ============ */
.site-footer{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px var(--edge) 60px;
  display:flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}
.site-footer a:hover{ color: var(--accent); }

/* ============ REVEAL ANIM ============ */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s ease forwards;
}
.hero-name .line:nth-child(1){ animation-delay: 0.05s; }
.hero-name .line:nth-child(2){ animation-delay: 0.15s; }
.hero-sub{ animation-delay: 0.25s; }
.hero-actions{ animation-delay: 0.35s; }
.hero-photo{ animation-delay: 0.45s; }
@keyframes rise{ to{ opacity:1; transform: translateY(0); } }

.tilt-card{ perspective: 1200px; }
.tilt-card .project-visual{
  transition: transform 0.12s ease-out;
  transform-style: preserve-3d;
}

.repo-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-glow);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, gap 0.2s ease;
}
.repo-link:hover{ border-color: var(--accent-glow); gap: 9px; }

/* ============ MORE PROJECTS GRID ============ */
.more-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.more-card{
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  display:flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.more-card:not(.no-link):hover{ border-color: var(--accent); transform: translateY(-4px); }
.more-lang{
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}
.more-card h4{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.more-card p{ color: var(--text-muted); font-size: 0.88rem; }
.more-card .more-arrow{
  position: absolute;
  right: 18px; top: 20px;
  color: var(--text-dim);
  transition: color 0.2s ease, transform 0.2s ease;
}
.more-card:hover .more-arrow{ color: var(--accent); transform: translate(2px,-2px); }
.more-card.no-link{ opacity: 0.75; }

.all-repos-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.all-repos-link:hover{ color: var(--accent-glow); border-color: var(--accent-glow); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px){
  .more-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px){
  .main-nav, .nav-cta{ display:none; }
  .nav-toggle{ display:flex; }
  .main-nav.open{
    display:flex;
    flex-direction: column;
    position: absolute;
    top: 72px; right: var(--edge);
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    gap: 18px;
    z-index: 10;
  }
  .hero-photo{ position: static; margin-top: 48px; width: 140px; height: 140px; }
  .hero{ padding-bottom: 60px; }
  .scroll-cue{ display:none; }
  .about-grid, .content-grid{ grid-template-columns: 1fr; }
  .project-row, .project-row.reverse{
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .project-visual{ order: -1; aspect-ratio: 16/9; }
  .contact-links{ grid-template-columns: 1fr; }
  .more-grid{ grid-template-columns: 1fr; }
}
