:root {
  color-scheme: dark;
  --ink: #090909;
  --panel: #151515;
  --gold: #c9ad72;
  --gold-light: #e2c78f;
  --white: #f1eee8;
  --muted: #a7a39c;
  --quiet: #77736b;
  --bronze: rgba(160, 128, 75, .24);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--white);
  background:
    radial-gradient(ellipse at 50% 12%, rgba(201, 173, 114, .085), transparent 25rem),
    radial-gradient(ellipse at 100% 58%, rgba(123, 94, 49, .045), transparent 24rem),
    linear-gradient(160deg, #090909 0%, #0c0c0c 54%, #090909 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.page-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(17px, env(safe-area-inset-top)) 23px max(19px, env(safe-area-inset-bottom));
  animation: page-arrive .65s ease both;
}

.identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 21px 0 24px;
  text-align: center;
}

.portrait-frame {
  width: clamp(122px, 35vw, 146px);
  height: clamp(122px, 35vw, 146px);
  margin: 0 0 15px;
  overflow: hidden;
  border: 1px solid rgba(201, 173, 114, .85);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, rgba(201, 173, 114, .14), transparent 70%),
    #171614;
  box-shadow: 0 0 0 4px rgba(201, 173, 114, .035), 0 15px 34px rgba(0, 0, 0, .35);
  animation: portrait-arrive .72s .08s ease both;
}

.portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
  filter: saturate(.8) contrast(1.04) brightness(.9);
}

.identity__eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .2em;
}

h1 {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: clamp(31px, 8.8vw, 40px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.16;
}

.identity__title {
  margin: 5px 0 0;
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .055em;
}

.identity__tagline {
  max-width: 330px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.save-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 53px;
  margin-top: 17px;
  border: 1px solid var(--gold);
  border-radius: 5px;
  color: #14120e;
  background: var(--gold);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, transform .18s ease, box-shadow .2s ease;
}

.save-button svg { width: 18px; height: 18px; }
.save-button:hover { border-color: var(--gold-light); background: var(--gold-light); box-shadow: 0 9px 23px rgba(201, 173, 114, .13); }
.save-button:active { transform: scale(.985); }
.contact-section, .presence-section, .profile-sections { margin-top: 5px; }
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.section-heading h2 {
  margin: 0;
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
}
.section-heading > span {
  color: var(--quiet);
  font-size: 7px;
  letter-spacing: .13em;
  white-space: nowrap;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 19px 14px;
  align-content: center;
  align-items: center;
  justify-items: center;
  min-width: 0;
  min-height: 78px;
  row-gap: 5px;
  padding: 11px 10px;
  border: 1px solid var(--bronze);
  border-radius: 5px;
  background: linear-gradient(145deg, rgba(24, 23, 21, .94), rgba(17, 17, 16, .86));
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .18s ease;
}

.contact-card[href]:hover { border-color: rgba(201, 173, 114, .57); background: #191815; }
.contact-card[href]:active { transform: scale(.98); }
.contact-card--placeholder { border-color: rgba(201, 173, 114, .15); }
.contact-card:last-child { grid-column: 1 / -1; }
.contact-card__heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.contact-card__icon {
  display: grid;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  color: var(--gold);
  place-items: center;
}
.contact-card__icon svg { width: 19px; height: 19px; }
.contact-card__label {
  min-width: 0;
  overflow: hidden;
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .065em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-card__value {
  grid-column: 1;
  grid-row: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-card--placeholder .contact-card__value { color: #77736b; font-style: italic; }

.presence-section { margin-top: 24px; }
.presence-section .section-heading { margin-bottom: 8px; }
.presence-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(201, 173, 114, .18);
  border-bottom: 1px solid rgba(201, 173, 114, .18);
}
.presence-link {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 9px;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 43px;
  padding: 5px 7px;
  border-right: 1px solid rgba(201, 173, 114, .15);
  color: var(--white);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.presence-link:nth-child(even) { border-right: 0; }
.presence-link:nth-child(n + 3) { border-top: 1px solid rgba(201, 173, 114, .15); }
.presence-link:hover { color: var(--gold-light); background: rgba(201, 173, 114, .045); }
.presence-link--placeholder { color: var(--muted); }
.presence-link__icon { display: grid; width: 17px; height: 17px; color: var(--gold); place-items: center; }
.presence-link__icon svg { width: 17px; height: 17px; }
.presence-link__label {
  overflow: hidden;
  font-size: 9px;
  letter-spacing: .005em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.presence-link__arrow { color: var(--gold); font-size: 9px; text-align: right; }
.presence-link--placeholder .presence-link__arrow { color: #625a4c; }

.profile-sections { margin-top: 25px; }
.profile-sections .section-heading { margin-bottom: 8px; }
.accordion { border-top: 1px solid rgba(201, 173, 114, .28); }
.accordion__item { border-bottom: 1px solid rgba(201, 173, 114, .2); }
.accordion__trigger {
  display: grid;
  grid-template-columns: 1fr 30px 20px;
  align-items: center;
  width: 100%;
  min-height: 53px;
  padding: 0 3px;
  border: 0;
  color: var(--white);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease;
}
.accordion__trigger:hover, .accordion__trigger[aria-expanded="true"] { color: var(--gold-light); }
.accordion__title { font-size: 9px; font-weight: 500; letter-spacing: .12em; }
.accordion__number { color: var(--quiet); font-family: var(--serif); font-size: 11px; }
.accordion__indicator { justify-self: end; color: var(--gold); font-family: var(--serif); font-size: 20px; font-weight: 400; }
.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  opacity: 0;
  transition: grid-template-rows .3s cubic-bezier(.2, .65, .25, 1), opacity .2s ease, visibility .3s;
}
.accordion__panel--open { grid-template-rows: 1fr; visibility: visible; opacity: 1; }
.accordion__panel-inner { min-height: 0; overflow: hidden; padding: 0 4px 18px; }

.about-content__intro {
  margin: 2px 0 8px;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
}
.about-content__bio, .about-content__background {
  margin: 7px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.detail-group { padding-top: 12px; }
.detail-group + .detail-group { margin-top: 10px; border-top: 1px solid rgba(241, 238, 232, .08); }
.detail-group__heading {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .14em;
}
.detail-group__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.detail-group__list li {
  position: relative;
  padding-left: 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.detail-group__list li::before {
  position: absolute;
  top: .65em;
  left: 0;
  width: 4px;
  height: 4px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  content: "";
}

.project-list { display: grid; gap: 9px; }
.project-card { padding: 13px; border: 1px solid rgba(201, 173, 114, .19); border-radius: 4px; background: rgba(21, 21, 21, .66); }
.project-card__image { display: block; width: 100%; max-height: 150px; margin-bottom: 12px; border-radius: 2px; object-fit: cover; }
.project-card__index { color: var(--gold); font-size: 7px; letter-spacing: .15em; }
.project-card__title { margin: 7px 0 5px; color: var(--white); font-family: var(--serif); font-size: 17px; font-weight: 400; }
.project-card__description { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.project-card__link { display: inline-block; margin-top: 11px; color: var(--gold-light); font-size: 8px; letter-spacing: .12em; text-decoration-color: rgba(201, 173, 114, .45); text-underline-offset: 4px; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
@keyframes page-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes portrait-arrive { from { opacity: 0; transform: translateY(7px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 360px) {
  .page-shell { padding-right: 18px; padding-left: 18px; }
  .contact-card { padding-right: 7px; padding-left: 8px; }
  .presence-link { grid-template-columns: 16px minmax(0, 1fr) 8px; gap: 4px; padding-right: 5px; padding-left: 5px; }
  .presence-link__label { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
