@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #05080d;
  --panel: rgba(10,16,24,.78);
  --line: rgba(120,190,220,.14);
  --text: #eaf7ff;
  --muted: #91a6b5;
  --cyan: #38d9ff;
  --blue: #4387ff;
  --glow: 0 0 40px rgba(56,217,255,.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

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

/* Background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(80,160,200,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80,160,200,.045) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  pointer-events: none;
}

.orb {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .12;
  pointer-events: none;
}

.orb-a {
  background: var(--cyan);
  top: -250px;
  right: -120px;
}

.orb-b {
  background: var(--blue);
  bottom: -300px;
  left: -180px;
}

/* Navigation */
.nav {
  height: 76px;
  max-width: 1180px;
  margin: auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
}

.brand {
  font: 700 20px 'Space Grotesk';
  letter-spacing: .08em;
}

.brand-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
  margin-right: 8px;
}

.nav nav {
  display: flex;
  gap: 30px;
  color: var(--muted);
  font-size: 14px;
}

.nav nav a:hover,
.social-mini a:hover {
  color: var(--cyan);
}

.nav-github {
  border: 1px solid var(--line);
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 13px;
  background: rgba(255,255,255,.025);
}

/* Hero */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 110px 28px 80px;
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 80px;
  align-items: center;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--cyan);
  font-weight: 700;
  margin-bottom: 17px;
}

.pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #52f2a7;
  box-shadow: 0 0 12px #52f2a7;
  margin-right: 8px;
}

.hero h1 {
  font: 700 clamp(55px,8vw,94px)/.95 'Space Grotesk';
  letter-spacing: -.06em;
  margin: 0 0 24px;
}

.hero h1 span,
h2 span {
  color: var(--cyan);
}

.tagline {
  font-size: 20px;
  font-weight: 600;
  max-width: 720px;
  margin: 0 0 12px;
}

.intro {
  color: var(--muted);
  line-height: 1.8;
  max-width: 650px;
  font-size: 15px;
}

.actions {
  display: flex;
  gap: 12px;
  margin: 30px 0;
}

.btn {
  padding: 14px 19px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--line);
  transition: .25s;
}

.btn.primary {
  background: var(--cyan);
  color: #031016;
  box-shadow: 0 0 30px rgba(56,217,255,.16);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 38px rgba(56,217,255,.3);
}

.btn.ghost:hover {
  border-color: rgba(56,217,255,.45);
  background: rgba(56,217,255,.06);
}

.social-mini {
  display: flex;
  gap: 22px;
  color: #7f96a6;
  font-size: 12px;
}

/* Hero Card */
.hero-card {
  justify-self: end;
  width: 290px;
  padding: 30px 25px;
  border: 1px solid var(--line);
  background: linear-gradient(
    145deg,
    rgba(15,26,37,.88),
    rgba(7,12,18,.75)
  );
  border-radius: 24px;
  text-align: center;
  box-shadow: var(--glow);
  transform: rotate(2deg);
}

.avatar-wrap {
  width: 130px;
  height: 130px;
  margin: 0 auto 20px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg,var(--cyan),var(--blue));
  box-shadow: 0 0 35px rgba(56,217,255,.2);
}

.avatar-wrap img,
.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: #0a141e;
  font: 700 50px 'Space Grotesk';
  color: var(--cyan);
}

.card-name {
  font: 700 21px 'Space Grotesk';
}

.card-role {
  color: var(--muted);
  font-size: 12px;
  margin: 5px 0 18px;
}

.status {
  font-size: 11px;
  color: #8ca1ae;
}

.status span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #52f2a7;
  box-shadow: 0 0 10px #52f2a7;
  margin-right: 5px;
}

.code-line {
  border-top: 1px solid var(--line);
  margin-top: 23px;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  color: #6e8797;
  font: 12px monospace;
}

.code-line b {
  color: var(--cyan);
}

/* Stats */
.stats {
  max-width: 1124px;
  margin: 0 auto 120px;
  padding: 24px 30px;
  border: 1px solid var(--line);
  background: rgba(8,14,20,.55);
  border-radius: 16px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
}

.stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border-right: 1px solid var(--line);
}

.stats div:last-child {
  border: 0;
}

.stats strong {
  font: 700 25px 'Space Grotesk';
}

.stats span {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* Sections */
.section {
  max-width: 1124px;
  margin: 0 auto 130px;
  padding: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 35px;
  gap: 30px;
}

.section-head h2,
.about h2 {
  font: 700 48px/1 'Space Grotesk';
  letter-spacing: -.04em;
  margin: 0;
}

.section-head > p {
  max-width: 320px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
}

.project-card {
  min-height: 310px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(
    150deg,
    rgba(13,21,30,.86),
    rgba(7,11,17,.8)
  );
  position: relative;
  overflow: hidden;
  transition: .3s;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56,217,255,.35);
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
}

.project-card.featured {
  grid-column: span 2;
}

.project-card.featured:after {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  background: var(--cyan);
  filter: blur(100px);
  opacity: .08;
  right: -80px;
  top: -80px;
}

.project-icon {
  font-size: 27px;
  margin-bottom: 25px;
}

.project-meta {
  font-size: 10px;
  color: var(--cyan);
  letter-spacing: .16em;
  font-weight: 700;
}

.project-card h3 {
  font: 700 25px 'Space Grotesk';
  margin: 9px 0;
}

.project-card p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 520px;
}

.tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.tags span {
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 8px;
  color: #a8bac5;
}

.project-links {
  position: absolute;
  bottom: 23px;
  display: flex;
  gap: 20px;
  font-size: 12px;
  font-weight: 700;
}

.project-links a:hover {
  color: var(--cyan);
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-panel {
  padding-right: 30px;
}

.about h2 {
  margin-bottom: 25px;
}

.about p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

/* Terminal */
.terminal {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #050a0f;
  box-shadow: var(--glow);
}

.terminal-top {
  height: 38px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 13px;
  gap: 6px;
  color: #66808f;
  font: 10px monospace;
}

.terminal-top i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #273640;
}

.terminal-top span {
  margin-left: 7px;
}

.terminal-body {
  padding: 25px;
  font: 12px/1.5 monospace;
  color: #8499a7;
}

.terminal-body p {
  margin: 0 0 8px;
}

.terminal-body b {
  color: var(--cyan);
  margin-right: 8px;
}

.terminal-body .cyan {
  color: #aeeeff;
}

.cursor {
  animation: blink 1s steps(2) infinite;
}

/* Links */
.link-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
}

.link-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(9,15,22,.7);
  transition: .25s;
}

.link-card:hover {
  border-color: rgba(56,217,255,.35);
  transform: translateY(-2px);
  background: rgba(56,217,255,.04);
}

/* FIXED ICON CONTAINER */
.link-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 11px;
  background: rgba(56,217,255,.08);
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-weight: 800;
  overflow: hidden;
}

/* FIXED SOCIAL ICON SIZE */
.link-icon img {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
  display: block;
}

.link-card span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.link-card b {
  font-size: 13px;
}

.link-card small {
  font-size: 11px;
  color: var(--muted);
}

.link-card em {
  margin-left: auto;
  color: #67808f;
  font-style: normal;
}

.links-section {
  margin-bottom: 100px;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  max-width: 1180px;
  margin: auto;
  padding: 30px 28px 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #607786;
  font-size: 11px;
}

footer > div {
  font: 700 14px 'Space Grotesk';
  color: var(--text);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .7s ease,
    transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.delay-1 {
  transition-delay: .1s;
}

.delay-2 {
  transition-delay: .2s;
}

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

/* Mobile */
@media(max-width:800px) {

  .nav nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 70px;
    min-height: auto;
  }

  .hero-card {
    justify-self: start;
    width: 100%;
    max-width: 330px;
  }

  .stats {
    margin-left: 20px;
    margin-right: 20px;
  }

  .section {
    padding: 0 20px;
  }

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

  .project-card.featured {
    grid-column: auto;
  }

  .about {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section-head h2,
  .about h2 {
    font-size: 38px;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

  footer {
    margin: 0 20px;
    padding-left: 0;
    padding-right: 0;
    gap: 12px;
    flex-wrap: wrap;
  }

  .hero h1 {
    font-size: 60px;
  }
}
