:root {
  color-scheme: dark;
  --bg: #07111f;
  --surface: #0d1729;
  --surface-2: #13223a;
  --soft: #172842;
  --line: #263953;
  --text: #f7fbff;
  --muted: #a9b8cc;
  --pink: #f72585;
  --purple: #7209b7;
  --indigo: #3a0ca3;
  --blue: #4361ee;
  --cyan: #4cc9f0;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(135deg, rgba(67, 97, 238, 0.18), transparent 32%),
    linear-gradient(315deg, rgba(247, 37, 133, 0.12), transparent 30%),
    var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  min-height: 58vh;
  padding: 38px 0 34px;
}

.hero__image-wrap {
  position: relative;
  width: 264px;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow: var(--shadow);
}

.hero__image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 6px solid var(--bg);
  border-radius: 50%;
}

.hero__content {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 56px;
  line-height: 1.02;
}

.tagline {
  margin-bottom: 18px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.35;
}

.summary {
  display: grid;
  gap: 10px;
  max-width: 700px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.summary p {
  margin-bottom: 0;
}

.summary a,
.project-card a:not(:last-child),
.note-card a {
  color: var(--cyan);
}

.summary ul,
.project-card ul,
.note-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.summary h2,
.summary h3,
.project-card h4,
.note-card h4 {
  margin: 12px 0 8px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.profile-link {
  display: grid;
  gap: 4px;
  min-width: 154px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 23, 41, 0.78);
  text-decoration: none;
}

.profile-link:hover {
  border-color: var(--cyan);
  background: var(--surface-2);
}

.profile-link span {
  font-weight: 700;
}

.profile-link small {
  color: var(--muted);
}

.section-block {
  padding: 34px 0 0;
}

.section-heading {
  margin-bottom: 16px;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.2;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.neural-card,
.project-card,
.note-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 23, 41, 0.82);
  box-shadow: var(--shadow);
}

.neural-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.neural-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-top: 4px solid var(--blue);
}

.neural-card__media,
.project-card__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #050b14;
}

.neural-card__media img,
.project-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 22px;
}

.project-card:only-child {
  grid-column: 1 / -1;
}

.project-card--with-media {
  display: grid;
  grid-template-columns: minmax(150px, 178px) minmax(0, 1fr);
  min-height: auto;
  gap: 18px;
  align-items: start;
}

.project-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.project-card--cyan {
  border-top: 4px solid var(--cyan);
}

.project-card--pink {
  border-top: 4px solid var(--pink);
}

h3 {
  margin-bottom: 12px;
  font-size: 24px;
  line-height: 1.2;
}

.neural-card p,
.project-card p:not(.section-kicker),
.note-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.neural-card__body {
  display: grid;
  gap: 10px;
}

.neural-card a,
.project-card a {
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.neural-card a:hover,
.project-card a:hover {
  border-color: var(--cyan);
}

.talk-list {
  display: grid;
  gap: 16px;
}

.talk-card {
  display: grid;
  grid-template-columns: minmax(150px, 178px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 23, 41, 0.82);
  box-shadow: var(--shadow);
}

.talk-card--featured {
  border-color: rgba(76, 201, 240, 0.72);
  background:
    linear-gradient(90deg, rgba(76, 201, 240, 0.11), transparent 38%),
    rgba(13, 23, 41, 0.86);
}

.talk-card__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #050b14;
}

.talk-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.talk-card__body {
  min-width: 0;
}

.talk-card h3 {
  margin-bottom: 8px;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.talk-meta {
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 14px;
  line-height: 1.45;
}

.talk-summary {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.talk-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.talk-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.talk-link:hover {
  border-color: var(--cyan);
}

.talk-link--todo {
  border-style: dashed;
  background: rgba(23, 40, 66, 0.52);
  color: var(--muted);
}

.talk-link--todo:hover {
  border-color: var(--line);
}

.talk-older {
  margin-top: 18px;
}

.talk-older summary {
  width: fit-content;
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 23, 41, 0.86);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.talk-older summary:hover {
  border-color: var(--cyan);
}

.talk-list--older {
  margin-top: 16px;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.note-card {
  padding: 16px;
}

.note-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 780px) {
  main {
    width: min(100% - 24px, 640px);
    padding-top: 28px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
  }

  .hero__image-wrap {
    width: 192px;
  }

  h1 {
    font-size: 42px;
  }

  .tagline {
    font-size: 19px;
  }

  .neural-grid,
  .project-grid,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .neural-card,
  .project-card {
    min-height: auto;
  }

  .project-card--with-media {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .talk-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .talk-card__body {
    min-width: 0;
  }

  .talk-card h3 {
    font-size: 19px;
    overflow-wrap: anywhere;
  }

  .talk-meta,
  .talk-summary {
    font-size: 14px;
  }

  .talk-link {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}
