/* Base styles */
* {
  box-sizing: border-box;
}

body {
  /* Keep the negative canvas layer above the body background. */
  isolation: isolate;
  margin: 0;
  line-height: 1.6;
  color: #222;
  background: #FAF9F6;

  /* Default font for the website */
  font-family: Menlo, Monaco, "Courier New", monospace;
}

/* Different font for headings */
h1,
h2,
h3 {
  font-family: "Courier New", Courier, monospace;
}

/* One decorative layer; existing content needs no positioning changes. */
#binary-fish-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Layout */
.container {
  width: min(100% - 2rem, 960px);
  margin-inline: auto;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

section {
  padding-block: 3rem;
}

footer {
  padding-block: 1.5rem;
}

/* ==========================================================
   FULL-SCREEN LANDING PAGE
   ========================================================== */

.landing {
    /*
     * 100svh makes the landing section occupy one complete
     * visible viewport, including more reliable behavior on
     * mobile browsers than traditional 100vh.
     */
    min-height: 100svh;

    position: relative;

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

    text-align: center;
}


/*
 * Contains only the introductory name/title.
 * Keeping this separate from .landing makes positioning the
 * scroll indicator independently much easier.
 */
.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* Small introductory text above the name. */
.landing-eyebrow {
    margin-bottom: 1rem;
    font-size: 1rem;
}


/*
 * Main visual element of the landing page.
 *
 * clamp() allows the name to become very large on desktop
 * while remaining usable on smaller screens.
 */
.landing h1 {
    margin: 0;

    font-size: clamp(4rem, 12vw, 10rem);
    line-height: 0.9;
    letter-spacing: -0.06em;
}


/* Supporting information underneath the name. */
.landing-subtitle {
    margin-top: 1.5rem;
    font-size: clamp(1rem, 2vw, 1.4rem);
}


/* ==========================================================
   SCROLL INDICATOR
   ========================================================== */

.scroll-indicator {
    /*
     * Position independently from the centered landing text.
     */
    position: absolute;
    bottom: 2rem;
    left: 50%;

    transform: translateX(-50%);

    font-size: 1.5rem;
    text-decoration: none;
}


/* ==========================================================
   PORTFOLIO
   ========================================================== */

main > section {
    /*
     * Gives every portfolio section substantial breathing room.
     */
    padding: 7rem 0;
}


/*
 * Allows navigation links and the scroll arrow to smoothly
 * move to their respective sections.
 */
html {
    scroll-behavior: smooth;
}

/* Center the navigation bar horizontally */
.header-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Keep all navigation links in one centered row */
.site-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}