@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=DM+Mono:wght@300;400;500&family=Jost:wght@400;500;600;700&display=swap');

/* ================================================================
   ROOT & CUSTOM PROPERTIES
   ================================================================ */
:root {
  --font-body: 'Jost', sans-serif;
  --font-heading: 'Cormorant Garamond', serif;
  --font-mono: 'DM Mono', monospace;

  --coral: #FF644C;
  --foam: #F1FAEE;
  --background-shallows: #d1ece6;
  --shallows: #A8DADC;
  --open-ocean: #457B9D;
  --deep-sea: #1D3557;
  --foam-soft: #f1faee6b;
  --open-ocean-soft: #457b9d17;
  --coral-soft: #ff644c1a;
  --deep-sea-soft: #1d35571a;

  --page-gutter: 10rem;
  --page-gap: 7rem;
  --top-padding: 2.5rem;

  --corner-rounding: 4px;
}

/* ================================================================
   CSS RESET
   ================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--foam);
  color: var(--deep-sea);
}

h1 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: small;
  text-transform: uppercase;
  color: var(--coral);
}

h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: xx-large;
  padding-bottom: 1rem;
}

em {
  color: var(--open-ocean);
  font-style: italic;
}

p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: large;
  text-align: justify;
}

hr {
  border: 0;
  border-top: 1px solid var(--shallows); /* Customize color and thickness */
  width: 100%;
  margin-top: 1.5rem;
}

main {
  padding: 0 var(--page-gutter);
}

.page__grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-column: 1 / 11;
  column-gap: 1rem;
}

.page__grid-spread {
  grid-column: 1 / 11;
}

.page__grid-left {
  grid-column: 1 / 6;
}

.page__grid-right {
  grid-column: 7 / 11;
}

.about,
.writing,
.design {
  height: 950px;
  width: 100%;
  padding-top: var(--page-gap);
}

.about.page__grid,
.writing.page__grid,
.design.page__grid {
  align-content: start; row-gap: 0.5rem;
  row-gap: 2rem;
}

/* ================================================================
   HEADER & NAVIGATION
   ================================================================ */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--foam);
}

.header-component{
  width: 100%;
  padding: 1rem var(--page-gutter);
  box-shadow: 0 0.35rem 0.85rem var(--deep-sea);
}

/* .logo {
  
} */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.2rem 0.25rem;
  font-family: var(--font-mono);
  font-size: medium;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--deep-sea);
  transition: color 180ms ease, transform 180ms ease;
  animation: nav-link-in 380ms ease both;
}

.nav__link:nth-of-type(2) {
  animation-delay: 35ms;
}

.nav__link:nth-of-type(3) {
  animation-delay: 70ms;
}

.nav__link:nth-of-type(4) {
  animation-delay: 105ms;
}

.nav__link:nth-of-type(5) {
  animation-delay: 140ms;
}

.nav__link::after {
  content: "";
  position: absolute;
  inset: -0.15rem -0.3rem;
  border-radius: var(--corner-rounding);
  background-color: var(--open-ocean-soft);
  opacity: 0;
  z-index: -1;
  transition: opacity 180ms ease;
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--coral);
  transform: translateY(-1px);
}

.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link.is-active::after {
  opacity: 1;
}

.nav__link.is-active {
  color: var(--coral);
}

.nav__link:focus-visible {
  outline: 2px solid var(--open-ocean);
  outline-offset: 2px;
}

.nav__theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  font-family: var(--font-mono);
  font-size: large;
  text-transform: uppercase;
  color: var(--deep-sea);
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* ================================================================
   HERO SECTION
   ================================================================ */

.hero {
  align-items: center;
  height: 100vh;
  width: 100%;
}

.hero__information h2 {
  font-size: 5rem;
  padding-top: var(--top-padding);
}

.hero__buttons {
  padding-top: var(--top-padding);
  display: flex;
  align-items: center;
  gap: var(--top-padding);
}

.hero__buttons a {
  text-decoration: none;
}

.hero__buttons h1 {
  color: var(--foam);
}

.hero__buttons em {
  color: var(--coral);
  font-style: italic;
  text-transform: lowercase;
  text-decoration: underline;
}

.hero__headshot {
  position: relative;
  overflow: hidden;
  background-image: url(../img/headshot.jpg);
  height: 35rem;
  background-size: cover;
  background-position: -4.5rem;
  border-radius: 4px;
  transition: transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 0 0 rgba(29, 53, 87, 0);
}

.hero__headshot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    115deg,
    rgba(241, 250, 238, 0) 30%,
    var(--foam-soft) 50%,
    rgba(241, 250, 238, 0) 70%
  );
  background-size: 260% 100%;
  background-position: 140% 0;
  background-repeat: no-repeat;
  opacity: 0.85;
}

.hero__headshot:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(29, 53, 87, 0.18);
}

.hero__headshot:hover::after {
  animation: hero-headshot-sheen 700ms ease-out 1;
}

.hero__headshot:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(29, 53, 87, 0.14);
}

/* ================================================================
   ABOUT SECTION
   ================================================================ */

.about__education,
.about__experience {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__education > h2,
.about__experience > h2,
.writing__featured > h2,
.writing__selecteds > h2,
.design__portfolio > h2 {
  padding-bottom: 0;
}

.about__accordion {
  --accordion-row-size: 5.25rem;
  --accordion-max-visible: 4;
  position: relative;
  height: calc(var(--accordion-row-size) * var(--accordion-max-visible));
  background: var(--foam);
  border-radius: var(--corner-rounding);
  border-top: 1px solid var(--shallows);
  overflow: hidden;
  width: 100%;
}

.about__accordion-scroll {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}

.about__accordion-scroll::-webkit-scrollbar {
  display: none;
}

.about__accordion-item {
  border-bottom: 1px solid var(--shallows);
  padding: 1rem 0;
}

.about__accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.about__accordion-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.about__accordion-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--deep-sea);
}

.about__accordion-subtitle {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--open-ocean);
}

.about__accordion-toggle {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--coral);
}

.about__accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
}

.about__accordion-body.is-open {
  max-height: 12rem;
}

.about__accordion-body p {
  margin-top: 0.65rem;
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
}

.about__accordion-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5rem;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(241, 250, 238, 0), var(--foam));
}

/* ================================================================
   WRITING SECTION
   ================================================================ */

.writing {
  position: relative;
  z-index: 0;
}

.writing::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--page-gutter) * -1);
  right: calc(var(--page-gutter) * -1);
  background-color: var(--background-shallows);
  z-index: -1;
}

.writing__featured,
.writing__selecteds {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.writing__list {
  --list-row-size: 8.5rem;
  --list-max-visible: 4;
  position: relative;
  /* height: calc(var(--list-row-size) * var(--list-max-visible)); */
  background: var(--background-shallows);
  border-radius: var(--corner-rounding);
  border-top: 1px solid var(--shallows);
  overflow: hidden;
}

.writing__list-scroll {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}

.writing__list-scroll::-webkit-scrollbar {
  display: none;
}

.writing__list-item {
  display: block;
  width: 100%;
  border-bottom: 1px solid var(--shallows);
  padding: 1rem 0;
}

.writing__list-item-featured {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.writing__list-content {
  flex: 1;
  min-width: 0;
}

.writing__list-item-link {
  text-decoration: none;
  color: inherit;
  transition: background-color 160ms ease;
}

.writing__list-item-link:hover {
  background: var(--foam);
}

.writing__list-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
  color: var(--deep-sea);
}

.writing__list-sub {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-style: italic;
  margin: 0.15rem 0 0.35rem;
  color: var(--open-ocean);
}

.writing__list-body {
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
  text-align: left;
}

.writing__list-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.writing__buy-link {
  display: inline-grid;
  place-items: center;
  width: 8rem;
  height: 3rem;
  text-decoration: none;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-size: small;
  letter-spacing: 0.03em;
  color: var(--foam);
}

.writing__list-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5rem;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(241, 250, 238, 0), var(--background-shallows));
}

/* ================================================================
   DESIGN SECTION
   ================================================================ */

.design__projects {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.design__portfolio {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  min-height: 0;
}

.design__portfolio hr {
  margin-top: 0;
}

.design__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.design__filter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--deep-sea);
  background: transparent;
  color: var(--deep-sea);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.design__filter.is-active {
  font-weight: 500;
}

.design__filter--all.is-active {
  background: var(--deep-sea);
  border-color: var(--deep-sea);
  color: var(--foam);
}

.design__filter--web.is-active {
  background: var(--open-ocean-soft);
  border-color: var(--open-ocean);
  color: var(--open-ocean);
}

.design__filter--software.is-active {
  background: var(--coral-soft);
  border-color: var(--coral);
  color: var(--coral);
}

.design__filter--collab.is-active {
  background: var(--deep-sea-soft);
  border-color: var(--deep-sea);
  color: var(--deep-sea);
}

.design__grid-shell {
  --design-row-size: 16rem;
  --design-row-gap: 0.8rem;
  position: relative;
  height: calc((var(--design-row-size) * 2) + var(--design-row-gap));
  overflow: hidden;
}

.design__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(var(--design-row-size), auto);
  gap: var(--design-row-gap);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  padding-right: 0.25rem;
  padding-bottom: 3.5rem;
  scrollbar-width: none;
}

.design__grid::-webkit-scrollbar {
  display: none;
}

.design__grid-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5rem;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--foam));
}

.design__card {
  border: 1px solid var(--shallows);
  background: var(--foam);
  transition: opacity 160ms ease;
  min-height: var(--design-row-size);
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.design__card:hover {
  opacity: 0.9;
}

.design__thumb {
  width: 100%;
  height: 8rem;
  position: relative;
  overflow: hidden;
}

.design__thumb-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.design__thumb--web {
  background: var(--open-ocean);
}

.design__thumb--software {
  background: var(--coral);
}

.design__thumb--collab {
  background: var(--deep-sea);
}

.design__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  background: var(--foam);
  border: 1px solid;
}

.design__badge--web {
  color: var(--open-ocean);
  border-color: var(--open-ocean);
}

.design__badge--software {
  color: var(--coral);
  border-color: var(--coral);
}

.design__badge--collab {
  color: var(--deep-sea);
  border-color: var(--deep-sea);
}

.design__info {
  border-top: 1px solid var(--shallows);
  padding: 0.75rem 1rem 1rem;
  flex: 1;
  overflow: visible;
}

.design__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--deep-sea);
  margin: 0;
}

.design__context {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--open-ocean);
  margin: 0.15rem 0 0.45rem;
}

.design__body {
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
  margin: 0;
}

@media (max-width: 900px) {
  .design__grid-shell {
    --design-row-size: 18rem;
  }

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

@media (max-width: 620px) {
  .design__grid-shell {
    --design-row-size: 20rem;
  }

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

/* ================================================================
   FOOTER COMPONENTS
   ================================================================ */

.footer-component{
  width: 100%;
  height: 35vh;
  padding: var(--top-padding) var(--page-gutter);
  background-color: var(--background-shallows);
}

.footer-statement h2 {
  font-size: 4rem;
}




/* ================================================================
   BUTTON COMPONENTS
   ================================================================ */

.button__orange {
  display: grid;
  position: relative;
  overflow: hidden;
  background-color: var(--coral);
  background-image:
    linear-gradient(
      115deg,
      rgba(241, 250, 238, 0) 30%,
      var(--foam-soft) 50%,
      rgba(241, 250, 238, 0) 70%
    ),
    linear-gradient(var(--coral), var(--coral));
  background-size: 260% 100%, 100% 100%;
  background-position: 140% 0, 0 0;
  background-repeat: no-repeat;
  border-radius: 4px;
  height: 3rem;
  width: 8rem;
  place-items: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
  box-shadow: 0 0 0 rgba(29, 53, 87, 0);
}

.button__orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(29, 53, 87, 0.18);
  animation: orange-bg-sheen 700ms ease-out 1;
}

.button__orange:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(29, 53, 87, 0.14);
}

.button__orange:focus-visible {
  outline: 2px solid var(--deep-sea);
  outline-offset: 2px;
}

.button__invisible {
  display: grid;
  border-radius: 4px;
  height: 3rem;
  width: 8.5rem;
  place-items: center;
}

.button__invisible > * {
  color: var(--coral);
}

.button__invisible:hover > * {
  background-image: linear-gradient(
    110deg,
    var(--coral) 28%,
    var(--foam-soft) 50%,
    var(--coral) 72%
  );
  background-size: 320% 100%;
  background-position: 120% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: brightness(1.2);
  animation: invisible-text-sheen 700ms ease-out 1;
}

@keyframes invisible-text-sheen {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

@keyframes orange-bg-sheen {
  0% {
    background-position: 140% 0, 0 0;
  }

  100% {
    background-position: -140% 0, 0 0;
  }
}

@keyframes hero-headshot-sheen {
  0% {
    background-position: 140% 0;
  }

  100% {
    background-position: -140% 0;
  }
}

@keyframes nav-link-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav__link {
    animation: none;
    transition: none;
  }

  .nav__link:hover,
  .nav__link:focus-visible {
    transform: none;
  }

  .nav__link::before,
  .nav__link::after {
    transition: none;
  }

  .button__orange {
    transition: none;
  }

  .hero__headshot {
    transition: none;
  }

  .button__orange:hover,
  .button__orange:active {
    transform: none;
    box-shadow: none;
  }

  .hero__headshot:hover,
  .hero__headshot:active {
    transform: none;
    box-shadow: none;
  }

  .button__invisible:hover > * {
    animation: none;
  }

  .hero__headshot:hover::after {
    animation: none;
  }
}