/* =========================================================
   COLORS & SIZES
   Change the site's look here. Everything below uses these.
   ========================================================= */
:root {
  --bg:          #16261e;  /* page background (dark forest green) */
  --bg-topbar:   rgba(22, 38, 30, 0.92); /* top bar once you scroll */
  --text:        #eef2ec;  /* main text */
  --text-muted:  #a9bcae;  /* labels and secondary text */
  --line:        #2d4637;  /* thin divider lines */
  --accent:      #a8d5b5;  /* sage highlight */

  --footer-bg:   #dfe7de;  /* light sage footer band */
  --footer-text: #16261e;
  --footer-link: #5f7d69;

  --gutter:      clamp(1.25rem, 4vw, 2.5rem); /* side padding */
  --label-width: 220px;    /* width of the italic label column */
  --body-width:  680px;    /* max width of the right-hand column */

  --font: "Google Sans", sans-serif;;
  --font-name: "Google Sans", sans-serif; /* the name in the top bar */
}

/* =========================================================
   BASE
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;  /* so anchors aren't hidden under the top bar */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   TOP BAR
   Stays at the top. Gets a background after you scroll
   (script.js adds the "scrolled" class).
   ========================================================= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem var(--gutter);
  transition: background 0.3s, padding 0.3s;
}

.topbar.scrolled {
  background: var(--bg-topbar);
  backdrop-filter: blur(6px);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.topbar-name {
  font-family: var(--font-name);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);  /* scales with screen size */
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.topbar-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.topbar-links a:hover {
  color: var(--accent);
}

/* =========================================================
   INTRO
   ========================================================= */
.intro {
  max-width: 900px;
  padding: clamp(8rem, 18vh, 12rem) var(--gutter) clamp(4rem, 10vh, 7rem);
}

.intro p {
  font-size: clamp(1.5rem, 3.2vw, 2.35rem);
  line-height: 1.35;
}

.intro strong {
  font-weight: 600;
}

/* =========================================================
   SECTIONS
   Italic label on the left, content on the right.
   On phones the label sits on top.
   ========================================================= */
.section {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  padding: clamp(2.5rem, 6vh, 4rem) var(--gutter);
}

.section-label {
  flex: 0 0 var(--label-width);
}

.section-label h2 {
  color: var(--text-muted);
  font-size: 0.95rem;
  /* font-style: italic; */
  font-weight: 400;
}

/* the short dash under each label */
.section-label h2::after {
  content: "";
  display: block;
  width: 1.5rem;
  height: 1px;
  margin-top: 1.5rem;
  background: var(--text-muted);
}

.section-body {
  flex: 1 1 320px;
  max-width: var(--body-width);
}

/* On phones: label on top, full-width content */
@media (max-width: 700px) {
  .section-label { flex-basis: 100%; }
  .section-label h2::after { margin-top: 1rem; }
}

/* =========================================================
   PROJECT ROWS
   ========================================================= */
.project {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.project:first-child {
  padding-top: 0;
}

.project-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.25s, transform 0.25s;
}

.project-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-name {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  line-height: 1.25;
}

.project-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

.project-arrow {
  color: var(--text-muted);
  font-size: 1.4rem;
  transition: transform 0.25s, color 0.25s;
}

.project:hover .project-icon {
  border-color: var(--accent);
  transform: rotate(-4deg);
}

.project:hover .project-name {
  color: var(--accent);
}

.project:hover .project-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* =========================================================
   BIG LIST & BODY TEXT
   ========================================================= */
.big-list {
  list-style: none;
}

.big-list li {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  line-height: 1.3;
  margin-bottom: 0.9rem;
}

.body-text {
  font-size: 1.15rem;
  line-height: 1.75;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-top: clamp(3rem, 8vh, 5rem);
  padding: clamp(3rem, 8vh, 5rem) var(--gutter);
  background: var(--footer-bg);
  color: var(--footer-text);
}

.footer-cta {
  max-width: 100rem;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.35;
}

.footer-cta a {
  color: var(--footer-link);
  border-bottom: 1px solid currentColor;
}

.footer-cta a:hover {
  color: var(--footer-text);
}

.footer-small {
  font-size: 0.9rem;
  color: var(--footer-link);
}

/* =========================================================
   FADE-IN ON SCROLL
   script.js adds "visible" when a section comes into view.
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Turn off motion for people who ask their device for less of it */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}

/* =========================================================
   CONTACT FORM (contact.html)
   ========================================================= */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.6rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.3rem;
  transition: border-color 0.2s;
}

.field textarea {
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

/* Hides the spam trap from people (bots still see it) */
.botcheck {
  display: none;
}

.button {
  align-self: flex-start;
  padding: 0.8rem 1.75rem;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  color: var(--bg);
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

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

.button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.form-status {
  min-height: 1.5em;
  font-size: 1.05rem;
}

.form-status.success { color: var(--accent); }
.form-status.error   { color: #f0a88f; }

/* Underline the current page in the top bar */
.topbar-links a[aria-current="page"] {
  border-bottom: 1px solid currentColor;
}
