:root {
  --bg: #0b0f12;
  --panel: #10161d;
  --text: #d7e0e8;
  --muted: #8f9daa;
  --line: #23303c;
  --accent: #74c5ff;
  --accent-soft: rgba(116, 197, 255, 0.12);
  --link: #b8deff;
  --link-line: #446b8a;
}

:root[data-theme="light"] {
  --bg: #f1f4f8;
  --panel: #ffffff;
  --text: #1a2430;
  --muted: #52606d;
  --line: #d6dde5;
  --accent: #0f6da8;
  --accent-soft: rgba(15, 109, 168, 0.08);
  --link: #04558a;
  --link-line: #9ec1d7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "IBM Plex Mono", "Consolas", "Menlo", monospace;
  background: radial-gradient(circle at top, #1a2128, var(--bg) 48%);
  color: var(--text);
  line-height: 1.6;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.11;
  z-index: 0;
}

:root[data-theme="light"] body {
  background: radial-gradient(circle at top, #ffffff, var(--bg) 50%);
}

.page {
  position: relative;
  z-index: 1;
  width: min(900px, 92vw);
  margin: 0 auto;
  padding: 3.2rem 0 4rem;
}

.theme-toggle {
  position: absolute;
  top: 0.4rem;
  right: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-icon {
  line-height: 0;
}

.theme-icon-svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.hero {
  margin-bottom: 1.4rem;
  padding-top: 2rem;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.9rem;
}

.tag {
  margin: 0 0 0.6rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.tag-right {
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3.4vw, 2.1rem);
  white-space: nowrap;
}

.muted {
  color: var(--muted);
  font-weight: 400;
}

.intro {
  max-width: 70ch;
  margin: 0;
  color: var(--text);
}

.quick-links {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.soon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.link-disabled {
  opacity: 0.45;
  pointer-events: none;
  border-bottom-color: transparent;
}

.soon-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 120ms ease;
}

.soon-wrap:hover .soon-tip {
  opacity: 1;
  visibility: visible;
}

.profile-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  flex-shrink: 0;
  margin-top: 0.22rem;
}

.block {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

h2 {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
}

h3 {
  margin: 0;
  font-size: 1rem;
}

#about p {
  text-align: justify;
  text-justify: inter-word;
}

.about-cert {
  margin-top: 0;
  text-align: left;
}

.item {
  padding: 0.4rem 0;
}

.block .item + .item {
  margin-top: 0.75rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
}

.item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.item-head span {
  color: var(--muted);
  white-space: nowrap;
}

.role {
  margin: 0.2rem 0 0.6rem;
  color: var(--muted);
}

.meta {
  margin: -0.35rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

ul {
  margin: 0;
  padding-left: 1.2rem;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-left: 0;
}

.chips li {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.9rem;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted var(--link-line);
}

a:hover {
  color: var(--text);
  border-bottom-style: solid;
}

.sep {
  margin: 0 0.45rem;
  color: var(--muted);
}

@media (max-width: 620px) {
  .page {
    width: min(900px, 94vw);
    padding-top: 2.3rem;
  }

  h1 {
    white-space: normal;
  }

  .item-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }

  .hero-head {
    flex-direction: column;
  }

  .hero-top {
    flex-wrap: wrap;
  }

  .profile-photo {
    width: 96px;
    height: 96px;
  }

  .quick-links {
    line-height: 1.8;
  }
}
