@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap");

:root {
  color-scheme: dark;
  --background: #080b14;
  --surface: #0d1322;
  --surface-hover: #111c30;
  --primary: #4385ff;
  --primary-light: #82b0ff;
  --text: #edf2ff;
  --muted: #8b9bb7;
  --border: #1e2d46;
  --font: "Space Grotesk", sans-serif;
  --mono: "Space Mono", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: var(--font);
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
}

::selection {
  background: var(--primary);
  color: white;
}

::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: #263c60;
  padding: 10px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.container {
  width: min(1280px, 90%);
  margin: auto;
}

/* Navigation */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 20, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  width: min(1280px, 90%);
  height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -2px;
}

.brand::before {
  content: "";
  color: var(--primary);
  margin-right: 6px;
}

.brand span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a::before {
  content: "[";
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-links a::after {
  content: "]";
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::before,
.nav-links a:hover::after {
  opacity: 1;
}

#menu-toggle {
  display: none;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

#menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: var(--primary);
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-image:
    linear-gradient(#4385ff0c 1px, transparent 1px),
    linear-gradient(90deg, #4385ff0c 1px, transparent 1px);

  background-size: 48px 48px;
  mask-image: linear-gradient(to right, transparent, black);
}

.hero::after {
  content: "01 / INTRODUCTION";
  position: absolute;
  bottom: 30px;
  right: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-light);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
}

.hero h1 {
  font-size: clamp(42px, 7vw, 100px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.065em;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  max-width: 620px;
  margin-top: 32px;
  padding-left: 20px;
  border-left: 2px solid var(--primary);
  color: var(--muted);
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  font-family: var(--mono);
  font-size: 12px;
  transition: 0.2s;
}

.primary {
  color: #ffffff;
  background: #2563eb;
  border: 1px solid var(--primary);
  box-shadow: 4px 4px 0 #17396d;
}

.primary:hover {
  background: #3478f6;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #17396d;
}

.secondary {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid var(--border);
}

.secondary:hover {
  background: var(--surface);
  border-color: var(--primary);
}

/* Sections */

.section {
  padding-top: 100px;
  padding-bottom: 100px;
}

h2 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.15;
  letter-spacing: -2.5px;
}

.section-description {
  max-width: 650px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 16px;
}

.about,
.contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about .container,
.contact .container {
  position: relative;
}

.about .container::after {
  content: "02";
  position: absolute;
  right: 0;
  top: -35px;
  color: transparent;
  -webkit-text-stroke: 1px #243958;
  font-size: 140px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

/* Skills */

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.skills span {
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--primary-light);
  font-family: var(--mono);
  font-size: 12px;
  transition: 0.2s;
}

.skills span::before {
  content: "+ ";
  color: var(--primary);
}

.skills span:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
}

/* Project filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 36px 0 28px;
  border-bottom: 1px solid var(--border);
}

.filter {
  position: relative;
  padding: 12px 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.filter:hover {
  color: var(--primary-light);
}

.filter.active {
  color: var(--primary-light);
}

.filter.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 10px #4385ff55;
}

/* Asymmetric project layout */

.project-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  position: relative;
  overflow: hidden;
  grid-column: span 2;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition:
    background 0.25s,
    border-color 0.25s,
    transform 0.25s;
}

.project-card:nth-child(1),
.project-card:nth-child(6) {
  grid-column: span 4;
}

.project-card:nth-child(2),
.project-card:nth-child(6) {
  grid-column: span 2;
}

.project-card:nth-child(3) {
  grid-column: span 3;
}

.project-card:nth-child(4) {
  grid-column: span 3;
}

.project-card:nth-child(5) {
  grid-column: span 4;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.project-card::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 12px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #375580;
  border-right: 1px solid #375580;
}

.project-card:hover {
  background: var(--surface-hover);
  border-color: #34598f;
  transform: translateY(-3px);
}

.project-card:hover::before {
  width: 100%;
}

.project-card[hidden] {
  display: none;
}

.project-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 28px;
  background: #122441;
  border: 1px solid #294d80;
  color: var(--primary-light);
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
}

.atlas {
  background: #142e59;
  color: #82b0ff;
}

.tempo {
  background: #10283f;
  color: #70c5ff;
}

.rightly {
  background: #18264b;
  color: #a0b6ff;
}

.docupad {
  background: #102c46;
  color: #64c8ff;
}

.coutour {
  background: #172950;
  color: #8ba8ff;
}

.littlecity {
  background: #102b3c;
  color: #7ad8ff;
}

.category {
  color: var(--primary-light);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
}

.project-card h3 {
  margin-top: 10px;
  font-size: 25px;
  letter-spacing: -0.8px;
}

.project-card p {
  max-width: 480px;
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 14px;
  flex-grow: 1;
}

.project-card a {
  color: var(--primary-light);
  font-family: var(--mono);
  font-size: 12px;
}

.project-card a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.project-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.project-status::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
}

/* Contact */

.contact {
  position: relative;
  overflow: hidden;
}

.contact h2 {
  font-size: clamp(42px, 6vw, 80px);
}

.contact .container::after {
  content: "</>";
  position: absolute;
  right: 0;
  bottom: 0;
  color: transparent;
  -webkit-text-stroke: 1px #243958;
  font-family: var(--mono);
  font-size: 120px;
  pointer-events: none;
}

/* Footer */

footer {
  padding: 30px 0;
  border-top: 2px solid var(--primary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

footer a:hover {
  color: var(--primary-light);
}

:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 5px;
}

/* Tablet */

@media (max-width: 900px) {
  .hero {
    min-height: 580px;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid .project-card {
    grid-column: span 1;
  }

  .about .container::after,
  .contact .container::after {
    display: none;
  }
}

/* Mobile */

@media (max-width: 600px) {
  .navbar {
    height: 64px;
  }

  #menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    padding: 24px 5%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    min-height: 540px;
    padding: 70px 0 100px;
  }

  .hero h1 {
    font-size: clamp(36px, 9vw, 56px);
  }

  .hero p {
    font-size: 15px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 1px;
  }

  .section {
    padding-top: 65px;
    padding-bottom: 65px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 260px;
    padding: 24px;
  }

  .filters {
    gap: 16px;
  }

  .filter {
    font-size: 11px;
  }

  .footer-content {
    flex-direction: column;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
