@font-face {
  font-family: "Geist Sans";
  src: url("assets/fonts/Geist-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #eef0f1;
  --surface: rgba(255, 255, 255, 0.58);
  --text: #242627;
  --muted: #686d70;
  --label: #a0a4a6;
  --border: rgba(36, 38, 39, 0.14);
  --shadow: 0 12px 34px rgba(34, 38, 40, 0.07);
}

[data-theme="dark"] {
  color-scheme: dark;
  --background: #1c1e1f;
  --surface: rgba(42, 44, 45, 0.72);
  --text: #eceeee;
  --muted: #9da1a3;
  --label: #6f7375;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  transition: background-color 280ms ease, color 280ms ease;
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 64px 24px 150px;
}

.profile { width: min(100%, 760px); }

.profile-header {
  margin-left: 128px;
  margin-bottom: 34px;
}

.portrait {
  display: block;
  width: 116px;
  height: 116px;
  margin-bottom: 24px;
  border: 5px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--border), var(--shadow);
  object-fit: cover;
  object-position: 56% 32%;
}

h1 {
  margin: 0;
  font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 31.5px;
  font-weight: 700;
  letter-spacing: -0.7875px;
  line-height: 37.8px;
}

.details {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 34px 28px;
  align-items: start;
}

.section-label {
  margin: 4px 0 0;
  color: var(--label);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  text-align: right;
}

.about-copy {
  max-width: 590px;
  color: var(--muted);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.94rem;
  line-height: 1.58;
}

.about-copy p { margin: 0 0 22px; }
.about-copy p:last-child { margin-bottom: 0; }

.aerial-icon {
  display: inline-block;
  width: 38px;
  height: 38px;
  margin: -12px 0 -12px 5px;
  object-fit: contain;
  vertical-align: middle;
}

.aerial-icon-group { white-space: nowrap; }

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

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.social-links a:hover { color: var(--text); transform: translateY(-2px); }

.icon-box {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.icon-box svg {
  width: 21px;
  fill: currentColor;
}

.cv-button {
  display: inline-grid;
  width: 78px;
  height: 37px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.03);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--muted);
  font-size: 0.94rem;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.cv-button:hover { border-color: var(--muted); transform: translateY(-2px); }

.dock {
  position: fixed;
  z-index: 10;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  overflow: visible;
  transform: translateX(-50%);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.dock-link, .theme-toggle {
  position: relative;
  display: grid;
  width: 66px;
  height: 58px;
  padding: 0;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.theme-toggle { border-right: 0; }
.dock-link::before, .theme-toggle::before {
  position: absolute;
  z-index: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  content: "";
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 160ms ease, transform 160ms ease;
}

[data-theme="dark"] .dock-link::before,
[data-theme="dark"] .theme-toggle::before { background: rgba(255, 255, 255, 0.1); }

.dock-link::after, .theme-toggle::after {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  padding: 7px 10px;
  transform: translate(-50%, 5px);
  border-radius: 7px;
  background: #222425;
  color: #fff;
  content: attr(data-tooltip);
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 150ms ease, transform 150ms ease;
}

.dock-link svg, .theme-toggle svg { position: relative; z-index: 1; }

.dock-link:hover, .theme-toggle:hover { color: var(--text); }
.dock-link:hover::before, .theme-toggle:hover::before { opacity: 1; transform: scale(1); }
.dock-link:hover::after, .theme-toggle:hover::after { opacity: 1; transform: translate(-50%, 0); }
.dock-link:focus-visible, .theme-toggle:focus-visible, .social-links a:focus-visible, .cv-button:focus-visible { outline: 3px solid #5689d6; outline-offset: 3px; }

.dock svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dock-link:nth-child(2) svg, .dock-link:nth-child(3) svg { fill: currentColor; stroke: none; }
.sun { display: none; }
.moon { display: block; }
[data-theme="dark"] .sun { display: block; }
[data-theme="dark"] .moon { display: none; }

@media (max-width: 640px) {
  .page { place-items: start center; padding: 48px 22px 130px; }
  .profile-header { margin-left: 0; text-align: center; }
  .portrait { width: 106px; height: 106px; margin: 0 auto 24px; }
  .details { grid-template-columns: 1fr; gap: 12px; }
  .section-label { margin-top: 22px; text-align: left; }
  .about-copy { font-size: 0.92rem; }
  .social-links { gap: 18px; }
  .dock-link, .theme-toggle { width: 60px; height: 56px; }
}

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