:root {
  --ink: #102a43;
  --paper: #ffffff;
  --soft: #f3f8fc;
  --line: #d4e2ed;
  --muted: #52677a;
  --accent: #2878c8;
  --accent-bright: #5eb7ff;
  --timeline: #65a9df;
  --page: min(1180px, calc(100% - 48px));
  --shadow: 0 18px 55px rgba(17, 17, 17, 0.09);
  --button-shadow: 0 9px 0 rgba(8, 40, 69, 0.16), 0 18px 34px rgba(16, 42, 67, 0.18);
  --button-shadow-hover: 0 12px 0 rgba(8, 40, 69, 0.13), 0 24px 42px rgba(16, 42, 67, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

section {
  scroll-margin-top: 78px;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(24px, 5vw, 72px);
  color: var(--paper);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 2px solid currentColor;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 46px);
}

.site-header nav a {
  position: relative;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.site-header nav a::after {
  content: '';
  position: absolute;
  right: 13px;
  bottom: 5px;
  left: 13px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-header nav a:hover,
.site-header nav a.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(2, 19, 35, 0.2);
  transform: translateY(-2px);
}

.site-header nav a:hover::after,
.site-header nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  min-height: min(590px, 72vh);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 18% 22%, rgba(94, 183, 255, 0.18), transparent 33%),
    radial-gradient(circle at 82% 78%, rgba(40, 120, 200, 0.2), transparent 35%),
    #0b2945;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media,
.project-banner-media,
.project-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-shade {
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 32, 58, 0.62), rgba(8, 53, 91, 0.42) 45%, rgba(4, 27, 49, 0.74));
}

.media-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  background:
    linear-gradient(135deg, transparent 49.7%, rgba(255, 255, 255, 0.11) 50%, transparent 50.3%),
    linear-gradient(45deg, #0b2945, #28679b);
}

.media-placeholder span {
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.22em;
}

.media-placeholder small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-placeholder::before {
  content: '+';
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  font-size: 2rem;
  font-weight: 200;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: var(--page);
  padding: 145px 0 85px;
  text-align: center;
}

.hero-content p {
  margin: 0 0 19px;
  font-size: clamp(0.72rem, 1.2vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1100px;
  margin: 0 auto;
  font-size: clamp(2.75rem, 5.4vw, 5.15rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.hero-content > a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 0 rgba(2, 23, 42, 0.24), 0 22px 42px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.hero-content > a:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 13px 0 rgba(2, 23, 42, 0.2), 0 28px 48px rgba(0, 0, 0, 0.24);
  transform: translateY(-4px) scale(1.02);
}

.hero-content > a:active {
  box-shadow: 0 4px 0 rgba(2, 23, 42, 0.26), 0 12px 22px rgba(0, 0, 0, 0.2);
  transform: translateY(3px) scale(0.99);
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.27em;
}

.section-title h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: var(--button-shadow);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.pill-button:hover {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--button-shadow-hover);
  transform: translateY(-4px) scale(1.025);
}

.pill-button:active {
  box-shadow: 0 3px 0 rgba(8, 40, 69, 0.18), 0 9px 18px rgba(16, 42, 67, 0.18);
  transform: translateY(3px) scale(0.99);
}

.accent-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid rgba(40, 120, 200, 0.24);
  border-radius: 999px;
  padding: 0 19px;
  color: var(--accent);
  background: var(--paper);
  box-shadow: 0 7px 0 rgba(40, 120, 200, 0.1), 0 14px 25px rgba(40, 120, 200, 0.1);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.accent-link:hover {
  color: var(--paper);
  background: var(--accent);
  box-shadow: 0 10px 0 rgba(40, 120, 200, 0.12), 0 20px 32px rgba(40, 120, 200, 0.2);
  transform: translateY(-3px);
}

.accent-link:active {
  box-shadow: 0 3px 0 rgba(40, 120, 200, 0.12), 0 8px 16px rgba(40, 120, 200, 0.16);
  transform: translateY(3px);
}

.about-section,
.experience-section,
.skills-section,
.contact-section {
  padding: 120px max(24px, calc((100vw - 1180px) / 2));
}

.about-section {
  background: var(--soft);
}

.section-title {
  max-width: 850px;
  margin-bottom: 66px;
}

.centered-title {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 72px;
  align-items: stretch;
}

.about-copy {
  padding: 28px 0;
}

.about-copy > p:first-child {
  max-width: 700px;
  margin: 0 0 24px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.48;
}

.about-copy > p:not(:first-child) {
  max-width: 600px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.7;
}

.about-copy .about-opportunity {
  display: block;
  margin: 0 0 32px;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.5;
}

.education-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  padding: 42px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: var(--shadow);
  transition: box-shadow 260ms ease, transform 260ms ease;
}

.education-card:hover {
  box-shadow: 0 28px 70px rgba(16, 42, 67, 0.2);
  transform: translateY(-7px);
}

.education-card > span {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.education-card h3 {
  margin: 37px 0 10px;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.education-card > p {
  margin: 0;
  color: #cfcfcf;
  line-height: 1.6;
}

.education-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
  border-top: 1px solid #454545;
  padding-top: 22px;
  color: #bdbdbd;
  font-size: 0.8rem;
}

.education-meta strong {
  color: var(--paper);
}

.traits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 72px;
  margin-top: 78px;
  border-top: 1px solid var(--line);
  padding-top: 52px;
}

.traits-grid h3 {
  margin: 0 0 24px;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.traits-grid ul,
.timeline-card ul,
.skill-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.traits-grid li {
  position: relative;
  margin-top: 13px;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.6;
}

.traits-grid li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.experience-section {
  overflow: hidden;
  background: var(--paper);
}

.company-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 4vw, 52px);
  margin-bottom: 96px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}

.company-mark {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  border: 1px solid #cdcdcd;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #4b4b4b;
  background: #f7fbff;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  filter: grayscale(1);
  box-shadow: 0 8px 20px rgba(16, 42, 67, 0.08);
  transition: color 220ms ease, background 220ms ease, border-color 220ms ease, box-shadow 220ms ease, filter 220ms ease, transform 220ms ease;
}

.company-mark:hover {
  color: var(--paper);
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 13px 28px rgba(40, 120, 200, 0.25);
  filter: grayscale(0);
  transform: translateY(-5px) scale(1.05);
}

.company-mark img {
  width: 74%;
  height: 74%;
  object-fit: contain;
}

.timeline {
  position: relative;
  max-width: 1060px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 50%;
  width: 2px;
  background: var(--timeline);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 62px 1fr;
  min-height: 225px;
  align-items: start;
}

.timeline-node {
  z-index: 2;
  grid-column: 2;
  width: 54px;
  height: 54px;
  border: 5px solid var(--paper);
  border-radius: 50%;
  display: grid;
  place-items: center;
  justify-self: center;
  color: var(--paper);
  background: var(--timeline);
  box-shadow: 0 0 0 1px var(--timeline);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.timeline-card,
.timeline-date {
  margin-top: 2px;
}

.timeline-left .timeline-card,
.timeline-right .timeline-date {
  grid-column: 1;
  grid-row: 1;
}

.timeline-right .timeline-card,
.timeline-left .timeline-date {
  grid-column: 3;
  grid-row: 1;
}

.timeline-card {
  max-width: 430px;
  border-top: 3px solid var(--ink);
  padding: 24px 28px 26px;
  background: var(--soft);
  box-shadow: 0 12px 30px rgba(16, 42, 67, 0.07);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.timeline-card:hover {
  border-color: var(--accent);
  box-shadow: 0 20px 42px rgba(16, 42, 67, 0.13);
  transform: translateY(-5px);
}

.timeline-left .timeline-card {
  justify-self: end;
}

.timeline-right .timeline-card {
  justify-self: start;
}

.timeline-card > p:first-child {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.timeline-card h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.timeline-summary {
  margin: 16px 0 0;
  color: #444;
  font-size: 0.9rem;
  line-height: 1.55;
}

.timeline-date {
  padding: 11px 22px;
}

.timeline-left .timeline-date {
  text-align: left;
}

.timeline-right .timeline-date {
  text-align: right;
}

.timeline-date strong,
.timeline-date span {
  display: block;
}

.timeline-date strong {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.timeline-date span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
}

.timeline-date .blank-field {
  color: var(--accent);
  font-style: italic;
}

.projects-section {
  padding-bottom: 118px;
  background: var(--paper);
}

.project-banner {
  position: relative;
  height: clamp(310px, 46vw, 510px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--paper);
}

.project-banner-media,
.banner-shade {
  position: absolute;
  inset: 0;
}

.banner-shade {
  z-index: 1;
  background: rgba(0, 0, 0, 0.46);
}

.project-banner h2 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: clamp(3.8rem, 10vw, 9rem);
  letter-spacing: 0.08em;
}

.project-grid {
  width: var(--page);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 78px 52px;
  margin: 106px auto 0;
}

.project-card-link:nth-child(even) {
  margin-top: 90px;
}

.project-card-link {
  display: block;
  min-width: 0;
}

.project-card-link .project-info h3,
.project-card-link .project-detail-link {
  transition: color 180ms ease;
}

.project-card-link:hover .project-info h3,
.project-card-link:hover .project-detail-link {
  color: var(--accent);
}

.project-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #163b5d;
  box-shadow: 0 18px 42px rgba(16, 42, 67, 0.14);
  transition: box-shadow 320ms ease, transform 320ms ease;
}

.project-card:hover .project-image {
  box-shadow: 0 27px 58px rgba(16, 42, 67, 0.23);
  transform: translateY(-7px) scale(1.012);
}

.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.project-placeholder {
  color: var(--paper);
  background:
    linear-gradient(135deg, transparent 49.7%, rgba(255, 255, 255, 0.12) 50%, transparent 50.3%),
    linear-gradient(45deg, #123552, #5a9bc9);
}

.project-number {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 16px;
  color: var(--paper);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.project-info {
  padding: 30px 5px 0;
}

.project-info > p:first-child {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.project-info > p:first-child span {
  color: #888;
  text-align: right;
}

.project-info h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.project-overview {
  margin: 20px 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

.project-info > strong {
  display: block;
  margin-bottom: 20px;
  font-size: 0.86rem;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-tools span {
  border: 1px solid #d2d2d2;
  border-radius: 999px;
  padding: 7px 11px;
  color: #496175;
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(16, 42, 67, 0.06);
  font-size: 0.68rem;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-tools span:hover {
  color: var(--paper);
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(40, 120, 200, 0.2);
  transform: translateY(-2px);
}

.project-info details {
  margin-top: 25px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.project-info summary {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  list-style: none;
  text-transform: uppercase;
  transition: color 180ms ease, padding 180ms ease;
}

.project-info summary:hover {
  padding-right: 10px;
  padding-left: 10px;
  color: var(--accent);
}

.project-info summary::-webkit-details-marker {
  display: none;
}

.project-info details[open] summary span {
  transform: rotate(45deg);
}

.project-info summary span {
  transition: transform 180ms ease;
}

.project-info details ul {
  margin: 0 0 22px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.project-info details li + li {
  margin-top: 7px;
}

.project-detail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 25px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.project-card-link:hover .project-detail-link span {
  transform: translateX(5px);
}

.project-detail-link span {
  transition: transform 180ms ease;
}

.project-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 100px;
}

.outline-pill {
  color: var(--ink);
  background: transparent;
  box-shadow: 0 9px 0 rgba(40, 120, 200, 0.1), 0 18px 34px rgba(16, 42, 67, 0.12);
}

.outline-pill:hover {
  color: var(--paper);
  background: var(--ink);
}

.skills-section {
  background: var(--soft);
}

.compact-title {
  margin-bottom: 54px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dedede;
  background: #dedede;
}

.skill-grid article {
  min-height: 250px;
  padding: 37px;
  background: var(--paper);
  transition: box-shadow 240ms ease, transform 240ms ease;
}

.skill-grid article:hover {
  z-index: 1;
  box-shadow: 0 20px 45px rgba(16, 42, 67, 0.14);
  transform: translateY(-6px);
}

.skill-grid h3 {
  margin: 0 0 26px;
  font-size: 1.1rem;
}

.skill-grid li {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.coursework {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 30px;
  margin-top: 44px;
  border-top: 1px solid #d3d3d3;
  padding-top: 34px;
}

.coursework > strong {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.coursework > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: end;
  gap: 70px;
  background: var(--paper);
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.contact-links a {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 22px;
  background: var(--paper);
  box-shadow: 0 7px 0 rgba(40, 120, 200, 0.08), 0 16px 30px rgba(16, 42, 67, 0.08);
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.contact-links a:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-links a:hover {
  color: var(--accent);
  border-color: rgba(40, 120, 200, 0.42);
  box-shadow: 0 10px 0 rgba(40, 120, 200, 0.1), 0 23px 38px rgba(16, 42, 67, 0.13);
  transform: translateY(-4px);
}

.contact-links a:active {
  box-shadow: 0 3px 0 rgba(40, 120, 200, 0.1), 0 8px 16px rgba(16, 42, 67, 0.1);
  transform: translateY(3px);
}

/* Scroll-linked opacity only: no layout movement, blur, or clipping. */
.scroll-fade {
  opacity: 1;
  transition: opacity 90ms linear;
  will-change: opacity;
}

/* Projects directory and project case-study pages */
.inner-page {
  background: var(--soft);
}

.inner-header {
  position: sticky;
  top: 0;
  color: var(--paper);
  background: rgba(16, 42, 67, 0.96);
  box-shadow: 0 12px 34px rgba(5, 27, 48, 0.18);
  backdrop-filter: blur(16px);
}

.subpage-hero,
.projects-directory,
.directory-contact,
.case-study-hero,
.case-study-media,
.case-study-layout,
.project-pagination {
  width: var(--page);
  margin-right: auto;
  margin-left: auto;
}

.subpage-hero {
  max-width: 960px;
  padding: 132px 0 82px;
  text-align: center;
}

.subpage-hero h1,
.case-study-hero h1,
.project-not-found h1 {
  margin: 0 0 26px;
  font-size: clamp(3rem, 7vw, 6.7rem);
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.subpage-hero > p:last-child {
  max-width: 700px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.7;
}

.projects-directory {
  padding-bottom: 130px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.directory-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(40, 120, 200, 0.15);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 16px 42px rgba(16, 42, 67, 0.1);
  transition: border-color 260ms ease, box-shadow 260ms ease, transform 260ms ease;
}

.directory-card:hover {
  border-color: rgba(40, 120, 200, 0.5);
  box-shadow: 0 28px 65px rgba(16, 42, 67, 0.2);
  transform: translateY(-9px);
}

.directory-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #163b5d;
  background-position: center;
  background-size: cover;
}

.directory-card-media .media-placeholder {
  min-height: 100%;
}

.directory-number {
  position: absolute;
  right: 19px;
  bottom: 17px;
  z-index: 2;
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.directory-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px;
}

.directory-card-copy > p:first-child {
  display: flex;
  min-height: 34px;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.directory-card-copy > p:first-child span {
  color: #718294;
  text-align: right;
}

.directory-card-copy h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.directory-overview {
  margin: 20px 0 17px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.directory-card-copy > strong {
  font-size: 0.82rem;
}

.directory-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.directory-card:hover .directory-open span {
  transform: translateX(5px);
}

.directory-open span {
  transition: transform 180ms ease;
}

.directory-contact {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 60px;
  border-top: 1px solid var(--line);
  padding: 92px 0 110px;
}

.directory-contact h2 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.directory-contact .project-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.case-study-hero {
  max-width: 1000px;
  padding: 105px 0 80px;
}

.case-study-back {
  display: inline-flex;
  margin-bottom: 75px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-study-back:hover {
  color: var(--accent);
}

.case-study-hero h1 {
  max-width: 950px;
}

.case-study-hero > p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.68;
}

.case-study-meta {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-top: 54px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  color: var(--muted);
  font-size: 0.82rem;
}

.case-study-meta strong {
  color: var(--ink);
}

.case-study-media {
  min-height: 420px;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-radius: 30px;
  background-color: #163b5d;
  background-position: center;
  background-size: cover;
  box-shadow: 0 24px 65px rgba(16, 42, 67, 0.2);
}

.case-study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(50px, 8vw, 110px);
  padding: 110px 0 120px;
}

.case-study-main > section {
  border-top: 1px solid var(--line);
  padding: 54px 0 62px;
}

.case-study-main > section:first-child {
  border-top: 0;
  padding-top: 0;
}

.case-study-main h2 {
  margin: 0 0 24px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  letter-spacing: -0.05em;
  line-height: 1.03;
}

.case-study-main section > p:not(.eyebrow),
.case-study-main li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.case-study-main ul {
  margin: 0;
  padding-left: 22px;
}

.case-study-main li + li {
  margin-top: 14px;
}

.case-study-sidebar {
  align-self: start;
  position: sticky;
  top: 116px;
  display: grid;
  gap: 14px;
}

.case-study-sidebar > div {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(16, 42, 67, 0.07);
}

.case-study-sidebar > div > strong {
  font-size: 1.05rem;
  line-height: 1.45;
}

.project-toolkit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-toolkit span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 0.7rem;
}

.case-study-sidebar .case-study-status {
  color: var(--paper);
  border-color: var(--ink);
  background: var(--ink);
}

.case-study-status > span {
  color: var(--accent-bright);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-study-status p {
  margin: 15px 0 0;
  color: #c5d8e8;
  line-height: 1.6;
}

.documentation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 34px;
}

.documentation-grid > div {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px dashed #9db9d0;
  border-radius: 20px;
  padding: 24px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
}

.documentation-grid span {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.project-pagination {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  padding: 0 0 110px;
}

.project-pagination a {
  display: flex;
  min-height: 160px;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 30px;
  transition: color 180ms ease, background 180ms ease;
}

.project-pagination a + a {
  border-left: 1px solid var(--line);
  text-align: right;
}

.project-pagination a:hover {
  color: var(--accent);
  background: var(--paper);
}

.project-pagination span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-pagination strong {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
}

.project-not-found {
  min-height: 70vh;
  display: grid;
  place-content: center;
  justify-items: start;
  padding: 80px max(24px, calc((100vw - 1180px) / 2));
}

footer {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px max(24px, calc((100vw - 1180px) / 2));
  color: #c5d8e8;
  background: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

footer a {
  color: var(--paper);
}

@media (max-width: 900px) {
  :root {
    --page: min(100% - 36px, 720px);
  }

  .site-header {
    align-items: flex-start;
  }

  .site-header nav {
    max-width: calc(100% - 76px);
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 22px;
  }

  .about-grid,
  .contact-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .traits-grid {
    gap: 40px;
  }

  .company-strip {
    justify-content: flex-start;
    overflow-x: auto;
    padding-right: 10px;
    padding-left: 10px;
  }

  .timeline::before {
    left: 27px;
  }

  .timeline-item {
    grid-template-columns: 58px 1fr;
    min-height: auto;
    margin-bottom: 58px;
  }

  .timeline-node {
    grid-column: 1;
    grid-row: 1;
  }

  .timeline-left .timeline-card,
  .timeline-right .timeline-card {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    max-width: none;
  }

  .timeline-left .timeline-date,
  .timeline-right .timeline-date {
    grid-column: 2;
    grid-row: 2;
    padding: 15px 28px 0;
    text-align: left;
  }

  .project-grid {
    gap: 72px 30px;
  }

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

  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-card:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 14px);
    justify-self: center;
  }

  .case-study-layout {
    grid-template-columns: 1fr;
  }

  .case-study-sidebar {
    position: static;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 68px;
    padding: 12px 18px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .site-header nav {
    gap: 4px 15px;
  }

  .site-header nav a {
    font-size: 0.59rem;
    letter-spacing: 0.08em;
    padding: 8px 9px;
  }

  .hero {
    min-height: 520px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 11.5vw, 4.2rem);
  }

  .about-section,
  .experience-section,
  .skills-section,
  .contact-section {
    padding-top: 82px;
    padding-bottom: 82px;
  }

  .project-actions {
    flex-direction: column;
  }

  .about-grid {
    gap: 24px;
  }

  .education-card {
    padding: 30px;
  }

  .traits-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .traits-grid {
    gap: 34px;
    margin-top: 56px;
  }

  .section-title {
    margin-bottom: 48px;
  }

  .company-strip {
    margin-bottom: 68px;
  }

  .company-mark {
    width: 64px;
    height: 64px;
  }

  .timeline-card {
    padding: 22px;
  }

  .project-grid {
    margin-top: 74px;
  }

  .project-card-link:nth-child(even) {
    margin-top: 0;
  }

  .project-info > p:first-child {
    flex-direction: column;
    gap: 5px;
  }

  .project-info > p:first-child span {
    text-align: left;
  }

  .coursework {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .subpage-hero {
    padding-top: 92px;
  }

  .directory-grid,
  .directory-contact,
  .documentation-grid,
  .project-pagination {
    grid-template-columns: 1fr;
  }

  .directory-card:last-child {
    grid-column: auto;
    width: auto;
  }

  .directory-contact {
    gap: 38px;
  }

  .directory-contact .project-actions {
    justify-content: stretch;
  }

  .case-study-hero {
    padding-top: 72px;
  }

  .case-study-back {
    margin-bottom: 52px;
  }

  .case-study-meta {
    flex-direction: column;
  }

  .case-study-media {
    min-height: 300px;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
  }

  .case-study-layout {
    padding-top: 76px;
  }

  .case-study-sidebar {
    grid-template-columns: 1fr;
  }

  .project-pagination a + a {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .scroll-fade {
    opacity: 1 !important;
    transition: none !important;
  }
}
