/* ============================================================
   Aaron Portanova — site stylesheet
   Direction: cyanotype / blueprint survey sheet. Deep navy ground,
   paper-white ink, a single amber "flag tape" accent for links/CTAs.
   ============================================================ */

/* ---------- Design tokens ---------- */

:root {
  --ink: #EAF2F5;
  --ink-dim: #9FB8C7;
  --ground: #0F2A3D;
  --ground-alt: #0C2432;
  --surface: #16374D;
  --line: rgba(234, 242, 245, 0.10);
  --accent: #F2A340;
  --accent-dim: #C97F2A;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-width: 880px;
}

/* ---------- Reset & base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

p { margin: 0 0 1em; }

/* ---------- Base heading defaults ---------- */
/* Page-specific heading treatment (page-body h1/h2, project-list h2, etc.)
   lives further down and overrides these where relevant. */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.9em;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(15, 42, 61, 0.9);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand-mark { color: var(--ink); transition: color 0.15s ease; }
.brand:hover .brand-mark { color: var(--accent); }

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Hero (homepage signature element) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 72px;
  padding-bottom: 96px;
  border-bottom: 1px solid var(--line);
}

.hero-inner { position: relative; z-index: 2; }

.hero h1 {
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  margin-bottom: 0.25em;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--ink-dim);
  max-width: 32em;
}

.contour {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  width: 100%;
  height: 140px;
  z-index: 1;
  pointer-events: none;
}
.contour path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  opacity: 0.14;
}
.contour path:nth-child(2) { opacity: 0.10; }
.contour path:nth-child(3) { opacity: 0.08; }

/* ---------- Profile photo ---------- */

.profile-photo {
  width: 15vw;
  max-width: 150px;
  min-width: 96px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  display: block;
  margin-bottom: 1.2em;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  margin-bottom: 1.5em;
}
.breadcrumb a { color: var(--ink-dim); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--ink); }

/* --------- Display Above Page Title --------- */
.page-body {
  display: flex;
  flex-direction: column;
}

.page-body .breadcrumb {
  order: -1;
}

/* ---------- Icons ---------- */

.icon-link {
  display: inline-flex;
  color: var(--ink-dim);
  transition: color 0.15s ease;
}
.icon-link:hover { color: var(--accent); }

/* ---------- Page body: layout + heading hierarchy ---------- */
/* h1 = major section break within a long-form page (e.g. "Tax Parcel
   Management" vs "Address Management" on the Parcels & Addresses page).
   h2 = subsection kicker within that section (e.g. "Data Model"). */

.page-body { padding-top: 56px; padding-bottom: 88px; }

.page-title { font-size: 2rem; margin-bottom: 0.6em; }

.page-intro { color: var(--ink-dim); margin-top: -0.4em; }

.page-body h1 {
  font-size: 1.7rem;
  margin-top: 3em;
  padding-top: 2em;
  border-top: 2px solid var(--line);
}
.page-body h1:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.page-body h2 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2.4em;
  margin-bottom: 0.8em;
}
.page-body h2:first-of-type { margin-top: 1.2em; }

.page-body code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-dim);
  background: none;
}

.page-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5em 0;
}

/* ---------- Photo grid (photography page) ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 1.5em;
}
.photo-grid figure { margin: 0; }
.photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--line);
  display: block;
}
.photo-grid img.obj-top { object-position: top; }
.photo-grid img.obj-bottom { object-position: bottom; }
.photo-grid img.obj-left { object-position: left; }
.photo-grid img.obj-right { object-position: right; }

.photo-grid figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-dim);
  margin-top: 0.5em;
}

@media (max-width: 640px) {
  .photo-grid { grid-template-columns: 1fr; }
}

/* ---------- Portfolio cards (homepage, built from markdown H2 sections) ---------- */
/* Overrides the generic .page-body h2 kicker style above -- these are
   actual project titles, not subsection labels. */

.project-list h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 1.4em;
}
.project-list h2:first-of-type { border-top: none; padding-top: 0; }

/* ---------- Apps / map sheet cards ---------- */

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 1.8em;
}

.sheet-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.sheet-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  text-decoration: none;
}

.sheet-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.sheet-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.sheet-desc {
  font-size: 0.92rem;
  color: var(--ink-dim);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-dim);
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .site-nav { gap: 18px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet-card { transition: none; }
}

/* ---------- Contact Me Form ---------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 480px;
  margin-top: 1.5em;
}
.contact-form label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-top: 0.8em;
}
.contact-form input,
.contact-form textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 12px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.contact-form button {
  align-self: flex-start;
  margin-top: 1.2em;
  padding: 10px 24px;
  background: var(--accent);
  color: var(--ground);
  border: none;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.contact-form button:hover { background: var(--accent-dim); }