/* Shared styles for D276: Portfolio. */
:root {
  --ink: #104256;
  --paper: #e9f3f7;
  --accent: #367892;
  --career: #66abc7;
  --focus: #ff9524;
  --font-body: Arial, Helvetica, sans-serif;
  --font-heading: "Times New Roman", Times, serif;
  --content-width: 1180px;
  --page-padding: clamp(1.25rem, 4vw, 4rem);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--font-body);
}
a {
  color: inherit;
}
img,
video {
  max-width: 100%;
  height: auto;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Header and navigation */
.site-header,
main,
footer {
  width: min(100% - 2.5rem, 1180px);
  margin-inline: auto;
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 1.25rem;
}
hr {
  width: min(100% - 2.5rem, 1180px);
  margin: 0 auto;
  border: none;
  border-top: 1px solid var(--accent);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-weight: 700;
  text-decoration: none;
}
.wordmark-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--ink);
  color: var(--paper);
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem clamp(1rem, 3vw, 2.25rem);
}
nav a {
  padding-block: .35rem;
  border-bottom: 3px solid transparent;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}
nav a:hover,
nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--focus);
}
.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  padding: .5rem;
  background: var(--focus);
}
.skip-link:focus {
  top: 1rem;
  z-index: 10;
}

/* Type and the one shared section style */
main {
  padding-block: 2rem 4rem;
}
section {
  padding-block: clamp(3rem, 7vw, 6rem);
  border-bottom: 1px solid var(--accent);
}
section:last-child {
  border-bottom: 0;
}
h1,
h2,
h3 {
  line-height: 1.15;
  overflow-wrap: break-word;
}
h1 {
  margin: .5rem 0 1.5rem;
  font: bold clamp(2.7rem, 7vw, 5.5rem)/1.05 var(--font-heading);
}
h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.1;
  letter-spacing: -.035em;
}
h3 {
  margin: 0 0 .5rem;
  font-size: 1.25rem;
}
p {
  max-width: 72ch;
  margin: .5rem 0 1rem;
}
.eyebrow {
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.hero-lede,
.document-role {
  font-size: 1.2rem;
}
.entry-date,
.goal-number {
  color: var(--accent);
  font-weight: 700;
}
em {
  font-style: italic;
}
mark {
  color: var(--focus);
  background: transparent;
  font-weight: 700;
}
.label {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.practice-section .label {
  color: var(--career);
}

/* One list treatment across the resume and career goals */
/* Source: W3Schools, n.d.-b — see References on career-goals.html */
ul {
  padding-left: 1.5rem;
  margin: 1rem 0;
  list-style: square;
}
li {
  margin-bottom: .55rem;
  padding-left: .2rem;
}
li::marker {
  color: var(--accent);
}

/* Links and one button style */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .7rem 1.1rem;
  border: 2px solid var(--ink);
  background-color: var(--focus);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover,
.button:focus-visible {
  background-color: var(--career);
}
.button-secondary {
  background-color: transparent;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}
.text-link {
  display: inline-block;
  margin-top: .75rem;
  border-bottom: 3px solid var(--focus);
  font-weight: 700;
  text-decoration: none;
}
.text-link:hover {
  color: var(--accent);
  text-decoration-color: var(--focus);
}

/* Repeated content uses the same spacing */
article {
  margin-block: 1.5rem;
}
article + article {
  padding-top: 1.5rem;
  border-top: 1px solid var(--career);
}
.experience-entry header {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  align-items: baseline;
}
.experience-entry header p {
  margin: 0;
}
.goal-list article {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
}
.goal-list article > .goal-number {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}
.letter-section {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
  gap: 3rem;
}
.letter-body {
  margin-top: 0;
}
.letter-principle {
  align-self: start;
  max-width: 500px;
  padding-left: 1.5rem;
  border-left: 4px solid var(--career);
}
.letter-principle > p:last-child {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
}

/* Only the layouts that need columns get layout classes */
.hero {
  min-height: min(710px, 85vh);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.hero h1 {
  font-size: clamp(4rem, 8vw, 7.5rem);
  line-height: .86;
  letter-spacing: -.05em;
}
.hero-lede {
  max-width: 650px;
  margin-top: 2rem;
}
.section-intro {
  display: grid;
  grid-template-columns: minmax(160px, .4fr) minmax(0, 1fr);
  gap: 0 2.5rem;
}
.section-intro .label {
  grid-row: 1 / span 2;
}
.section-intro > p:last-child {
  max-width: 650px;
  margin-top: 0;
}
.media-grid,
.resume-closing-grid,
.consulting-grid,
.goals-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}
.practice-grid {
  display: grid;  
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Four stages share one career line; the orange marker shows the current stage */
.career-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}
.career-path::before {
  content: "";
  position: absolute;
  top: 3.55rem;
  right: 0;
  left: 0;
  height: 3px;
  background-color: var(--accent);
}
.career-stop {
  position: relative;
  margin: 0;
}
.career-stop + .career-stop {
  padding: 0;
  border: 0;
}
.career-marker {
  position: relative;
  z-index: 1;
  width: 1.05rem;
  height: 1.05rem;
  margin: 2.1rem 0 2rem;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background-color: var(--paper);
}
.career-stop-current .career-marker {
  border-color: var(--ink);
  background-color: var(--focus);
}

/* One dark section gives the homepage a clear change of pace */
.practice-section {
  padding-inline: clamp(1.25rem, 4vw, 4rem);
  background-color: var(--ink);
  color: var(--paper);
  border: 0;
}
.practice-section .label,
.practice-index {
  color: var(--career);
}
.practice-grid {
  margin-top: 3rem;
  gap: 0;
  border-top: 1px solid var(--career);
}
.practice-grid article {
  margin: 0;
  padding: 2rem 1.5rem 0 0;
}
.practice-grid article + article {
  border-top: 0;
  border-left: 1px solid var(--career);
  padding-left: 1.5rem;
}

/* Simple CSS diagram: two rings, crosshairs, four nodes, one center */
.systems-map {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1;
  margin: auto;
}
.systems-orbit {
  position: absolute;
  inset: 10%;
  border: 1px solid var(--accent);
  border-radius: 50%;
}
.systems-orbit-two {
  inset: 29%;
}
.systems-map::before,
.systems-map::after {
  content: "";
  position: absolute;
  background-color: var(--career);
}
.systems-map::before {
  width: 1px;
  height: 80%;
  top: 10%;
  left: 50%;
}
.systems-map::after {
  height: 1px;
  width: 80%;
  top: 50%;
  left: 10%;
}
.system-node,
.system-core {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  text-align: center;
  font-weight: 700;
  line-height: 1.1;
}
.system-node {
  width: 22%;
  aspect-ratio: 1;
  background-color: var(--career);
  font-size: clamp(.7rem, 1.2vw, 1rem);
}
.system-core {
  top: 50%;
  left: 50%;
  width: 28%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background-color: var(--ink);
  color: var(--paper);
  font-size: clamp(.85rem, 1.5vw, 1.3rem);
}
.node-technology {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.node-knowledge {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.node-data {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.node-design {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* Document pages share the same width and reading rhythm */
.document-page {
  max-width: 960px;
}
.document-hero {
  padding-block: 2rem 3rem;
  border-bottom: 1px solid var(--accent);
}
.document-page > section {
  padding-block: 3rem;
}
.document-page > section > h2 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}
.document-role {
  max-width: 750px;
}
.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .8rem;
}
.contact-line a,
footer a {
  text-underline-offset: .2rem;
}

/* Resume table and media */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
caption {
  padding: .5rem;
  font-weight: 700;
  text-align: left;
}
th,
td {
  padding: .7rem;
  border-bottom: 1px solid var(--accent);
  text-align: left;
  vertical-align: top;
}
figure {
  margin: 1rem 0;
}
figcaption,
.media-note {
  font-size: .9rem;
}
audio,
video {
  display: block;
  width: 100%;
  margin-block: 1rem;
}
details {
  margin-block: 1rem;
}

/* Every text field shares one rule */
form {
  max-width: 700px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
label {
  display: block;
  margin-bottom: .3rem;
  font-weight: 700;
}
input:not([type="radio"]),
textarea,
select {
  display: block;
  width: 100%;
  padding: .65rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: white;
  color: var(--ink);
  font: inherit;
}
.field-group,
fieldset {
  margin-bottom: 1rem;
}
fieldset {
  border: 1px solid var(--accent);
}
legend {
  font-weight: 700;
}
.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.choice-row label {
  font-weight: 400;
}

#current-date {
  margin-top: 1.5rem;
  font-size: .9rem;
}

footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 1.5rem;
}
footer p {
  margin: 0;
}

@media (max-width: 750px) {
  .hero,
  .career-path,
  .practice-grid,
  .media-grid,
  .resume-closing-grid,
  .consulting-grid,
  .goals-section,
  .form-row,
  .section-intro,
  .letter-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }
  .section-intro .label {
    grid-row: auto;
  }
  .systems-map {
    width: min(78vw, 360px);
  }
  .career-path::before {
    top: 0;
    bottom: 0;
    left: .5rem;
    right: auto;
    width: 3px;
    height: auto;
  }
  .career-stop {
    padding-left: 2.5rem;
  }
  .career-stop + .career-stop {
    padding-left: 2.5rem;
  }
  .career-marker {
    position: absolute;
    left: 0;
    top: .15rem;
    margin: 0;
  }
  .practice-grid article + article {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--career);
  }
  .letter-principle {
    padding-left: 0;
    border-left: 0;
    padding-top: 0.3rem;
    border-top: 4px solid var(--career);
  }

  /* Technical stack becomes vertically stacked competency cards on mobile */
  .table-wrap {
    overflow-x: visible;
  }

  .tech-stack,
  .tech-stack tbody,
  .tech-stack tr,
  .tech-stack th,
  .tech-stack td {
    display: block;
    width: 100%;
  }

  .tech-stack thead {
    display: none;
  }

  .tech-stack caption {
    padding-inline: 0;
  }

  .tech-stack tbody tr {
    padding-block: 1.25rem;
    border-bottom: 1px solid var(--accent);
  }

  .tech-stack tbody tr:last-child {
    border-bottom: 0;
  }

  .tech-stack tbody th,
  .tech-stack tbody td {
    padding: 0;
    border-bottom: 0;
  }

  .tech-stack tbody th {
    margin-bottom: .9rem;
    font-size: 1.15rem;
  }

  .tech-stack tbody td {
    margin-top: .75rem;
  }

  .tech-stack tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: .1rem;
    color: var(--accent);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
}
