/* ================================
   RESET
   ================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ================================
   DESIGN TOKENS
   ================================= */

:root {
  --color-primary: #2f6fed;
  --color-secondary: #3a7d44;
  --color-primary-text: #202124;
  --color-secondary-text: #5f6368;
  --color-surface-primary: #fafaf8;
  --color-surface-secondary: #f1f3f4;
  --color-surface-card: #ffffff;
  --color-surface-border: #dadce0;
  --color-bg: #fafaf8;
}

/* ================================
   FONTS  
   ================================= */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-VariableFont_wdth\,wght.ttf");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ================================
   BASE TYPOGRAPHY & STYLING 
  ================================= */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans";
  font-size: 16px;
  line-height: 1.5;
  background: var(--color-bg);
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
}

section {
  padding: 2rem 0;
}

.text-center {
  text-align: center;
}

.text-header {
  color: var(--color-primary);
}

h1 {
  color: var(--color-primary);
  font-size: 1.6rem;
  font-weight: 800;
}

h2 {
  color: var(--color-primary);
  font-size: 1.6rem;
  font-weight: 700;
}

h3 {
  color: var(--color-primary-text);
  font-size: 1.4rem;
  font-weight: 600;
}

h4 {
  color: var(--color-primary-text);
  font-size: 1rem;
  font-weight: 400;
}

p {
  font-size: 1.3rem;
  color: var(--color-primary-text);
}

a {
  font-size: 1.3rem;
}

button {
  font-size: 1.3rem;
  border-radius: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.button-primary {
  color: var(--color-bg);
  background: var(--color-primary);
}

.button-primary:hover {
  background-color: #275fd1;
}

.button-primary:active {
  transform: translateY(1px);
}

.button-secondary {
  color: var(--color-primary-text);
  background-color: transparent;
  border-color: var(--color-surface-border);
}

.button-secondary:hover {
  background-color: #f1f3f4;
}

.button-secondary:active {
  transform: translateY(1px);
}

/* Desktops and larger screens */
@media (min-width: 801px) {
  .container {
    max-width: 900px;
  }
}

/* ================================
   HEADER 
  ================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 72px;
  background: var(--color-surface-secondary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid var(--color-surface-border);
}

.nav {
  display: none;
  pointer-events: none;
}

.nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.nav li {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.nav a {
  text-decoration: none;
  color: var(--color-primary-text);
  transition: all 0.3s ease;
}

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

.nav__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__toggle .bar {
  width: 100%;
  height: 3px;
  background: var(--color-primary-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.logo a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.logo a:hover {
  font-size: 1.6rem;
  color: #275fd1;
}

/* ================================
   HAMBURGER ANIMATION
   ================================= */

.nav__toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ================================
   MOBILE MENU PANEL
   ================================= */

.nav {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-surface-secondary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid var(--color-surface-border);
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.25s ease;
}

.nav__panel ul {
  max-width: 640px;
  margin: 0 auto;
}

.nav ul {
  padding: 1.5rem;
}

.nav a {
  display: block;
  padding: 0.5rem 0;
}

.nav.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ================================
   HERO 
  ================================= */

#hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  background: var(--color-surface-secondary);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(32, 33, 36, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 33, 36, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1),
    rgba(0, 0, 0, 0.75),
    rgba(0, 0, 0, 0)
  );

  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1),
    rgba(0, 0, 0, 0.75),
    rgba(0, 0, 0, 0)
  );

  pointer-events: none;
  opacity: 0.6;
}

.hero__container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Desktops and larger screens */
@media (min-width: 801px) {
  .hero__container {
    transform: translateY(-3rem);
    gap: 2.5rem;
  }
}

/* ================================
   ABOUT
  ================================= */

#about {
  padding: 1rem;
  margin-top: 1rem;
}

/* ================================
   SERVICES
  ================================= */

#services {
  padding: 1rem;
  margin-top: 1rem;
  background: var(--color-surface-secondary);
}

.grid__services {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.service__item {
  width: 100%;
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
  border: 2px solid var(--color-surface-border);
  background: var(--color-surface-card);
  border-radius: 10px;
}

.service__item:hover {
  transform: translateY(-2px);
}

/* Desktops and larger screens */
@media (min-width: 801px) {
  .grid__services {
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
  }

  .service__item {
    flex: 1;
    max-width: 34rem;
  }
}

/* ================================
   PROCESS
  ================================= */

#process {
  padding: 1rem;
  margin-top: 1rem;
}

.list__process {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.process__step {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.process__card {
  width: 100%;
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
  border: 2px solid var(--color-surface-border);
  border-radius: 10px;
  background: var(--color-surface-card);
  transition: transform 0.2s ease;
}

.process__card:hover {
  transform: translateY(-2px);
}

.separator {
  margin: 1.5rem 0;
  font-size: 2rem;
  color: var(--color-surface-border);
}

/* Desktops and larger screens */
@media (min-width: 801px) {
  .process__card {
    max-width: 44rem;
  }
}

/* ================================
   SELECTED WORK
  ================================= */

#work {
  padding: 1rem;
  margin-top: 1rem;
  background: var(--color-surface-secondary);
}

.list__work {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.work__card {
  width: 100%;
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--color-surface-border);
  background: var(--color-surface-card);
  border-radius: 10px;
}

.work__card:hover {
  transform: translateY(-2px);
}

.work__card-image img {
  display: block;
  width: 100%;
  height: auto;
}

.work__card-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
}

.work__card a {
  display: inline-block;
  text-align: center;
  width: 100%;
}

/* Desktops and larger screens */
@media (min-width: 801px) {
  .list__work {
    gap: 3rem;
  }

  .card__button {
    display: flex;
    justify-content: center;
  }

  .work__card a {
    width: 50%;
  }
}

/* ================================
   CONTACT
  ================================= */

#contact {
  padding: 1rem;
  margin-top: 1rem;
}

#contact a {
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

#contact a:hover {
  color: #275fd1;
}

/* ================================
   INDIVIDUAL PROJECT PAGE
================================ */

#project-hero {
  text-align: center;
  background: var(--color-surface-secondary);
}

.project__hero-image {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 2rem;
  display: block;
}

.project__summary {
  max-width: 700px;
  margin: 1.5rem auto 0;
}

.project__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.project__highlight {
  margin-top: 2rem;
}

.project__highlight:first-of-type {
  margin-top: 0;
}

.project__highlight h3 {
  margin-bottom: 1rem;
}

section ul {
  margin-top: 1rem;
  padding-left: 1.5rem;
}

section li + li {
  margin-top: 0.5rem;
}

#project__overview {
  background: var(--color-surface-primary);
}

#project__objectives {
  background: var(--color-surface-secondary);
}

#project__objectives ul li {
  font-size: 1.3rem;
}

#project__technologies ul li {
  font-size: 1.3rem;
}

#project__features {
  background: var(--color-surface-secondary);
}

#project__features ul li {
  font-size: 1.3rem;
}

#project__challenges {
  background: var(--color-surface-secondary);
}

#project__challenges ul li {
  font-size: 1.3rem;
}

/* Desktops and larger screens */
@media (min-width: 801px) {
  .project__buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* ================================
   FOOTER
  ================================= */

footer {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--color-surface-secondary);
}

footer p {
  color: var(--color-primary);
}
