/* EDITING GUIDE
   Theme: colors, font, and base text size are in :root below.
   Layout: .page controls the content width and side padding.
   Mobile: the final @media block applies below 700px.
   Keep the existing section order: later rules can override earlier ones.
*/

/* Theme */
:root {
  color-scheme: dark;
  --background: #b94b00;
  --text: #fffaf0;
  --muted: #fff1db;
  --rule: #df8a4c;
  font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
  font-size: 18px;
  line-height: 1.45;
  background: var(--background);
  color: var(--text);
}

/* Base layout and links */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.page {
  max-width: 1132px;
  padding: 0 40px;
  margin: auto;
}

a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 5px;
}

/* Header and navigation */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 25px;
}

.initials {
  font-size: .85rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: .85rem;
}

/* Six equal rainbow segments */
.rainbow {
  height: 5px;
  background: linear-gradient(
    to right,
    #b84c42 0% 16.666%,
    #d17c39 16.666% 33.333%,
    #b0a24c 33.333% 50%,
    #66845a 50% 66.666%,
    #587f9a 66.666% 83.333%,
    #936b98 83.333% 100%
  );
}

/* Introduction and typography */
.intro {
  padding: 68px 0 66px;
}

.eyebrow, .project-number, .section-heading span, .tech, .note, footer {
  font-size: .78rem;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 17px;
}

h1, h2, h3 {
  color: #fffaf0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -.065em;
  margin: 0 0 24px;
}

h1 span {
  color: #fff1db;
}

h2 {
  font-size: 1.8rem;
  margin: 0;
  letter-spacing: -.04em;
}

h3 {
  font-size: 1.2rem;
  margin: 0 0 15px;
}

p {
  margin: 0 0 1.1em;
}

.intro > p {
  max-width: 760px;
}

.intro-note {
  color: var(--muted);
}

.intro > a {
  display: inline-block;
  margin-top: 10px;
  font-size: .85rem;
}

/* Content sections and projects */
section:not(.intro) {
  padding: 32px 0 38px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 24px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}

article {
  max-width: 100%;
  margin-bottom: 48px;
}

.project-number {
  margin-bottom: 9px;
}

.tech {
  margin-top: 18px;
  margin-bottom: 12px;
}

.project-links, .contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  font-size: .85rem;
}

.note {
  max-width: 770px;
  margin-bottom: 0;
}

/* About */
blockquote {
  font-style: italic;
  border-left: 2px solid var(--text);
  padding-left: 22px;
  margin: 26px 0 26px 20px;
}

.skills {
  color: var(--muted);
}

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0 32px;
}

/* Keyboard accessibility */
.skip {
  position: absolute;
  top: 10px;
  left: 16px;
  transform: translateY(-160%);
  background: var(--background);
  padding: 8px;
}

.skip:focus {
  transform: none;
}

/* Optional screenshot: apply class="project-image" to a project image */
.project-image {
  float: left;
  width: 40%;
  height: auto;
  border: 8px solid var(--text);
  margin: 0 1.5rem 1rem 0;
}

article::after {
  content: "";
  display: block;
  clear: both;
}

/* Small screens: remove image floats and reduce spacing */
@media (max-width: 699px) {
  :root {
    font-size: 17px;
  }

  .page {
    padding: 0 16px;
  }

  header {
    padding: 24px 0 22px;
    gap: 16px;
    align-items: flex-start;
  }

  nav {
    gap: 16px;
  }

  .intro {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
    margin-bottom: 28px;
  }

  .section-heading span {
    display: block;
    margin-top: 10px;
  }

  .project-image {
    float: none;
    width: 100%;
    margin: 0 0 20px;
  }

  footer {
    flex-wrap: wrap;
  }

}
