@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("fonts/manrope.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --base: #120e10;
  --surface: #1c1619;
  --surface-hover: #251b20;
  --line: #362a30;
  --text: #fcf2e9;
  --muted: #bcaeb0;
  --accent: #ecad99;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: Manrope, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse 55rem 44rem at 10% 5%, #352027a8, transparent 76%),
    radial-gradient(ellipse 45rem 37rem at 95% 0%, #311c25a0, transparent 77%),
    var(--base);
  color: var(--text);
  font: 1rem/1.5 var(--body);
}

h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { display: block; }

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

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 2;
  inset: .75rem auto auto .75rem;
  padding: .65rem .9rem;
  border-radius: .5rem;
  background: var(--accent);
  color: var(--base);
}

.page-width {
  width: min(calc(100% - 3rem), 69rem);
  margin-inline: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 5.25rem;
  border-bottom: 1px solid var(--line);
}

.monogram {
  display: grid;
  grid-auto-flow: column;
  place-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid #503942;
  border-radius: 50%;
  background: #23171c;
  font: 600 1.8rem/.8 var(--display);
  letter-spacing: -.08em;
}

.monogram span { color: var(--accent); }

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.75rem;
  padding: .4rem .9rem;
  border: 1px solid #5a424b;
  border-radius: 999px;
  background: #291c22;
  color: var(--text);
  font-size: .8rem;
  font-weight: 700;
}

.share-button svg { width: 1rem; height: 1rem; }
.share-button:hover, .social-links a:hover { background: #3c2831; border-color: var(--accent); }

.storefront {
  display: grid;
  grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 4.6vw, 4.1rem);
  padding-block: clamp(2rem, 4.6vw, 3.8rem) 2.5rem;
}

.portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 10rem 10rem .9rem .9rem;
  background: #2b2524;
  outline: 1px solid #b08a7d77;
  outline-offset: -1px;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(.16);
}

.portrait::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #3d1b1b00 56%, #2f191763);
  content: "";
  pointer-events: none;
}

.profile h1 {
  margin-top: .8rem;
  font: 500 clamp(3.25rem, 5vw, 4rem)/.95 var(--display);
  letter-spacing: -.06em;
  white-space: nowrap;
}

.profile-divider {
  color: var(--accent);
  font-size: .68em;
  vertical-align: .12em;
}

.profile p {
  margin-top: .9rem;
  color: var(--muted);
  font-size: .92rem;
}

.profile-email {
  display: inline-block;
  margin-top: .35rem;
  text-underline-offset: .18em;
  overflow-wrap: anywhere;
}

.profile-email:hover { color: var(--accent); }

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.15rem;
}

.social-links a {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #503942;
  border-radius: 50%;
  background: #241a1f;
  color: var(--text);
}

.social-links svg { width: 1.14rem; height: 1.14rem; }

.projects h2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.projects h2::after {
  flex: 1;
  height: 1px;
  background: var(--line);
  content: "";
}

.project-feed, .fallback-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-item { min-width: 0; }

.project-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .78rem;
  height: 100%;
  min-height: 5.35rem;
  padding: .7rem .8rem;
  border: 1px solid var(--line);
  border-radius: .88rem;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease;
}

a.project-card:hover {
  border-color: #916557;
  background: var(--surface-hover);
}

.project-preview {
  position: relative;
  width: 3.6rem;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: .48rem;
  background: radial-gradient(at 28% 22%, #543644, #291c24);
}

.project-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: .2rem;
  color: var(--muted);
  font-size: .62rem;
  line-height: 1.2;
  text-align: center;
}

.project-preview--stacked {
  background: radial-gradient(at 30% 20%, #855a61, #4a3039);
}

.project-preview--stacked .project-image {
  position: absolute;
  inset: 16% auto auto 32%;
  width: 48%;
  height: 74%;
  border-radius: .07rem;
  box-shadow: 1px 2px 4px #170b0f90;
  object-fit: fill;
  transform: rotate(13deg);
}

.project-preview--stacked .project-image--companion {
  inset: 12% auto auto 20%;
  transform: rotate(-15deg);
}

.project-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.project-description {
  margin-top: .25rem;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-arrow {
  width: 1.22rem;
  height: 1.22rem;
  color: var(--accent);
}

.project-item--featured,
.project-item--featured:first-child ~ .project-item:last-child:nth-child(even) {
  grid-column: 1 / -1;
}

.project-item--featured { margin-bottom: .35rem; }

.project-item--featured .project-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 16.6rem;
  padding: clamp(1.45rem, 3.4vw, 2.2rem);
  overflow: hidden;
  border-color: #63424d;
  background: #21171c;
}

.project-item--featured .project-card:hover { border-color: var(--accent); }

.project-item--featured .project-preview {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 24%;
  width: auto;
  aspect-ratio: auto;
  border-radius: 0;
  background: #171417;
}

.project-item--featured .project-preview::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #21171c, #21171c8c 26%, #17141700 70%);
  content: "";
}

.project-item--featured .project-image {
  object-position: center 46%;
  transition: transform 450ms ease;
}

.project-item--featured a:hover .project-image { transform: scale(1.035); }

.project-item--featured .project-copy { width: min(20rem, 66%); }

.project-item--featured .project-name {
  font: 500 clamp(3.3rem, 7vw, 5.1rem)/.84 var(--display);
  letter-spacing: -.048em;
}

.project-item--featured .project-description {
  margin-top: .8rem;
  color: #e0cdd3;
  font-size: .875rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.project-action {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1.1rem;
  padding: .5rem .75rem .5rem .9rem;
  border-radius: 999px;
  background: var(--accent);
  color: #231517;
  font-size: .78rem;
  font-weight: 700;
}

.project-action .project-arrow { width: .95rem; height: .95rem; color: inherit; }

.site-footer {
  padding-bottom: 1.5rem;
  color: var(--muted);
  font-size: .72rem;
  text-align: center;
  text-wrap: balance;
}

dialog {
  width: min(24rem, calc(100% - 2rem));
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--text);
}

dialog::backdrop { background: #100a0bc7; }
dialog form { display: grid; gap: .7rem; }
dialog h2 { font: 500 2rem/1 var(--display); }
dialog input { width: 100%; padding: .6rem; border: 1px solid var(--line); border-radius: .4rem; }
dialog button { justify-self: end; }

@media (max-width: 58rem) {
  .storefront { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 1.75rem; }
  .profile h1 { font-size: 3rem; }
  .project-card { gap: .58rem; padding-inline: .6rem; }
  .project-preview { width: 3rem; }
}

@media (max-width: 48rem) {
  .page-width { width: min(calc(100% - 2rem), 35rem); }
  .topbar { min-height: 4.35rem; }
  .storefront { grid-template-columns: 1fr; gap: 1.8rem; padding-top: 1.45rem; }
  .profile { text-align: center; }
  .portrait {
    width: clamp(5.3rem, 22vw, 7.5rem);
    aspect-ratio: 1;
    margin-inline: auto;
    border-radius: 50%;
  }
  .portrait img { object-position: center 39%; }
  .profile h1 { font-size: clamp(2.85rem, 10.5vw, 3.75rem); }
  .profile p { margin-top: .65rem; font-size: .85rem; }
  .social-links { justify-content: center; margin-top: .8rem; }
}

@media (max-width: 32rem) {
  .project-feed, .fallback-links { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
  .project-card { min-height: 4.7rem; gap: .75rem; padding: .56rem .7rem; }
  .project-preview { width: 3.45rem; }
  .project-item--featured .project-card { min-height: 13rem; padding: 1.08rem; }
  .project-item--featured .project-name { font-size: clamp(2.6rem, 12vw, 4rem); }
  .project-item--featured .project-description { font-size: .78rem; }
  .project-item--featured .project-copy { width: 69%; }
  .project-item--featured .project-preview::after {
    background: linear-gradient(90deg, #21171c, #21171ca0 31%, #17141700 78%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card, .project-item--featured .project-image { transition: none; }
  .project-item--featured a:hover .project-image { transform: none; }
}
