:root {
  --background: #080f1d;
  --panel: #111d32;
  --text: #f7f9ff;
  --secondary: #c0cada;
  --muted: #94a3b8;
  --border: #425a7e;
  --cyan: #64e8e1;
  --coral: #ff9191;
  --amber: #ffc96e;
  --violet: #c3a4ff;
  --pink: #e2a0ff;
  --mint: #92e5b0;
  --display: "Press Start 2P", monospace;
  --mono: "Space Mono", monospace;
  --body: "Inter", sans-serif;
  --max-width: 1440px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: var(--body);
}

body,
button,
a {
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

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

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

.container {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(220px, 260px);
  grid-template-areas:
    "profile primary projects"
    "profile publications projects";
  column-gap: 28px;
  row-gap: 0;
  align-items: start;
  padding: 30px 0 46px;
}

.profile-sidebar {
  grid-area: profile;
  position: sticky;
  top: 30px;
  display: grid;
  gap: 12px;
  min-width: 0;
  align-self: start;
}

.profile-panel {
  padding: 16px;
  background: var(--panel);
  border: 2px solid var(--cyan);
  border-radius: 4px;
  box-shadow: 4px 4px 0 #1b5260;
}

.profile-sidebar .profile-block {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 14px;
}

.profile-sidebar .avatar-frame {
  width: 150px;
}

.profile-sidebar .profile-copy {
  text-align: center;
}

.profile-sidebar h1 {
  font-size: 1.05rem;
  line-height: 1.7;
}

.profile-sidebar .hero-keywords,
.profile-sidebar .hero-links {
  justify-content: center;
}

.profile-sidebar .hero-links {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

.primary-column {
  grid-area: primary;
  min-width: 0;
}

.primary-column > .section .container,
.publications-section > .container {
  width: 100%;
}

.publications-section {
  grid-area: publications;
}

.projects-sidebar {
  grid-area: projects;
  position: sticky;
  top: 30px;
  min-width: 0;
  align-self: start;
}

.projects-panel {
  padding: 16px;
  background: var(--panel);
  border: 2px solid var(--violet);
  border-radius: 4px;
  box-shadow: 4px 4px 0 #4d3c75;
}

.projects-panel-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.projects-panel-heading h2 {
  font-size: 0.74rem;
  line-height: 1.7;
}

.profile-block {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.avatar-frame {
  position: relative;
  width: 188px;
  aspect-ratio: 1;
  padding: 7px;
  background: #0d1728;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 5px 5px 0 #714aa6, 0 0 22px rgba(100, 232, 225, 0.16);
}

.avatar-frame::before,
.avatar-frame::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--amber);
}

.avatar-frame::before {
  top: 13px;
  right: 19px;
}

.avatar-frame::after {
  bottom: 18px;
  left: 13px;
  background: var(--coral);
}

.pixel-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  image-rendering: pixelated;
}

.profile-copy {
  min-width: 0;
}

.section-kicker,
.hero-keywords,
.hero-links,
.publication-topline,
.publication-link,
.publication-resource,
.research-item-topline,
.project-item-topline,
.project-link,
.publication-year {
  font-family: var(--mono);
}

.section-kicker {
  margin: 0 0 15px;
  color: var(--cyan);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
}

h1 {
  max-width: 100%;
  color: #ffffff;
  font-size: 2.35rem;
  line-height: 1.35;
  text-shadow: 3px 3px 0 #283554;
}

h2 {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}

h3 {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.hero-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.hero-keywords span {
  padding: 5px 8px;
  color: var(--cyan);
  background: #102b3c;
  border: 1px solid var(--cyan);
  border-radius: 2px;
  font-size: 0.72rem;
}

.hero-keywords span:nth-child(2) {
  color: var(--amber);
  background: #342b1e;
  border-color: var(--amber);
}

.hero-keywords span:nth-child(3) {
  color: var(--violet);
  background: #2b203c;
  border-color: var(--violet);
}

.primary-column > .section:first-child {
  padding-top: 0;
}

.research-overview {
  max-width: 780px;
  margin: 0 0 22px;
  padding-left: 15px;
  color: var(--secondary);
  border-left: 2px solid var(--violet);
  font-size: 0.96rem;
  line-height: 1.75;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 17px;
}

.hero-link {
  color: var(--cyan);
  font-size: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-link:hover {
  color: var(--amber);
}

.publication-item,
.research-item,
.project-item {
  position: relative;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 4px;
}

.section {
  padding: 36px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: auto minmax(24px, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.section-heading-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.section-icon {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.heading-accent {
  min-width: 24px;
  height: 2px;
  background: #324665;
  border-top: 1px dotted var(--cyan);
}

.publication-list,
.research-list,
.project-list {
  display: grid;
  gap: 10px;
}

.publication-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 14px;
  padding: 12px 15px;
  border-color: var(--cyan);
  box-shadow: 4px 4px 0 #164b60;
}

.publication-item[data-tone="coral"] {
  border-color: var(--coral);
  box-shadow: 4px 4px 0 #6f3d54;
}

.publication-item[data-tone="amber"] {
  border-color: var(--amber);
  box-shadow: 4px 4px 0 #76522f;
}

.publication-item[data-tone="violet"] {
  border-color: var(--violet);
  box-shadow: 4px 4px 0 #493c78;
}

.publication-item[data-tone="pink"] {
  border-color: var(--pink);
  box-shadow: 4px 4px 0 #713f72;
}

.publication-content {
  min-width: 0;
}

.publication-topline,
.research-item-topline,
.project-item-topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.5;
}

.publication-id,
.research-index,
.project-index {
  color: var(--cyan);
}

.publication-status {
  margin-left: auto;
  padding: 3px 6px;
  color: var(--mint);
  border: 1px solid #3e755b;
  border-radius: 2px;
  font-size: 0.58rem;
  white-space: nowrap;
}

.publication-title {
  display: inline-block;
  color: var(--cyan);
  font-size: 1.03rem;
}

.publication-title:hover {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.publication-item[data-tone="coral"] .publication-title {
  color: var(--coral);
}

.publication-item[data-tone="amber"] .publication-title {
  color: var(--amber);
}

.publication-item[data-tone="violet"] .publication-title {
  color: var(--violet);
}

.publication-item[data-tone="pink"] .publication-title {
  color: var(--pink);
}

.publication-authors,
.publication-venue,
.research-summary,
.project-summary {
  margin: 6px 0 0;
  color: var(--secondary);
  font-size: 0.86rem;
  line-height: 1.7;
}

.publication-authors,
.publication-venue {
  font-family: var(--body);
}

.publication-authors {
  color: #e2e8f5;
}

.publication-self {
  color: var(--text);
  font-weight: 700;
}

.publication-venue {
  margin-top: 0;
  color: var(--muted);
}

.publication-actions {
  margin-top: 9px;
}

.publication-resource {
  display: inline-flex;
  gap: 7px;
  color: var(--text);
  font-size: 0.72rem;
}

.publication-resource span:last-child {
  color: var(--amber);
}

.publication-resource:hover {
  color: var(--cyan);
}

.publication-link,
.project-link {
  display: inline-block;
  margin-top: 9px;
  color: var(--text);
  font-size: 0.68rem;
}

.publication-link:hover,
.project-link:hover {
  color: var(--cyan);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
  margin-top: 18px;
}

.project-links .project-link {
  margin-top: 0;
}

.publication-side {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: center;
  gap: 8px;
  padding-top: 8px;
  border-left: 1px solid #365174;
  color: var(--secondary);
  font-family: var(--mono);
}

.publication-year {
  font-size: 0.86rem;
}

.research-list,
.project-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.research-item,
.project-item {
  min-width: 0;
  min-height: 210px;
  padding: 15px;
  background: #101c31;
  border-color: #385379;
  box-shadow: 4px 4px 0 #1b2944;
}

.research-item:nth-child(2) {
  border-color: #765d83;
}

.research-item:nth-child(3) {
  border-color: #7c6540;
}

.project-item {
  border-color: #486987;
  box-shadow: 4px 4px 0 #233b5a;
}

.project-item:nth-child(2) {
  border-color: #6e5a84;
}

.project-item:nth-child(3) {
  border-color: #79613b;
}

.projects-sidebar .project-list {
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 2px;
}

.projects-sidebar .project-item {
  min-height: 0;
  padding: 15px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.projects-sidebar .project-item:first-child {
  padding-top: 13px;
  border-top: 0;
}

.projects-sidebar .project-tags {
  overflow: visible;
  font-size: 0.62rem;
  line-height: 1.5;
  text-overflow: clip;
  white-space: normal;
}

.projects-sidebar .project-title {
  margin-top: 10px;
  font-size: 0.86rem;
}

.projects-sidebar .project-summary {
  font-size: 0.8rem;
  line-height: 1.65;
}

.projects-sidebar .project-links {
  margin-top: 10px;
}

.projects-sidebar .project-link {
  font-size: 0.68rem;
}

.research-tags,
.project-tags {
  overflow: hidden;
  color: var(--cyan);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-item:nth-child(2) .research-tags {
  color: var(--violet);
}

.research-item:nth-child(3) .research-tags {
  color: var(--amber);
}

.project-item:nth-child(2) .project-tags {
  color: var(--violet);
}

.project-item:nth-child(3) .project-tags {
  color: var(--amber);
}

.research-title,
.project-title {
  margin-top: 20px;
  color: var(--text);
  font-size: 1rem;
}

.project-link {
  color: var(--cyan);
}

@media (max-width: 1180px) {
  .page-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "primary"
      "projects"
      "publications";
  }

  .profile-sidebar,
  .projects-sidebar {
    position: static;
  }

  .profile-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-panel {
    grid-column: span 2;
  }

  .profile-sidebar .profile-block {
    grid-template-columns: 150px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
  }

  .profile-sidebar .profile-copy {
    text-align: left;
  }

  .profile-sidebar .hero-keywords,
  .profile-sidebar .hero-links {
    justify-content: flex-start;
  }

}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .profile-block {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }

  .avatar-frame {
    width: 96px;
    padding: 4px;
    box-shadow: 3px 3px 0 #714aa6;
  }

  .avatar-frame::before,
  .avatar-frame::after {
    width: 7px;
    height: 7px;
  }

  .avatar-frame::before {
    top: 10px;
    right: 9px;
  }

  .avatar-frame::after {
    bottom: 9px;
    left: 7px;
  }

  .section-kicker {
    margin-bottom: 10px;
    font-size: 0.55rem;
  }

  h1 {
    font-size: 1.2rem;
    line-height: 1.65;
  }

  .research-overview {
    margin-bottom: 18px;
    padding-left: 12px;
    font-size: 0.82rem;
    line-height: 1.7;
  }

  .profile-sidebar {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    grid-column: auto;
  }

  .profile-sidebar .profile-block {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
  }

  .profile-sidebar .avatar-frame {
    width: 96px;
  }

  .profile-sidebar .profile-copy {
    text-align: left;
  }

  .profile-sidebar .hero-keywords,
  .profile-sidebar .hero-links {
    justify-content: flex-start;
  }

  .section {
    padding: 28px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .section-heading-label {
    min-width: 0;
  }

  .heading-accent {
    display: none;
  }

  h2 {
    font-size: 0.68rem;
  }

  .publication-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .publication-side {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 9px;
    border-top: 1px solid #365174;
    border-left: 0;
  }

  .publication-title {
    font-size: 0.86rem;
  }

  .publication-authors,
  .publication-venue,
  .research-summary,
  .project-summary {
    font-size: 0.82rem;
  }

  .research-list,
  .project-list {
    grid-template-columns: 1fr;
  }

  .research-item,
  .project-item {
    min-height: 0;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

}
