/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles

   Design system per docs/adr/0003-visual-direction.md: split-screen hero and
   logbook-style lists (structure) on a light chart/compass palette (colors).
   No emoji icons, no decorative animation.
   ========================================================================== */

:root {
  --paper: #faf9f6;
  --ink: #0d1f3c;
  --ink-dim: #5b6b88;
  --purple: #5b3a8e;
  --purple-2: #7d58b8;
  --line: #d7deea;
  --grid-line: rgba(13, 31, 60, 0.06);
  --on-dark: #eef1f7;
  --on-dark-dim: #b7c3da;
  --font: -apple-system, "Segoe UI", system-ui, sans-serif;
  --max-width: 72rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.15;
}

p {
  margin: 0 0 1em;
  color: var(--ink-dim);
}

a {
  color: inherit;
}

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

.grid-bg {
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

.eyebrow {
  margin: 0 0 0.5em;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
}

.eyebrow--on-dark {
  color: var(--on-dark-dim);
}

/* Site header */

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__wordmark {
  font-weight: 900;
  letter-spacing: 1px;
  font-size: 20px;
  text-transform: uppercase;
  font-style: italic;
  transform: skewX(-6deg);
  color: var(--ink);
}

.brand__wordmark b {
  color: var(--purple);
}

.brand__tagline {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  font-style: normal;
  transform: none;
  margin-top: 1px;
  opacity: 0.65;
}

.brand--small .brand__wordmark {
  font-size: 15px;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav__link {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}

.lang-switcher {
  display: flex;
  gap: 0.75rem;
}

.lang-switcher__link {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-dim);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.lang-switcher__link.is-active {
  color: var(--ink);
  border-bottom-color: var(--purple);
}

/* Buttons & links */

.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
}

.button--primary {
  background: var(--purple);
  color: var(--on-dark);
}

.button--secondary {
  background: transparent;
  color: var(--on-dark);
  border-color: var(--on-dark-dim);
}

.link-arrow {
  display: inline-block;
  font-weight: 700;
  color: var(--purple);
  text-decoration: none;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}

.hero__media {
  background: var(--line);
}

.hero__image {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.hero__panel {
  background: var(--ink);
  color: var(--on-dark);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--on-dark);
}

.hero__title span {
  color: var(--purple-2);
}

.hero__sub {
  color: var(--on-dark-dim);
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0 2rem;
}

.hero__stats {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--on-dark-dim);
}

/* Split: shared two-column image+copy layout, used by Home's About and the
   Services intro. Alternates image side via .split--reverse. */

.split {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split__copy {
  order: 0;
}

.split__media {
  order: 2;
}

.split--reverse .split__copy {
  order: 2;
}

.split--reverse .split__media {
  order: 0;
}

.split__image {
  border-radius: 4px;
  min-height: 320px;
  width: 100%;
  object-fit: cover;
  background: var(--line);
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding: 0;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-dim);
}

/* Logbook: shared numbered-row list (no card grid), used by Home's
   credentials, Services, and the RYA course ladder. */

.logbook-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.logbook {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.logbook__row {
  display: grid;
  grid-template-columns: 3rem 1.5rem 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.logbook__index {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  padding-top: 4px;
}

.logbook .icon {
  color: var(--purple);
}

.logbook__row h3 {
  font-size: 1.05rem;
}

.logbook__row p {
  margin: 0;
}

.logbook__bullets {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.35rem 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

.logbook__bullets li::before {
  content: "—";
  margin-right: 0.5em;
  color: var(--purple-2);
}

.logbook__badge {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--purple);
}

.logbook__row--no-icon {
  grid-template-columns: 3rem 1fr;
}

/* Flat list: shared hairline-bordered rows, no card chrome — the base
   for any simple list of items (testimonials, news) that isn't a
   .logbook (which adds an index/icon column). */

.flat-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.flat-list__item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

/* Testimonials */

.testimonials__quote {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--ink);
}

.testimonials__cite {
  font-style: normal;
  font-size: 0.8rem;
  color: var(--ink-dim);
}

.testimonials__cite b {
  color: var(--ink);
}

/* News */

.news-list__date {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple);
}

.flat-list__item h2 {
  font-size: 1.05rem;
}

.flat-list__item p:last-child {
  margin: 0;
}

/* Timeline: vertical hairline rule with dots, for the career timeline */

.timeline {
  list-style: none;
  position: relative;
  margin: 2.5rem 0 0;
  padding: 0 0 0 1.5rem;
  border-left: 1px solid var(--line);
}

.timeline__item {
  position: relative;
  padding-bottom: 2.25rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.35rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--purple);
  transform: translateX(-4.5px);
}

.timeline__stage {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.35rem;
}

.timeline__item h3 {
  font-size: 1.05rem;
}

.timeline__item p {
  margin: 0;
}

.resume-cta {
  text-align: center;
  padding-top: 1rem;
}

.resume-cta p {
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

/* Contact */

.contact-intro {
  max-width: 34rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  margin-top: 2.5rem;
}

.contact-details__label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.contact-details__location,
.contact-details__scope {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.95rem;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--purple-2);
  outline-offset: 1px;
}

.contact-form .button {
  border: none;
  cursor: pointer;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.site-footer__tagline,
.site-footer__copyright {
  font-size: 0.8rem;
  color: var(--ink-dim);
  margin: 1rem 0 0;
}

@media (max-width: 55em) {
  .site-header__inner {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  .site-header__nav {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero__image {
    min-height: 240px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split__copy,
  .split--reverse .split__copy,
  .split__media,
  .split--reverse .split__media {
    order: 0;
  }

  .logbook__row {
    grid-template-columns: 2rem 1.5rem 1fr;
  }

  .logbook__row--no-icon {
    grid-template-columns: 2rem 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

