/* Palette and shared shadow */
:root {
  --bg: #eae7e0;
  --paper: #f4f1e9;
  --ink: #2a2926;
  --mute: #77736a;
  --shadow: 0 22px 50px -26px rgba(60,50,30,.38),0 1px 4px rgba(60,50,30,.07);
}
 
/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
 
html {
  height: 100%;
}
 
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'EB Garamond',Georgia,serif;
  font-size: 18px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
}
 
a {
  color: inherit;
}
 
a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}
 
/* Top navigation */
header {
  padding: clamp(22px,4.8vw,84px) clamp(20px,4.5vw,76px) 0;
  display: flex;
  justify-content: flex-end;
}
 
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px clamp(20px,2.3vw,38px);
  justify-content: flex-end;
}
 
nav a {
  text-decoration: none;
  font-size: clamp(16px,1.15vw,20px);
  transition: opacity .2s;
}
 
nav a:hover {
  opacity: .6;
}
 
nav a.on {
  border-bottom: 1px solid var(--ink);
}
 
body[data-view=home] .nav-home {
  display: none;
}
 
/* Views and the page-to-page transition */
main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 0 64px;
}
 
.view {
  width: 100%;
  transition: opacity .3s ease,transform .3s ease;
}
 
.view[hidden] {
  display: none;
}
 
.view.out {
  opacity: 0;
  transform: translateY(-8px);
}
 
.view.in {
  opacity: 0;
  transform: translateY(10px);
}
 
.view.top {
  align-self: start;
  margin-top: clamp(0px,7vw,140px);
}
 
/* Shared width wrapper. Its width drives every cqw size below. */
.frame {
  width: min(71.5vw,1184px);
  margin: 0 auto;
  container-type: inline-size;
}
 
/* Home page business card */
.card {
  aspect-ratio: 1184/456;
  background: linear-gradient(#f6f3ec,#f2efe7);
  box-shadow: var(--shadow);
  padding: 3.4cqw 3.7cqw 3.6cqw 3.6cqw;
  display: grid;
  grid-template: auto 1fr auto/1fr auto;
}
 
.c-email {
  text-decoration: none;
  font-size: max(14px,2.1cqw);
  line-height: 1.2;
  transition: opacity .2s;
}

.c-email:hover {
  opacity: .6;
}
 
.c-tag {
  text-align: right;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-transform: uppercase;
}
 
.c-tag strong {
  font-weight: 500;
  font-size: max(18px,2.35cqw);
}
 
.c-tag span {
  font-size: max(12px,1.45cqw);
  margin-top: .3cqw;
}
 
.c-name {
  grid-column: 1/-1;
  align-self: center;
  text-align: center;
  font-variant: small-caps;
  margin-top: 2.2cqw;
}
 
.c-name h1 {
  font-weight: 500;
  font-size: max(28px,3.2cqw);
  line-height: 1.1;
}
 
.c-name p {
  font-weight: 500;
  font-size: max(18px,2.05cqw);
  line-height: 1.2;
  margin-top: .3cqw;
}
 
.c-foot {
  grid-column: 1/-1;
  text-align: center;
  font-size: max(11px,1.25cqw);
  letter-spacing: .02em;
  text-transform: uppercase;
}
 
.c-foot a {
  text-decoration: none;
}
 
.c-foot a:hover {
  opacity: .6;
}
 
/* Projects and Work Experience pages */
h2 {
  font-weight: 500;
  font-size: max(26px,3.5cqw);
  line-height: 1.15;
}
 
.sub {
  color: var(--mute);
  font-size: max(14px,1.4cqw);
  margin: 2px 0 1.6cqw;
}
 
.grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 2.3cqw;
}

#experience .grid {
  grid-template-columns: 1fr;
  gap: 1cqw;
  max-width: 900px;
}

#experience .tile {
  aspect-ratio: auto;
  min-height: 0;
  padding: 1.5cqw 2cqw;
  display: grid;
  grid-template-columns: minmax(220px,.9fr) 1.5fr;
  grid-template-rows: auto auto auto;
  align-items: start;
  gap: .35cqw 2cqw;
}

#experience .tile h3 {
  grid-column: 1;
  grid-row: 1;
  font-size: max(18px,2cqw);
  margin-bottom: 0;
}

#experience .tile em {
  grid-column: 1;
  grid-row: 2;
}

#experience .tile time {
  grid-column: 1;
  grid-row: 3;
}

#experience .tile p {
  grid-column: 2;
  grid-row: 1 / 3;
  margin-top: 0;
}

#experience .tile footer {
  grid-column: 2;
  grid-row: 3;
  align-self: end;
}
 
.tile {
  aspect-ratio: 137/133;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 2.4cqw;
  display: flex;
  flex-direction: column;
  gap: .5cqw;
}
 
.tile small {
  color: var(--mute);
  font-size: max(11px,1.1cqw);
  letter-spacing: .06em;
  font-variant: small-caps;
}
 
.tile h3 {
  font-weight: 500;
  font-size: max(20px,2.5cqw);
  line-height: 1.15;
  margin-bottom: .4cqw;
}
 
.tile em,.tile time {
  color: var(--mute);
  font-size: max(13px,1.3cqw);
  line-height: 1.3;
}
 
.tile p {
  color: var(--mute);
  font-size: max(14px,1.4cqw);
  line-height: 1.35;
  margin-top: .5cqw;
}
 
.tile footer a {
  text-decoration: underline;
}
 
.tile footer {
  margin-top: auto;
  font-size: max(13px,1.25cqw);
  font-weight: 600;
}
 
/* Who I Am page */
.about {
  aspect-ratio: 431/167;
  background: linear-gradient(#f6f3ec,#f2efe7);
  box-shadow: var(--shadow);
  padding: 3.6cqw;
  display: grid;
  grid-template-columns: 23.7cqw 1fr;
  gap: 6.3cqw;
  align-items: center;
}
 
.photo {
  height: 100%;
  background: #e8e5da;
  overflow: hidden;
  color: var(--mute);
  font-style: italic;
  font-size: max(13px,1.3cqw);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
 
.bio small {
  display: block;
  font-weight: 600;
  font-size: max(12px,1.2cqw);
  margin: .5cqw 0 .6cqw;
}
 
.bio h2 {
  font-size: max(24px,3cqw);
}
 
.bio p {
  color: var(--mute);
  font-size: max(15px,1.6cqw);
  line-height: 1.4;
  max-width: 34em;
}
 
/* Phones: stack everything in one column */
@media (max-width:700px) {
  .frame {
    width: 92vw;
  }
 
  .card {
    aspect-ratio: auto;
    min-height: 300px;
    padding: 22px;
  }
 
  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #experience .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
 
  .tile {
    aspect-ratio: auto;
    padding: 20px;
    gap: 4px;
    min-height: 200px;
  }

  #experience .tile {
    display: flex;
    padding: 16px;
    gap: 4px;
    min-height: 0;
  }

  #experience .tile h3 {
    font-size: 20px;
  }

  #experience .tile p {
    margin-top: 4px;
  }
 
  .about {
    aspect-ratio: auto;
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 20px;
  }
 
  .photo {
    height: auto;
    aspect-ratio: 3/4;
    max-width: 180px;
  }
 
  .view.top {
    margin-top: 0;
  }
}
 
/* Skip animations if the visitor asks for less motion */
@media (prefers-reduced-motion:reduce) {
  .view {
    transition: none;
  }
}