:root {
  --canvas: #f8f9fa;
  --surface: #ffffff;
  --surface-2: #f1f6fb;
  --ink: #1a1d21;
  --muted: #516175;
  --muted-2: #7b8694;
  --accent-rgb: 47, 95, 135;
  --navy-rgb: 0, 31, 54;
  --hairline: rgba(var(--accent-rgb), 0.16);
  --hairline-strong: rgba(var(--accent-rgb), 0.3);
  --navy: #001f36;
  --blue: #2f5f87;
  --blue-backup: #018afd;
  --red: #c00000;
  --coral: var(--blue);
  --gold: var(--navy);
  --paper: #ffffff;
  --shadow: 0 18px 48px rgba(var(--navy-rgb), 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

.icon-defs {
  position: absolute;
  overflow: hidden;
  width: 0;
  height: 0;
}

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

a {
  color: inherit;
}

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

h1,
h2 {
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.05;
}

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: 4.85rem;
}

h2 {
  margin-bottom: 18px;
  font-size: 3.35rem;
}

h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.08;
}

h4 {
  margin-bottom: 14px;
  color: var(--coral);
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
}

p {
  color: var(--muted);
}

em {
  color: var(--coral);
  font-style: italic;
}

::selection {
  color: var(--paper);
  background: var(--coral);
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--paper);
  background: var(--coral);
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  border-bottom: 1px solid var(--hairline);
  background: rgba(248, 249, 250, 0.9);
  backdrop-filter: blur(18px);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--coral);
}

.header-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--muted);
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
}

.nav-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 8px 24px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
}

.nav-bar a {
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.nav-bar a:hover,
.nav-bar a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible,
.project-body a:hover,
.project-body a:focus-visible {
  color: var(--coral);
}

.hero,
.section,
.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding-right: 24px;
  padding-left: 24px;
}

.hero {
  min-height: 720px;
  padding-top: 158px;
  padding-bottom: 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  align-items: center;
  gap: 76px;
}

.mono-label,
.experience-date,
.project-meta {
  color: var(--coral);
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0;
}

.mono-label {
  margin-bottom: 22px;
}

.hero-lede {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.28rem;
  line-height: 1.72;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.badge-row span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.36);
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 46px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--blue);
  box-shadow: 0 12px 22px rgba(var(--navy-rgb), 0.12);
  transform: translateY(-1px);
}

.social-icon {
  display: block;
  width: 21px;
  height: 21px;
  fill: currentColor;
}

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

.portrait-wrap {
  justify-self: end;
  margin: 0;
}

.portrait-frame {
  overflow: hidden;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section {
  scroll-margin-top: 120px;
  padding-top: 92px;
  padding-bottom: 92px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 42px;
}

.section-heading h2,
.split-heading h2,
.about-copy h2,
.contact-copy h2 {
  margin-bottom: 0;
}

.project-controls {
  display: flex;
  gap: 8px;
}

.project-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.project-controls button:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-1px);
}

.project-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  margin-right: 0;
  margin-left: 0;
  padding: 0 0 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.project-track::-webkit-scrollbar {
  display: none;
}

.project-card {
  display: flex;
  flex: 0 0 318px;
  flex-direction: column;
  overflow: hidden;
  min-height: 486px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(var(--navy-rgb), 0.08);
  scroll-snap-align: start;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.project-card:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.project-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 214px;
  padding: 24px;
  overflow: hidden;
  background: var(--navy);
}

.project-cover::before {
  position: absolute;
  inset: 0;
  background-image: var(--project-cover-tint), var(--project-cover-image);
  background-position: center, var(--project-cover-position, center);
  background-repeat: no-repeat;
  background-size: cover, var(--project-cover-size, cover);
  content: '';
  filter: saturate(0.95);
  transform: scale(1.01);
  transition: transform 240ms ease;
}

.project-cover::after {
  position: absolute;
  inset: auto 0 0;
  height: 62%;
  background: linear-gradient(to top, rgba(0, 21, 39, 0.58), transparent);
  content: '';
}

.project-cover span,
.project-cover strong {
  position: relative;
  z-index: 1;
}

.project-cover span {
  color: rgba(255, 253, 248, 0.86);
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.project-cover strong {
  color: var(--paper);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1;
}

.project-cover .trademark-mark {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(var(--navy-rgb), 0.44);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.9rem;
  line-height: 1;
}

.cover-sigma {
  --project-cover-image: url('assets/projects/sigmasolo.jpg');
  --project-cover-tint: linear-gradient(
    135deg,
    rgba(var(--navy-rgb), 0.9),
    rgba(var(--navy-rgb), 0.58) 52%,
    rgba(var(--navy-rgb), 0.42)
  );
}

.cover-edu {
  --project-cover-image: url('assets/projects/eduavenues.jpg');
  --project-cover-position: center 38%;
  --project-cover-tint: linear-gradient(
    135deg,
    rgba(var(--navy-rgb), 0.88),
    rgba(var(--navy-rgb), 0.56) 56%,
    rgba(var(--navy-rgb), 0.38)
  );
}

.cover-book {
  --project-cover-image: url('assets/projects/secrets-top-students-ai-era.jpg');
  --project-cover-position: center;
  --project-cover-size: auto 100%;
  --project-cover-tint: linear-gradient(
    90deg,
    rgba(var(--navy-rgb), 0.82),
    rgba(var(--navy-rgb), 0.1) 38%,
    rgba(var(--navy-rgb), 0.72)
  );
}

.cover-book strong {
  max-width: 128px;
  font-size: 1.76rem;
}

.cover-patent {
  --project-cover-image: url('assets/projects/patent.jpg');
  --project-cover-position: center 44%;
  --project-cover-tint: linear-gradient(
    135deg,
    rgba(26, 29, 33, 0.86),
    rgba(var(--navy-rgb), 0.62) 58%,
    rgba(var(--navy-rgb), 0.35)
  );
}

.project-card:hover .project-cover::before {
  transform: scale(1.06);
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  padding: 22px;
}

.project-meta {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.74rem;
}

.project-body p:not(.project-meta) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.project-body a {
  color: var(--coral);
  font-weight: 600;
  text-decoration: none;
}

.experience-section,
.about-section {
  border-top: 1px solid var(--hairline);
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 0.7fr);
  gap: 54px;
  align-items: end;
  margin-bottom: 44px;
}

.split-heading p:last-child {
  margin-bottom: 6px;
  font-size: 1rem;
}

.experience-list {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.experience-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 34px;
  padding: 26px;
}

.experience-item + .experience-item {
  border-top: 1px solid var(--hairline);
}

.experience-date {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.experience-role {
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 600;
}

.experience-item p:last-child {
  margin-bottom: 0;
}

.education-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.education-strip div {
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}

.education-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--coral);
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.education-strip strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.education-strip p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.about-section {
  display: block;
}

.about-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.86;
}

.community-note {
  max-width: 720px;
  margin-top: 44px;
  padding-top: 34px;
  border-top: 1px solid var(--hairline);
}

.community-note h3 {
  margin-bottom: 16px;
}

.community-note > p:not(.mono-label) {
  font-size: 1rem;
  line-height: 1.76;
}

.community-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.community-list a {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 88px;
  padding: 18px 0;
  border-top: 1px solid rgba(var(--accent-rgb), 0.1);
  text-decoration: none;
}

.community-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 68px;
  padding: 9px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.community-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.community-logo-wide {
  padding: 10px;
}

.community-copy {
  display: grid;
  gap: 5px;
}

.community-name {
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.1;
}

.community-list small {
  max-width: 620px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.62;
}

.community-list a:hover .community-name,
.community-list a:focus-visible .community-name {
  color: var(--coral);
}

.contact-section {
  padding: 96px 24px;
  border-top: 1px solid var(--hairline);
}

.contact-copy {
  max-width: 1120px;
  margin: 0 auto;
}

.contact-copy p {
  max-width: 680px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.08rem;
}

.contact-socials {
  margin-top: 24px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 32px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin-bottom: 0;
}

.footer-socials {
  gap: 8px;
  margin-top: 0;
}

.footer-socials .social-link {
  width: 38px;
  height: 38px;
  color: var(--muted);
}

.footer-socials .social-icon {
  width: 18px;
  height: 18px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  h1 {
    font-size: 3.65rem;
  }

  h2 {
    font-size: 2.7rem;
  }

  .hero-grid,
  .split-heading {
    grid-template-columns: 1fr;
  }

  .portrait-wrap {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .header-top {
    padding-right: 20px;
    padding-left: 20px;
  }

  .nav-bar {
    justify-content: flex-start;
    gap: 4px;
    overflow-x: auto;
    padding-right: 20px;
    padding-left: 20px;
    font-size: 0.78rem;
  }

  .nav-bar a {
    padding-right: 8px;
    padding-left: 8px;
  }

  .hero,
  .section,
  .site-footer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero {
    min-height: 0;
    padding-top: 150px;
    padding-bottom: 66px;
  }

  h1 {
    font-size: 3.05rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  h3 {
    font-size: 1.72rem;
  }

  .hero-lede,
  .about-copy p {
    font-size: 1.02rem;
    line-height: 1.75;
  }

  .section-heading,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-links {
    gap: 8px;
  }

  .social-link {
    width: 44px;
    height: 44px;
  }

  .portrait-frame {
    width: min(100%, 320px);
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .project-card {
    flex-basis: 82%;
  }

  .project-controls {
    display: none;
  }

  .experience-item,
  .education-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .experience-item {
    padding: 22px;
  }

  .contact-section {
    padding: 78px 20px;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 2.55rem;
  }

  .project-card {
    flex-basis: 88%;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
