:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(14, 14, 14, 0.9);
  --panel-border: rgba(255, 255, 255, 0.06);
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --soft: #707070;
  --accent: #dedede;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 40%),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto, auto;
  color: var(--text);
}

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

.page-shell {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 48px;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
}

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.profile-card {
  padding: 28px 24px;
  text-align: center;
}

.avatar-image {
  width: 88px;
  height: 88px;
  object-fit: cover;
  margin: 0 auto 18px;
  border-radius: 24px;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card h1 {
  margin: 0;
  font-size: 1.7rem;
}

.handle {
  margin: 6px 0 12px;
  color: var(--soft);
  font-size: 0.95rem;
}

.role {
  margin: 0 0 14px;
  color: #b6b6b6;
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.6;
}

.summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.96rem;
}

.section-nav {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.nav-link {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

.nav-link.is-active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.social-links {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.social-links a {
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.content {
  display: grid;
  gap: 28px;
}

.hero {
  min-height: 220px;
  padding: 34px 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.03)),
    var(--panel);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--soft);
}

.hero h2,
.section-heading h3,
.post-card h4 {
  margin: 0;
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.02rem;
}

.content-section {
  display: grid;
  gap: 16px;
}

.section-heading {
  padding: 0 4px;
}

.section-heading h3 {
  font-size: 1.6rem;
}

.post-list {
  display: grid;
  gap: 18px;
}

.post-card-link {
  display: block;
  border-radius: 26px;
}

.post-card-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 4px;
}

.post-card,
.about-card {
  padding: 26px 28px;
}

.post-card {
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.post-card-link:hover .post-card,
.post-card-link:focus-visible .post-card {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(22, 22, 22, 0.95);
}

.post-card .post-meta {
  margin: 0 0 24px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--soft);
  font-size: 0.72rem;
}

.post-date-inline {
  color: #7a7a7a;
}

.meta-calendar-icon {
  width: 12px;
  height: 12px;
  margin-right: 6px;
  fill: #6a6a6a;
  vertical-align: -2px;
}

.post-card h4 {
  font-size: 1.55rem;
  line-height: 1.2;
}

.post-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.post-link {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 700;
}

.post-card-link:hover .post-link,
.post-card-link:focus-visible .post-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.writeup-card {
  padding: 34px 34px 38px;
}

.writeup-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4.3vw, 3rem);
  letter-spacing: -0.03em;
}

.writeup-meta {
  margin: 14px 0 0;
  color: #cfcfcf;
  font-size: 0.96rem;
}

.writeup-source {
  margin: 10px 0 0;
  color: #9f9f9f;
}

.writeup-source a {
  color: #e8e8e8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.challenge-files ul {
  list-style: none;
  padding-left: 0;
}

.challenge-files a {
  color: #f0f0f0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.writeup-section {
  margin-top: 30px;
}

.writeup-section h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.writeup-section h4 {
  margin: 16px 0 8px;
  font-size: 1.05rem;
  color: #ececec;
}

.writeup-section p,
.writeup-section li {
  color: #d9d9d9;
  line-height: 1.7;
}

.writeup-section ul,
.writeup-section ol {
  margin: 0;
  padding-left: 22px;
}

.writeup-section li + li {
  margin-top: 8px;
}

.code-block {
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  overflow: auto;
}

.code-block pre {
  margin: 0;
  padding: 16px 18px;
}

.code-block code,
.writeup-section code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.92rem;
}

.table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dddddd;
}

.table-wrap th {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 700;
}

.about-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.8;
}

.about-hero {
  min-height: 760px;
  padding: 38px 44px 44px;
}

.about-hero h2 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 4.3rem);
  text-align: center;
  letter-spacing: -0.05em;
}

.about-subtitle {
  max-width: 720px;
  margin: 14px auto 0;
  color: #9d9d9d;
  line-height: 1.65;
  text-align: center;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
}

.about-divider {
  width: min(78%, 620px);
  height: 1px;
  margin: 44px auto 52px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0)
  );
}

.about-copy,
.skills-block {
  max-width: 630px;
  margin-left: 68px;
}

.about-copy p,
.skills-list p {
  margin: 0 0 10px;
  color: #e5e5e5;
  font-size: 1.02rem;
  line-height: 1.6;
}

.skills-list p {
  color: #b6b6b6;
  font-size: 0.94rem;
}

.about-copy strong {
  color: #ffffff;
}

.skills-block {
  margin-top: 26px;
}

.skills-title {
  margin: 0 0 10px;
  color: #b6b6b6;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.skills-list p:last-child,
.about-copy p:last-child {
  margin-bottom: 0;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.skills span {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: #d1d1d1;
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  .page-shell {
    width: min(100% - 32px, 760px);
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 100%);
    padding: 20px 0 28px;
    gap: 20px;
  }

  .profile-card,
  .hero,
  .about-hero,
  .writeup-card,
  .post-card,
  .about-card {
    padding: 22px 20px;
  }

  .hero {
    min-height: auto;
  }

  .social-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .post-card h4 {
    font-size: 1.3rem;
  }

  .about-copy,
  .skills-block {
    margin-left: 0;
  }

  .about-divider {
    width: 100%;
    margin: 30px 0 34px;
  }

  .about-subtitle,
  .about-hero h2 {
    text-align: left;
  }
}
