/* ===================================== */
/* ============ DESIGN SYSTEM ========== */
/* ===================================== */

:root {
  /* ===== Colors ===== */
  --color-bg: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-dark: #020617;

  --color-primary: #38bdf8;
  --color-white: #ffffff;
  --color-black: #000000;

  /* ===== Typography ===== */
  --font-main: "Inter", sans-serif;

  --fs-base: 1.6rem;
  --fs-sm: 1.4rem;
  --fs-md: 2rem;
  --fs-lg: 2.4rem;
  --fs-xl: 3.2rem;
  --fs-xxl: 4.8rem;

  /* ===== Spacing ===== */
  --space-xs: 0.8rem;
  --space-sm: 1.6rem;
  --space-md: 2.4rem;
  --space-lg: 3.2rem;
  --space-xl: 4.8rem;

  /* ===== Radius ===== */
  --radius-sm: 0.6rem;
  --radius-md: 0.8rem;
  --radius-lg: 1.2rem;

  /* ===== Motion ===== */
  --transition: 0.3s ease;

  /* ===== Layout ===== */
  --header-height: 8rem;
}

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

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

/* ===================================== */
/* ============ BASE SETUP ============= */
/* ===================================== */

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  color-scheme: dark;

  scroll-padding-top: var(--header-height);
}

html,
body {
  height: auto;
}

body {
  font-family: var(--font-main);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-white);
  background: linear-gradient(135deg,
      var(--color-bg),
      var(--color-bg-secondary));

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);

  width: 900px;
  height: 900px;

  background: radial-gradient(circle, rgba(56, 189, 248, 0.15)0%, rgba(56, 189, 248, 0.08) 30%, transparent 70%);

  pointer-events: none;
  z-index: -1;

  opacity: 0.15;
}

/* ===== Offset for fixed header ===== */
main {
  margin-top: var(--header-height);
  width: 100%;
}

/* ===================================== */
/* ============ TYPOGRAPHY ============= */
/* ===================================== */

p {
  font-size: 1.6rem;
  line-height: 1.7;
  max-width: 65ch;
  margin: 0 auto;
}

.section-text {
  font-size: 1.7rem;
  line-height: 1.8;
  opacity: 0.85;
  max-width: 70ch;
  margin: 0 auto;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.3px;
}

code {
  font-family: "Cascadia Code", monospace !important;
  font-size: 1.2rem;
  border-radius: var(--radius-sm);
}

.section-title {
  font-size: clamp(2.8rem, 3vw, 3.6rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

.section-subtitle {
  font-size: 1.7rem;
  opacity: 0.8;
  margin-bottom: 5rem;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* ===================================== */
/* ======= REUSABLE COMPONENTS ========= */
/* ===================================== */

.page-wrapper {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.page-wrapper.loaded {
  opacity: 1;
}

.container {
  width: min(90%, 110rem);
  margin: 0 auto;
}

.section {
  padding: clamp(8rem, 10vw, 12rem) 0;
  text-align: center;

  opacity: 0;
  transform: translateY(6rem);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section.reveal {
  opacity: 1;
  transform: translateY(0);
}

a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
