:root {
  --bg: #0c1210;
  --panel: rgba(11, 18, 16, 0.62);
  --panel-soft: rgba(255, 255, 255, 0.07);
  --text: #f5faf7;
  --muted: #b8c6bf;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #6ec6a5;
  --accent-strong: #4fb68f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

.profile-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.background {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 12, 10, 0.88) 0%, rgba(8, 13, 11, 0.58) 46%, rgba(8, 13, 11, 0.26) 100%),
    radial-gradient(circle at 23% 55%, rgba(110, 198, 165, 0.19), transparent 34%),
    url("../images/backgrounds/profile-bg.png") center center / cover no-repeat;
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(12, 18, 16, 0.06), rgba(12, 18, 16, 0.76));
}

.page-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 32px;
  padding: clamp(20px, 4vw, 48px);
}

.top-bar,
.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.social-block,
.site-links,
.actions,
.side-project-list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-block {
  color: var(--muted);
  font-size: 0.93rem;
}

.social-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.social-icon svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: currentColor;
}

.social-icon:hover,
.social-icon:focus-visible {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(110, 198, 165, 0.72);
  background: rgba(110, 198, 165, 0.15);
}

.site-links {
  justify-content: flex-end;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-links a {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.035);
}

.site-links a:hover,
.site-links a:focus-visible,
.site-links a[aria-current="page"] {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.075);
}

.hero {
  align-self: center;
  max-width: 760px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(13, 20, 18, 0.76), rgba(13, 20, 18, 0.42));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 7rem);
  line-height: 0.93;
  letter-spacing: -0.075em;
}

.role {
  margin: 18px 0 30px;
  color: var(--muted);
  font-size: clamp(1.12rem, 2.4vw, 1.45rem);
}

.role a {
  color: var(--accent);
  font-weight: 700;
}

.actions {
  gap: 12px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  color: #07110d;
  border-color: rgba(110, 198, 165, 0.76);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.button.primary:hover,
.button.primary:focus-visible {
  color: #07110d;
  border-color: rgba(255, 255, 255, 0.55);
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.button.secondary:hover,
.button.secondary:focus-visible,
.button.subtle:hover,
.button.subtle:focus-visible {
  color: var(--text);
  border-color: rgba(110, 198, 165, 0.55);
  background: rgba(110, 198, 165, 0.12);
}

.button.subtle {
  color: var(--muted);
  background: transparent;
}

.bottom-bar {
  color: var(--muted);
  font-size: 0.94rem;
}

.email {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.email::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(110, 198, 165, 0.95);
}

.side-projects {
  position: relative;
  text-align: right;
}

.side-projects summary {
  list-style: none;
  cursor: pointer;
  color: rgba(184, 198, 191, 0.72);
  font-size: 0.84rem;
}

.side-projects summary::-webkit-details-marker {
  display: none;
}

.side-projects[open] summary,
.side-projects summary:hover,
.side-projects summary:focus-visible {
  color: var(--accent);
}

.side-project-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  justify-content: flex-end;
  width: min(92vw, 440px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(12, 18, 16, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.side-project-list a {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

.side-project-list a:hover,
.side-project-list a:focus-visible {
  color: var(--text);
  background: rgba(110, 198, 165, 0.13);
}

@media (max-width: 900px) {
  .top-bar,
  .bottom-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-links {
    justify-content: flex-start;
  }

  .hero {
    max-width: 100%;
  }

  .side-projects {
    text-align: left;
  }

  .side-project-list {
    right: auto;
    left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .profile-page,
  .page-shell {
    min-height: 100vh;
    min-height: 100svh;
  }

  .page-shell {
    gap: 10px;
    padding: 12px;
  }

  .top-bar {
    gap: 8px;
  }

  .bottom-bar {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .social-block {
    gap: 8px;
    font-size: 0.78rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  .social-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
  }

  .social-icon svg {
    width: 13px;
    height: 13px;
  }

  .site-links {
    gap: 6px;
    font-size: 0.74rem;
    line-height: 1.1;
  }

  .site-links a {
    padding: 5px 7px;
  }

  .hero {
    padding: 18px;
    border-radius: 20px;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 0.68rem;
  }

  h1 {
    font-size: clamp(2.75rem, 14.8vw, 3.85rem);
  }

  .role {
    margin: 10px 0 14px;
    font-size: 1rem;
  }

  .actions {
    gap: 8px;
    width: 100%;
  }

  .button {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .bottom-bar {
    font-size: 0.8rem;
  }

  .side-projects summary {
    font-size: 0.78rem;
  }

  .side-project-list {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 48px;
    width: auto;
    max-width: none;
    justify-content: flex-start;
    z-index: 20;
  }

}

@media (max-width: 560px) and (max-height: 820px) {
  .page-shell {
    gap: 8px;
    padding: 10px;
  }

  .hero {
    padding: 14px;
  }

  .eyebrow {
    margin-bottom: 8px;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.3rem);
  }

  .role {
    margin: 8px 0 10px;
    font-size: 0.94rem;
  }

  .button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .site-links {
    font-size: 0.7rem;
  }

  .site-links a {
    padding: 4px 6px;
  }

  .side-project-list {
    left: 10px;
    right: 10px;
    bottom: 42px;
    padding: 10px;
    border-radius: 14px;
  }

  .side-project-list a {
    padding: 6px 8px;
  }

}
