@font-face {
  font-family: Inter;
  src: url("./assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f5f5f5;
  --foreground: #272727;
  --muted: #666;
  --border: #e2e2e2;
  --surface: #fff;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--foreground); color: var(--background); }

.appearance { position: absolute; top: 24px; right: 32px; z-index: 2; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--foreground);
  font: 400 12px/1.4 var(--mono);
  cursor: pointer;
  box-shadow: 0 1px 2px #00000008;
  transition: border-color 200ms, background-color 200ms;
}

.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 2px solid var(--foreground); outline-offset: 4px; }
.moon-icon, :root[data-theme="dark"] .sun-icon { display: none; }
:root[data-theme="dark"] .moon-icon { display: block; }

.profile {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 80px 32px;
  overflow: hidden;
  isolation: isolate;
}

.particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.profile-layout {
  display: flex;
  align-items: center;
  gap: 48px;
  width: 100%;
  max-width: 896px;
}

.profile-copy { flex: 1; min-width: 0; animation: reveal 700ms ease-out both; }

h1 {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 60px;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.05;
}

.name { white-space: nowrap; }
.cursor { animation: blink 1.1s steps(1, jump-none) infinite; }

.role {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 24px;
  color: var(--muted);
  font: 400 16px/1.6 var(--mono);
}

.prompt { opacity: .5; }
.role-location { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.role-location svg { width: 17px; height: 17px; }
.flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 20px; line-height: 1; }

.description {
  max-width: 576px;
  margin: 0 0 24px;
  padding: 4px;
  font-size: 18px;
  line-height: 1.625;
  text-wrap: pretty;
}

.profile-quote { color: var(--muted); font-style: italic; }

.social-links { display: flex; flex-wrap: wrap; gap: 8px; }

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--foreground);
  text-decoration: none;
  font: 400 12px/1.4 var(--mono);
  letter-spacing: .025em;
  text-transform: uppercase;
  transition: background-color 200ms, border-color 200ms, transform 200ms;
}

.social-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.social-link:hover { background: var(--surface); border-color: var(--foreground); transform: translateY(-2px); }
.social-link:active { transform: translateY(0); }
.social-link:focus-visible { outline: 2px solid var(--foreground); outline-offset: 5px; }

.portrait {
  position: relative;
  flex: 0 0 288px;
  width: 288px;
  height: 288px;
  animation: reveal 800ms 150ms ease-out both;
}

.portrait-ring {
  position: absolute;
  inset: -16px;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  pointer-events: none;
}

.portrait-ring rect { animation: outline-orbit 24s linear infinite; }

.portrait-photo {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
  object-position: center bottom;
  filter: none;
  transition: filter 400ms, transform 400ms;
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .portrait-photo { filter: grayscale(1); }
  .portrait:hover .portrait-photo { filter: grayscale(0); transform: scale(1.015); }
}

@keyframes blink { 0%, 45%, 100% { opacity: 1; } 50%, 95% { opacity: 0; } }
@keyframes outline-orbit { to { stroke-dashoffset: -100; } }
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #1a1a1a;
  --foreground: #fff;
  --muted: #999;
  --border: #333;
  --surface: #222;
}

@media (max-width: 1023px) {
  .profile { padding-block: 104px 64px; }
  .profile-layout { flex-direction: column; gap: 48px; max-width: 576px; }
  .profile-copy { order: 2; text-align: center; }
  .portrait { order: 1; flex-basis: 224px; width: 224px; height: 224px; }
  .portrait-photo { filter: none; }
  .role { justify-content: center; }
  h1 { font-size: 48px; }
  .social-links { justify-content: center; }
}

@media (max-width: 639px) {
  .appearance { top: 20px; right: 24px; }
  .profile { padding: 104px 24px 48px; }
  .profile-layout { gap: 40px; }
  h1 { font-size: clamp(28px, 7.4vw, 40px); }
  .role { font-size: 14px; }
  .description { font-size: 17px; }
  .social-link { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
