:root {
  --background: #070b14;
  --surface: rgba(15, 20, 35, 0.85);
  --text: #ffffff;
  --text-muted: #9ca3af;
  --purple: #7f7bff;
  --blue: #3b82f6;
  --border: rgba(255, 255, 255, 0.06);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  background: var(--background);
  color: var(--text);

  font-family: Arial, Helvetica, sans-serif;

  overflow-x: hidden;
}

/* BACKGROUND */

.background-glow {
  position: fixed;

  top: -200px;
  right: -200px;

  width: 500px;
  height: 500px;

  background: radial-gradient(
    circle,
    rgba(108, 99, 255, 0.12),
    transparent 70%
  );

  filter: blur(80px);

  z-index: -1;
}

/* LIGHTNING PATTERN */

.lightning-pattern {
  position: fixed;
  top: -150px;
  right: -150px;
  bottom: -150px;
  left: -150px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.03;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cpath d='M65 10 L40 70 H60 L45 130 L95 55 H70 L85 10 Z' fill='%237f7bff' fill-opacity='0.35'/%3E%3C/svg%3E");
  background-size: 150px;
  background-repeat: repeat;
}

body::before {
  content: "";

  position: fixed;

  bottom: -250px;
  left: -250px;

  width: 500px;
  height: 500px;

  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.10),
    transparent 70%
  );

  filter: blur(90px);

  z-index: -1;
}

/* LINKS */

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

.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 2000;
  padding: 12px 16px;
  background: #101727;
  border: 2px solid var(--purple);
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* HEADER */

.header {
  width: 100%;
  height: 76px;

  padding: 0 8%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  position: fixed;
  top: 0;

  background: rgba(7, 11, 20, 0.96);
  border-bottom: 1px solid rgba(127, 123, 255, 0.2);

  z-index: 999;
}

/* LOGO */

.logo {
  font-family: "Courier New", monospace;
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.logo span {
  color: var(--purple);
}

/* NAV */

.nav-toggle {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  color: #d1d5db;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav a span {
  color: var(--purple);
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
}

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

.logo:focus-visible,
.nav-toggle:focus-visible,
.nav a:focus-visible,
.hero a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 4px;
}

/* HERO */

.hero {
  width: min(100%, 1600px);
  min-height: 100vh;
  margin: 0 auto;

  padding: 140px 8% 90px;

  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  align-items: center;

  gap: clamp(2rem, 5vw, 6rem);
}

/* HERO CONTENT */

.hero-content {
  min-width: 0;
  max-width: 680px;
  padding-left: clamp(1rem, 2vw, 2rem);
  border-left: 1px solid rgba(127, 123, 255, 0.35);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--purple);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  font-size: clamp(4.5rem, 7vw, 7.25rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
  margin-bottom: 1.7rem;
}

.hero h1 span {
  display: block;
  color: var(--purple);
}

.hero-subtitle {
  font-size: 1.3rem;
  line-height: 1.2;
  color: #e6e9f2;
  margin-bottom: 1rem;
}

.eyebrow,
.hero-description {
  line-height: 1.65;
}

.hero-description {
  max-width: 560px;
  color: var(--text-muted);
}

/* BUTTONS */

.hero-actions {
  display: flex;
  gap: 1rem;

  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  min-height: 48px;
  border-radius: 4px;
  font-weight: bold;
}

.primary {
  background: #625bd2;
  border: 1px solid #827bf2;
  color: var(--text);
}

.secondary {
  background: transparent;
  border: 1px solid rgba(160, 163, 211, 0.45);
}

.secondary:hover {
  background: rgba(127, 123, 255, 0.08);
}

/* SOCIAL LINKS */

.social-links {
  display: flex;
  gap: 0.5rem;
  width: fit-content;
  margin-top: 2.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(127, 123, 255, 0.28);
}

.social-links a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  font-size: 1.15rem;
}

.social-links a:hover {
  color: var(--purple);
}

.social-links a span {
  display: none;
}

/* MINI TERMINAL */

.mini-terminal {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 480px;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(127, 123, 255, 0.28);
}

.terminal-title {
  display: block;
  color: #86efac;
  margin-bottom: 0.8rem;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
}

.terminal-line {
  color: #d1d5db;
  margin-bottom: 0.45rem;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
}

/* HERO SIDE */

.hero-side {
  min-width: 0;
  margin-top: 3rem;
}

/* CODE WINDOW */

.code-window {
  width: 100%;
  background: #101727;
  border: 1px solid rgba(127, 123, 255, 0.24);
  border-radius: 5px;
  overflow: hidden;
}

/* TOP WINDOW */

.window-top {
  height: 48px;
  display: flex;
  align-items: center;
  padding-right: 16px;
  background: #131d30;
  border-bottom: 1px solid rgba(127, 123, 255, 0.18);
}

.window-tab {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  border-top: 2px solid var(--purple);
  border-right: 1px solid rgba(127, 123, 255, 0.18);
  color: var(--text);
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
}

.window-language {
  margin-left: auto;
  color: var(--blue);
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

/* CODE */

.code-window pre {
  padding: 26px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-window code {
  display: block;
  line-height: 1.75;
  color: #d1d5db;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
}

/* COLORS */

.keyword {
  color: #c084fc;
}

.operator {
  color: white;
}

.property {
  color: #60a5fa;
}

.string {
  color: #86efac;
}

.function {
  color: #f9a8d4;
}

.method {
  color: #facc15;
}

/* HERO STATS */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.2rem;
  border-top: 1px solid rgba(127, 123, 255, 0.2);
  border-bottom: 1px solid rgba(127, 123, 255, 0.2);
}

.hero-stats > div {
  padding: 1rem 1.2rem 1rem 0;
}

.hero-stats > div + div {
  padding-left: 1.2rem;
  border-left: 1px solid rgba(127, 123, 255, 0.2);
}

.hero-stats dt {
  color: var(--text-muted);
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.hero-stats dd {
  color: var(--text);
  font-family: "Courier New", monospace;
  font-size: 1.35rem;
  font-weight: bold;
}

/* SECTIONS */

.projects-section,
.about-section {
  padding: 80px 8%;
}

/* SECTION HEADER */

.section-header {
  max-width: 650px;

  margin-bottom: 3rem;
}

.section-label {
  color: var(--purple);

  font-weight: bold;

  margin-bottom: 0.8rem;

  text-shadow:
  0 0 8px rgba(127, 123, 255, 0.35);
}

.section-header h2 {
  font-size: 2.5rem;

  margin-bottom: 1rem;
}

.section-header p {
  line-height: 1.7;
}

.section-header p:not(.section-label) {
  color: var(--text-muted);
}

/* SECTION INTRO */

.projects-section .section-header,
.about-section .section-header {
  max-width: 850px;
  margin-bottom: 3.5rem;
}

.projects-section .section-label,
.about-section .section-label {
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: none;
  margin-bottom: 1.25rem;
}

.projects-section .section-header h2,
.about-section .section-header h2 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: -0.055em;
  margin-bottom: 1.3rem;
}

.projects-section .section-header > p:last-child,
.about-section .section-header > p:last-child {
  max-width: 590px;
}

.projects-section,
.about-section {
  border-top: 1px solid rgba(127, 123, 255, 0.18);
}

/* PROJECTS */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid rgba(127, 123, 255, 0.22);
}

.project-image {
  min-width: 0;
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  padding: clamp(8px, 1vw, 14px);
  background: #101727;
  border: 1px solid rgba(127, 123, 255, 0.24);
}

.project-card:hover .project-image,
.project-card:focus-within .project-image {
  border-color: rgba(127, 123, 255, 0.58);
}

.project-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-content {
  min-width: 0;
}

.project-number {
  display: inline-block;
  margin-right: 1rem;
  color: var(--purple);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #4ade80;
  margin-bottom: 1.5rem;
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.project-status::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
}

.project-status.progress {
  color: #60a5fa;
}

.project-content h3 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.project-content p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin-bottom: 1.8rem;
}

.project-tags span {
  color: #d1d5db;
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
}

.project-tags span + span::before {
  content: "/";
  margin-right: 0.7rem;
  color: var(--purple);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.project-links a {
  color: var(--text);
  font-weight: bold;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(127, 123, 255, 0.45);
}

.project-links a::after {
  content: "↗";
  margin-left: 0.4rem;
  color: var(--purple);
}

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

.project-links a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 4px;
}

/* ABOUT */

.about-container {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.85fr);
  align-items: start;
  gap: clamp(2.5rem, 6vw, 6rem);
}

.about-story {
  max-width: 740px;
  padding-left: clamp(1rem, 2vw, 2rem);
  border-left: 1px solid rgba(127, 123, 255, 0.35);
}

.about-story h3 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.about-story h3 span {
  color: var(--purple);
}

.about-story p {
  color: #d1d5db;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-story p:first-of-type {
  color: #e6e9f2;
}

.about-side {
  padding: 1.6rem;
  background: #101727;
  border: 1px solid rgba(127, 123, 255, 0.22);
  border-radius: 4px;
}

.about-side h3 {
  color: var(--purple);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.about-side dl > div {
  padding: 1rem 0;
  border-top: 1px solid rgba(127, 123, 255, 0.18);
}

.about-side dl > div:last-child {
  padding-bottom: 0;
}

.about-side dt {
  color: var(--text-muted);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.about-side dd {
  color: var(--text);
  line-height: 1.5;
}

/* FOOTER */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  padding: 2rem 8%;
  border-top: 1px solid rgba(127, 123, 255, 0.18);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--text);
  border-bottom: 1px solid rgba(127, 123, 255, 0.45);
}

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

.footer a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 4px;
}

/* APOLLO */

.apollo-bot {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.apollo-bot:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 5px;
}

.apollo-img {
  width: 90px;
  height: auto;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3));
}

.apollo-speech {
  display: block;
  max-width: 220px;
  margin-bottom: 30px;
  padding: 12px 14px;
  background: #101727;
  color: #d1d5db;
  border: 1px solid rgba(127, 123, 255, 0.5);
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  position: relative;
}

.apollo-label {
  display: block;
  color: var(--purple);
  font-family: "Courier New", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
}

.apollo-speech::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 22px;
  width: 10px;
  height: 10px;
  background: #101727;
  border-right: 1px solid rgba(127, 123, 255, 0.5);
  border-bottom: 1px solid rgba(127, 123, 255, 0.5);
  transform: rotate(-45deg);
}

/* APOLLO AI */

.apollo-chat-close,
.apollo-chat-actions button {
  border: 1px solid rgba(127, 123, 255, 0.5);
  border-radius: 4px;
  background: #101727;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.apollo-chat-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 16px 6px 10px;
  border: 1px solid rgba(127, 123, 255, 0.6);
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(127, 123, 255, 0.22), rgba(59, 130, 246, 0.1));
  box-shadow: 0 0 18px rgba(127, 123, 255, 0.12);
  color: #eae8ff;
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.apollo-chat-open[hidden] {
  display: none;
}

.apollo-chat-open img {
  object-fit: contain;
}

.apollo-chat-open:hover {
  border-color: var(--purple);
  background: linear-gradient(120deg, rgba(127, 123, 255, 0.38), rgba(59, 130, 246, 0.2));
  box-shadow: 0 0 24px rgba(127, 123, 255, 0.25);
}

.apollo-chat-close:hover,
.apollo-chat-actions button:hover {
  border-color: var(--purple);
  background: #191f34;
}

.apollo-chat-open:focus-visible,
.apollo-chat button:focus-visible,
.apollo-chat textarea:focus-visible,
.apollo-chat-messages:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}

.apollo-chat {
  color-scheme: dark;
  position: fixed;
  inset: auto 28px 28px auto;
  width: min(420px, calc(100% - 56px));
  height: min(560px, calc(100dvh - 56px));
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #101727;
  color: var(--text);
  border: 1px solid rgba(127, 123, 255, 0.5);
  border-radius: 4px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}

.apollo-chat[open] {
  display: flex;
  flex-direction: column;
}

.apollo-chat::backdrop {
  background: rgba(7, 11, 20, 0.7);
}

.apollo-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.apollo-chat-header img {
  object-fit: contain;
}

.apollo-chat-header h2 {
  font-size: 1.15rem;
  line-height: 1.3;
}

.apollo-chat-close {
  flex: 0 0 44px;
  height: 44px;
  margin-left: auto;
  font-size: 1.5rem;
}

.apollo-chat-description {
  padding: 0 18px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.apollo-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.apollo-chat-message {
  width: fit-content;
  max-width: 85%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(127, 123, 255, 0.24);
  border-radius: 10px 10px 10px 2px;
  background: #191f34;
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.apollo-chat-message-apollo {
  margin-right: auto;
}

.apollo-chat-message-user {
  margin-left: auto;
  border-color: rgba(127, 123, 255, 0.55);
  border-radius: 10px 10px 2px 10px;
  background: #3e3779;
}

.apollo-chat-message:last-child {
  margin-bottom: 0;
}

.apollo-chat-message strong {
  display: block;
  margin-bottom: 4px;
  color: var(--purple);
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
}

.apollo-chat-message-user strong {
  color: #ddd7ff;
}

.apollo-chat-message span {
  white-space: pre-wrap;
}

.apollo-chat-form {
  padding: 16px 18px 10px;
}

.apollo-chat-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.apollo-chat-form textarea {
  display: block;
  width: 100%;
  resize: none;
  padding: 10px 12px;
  background: var(--background);
  color: var(--text);
  border: 1px solid rgba(127, 123, 255, 0.4);
  border-radius: 4px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
}

.apollo-chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.apollo-chat-actions small {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.apollo-chat-actions button {
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 16px;
}

.apollo-chat-form :disabled {
  opacity: 0.6;
  cursor: wait;
}

.apollo-chat-status {
  min-height: 2.5em;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
