:root {
  --bg: #020617;
  --ink: #ecf2ff;
  --muted: #9ba8c7;
  --card: #07162f;
  --card-soft: #0d2142;
  --line: rgba(130, 165, 255, 0.22);
  --line-soft: rgba(130, 165, 255, 0.14);
  --accent: #7c3aed;
  --accent-2: #2563eb;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 10% 10%, rgba(37, 99, 235, 0.2), transparent),
    radial-gradient(760px 420px at 90% 0%, rgba(124, 58, 237, 0.22), transparent),
    var(--bg);
}

.page-wrap {
  min-height: 100vh;
  padding: 2rem 0 1.5rem;
}

.portfolio-shell {
  width: min(1120px, 94%);
  margin: 0 auto;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(10, 24, 52, 0.88), rgba(4, 11, 28, 0.9));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.menu {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.menu a {
  color: #cfdaf8;
  text-decoration: none;
  border: 1px solid var(--line-soft);
  background: rgba(17, 37, 73, 0.5);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.77rem;
  transition: all 0.2s ease;
}

.menu a:hover {
  border-color: rgba(124, 58, 237, 0.6);
  transform: translateY(-1px);
}

.menu span {
  color: #95a6ce;
  margin-right: 0.24rem;
}

.hero {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 0.75rem;
  align-items: start;
}

.hero-copy,
.hero-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(170deg, rgba(12, 29, 59, 0.9), rgba(8, 18, 40, 0.95));
}

.hero-copy {
  padding: 1rem;
}

.eyebrow {
  margin: 0;
  color: #85a2ff;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
}

.hero-copy h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  margin: 0.35rem 0 0.5rem;
  line-height: 1.02;
}

.hero-copy h1 span {
  color: #9f8cff;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 44ch;
  line-height: 1.45;
  font-size: 0.9rem;
}

.hero-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.5rem 0.82rem;
  font-weight: 600;
  font-size: 0.8rem;
}

.btn-primary {
  color: #fff;
  border: 1px solid rgba(124, 58, 237, 0.55);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

.btn-ghost {
  color: #d7e3ff;
  border: 1px solid var(--line);
  background: rgba(17, 37, 73, 0.35);
}

.hero-card {
  padding: 0.55rem;
  max-width: 320px;
  justify-self: end;
}

.hero-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 14px;
  aspect-ratio: 4 / 5;
  max-height: 390px;
}

.block {
  margin-top: 1.35rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(170deg, rgba(10, 24, 50, 0.85), rgba(5, 13, 30, 0.85));
}

.block h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: 0.01em;
}

.block h2 span {
  color: #95a6ce;
  font-size: 0.78em;
  margin-right: 0.38rem;
}

.about-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.about-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(13, 33, 66, 0.44);
  padding: 0.95rem;
}

.chips {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips span {
  color: #eef4ff;
  border: 1px solid rgba(66, 125, 255, 0.45);
  background: linear-gradient(130deg, #0b52c2, #1f6feb);
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.38rem 0.62rem;
}

.project-card {
  margin-top: 1rem;
  border: 1px solid var(--line-soft);
  background: rgba(7, 24, 50, 0.6);
  border-radius: 14px;
  padding: 1rem;
}

.project-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.project-card h3 {
  margin: 0;
  font-size: 1.12rem;
}

.project-card p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.project-card a {
  color: #9fc0ff;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.image-row {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.image-row-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.image-row img {
  width: 100%;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.contact-links {
  margin-top: 1rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.contact-links a,
.contact-links span {
  color: #d7e3ff;
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(13, 33, 66, 0.56);
  padding: 0.44rem 0.82rem;
  font-size: 0.82rem;
}

.contact-links a:hover {
  border-color: rgba(66, 125, 255, 0.6);
}

.footer {
  text-align: center;
  color: #7f91b9;
  font-size: 0.84rem;
  padding: 1rem 0 2rem;
}

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

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

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

  .image-row-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .page-wrap {
    padding: 1rem 0;
  }

  .portfolio-shell {
    padding: 1rem;
    border-radius: 14px;
  }

  .block {
    padding: 0.95rem;
  }

  .image-row,
  .image-row-four {
    grid-template-columns: 1fr;
  }
}
