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

/* ── DESIGN TOKENS ───────────────────────── */
:root {
  --bg: #0a0e1b;
  --surface: #0f1528;
  --surface2: #161d35;
  --border: #1e2d4a;
  --border-hover: #2e4570;
  --text: #e8edf5;
  --text-soft: #c5d0de;
  --muted: #6b7f96;
  --accent: #4f9eff;
  --accent2: #7c3aed;
  --accent-dim: rgba(79, 158, 255, 0.08);
  --accent-glow: rgba(79, 158, 255, 0.18);
  --ff: 'Inter', sans-serif;
  --fm: 'Fira Code', monospace;
  --radius: 10px;
}

/* ── BASE ────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

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

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(79, 158, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 158, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 30%, transparent 100%);
}

/* Glow blob */
body::after {
  content: '';
  position: fixed;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(79, 158, 255, 0.1) 0%, rgba(124, 58, 237, 0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── NAV ──────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2.5rem;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px) saturate(1.5);
  background: rgba(10, 14, 27, 0.82);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
}

.nav-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid;
  place-items: center;
  font-family: var(--fm);
  font-size: .72rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: -.02em;
  flex-shrink: 0;
}

.nav-logo-text {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: -.01em;
}

.nav-logo-text span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}

.nav-links a {
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: .4rem .85rem;
  border-radius: 6px;
  letter-spacing: .01em;
  transition: color .2s, background .2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Hire Me button */
.btn-hire {
  display: inline-flex;
  align-items: center;
  padding: .38rem 1rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(79, 158, 255, 0.35);
  text-decoration: none;
  letter-spacing: .01em;
  transition: all .2s;
  background: var(--accent-dim);
  white-space: nowrap;
}

.btn-hire:hover {
  background: var(--accent);
  color: #05080f;
  border-color: var(--accent);
  box-shadow: 0 4px 18px rgba(79, 158, 255, 0.3);
  transform: translateY(-1px);
}

/* ── WRAPPER ─────────────────────────────── */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* ── HERO ────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 2rem 6rem;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .85rem;
  background: var(--accent-dim);
  border: 1px solid rgba(79, 158, 255, 0.2);
  border-radius: 999px;
  font-family: var(--fm);
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .04em;
  margin-bottom: 1.75rem;
  width: fit-content;
  opacity: 0;
  animation: fadeUp .5s ease .1s forwards;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease infinite;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.05em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp .55s ease .2s forwards;
}

.hero-name .line1 {
  display: block;
  color: var(--text);
}

.hero-name .line2 {
  display: block;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-family: var(--fm);
  font-size: clamp(.85rem, 2vw, .97rem);
  color: var(--muted);
  margin-bottom: 1.75rem;
  min-height: 1.65em;
  opacity: 0;
  animation: fadeUp .55s ease .3s forwards;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: .85em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

.hero-desc {
  max-width: 520px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp .55s ease .4s forwards;
}

.hero-cta {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .55s ease .5s forwards;
}

/* Scroll hint */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
  margin-top: 3rem;
  opacity: 0;
  animation: fadeUp .55s ease .7s forwards;
}

.scroll-hint-line {
  display: block;
  width: 1.5px;
  height: 40px;
  background: linear-gradient(180deg, var(--accent), transparent);
  animation: scrollLine 1.8s ease infinite;
  transform-origin: top;
}

.scroll-hint-label {
  font-family: var(--fm);
  font-size: .62rem;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); opacity: 1; }
  60%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .75rem 1.5rem;
  border-radius: 8px;
  font-family: var(--ff);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: all .2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #05080f;
}

.btn-primary:hover {
  background: #6aaeff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 158, 255, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.03);
}

/* ── DIVIDER ─────────────────────────────── */
.hr {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
  position: relative;
  z-index: 1;
  border: none;
}

/* ── SECTION ─────────────────────────────── */
.section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

.sec-label {
  font-family: var(--fm);
  font-size: .7rem;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .65rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sec-label::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1.5px;
  background: var(--accent);
}

.sec-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: 3rem;
  color: var(--text);
}


/* ── ABOUT ───────────────────────────────── */
.about-text {
  max-width: 620px;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: .97rem;
  line-height: 1.8;
  font-weight: 400;
}

.about-text strong {
  color: var(--text-soft);
  font-weight: 600;
}

.stack-groups {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.grp-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .7rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: .45rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: -.01em;
  transition: all .2s;
  cursor: default;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* ── PROJECTS ────────────────────────────── */
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}

.proj-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .3s;
}

.proj-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  background: var(--surface2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(79, 158, 255, 0.1);
}

.proj-card:hover::after {
  opacity: 1;
}

.proj-ico {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: .1rem;
}

.proj-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}

.proj-desc {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  font-weight: 400;
}

.proj-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.proj-lang {
  font-family: var(--fm);
  font-size: .68rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Live badge on project cards */
.proj-live {
  font-family: var(--fm);
  font-size: .68rem;
  font-weight: 600;
  color: var(--accent);
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(79, 158, 255, 0.25);
  background: var(--accent-dim);
  opacity: 0;
  transition: opacity .2s;
  letter-spacing: .03em;
}

.proj-card:hover .proj-live {
  opacity: 1;
  box-shadow: 0 0 10px rgba(79, 158, 255, 0.25);
}

/* ── CONTACT ─────────────────────────────── */
#contact {
  text-align: center;
  padding-bottom: 8rem;
}

#contact .sec-label {
  justify-content: center;
}

#contact .sec-label::before {
  display: none;
}

#contact .sec-title {
  text-align: center;
}

.contact-sub {
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 2.25rem;
  font-size: .97rem;
  line-height: 1.8;
  font-weight: 400;
}

.socials {
  display: flex;
  justify-content: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.soc {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: .01em;
  transition: all .2s;
}

.soc:hover {
  color: var(--accent);
  border-color: rgba(79, 158, 255, 0.4);
  background: var(--accent-dim);
}

/* ── FOOTER ──────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: var(--fm);
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .04em;
  position: relative;
  z-index: 1;
}

/* ── REVEAL ANIMATION ────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.rv.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── KEYFRAMES ───────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 700px) {
  nav {
    padding: 0 1.25rem;
  }
  .nav-links {
    gap: 0;
  }
  .nav-links a {
    padding: .4rem .6rem;
    font-size: .75rem;
  }
  #hero {
    min-height: auto;
    padding: 100px 1.25rem 3rem;
  }
  .wrap {
    padding: 0 1.25rem;
  }
  .proj-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 4.5rem 0;
  }
}
