:root {
  --bg: #030712;
  --bg-2: #05091a;
  --surface: rgba(13, 22, 43, 0.72);
  --surface-2: rgba(18, 29, 54, 0.6);
  --text: #eaf2ff;
  --text-soft: #c3d2e6;
  --muted: #8595ad;
  --accent: #31d7c8;
  --accent-2: #7cf0b1;
  --accent-3: #4aa8ff;
  --live: #34e6a0;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  --radius-lg: 28px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(900px circle at 12% -5%, rgba(49, 215, 200, 0.14), transparent 45%),
    radial-gradient(900px circle at 100% 8%, rgba(74, 168, 255, 0.12), transparent 45%),
    linear-gradient(160deg, #02050c 0%, #050b1a 55%, #02050f 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

.container {
  width: min(1160px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.section {
  padding: 5.5rem 0;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(20px);
  background: rgba(3, 7, 18, 0.72);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0;
}

.brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

.nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.04);
}

.nav-cta:hover {
  border-color: var(--accent);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-icon:hover {
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  padding: 5.5rem 0 4rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  line-height: 1.05;
  margin-bottom: 1.2rem;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-heading h2,
.contact-card h2 {
  font-size: clamp(1.9rem, 3vw, 2.9rem);
  line-height: 1.1;
  margin-bottom: 0.9rem;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.section-heading p.lead,
.hero-text,
.about-grid p,
.contact-card p {
  color: var(--text-soft);
  font-size: 1.03rem;
}

.hero-text {
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.8rem 0 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #02121b;
  box-shadow: 0 12px 30px rgba(49, 215, 200, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 16px 40px rgba(49, 215, 200, 0.3);
}

.btn-secondary {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.hero-stats {
  display: flex;
  gap: 2.2rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Hero card */
.hero-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at 100% 0%, rgba(49, 215, 200, 0.16), transparent 60%);
  pointer-events: none;
}

.hero-card .card-label {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-card h3 {
  font-size: 1.3rem;
  margin: 0.6rem 0 0.7rem;
  font-weight: 700;
}

.hero-card p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.hero-card .mini-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.mini-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.mini-ico img {
  width: 20px;
  height: 20px;
}

/* ---------- Tech chip (shared) ---------- */
.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.72rem 0.32rem 0.34rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tech-chip:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
}

.tech-chip .ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.tech-chip .ico img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* ---------- Section heading ---------- */
.section-heading {
  margin-bottom: 2.4rem;
  max-width: 62ch;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 1.6rem;
  align-items: start;
}

.about-grid > p {
  font-size: 1.08rem;
}

.info-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: grid;
  gap: 0.55rem;
}

.info-card h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.info-card a {
  color: var(--text);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.info-card a:hover {
  color: var(--accent);
}

/* ---------- Featured projects ---------- */
.featured-grid {
  display: grid;
  gap: 1.4rem;
}

.featured-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.6rem;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.featured-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--gx, 0%) 0%, var(--glow, rgba(49, 215, 200, 0.12)), transparent 55%);
  pointer-events: none;
}

.featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.logo-tile {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  background: #0a0f1e;
}

.logo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-body {
  position: relative;
  z-index: 1;
}

.featured-top {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.featured-top h3 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(52, 230, 160, 0.12);
  border: 1px solid rgba(52, 230, 160, 0.3);
  color: var(--live);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(52, 230, 160, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 230, 160, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 230, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 230, 160, 0); }
}

.project-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.featured-body > p {
  color: var(--text-soft);
  font-size: 0.98rem;
  max-width: 62ch;
}

.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.2rem 0 1.3rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.link-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.link-btn.solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #02121b;
  border-color: transparent;
}

.link-btn svg {
  width: 15px;
  height: 15px;
}

/* ---------- Other projects grid ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.project-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.proj-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.proj-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: #04121a;
  flex-shrink: 0;
  overflow: hidden;
}

.proj-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.proj-logo.logo-img img {
  object-fit: cover;
  padding: 0;
}

.proj-repo {
  margin-left: auto;
  color: var(--muted);
  transition: color 0.2s ease;
}

.proj-repo:hover {
  color: var(--accent);
}

.proj-repo svg {
  width: 20px;
  height: 20px;
}

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.project-card .ptag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.project-card > p {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin: 0.7rem 0 1rem;
  flex-grow: 1;
}

.tech-row.sm {
  margin: 0;
  gap: 0.45rem;
}

.tech-row.sm .tech-chip {
  padding: 0.24rem 0.6rem 0.24rem 0.28rem;
  font-size: 0.74rem;
}

.tech-row.sm .ico {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

.tech-row.sm .ico img {
  width: 13px;
  height: 13px;
}

.more-projects {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  text-align: center;
  margin: 1.75rem auto 0;
  max-width: 640px;
  padding: 0.9rem 1.25rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.more-projects svg {
  flex-shrink: 0;
  color: var(--text-soft);
}

.more-projects a {
  color: var(--text-soft);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.more-projects a:hover {
  color: var(--text);
}

/* ---------- Stack ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.stack-cat {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.stack-cat h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.stack-cat h3::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.stack-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---------- Differentials ---------- */
.differential-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.differential-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.differential-card .d-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(49, 215, 200, 0.12);
  margin-bottom: 1rem;
  color: var(--accent);
}

.differential-card .d-ico svg {
  width: 22px;
  height: 22px;
}

.differential-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.differential-card p {
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* ---------- Contact ---------- */
.contact-card {
  background: linear-gradient(150deg, rgba(49, 215, 200, 0.1), rgba(74, 168, 255, 0.08)), var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-card p {
  max-width: 52ch;
  margin: 0 auto 1.6rem;
}

.contact-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 1.4rem 0 2.4rem;
  color: var(--muted);
}

.footer-inner {
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .stack-grid,
  .project-grid,
  .differential-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    padding-top: 3.5rem;
  }
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }

  .featured-card {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    padding: 1.4rem;
  }

  .project-grid,
  .stack-grid,
  .differential-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.8rem 0;
  }

  .hero-stats {
    gap: 1.4rem;
  }
}
