/* project-tcg.css */

:root {
  --bg: #f4f1e8;
  --accent: #9b4819;
  --text: #191919;
  --paper: #fffaf0;
  --paper-2: #f8f0e2;
  --muted: #6e675f;

  --serif: "Radley", Georgia, serif;
  --sans: "Carlito", Arial, sans-serif;

  --page-pad: clamp(24px, 5vw, 82px);
}


/* RESET */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background:
    radial-gradient(
      circle at 50% 0,
      rgba(255,255,255,.65),
      transparent 35%
    ),
    var(--bg);

  color: var(--text);

  font-family: var(--sans);

  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
}


/* HEADER */

.site-header {
  position: fixed;

  top: 0;
  left: 0;

  z-index: 100;

  width: 100%;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding:
    24px
    var(--page-pad);

  background:
    linear-gradient(
      to bottom,
      rgba(244,241,232,.96),
      rgba(244,241,232,0)
    );
}

.logo {
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .09em;

  text-decoration: none;
}

.main-nav {
  display: flex;

  gap:
    clamp(
      16px,
      2vw,
      32px
    );
}

.main-nav a {
  position: relative;

  font-size: .88rem;

  text-decoration: none;
}

.main-nav a::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -5px;

  width: 100%;
  height: 1px;

  background: var(--accent);

  transform: scaleX(0);
  transform-origin: right;

  transition:
    transform .3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);

  transform-origin: left;
}


/* GLOBAL */

main {
  padding-top: 100px;
}

.section-wrap {
  width:
    min(
      1220px,
      calc(100% - 2 * var(--page-pad))
    );

  margin:
    0 auto;
}

.paper-card {
  position: relative;

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.45),
      transparent 55%
    ),
    var(--paper);

  border:
    1px solid
    rgba(
      75,
      52,
      32,
      .14
    );

  box-shadow:
    0
    12px
    24px
    rgba(
      79,
      51,
      28,
      .08
    );
}


/* PAPER DECOR */

.taped::before,
.taped::after {
  content: "";

  position: absolute;

  z-index: 4;

  width: 80px;
  height: 28px;

  background:
    rgba(
      222,
      195,
      149,
      .68
    );
}

.taped::before {
  left: -18px;
  top: -10px;

  transform:
    rotate(-14deg);
}

.taped::after {
  right: -18px;
  top: -10px;

  transform:
    rotate(13deg);
}

.taped-small::before {
  content: "";

  position: absolute;

  width: 62px;
  height: 22px;

  left: -14px;
  top: -9px;

  background:
    rgba(
      159,
      174,
      129,
      .75
    );

  transform:
    rotate(13deg);
}

.pinned::before {
  content: "";

  position: absolute;

  width: 10px;
  height: 10px;

  top: -5px;
  right: 22px;

  border-radius: 50%;

  background: #754523;

  box-shadow:
    0 3px 6px
    rgba(
      0,
      0,
      0,
      .2
    );
}

.clipped::after {
  content: "⌇";

  position: absolute;

  right: 15px;
  top: -12px;

  color: #b06d3e;

  font-size: 2.2rem;

  transform:
    rotate(-12deg);
}


/* HERO */

.hero-section {
  width:
    min(
      1320px,
      calc(100% - 2 * var(--page-pad))
    );

  margin:
    0 auto;
}

.back-link {
  display:
    inline-block;

  margin-bottom:
    28px;

  color:
    var(--accent);

  text-decoration:
    none;

  font-size:
    .92rem;
}

.hero-grid {
  display:
    grid;

  grid-template-columns:
    minmax(0, 1.05fr)
    minmax(340px, .95fr);

  gap:
    clamp(
      38px,
      6vw,
      90px
    );

  align-items:
    center;
}

.hero-image-card {
  padding:
    16px;

  transform:
    rotate(-1.2deg);
}

.hero-image-card img {
  aspect-ratio:
    4 / 3;

  object-fit:
    cover;
}

.hero-copy {
  display:
    flex;

  flex-direction:
    column;

  gap:
    25px;
}

.hero-title-paper {
  padding:
    28px
    34px;

  transform:
    rotate(.8deg);
}

.eyebrow {
  margin:
    0 0 8px;

  color:
    var(--accent);

  font-size:
    .72rem;

  font-weight:
    700;

  letter-spacing:
    .12em;
}

.hero-title-paper h1 {
  margin:
    0;

  color:
    var(--accent);

  font-family:
    var(--serif);

  font-size:
    clamp(
      2.8rem,
      5vw,
      5.5rem
    );

  font-style:
    italic;

  font-weight:
    400;

  line-height:
    .95;
}

.hero-period {
  margin:
    17px 0 0;

  color:
    var(--accent);
}

.hero-description {
  margin:
    0;

  font-size:
    1.03rem;

  line-height:
    1.65;
}

.tag-list {
  display:
    flex;

  flex-wrap:
    wrap;

  gap:
    8px;
}

.tag-list span {
  padding:
    7px
    12px;

  border-radius:
    999px;

  background:
    #ede1d0;

  font-size:
    .77rem;
}


/* INFO CARDS */

.info-grid {
  display:
    grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap:
    26px;

  margin-top:
    75px;
}

.info-card {
  min-height:
    235px;

  padding:
    27px;
}

.info-card h2,
.bottom-card h2 {
  margin:
    0
    0
    18px;

  color:
    var(--accent);

  font-family:
    var(--serif);

  font-size:
    1.35rem;

  font-weight:
    400;
}

.info-card p {
  line-height:
    1.65;
}

.role-list {
  margin:
    0;
}

.role-list div {
  display:
    grid;

  grid-template-columns:
    110px
    1fr;

  gap:
    12px;

  margin-bottom:
    13px;
}

.role-list dt {
  color:
    var(--accent);
}

.role-list dd {
  margin:
    0;
}

.tool-grid {
  display:
    flex;

  flex-wrap:
    wrap;

  gap:
    9px;
}

.tool-grid span {
  padding:
    8px
    11px;

  border:
    1px solid
    rgba(
      25,
      25,
      25,
      .18
    );

  border-radius:
    999px;

  font-size:
    .82rem;
}


/* SECTION LABEL */

.section-label {
  width:
    fit-content;

  margin-bottom:
    20px;

  padding:
    9px
    18px;

  background:
    var(--paper);

  box-shadow:
    0
    5px
    12px
    rgba(
      75,
      50,
      30,
      .08
    );

  transform:
    rotate(-1deg);
}

.section-label h2 {
  margin:
    0;

  color:
    var(--accent);

  font-family:
    var(--serif);

  font-size:
    1.3rem;

  font-weight:
    400;
}


/* WORKFLOW */

.workflow-section {
  margin-top:
    75px;
}

.workflow-board {
  position:
    relative;

  display:
    grid;

  grid-template-columns:
    repeat(
      13,
      auto
    );

  align-items:
    center;

  gap:
    12px;

  padding:
    32px
    24px;

  background:
    rgba(
      255,
      250,
      240,
      .7
    );

  border:
    1px solid
    rgba(
      70,
      48,
      28,
      .12
    );
}

.workflow-step {
  width:
    130px;

  text-align:
    center;
}

.step-number {
  display:
    block;

  margin-bottom:
    10px;

  color:
    var(--accent);

  font-family:
    var(--serif);

  font-style:
    italic;
}

.workflow-step h3 {
  margin:
    0 0 10px;

  font-size:
    .94rem;
}

.workflow-step p {
  margin:
    0;

  color:
    var(--muted);

  font-size:
    .8rem;

  line-height:
    1.45;
}

.workflow-arrow {
  color:
    var(--accent);

  font-size:
    1.2rem;
}


/* PROJECTS */

.projects-section {
  margin-top:
    80px;
}

.selected-projects-grid {
  display:
    grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap:
    28px;
}

.selected-project {
  padding:
    27px;

  min-height:
    520px;
}

.project-head {
  display:
    flex;

  justify-content:
    space-between;

  margin-bottom:
    20px;
}

.project-head h3 {
  margin:
    0;

  color:
    var(--accent);

  font-family:
    var(--serif);

  font-size:
    1.8rem;

  font-style:
    italic;

  font-weight:
    400;
}

.project-head p {
  margin:
    5px 0 0;

  font-size:
    .84rem;
}

.project-content-grid {
  display:
    grid;

  grid-template-columns:
    minmax(0, 1.3fr)
    minmax(180px, .7fr);

  gap:
    24px;
}

.project-image {
  padding:
    10px;

  background:
    #eadac1;

  transform:
    rotate(-1deg);
}

.project-image img {
  aspect-ratio:
    4 / 3;

  object-fit:
    cover;
}

.project-task h4 {
  margin:
    0 0 12px;

  color:
    var(--accent);

  font-family:
    var(--serif);

  font-style:
    italic;

  font-weight:
    400;

  font-size:
    1.2rem;
}

.project-task ul {
  padding-left:
    18px;

  margin:
    0;
}

.project-task li {
  margin-bottom:
    7px;

  font-size:
    .88rem;

  line-height:
    1.4;
}

.small-note {
  margin:
    20px 0 0;

  color:
    var(--accent);

  font-family:
    var(--serif);

  font-style:
    italic;

  font-size:
    .85rem;

  transform:
    rotate(-1deg);
}


/* BOTTOM */

.bottom-grid {
  display:
    grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap:
    26px;

  margin-top:
    70px;
}

.bottom-card {
  min-height:
    390px;

  padding:
    26px;
}

.bottom-card p {
  line-height:
    1.6;
}

.code-block {
  overflow-x:
    auto;

  padding:
    15px;

  background:
    #202020;

  color:
    #f3e9dd;

  border-radius:
    3px;

  font-size:
    .78rem;
}

.check-list {
  display:
    grid;

  gap:
    22px;
}

.check-item {
  display:
    grid;

  grid-template-columns:
    28px
    1fr;

  gap:
    10px;
}

.check-item > span {
  display:
    grid;

  place-items:
    center;

  width:
    25px;

  height:
    25px;

  border:
    1px solid
    var(--accent);

  border-radius:
    50%;

  color:
    var(--accent);
}

.check-item h3 {
  margin:
    0 0 5px;

  font-size:
    .95rem;
}

.check-item p {
  margin:
    0;

  color:
    var(--muted);

  font-size:
    .88rem;
}

.reflection-note {
  margin-top:
    25px;

  color:
    var(--accent);

  font-family:
    var(--serif);

  font-style:
    italic;

  transform:
    rotate(-1deg);
}


/* NEXT PROJECT */

.next-project-section {
  width:
    min(
      650px,
      calc(100% - 2 * var(--page-pad))
    );

  margin:
    70px auto;
}

.next-project-card {
  display:
    grid;

  grid-template-columns:
    auto
    1fr
    auto;

  align-items:
    center;

  gap:
    22px;

  padding:
    25px
    30px;

  background:
    #ead7b8;

  text-decoration:
    none;

  box-shadow:
    0
    10px
    20px
    rgba(
      72,
      49,
      30,
      .1
    );

  transition:
    transform
    .35s
    ease;
}

.next-project-card:hover {
  transform:
    translateY(-5px)
    rotate(-.5deg);
}

.next-label {
  font-size:
    .72rem;

  color:
    var(--accent);

  letter-spacing:
    .08em;
}

.next-title {
  color:
    var(--accent);

  font-family:
    var(--serif);

  font-size:
    1.45rem;

  font-style:
    italic;
}

.next-arrow {
  color:
    var(--accent);

  font-size:
    1.6rem;
}


/* FOOTER */

.site-footer {
  display:
    flex;

  justify-content:
    space-between;

  padding:
    25px
    var(--page-pad);

  border-top:
    1px solid
    rgba(
      25,
      25,
      25,
      .12
    );

  font-size:
    .8rem;
}

.social-links {
  display:
    flex;

  gap:
    15px;
}

.social-links a {
  text-decoration:
    none;

  font-weight:
    700;
}


/* PAGE TRANSITION */

.page-transition {
  position:
    fixed;

  inset:
    0;

  z-index:
    9999;

  background:
    var(--accent);

  transform:
    translateY(100%);

  pointer-events:
    none;
}

.page-transition.entering {
  animation:
    pageCover
    .7s
    cubic-bezier(
      .76,
      0,
      .24,
      1
    )
    forwards;
}

@keyframes pageCover {
  to {
    transform:
      translateY(0);
  }
}


/* REVEAL ANIMATION */

.reveal-on-scroll {
  opacity:
    0;

  transform:
    translateY(25px);

  transition:
    opacity
    .7s
    ease,
    transform
    .7s
    ease;
}

.reveal-on-scroll.visible {
  opacity:
    1;

  transform:
    translateY(0);
}


/* RESPONSIVE */

@media (max-width: 1100px) {

  .workflow-board {
    overflow-x:
      auto;

    grid-template-columns:
      repeat(
        13,
        auto
      );
  }

  .info-grid,
  .bottom-grid {
    grid-template-columns:
      1fr
      1fr;
  }

  .tools-card {
    grid-column:
      1 / -1;
  }

}

@media (max-width: 860px) {

  .main-nav a:not(.active) {
    display:
      none;
  }

  .hero-grid,
  .selected-projects-grid,
  .info-grid,
  .bottom-grid {
    grid-template-columns:
      1fr;
  }

  .hero-grid {
    gap:
      35px;
  }

  .hero-copy {
    order:
      -1;
  }

  .project-content-grid {
    grid-template-columns:
      1fr;
  }

  .workflow-board {
    display:
      flex;

    overflow-x:
      auto;

    gap:
      20px;
  }

  .workflow-step {
    flex:
      0 0 175px;
  }

  .workflow-arrow {
    flex:
      0 0 auto;
  }

}

@media (max-width: 560px) {

  main {
    padding-top:
      90px;
  }

  .hero-title-paper {
    padding:
      22px;
  }

  .hero-title-paper h1 {
    font-size:
      clamp(
        2.6rem,
        13vw,
        4.2rem
      );
  }

  .section-wrap,
  .hero-section {
    width:
      min(
        100% - 32px,
        100%
      );
  }

  .role-list div {
    grid-template-columns:
      1fr;
  }

  .next-project-card {
    grid-template-columns:
      1fr
      auto;
  }

  .next-label {
    grid-column:
      1 / -1;
  }

}


/* ACCESSIBILITY */

a:focus-visible {
  outline:
    2px solid
    var(--accent);

  outline-offset:
    5px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration:
      .01ms
      !important;

    animation-iteration-count:
      1
      !important;

    transition-duration:
      .01ms
      !important;
  }

  .reveal-on-scroll {
    opacity:
      1;

    transform:
      none;
  }

}