:root {
  --accent: #e11d48;
  --gastrosync: #4f20a8;
  --linkedin: #0a66c2;
  --background: #fafafa;
  --text: #171717;
  --muted: #525252;
  --soft: #e5e5e5;
  --line: #f0f0f0;
  color-scheme: light;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #ffe4e6;
  color: #881337;
}

.page-shell {
  width: min(100%, 672px);
  min-height: 100vh;
  margin-inline: auto;
  padding: 12rem 1.5rem 6rem;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3rem;
}

.portrait-wrap {
  position: relative;
  width: 10rem;
  height: 10rem;
}

.portrait-layer,
.portrait {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
}

.portrait-layer {
  transition: transform 500ms ease;
}

.portrait-layer--back {
  background: #e5e5e5;
  transform: rotate(3deg);
}

.portrait-layer--middle {
  border: 1px solid rgba(229, 229, 229, 0.5);
  background: #f5f5f5;
  transform: rotate(-2deg);
}

.portrait-wrap:hover .portrait-layer--back {
  transform: rotate(6deg);
}

.portrait-wrap:hover .portrait-layer--middle {
  transform: rotate(-4deg);
}

.portrait {
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid #e5e5e5;
  background: #e5e5e5;
}

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

.intro-copy {
  display: grid;
  gap: 1.5rem;
}

h1 {
  margin: 0;
  color: #171717;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bio {
  display: grid;
  gap: 1.5rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 2.7vw, 1.25rem);
  font-weight: 300;
  line-height: 1.625;
}

.bio p {
  margin: 0;
}

.bio strong,
.bio a {
  color: var(--text);
  font-weight: 500;
}

.text-link {
  position: relative;
  text-decoration: none;
}

.text-link::after {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--soft);
  content: "";
}

.text-link::before {
  position: absolute;
  z-index: 1;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.text-link:hover::before,
.text-link:focus-visible::before {
  transform: scaleX(1);
}

.gastrosync-link,
.linkedin-link {
  transition: color 200ms ease;
}

.gastrosync-link::before {
  background: var(--gastrosync);
}

.gastrosync-link:hover,
.gastrosync-link:focus-visible {
  color: var(--gastrosync);
}

.gastrosync-link:focus-visible {
  outline-color: var(--gastrosync);
}

.linkedin-link::before {
  background: var(--linkedin);
}

.linkedin-link:hover,
.linkedin-link:focus-visible {
  color: var(--linkedin);
}

.linkedin-link:focus-visible {
  outline-color: var(--linkedin);
}

.connections {
  width: 100%;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.social-grid a,
.social-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: max-content;
  color: #525252;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 200ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.social-grid svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: #a3a3a3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
  transition: fill 200ms ease, stroke 200ms ease;
}

.social-grid a:nth-child(-n+3) svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.social-grid a:hover,
.social-grid a:focus-visible {
  color: var(--text);
  transform: translateY(-2px);
}

.social-grid a:hover svg,
.social-grid a:focus-visible svg {
  color: var(--accent);
  stroke: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 2px;
}

footer {
  margin-top: 8rem;
  color: #a3a3a3;
  font-size: 0.75rem;
  font-weight: 500;
}

.grain {
  position: fixed;
  z-index: 10;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

@media (max-width: 640px) {
  .page-shell {
    padding-top: 6rem;
  }

  .profile {
    gap: 3rem;
  }

  .portrait-wrap {
    width: 8rem;
    height: 8rem;
  }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
