:root {
  --bg: #07111f;
  --bg-2: #0b1728;
  --panel: rgba(255,255,255,.075);
  --panel-2: rgba(255,255,255,.115);
  --text: #f4f8ff;
  --muted: #a9b6c9;
  --line: rgba(255,255,255,.16);
  --blue: #69b7ff;
  --cyan: #74f3ff;
  --green: #8ff0a4;
  --gold: #ffd36d;
  --red: #ff7d7d;
  --shadow: 0 24px 80px rgba(0,0,0,.38);
  --radius: 28px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(105,183,255,.24), transparent 34%),
    radial-gradient(circle at 88% 6%, rgba(116,243,255,.16), transparent 30%),
    radial-gradient(circle at 70% 82%, rgba(143,240,164,.13), transparent 35%),
    linear-gradient(135deg, #050914 0%, #07111f 44%, #081b2c 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), transparent 82%);
}

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

.wrap {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(7,17,31,.72);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}

.element {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(116,243,255,.55);
  background:
    linear-gradient(145deg, rgba(105,183,255,.35), rgba(7,17,31,.65)),
    rgba(255,255,255,.06);
  border-radius: 12px;
  box-shadow: inset 0 0 28px rgba(116,243,255,.16), 0 12px 32px rgba(0,0,0,.28);
  display: grid;
  place-items: center;
  position: relative;
}

.element small {
  position: absolute;
  top: 5px;
  left: 7px;
  font-size: 9px;
  color: var(--muted);
  font-weight: 700;
}

.element strong {
  font-size: 20px;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.navlinks a {
  padding: 10px 12px;
  border-radius: 999px;
}

.navlinks a:hover {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

.hero {
  padding: 86px 0 54px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 44px;
  max-width: var(--max);
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  border: 1px solid rgba(143,240,164,.3);
  background: rgba(143,240,164,.075);
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}

h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(46px, 7vw, 92px);
  line-height: .92;
  letter-spacing: -.07em;
}

.gradient {
  background: linear-gradient(90deg, #fff, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
  margin: 24px 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.13);
  border-color: rgba(116,243,255,.45);
}

.btn.primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #06101d;
  border: 0;
  box-shadow: 0 18px 50px rgba(105,183,255,.26);
}

.lab-card {
  position: relative;
  min-height: 500px;
  max-width: 480px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.04)),
    rgba(255,255,255,.045);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 28px;
}

.lab-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(circle at 30% 22%, rgba(116,243,255,.32), transparent 24%),
    radial-gradient(circle at 78% 72%, rgba(143,240,164,.2), transparent 28%);
  opacity: .8;
  pointer-events: none;
}

.terminal {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(3,8,15,.72);
  padding: 20px;
  height: auto;
  box-shadow: inset 0 0 60px rgba(116,243,255,.06);
}

.terminal-bar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.lights span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
}
.lights span:first-child { background: #ff5f57; }
.lights span:nth-child(2) { background: #febc2e; }
.lights span:last-child { background: #28c840; }

.screen {
  padding: 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #dcecff;
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: break-word;
  word-break: break-word;
}

.screen .muted { color: #7f91aa; }
.screen .good { color: var(--green); }
.screen .blue { color: var(--cyan); }
.screen .gold { color: var(--gold); }

.orbit {
  position: absolute;
  right: 18px;
  bottom: 12px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px dashed rgba(116,243,255,.28);
  display: grid;
  place-items: center;
  opacity: .72;
  pointer-events: none;
}

.orbit::before {
  content: "Ct";
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  border: 1px solid rgba(116,243,255,.5);
  background: rgba(105,183,255,.16);
  font-weight: 900;
  font-size: 28px;
}

section {
  padding: 54px 0;
}

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

h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -.045em;
}

.section-head p {
  color: var(--muted);
  max-width: 560px;
  margin: 0;
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 14px 50px rgba(0,0,0,.16);
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.project:hover {
  transform: translateY(-4px);
  background: var(--panel-2);
  border-color: rgba(116,243,255,.38);
}

.project::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--glow, rgba(105,183,255,.18));
  filter: blur(4px);
  opacity: .72;
}

.project > * {
  position: relative;
  z-index: 1;
}

.tagrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.arrow {
  color: var(--cyan);
  font-weight: 900;
  font-size: 20px;
}

.project h3 {
  font-size: 24px;
  margin: 0 0 12px;
  letter-spacing: -.025em;
}

.project p {
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.status {
  margin-top: 22px;
  color: #dfeaff;
  font-size: 13px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07);
  padding: 7px 9px;
  border-radius: 999px;
}

.featured {
  grid-column: span 2;
  min-height: 310px;
  background:
    linear-gradient(135deg, rgba(105,183,255,.16), rgba(143,240,164,.09)),
    var(--panel);
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.about-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  border-radius: 24px;
  padding: 26px;
}

.about-card h3 {
  margin: 0 0 14px;
  font-size: 25px;
}

.about-card p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.stack span {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.065);
  color: #d7e6fb;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

.callout {
  margin: 50px 0 0;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(116,243,255,.28);
  background:
    linear-gradient(135deg, rgba(116,243,255,.16), rgba(105,183,255,.08)),
    rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.callout h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.callout p {
  color: var(--muted);
  margin: 12px 0 0;
  line-height: 1.6;
  max-width: 700px;
}

footer {
  padding: 36px 0 50px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 34px;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}

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

  .lab-card {
    min-height: auto;
  }

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

  .featured {
    grid-column: span 1;
  }

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

@media (max-width: 640px) {
  .nav {
    height: auto;
    padding: 14px 0;
    align-items: start;
  }

  .brand {
    gap: 10px;
  }

  .element {
    width: 40px;
    height: 40px;
  }

  .element small {
    font-size: 7px;
    top: 4px;
    left: 5px;
  }

  .element strong {
    font-size: 17px;
  }

  .navlinks {
    display: none;
  }

  .hero {
    padding-top: 54px;
  }

  .lab-card {
    padding: 16px;
  }

  .terminal {
    border-radius: 14px;
  }

  .screen {
    padding: 14px;
    font-size: 13px;
  }

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

  .project {
    min-height: 240px;
  }

  .orbit {
    display: none;
  }
}

/* Cursor styles for terminal */
.terminal-bar:hover .cursor, .terminal-bar:focus .cursor {
  display: block;
}
.cursor {
  display: none;
  position: absolute;
  left: 100%;
  width: 8px;
  height: 16px;
  background: var(--cyan);
  animation: blink 1s step-end infinite;
}
