:root {
  color-scheme: light;
  --bg: #eef2f8;
  --bg-mesh-a: rgba(88, 112, 255, 0.16);
  --bg-mesh-b: rgba(69, 198, 179, 0.12);
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.78);
  --ink: #171920;
  --muted: #5f6677;
  --line: rgba(25, 28, 36, 0.1);
  --shadow: 0 28px 80px rgba(21, 28, 43, 0.12);
  --accent: #4a61ff;
  --accent-soft: rgba(74, 97, 255, 0.12);
  --accent-strong: #324cff;
  --signal-red: #cf3d3d;
  --signal-red-soft: rgba(207, 61, 61, 0.16);
  --chip-bg: rgba(255, 255, 255, 0.94);
  --timeline-line: linear-gradient(180deg, rgba(207, 61, 61, 0.5), rgba(207, 61, 61, 0.08));
  --theme-button-bg: rgba(255, 255, 255, 0.88);
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0d1220;
  --bg-mesh-a: rgba(98, 112, 255, 0.24);
  --bg-mesh-b: rgba(34, 201, 173, 0.18);
  --panel: rgba(18, 24, 39, 0.9);
  --panel-strong: #131b2c;
  --panel-soft: rgba(20, 28, 44, 0.84);
  --ink: #f4f6fb;
  --muted: #aab2c7;
  --line: rgba(190, 204, 255, 0.12);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  --accent: #8ea0ff;
  --accent-soft: rgba(142, 160, 255, 0.16);
  --accent-strong: #b7c3ff;
  --signal-red: #ff7070;
  --signal-red-soft: rgba(255, 112, 112, 0.18);
  --chip-bg: rgba(17, 25, 41, 0.92);
  --timeline-line: linear-gradient(180deg, rgba(255, 112, 112, 0.6), rgba(255, 112, 112, 0.12));
  --theme-button-bg: rgba(18, 24, 39, 0.92);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, var(--bg-mesh-a), transparent 28%),
    radial-gradient(circle at bottom right, var(--bg-mesh-b), transparent 26%),
    var(--bg);
  transition: background 180ms ease, color 180ms ease;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.profile-card,
.content-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.profile-card {
  position: sticky;
  top: 22px;
  padding: 26px;
  border-radius: 30px;
}

.content-panel {
  border-radius: 34px;
  padding: 42px;
}

.profile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0;
  color: var(--signal-red);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--theme-button-bg);
  color: var(--ink);
  border-radius: 999px;
  width: 46px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(18, 24, 38, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.theme-toggle__sun,
.theme-toggle__moon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(1px);
}

.theme-toggle__moon {
  display: none;
}

html[data-theme='dark'] .theme-toggle__sun {
  display: none;
}

html[data-theme='dark'] .theme-toggle__moon {
  display: inline-flex;
}

.photo-frame {
  overflow: hidden;
  border-radius: 26px;
  margin-bottom: 24px;
  background: #d9d9de;
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: 0 22px 46px rgba(18, 24, 38, 0.16);
  outline: 1px solid rgba(255, 255, 255, 0.35);
}

html[data-theme='dark'] .photo-frame {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.28);
  outline-color: rgba(255, 255, 255, 0.06);
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
  object-position: center 24%;
  transform: scale(1.34);
  transform-origin: center 26%;
}

.identity-block h1,
.intro-header h2,
.resume-block h3 {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.identity-block h1 {
  font-size: clamp(2rem, 2.4vw, 2.45rem);
  line-height: 1.04;
}

.role {
  margin: 12px 0 10px;
  font-size: 1.18rem;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
  font-weight: 800;
}

.micro-bio {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
  font-size: 1rem;
  text-wrap: pretty;
}

.tag-list {
  margin: 22px 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span,
.mail-pill {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
  padding: 11px 15px;
  font-size: 0.92rem;
}

.social-grid {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 20px;
  flex-wrap: wrap;
}

.social-icon-link {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(18, 24, 38, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

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

.social-icon-link:hover,
.mail-pill:hover,
.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  color: var(--accent);
  box-shadow: 0 16px 34px rgba(18, 24, 38, 0.12);
}

.social-icon-link:active,
.mail-pill:active,
.theme-toggle:active {
  transform: scale(0.96);
}

.identity-links {
  display: grid;
  gap: 12px;
}

.mail-pill {
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-strong) 96%, white), color-mix(in srgb, var(--panel) 88%, transparent));
  word-break: break-word;
}

.intro-header {
  margin-bottom: 24px;
}

.intro-header h2 {
  font-size: clamp(2.6rem, 4vw, 4.2rem);
  line-height: 0.98;
}

.lead {
  margin: 18px 0 0;
  max-width: 60rem;
  font-size: 1.12rem;
  line-height: 1.78;
  color: var(--muted);
  text-wrap: pretty;
}

.summary-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.summary-item {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 22px;
  padding: 16px 18px;
}

.summary-item span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 800;
}

.summary-item strong {
  font-size: 1rem;
  line-height: 1.45;
}

.resume-flow {
  position: relative;
  padding-left: 28px;
}

.resume-flow::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--timeline-line);
}

.resume-block {
  position: relative;
  margin-bottom: 18px;
  padding: 24px 24px 24px 28px;
  border-radius: 24px;
  background: var(--panel-soft);
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}

.resume-block::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 30px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--signal-red) 78%, white), var(--signal-red));
  box-shadow: 0 0 0 6px var(--signal-red-soft);
}

.resume-block h3 {
  margin-bottom: 12px;
  font-size: 1.28rem;
}

.resume-block p {
  margin: 0;
  line-height: 1.86;
  font-size: 1.03rem;
  color: color-mix(in srgb, var(--ink) 92%, var(--muted));
  text-wrap: pretty;
}

.site-footer {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .profile-card {
    position: static;
  }

  .content-panel,
  .profile-card {
    padding: 24px;
  }

  .summary-ribbon {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    margin: 10px auto 20px;
    gap: 14px;
  }

  .content-panel,
  .profile-card {
    border-radius: 24px;
    padding: 20px;
  }

  .profile-topbar {
    align-items: flex-start;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
  }

  .photo-frame img {
    transform: scale(1.28);
    object-position: center 22%;
  }

  .social-grid {
    gap: 10px;
  }

  .social-icon-link {
    width: 48px;
    height: 48px;
  }

  .intro-header h2 {
    font-size: 2.35rem;
  }

  .lead,
  .resume-block p {
    font-size: 0.98rem;
  }

  .resume-flow {
    padding-left: 22px;
  }

  .resume-block {
    padding: 20px 18px 20px 22px;
  }

  .resume-block::before {
    left: -22px;
  }
}
