@font-face {
  font-family: Montserrat;
  src: url("fonts/Montserrat-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Montserrat;
  src: url("fonts/Montserrat-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Montserrat;
  src: url("fonts/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Merriweather;
  src: url("fonts/Merriweather-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #111111;
  --muted: #555555;
  --soft: #6d6d6d;
  --line: #e7eaef;
  --paper: #ffffff;
  color-scheme: light;
}

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

html {
  min-height: 100%;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

button,
summary,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

.corner-pixels {
  position: fixed;
  z-index: 1;
  width: 210px;
  height: 210px;
  pointer-events: none;
  image-rendering: pixelated;
}

.corner-pixels.tl { top: 0; left: 0; }
.corner-pixels.tr { top: 0; right: 0; }
.corner-pixels.bl { bottom: 0; left: 0; }
.corner-pixels.br { bottom: 0; right: 0; }

.stage {
  position: relative;
  z-index: 2;
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 20px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  align-content: center;
}

.mark-wrap {
  margin: 0;
  width: 100%;
  max-width: 520px;
  min-width: 0;
  font-size: 0;
  line-height: 0;
  z-index: 1;
}

.mark {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.mark .eye {
  transform-box: fill-box;
  transform-origin: center;
}

.mark-wrap.wink .eye,
.mark-wrap:hover .eye {
  animation: wink 0.42s ease;
}

@keyframes wink {
  0%,
  100% {
    transform: scaleY(1);
  }
  38%,
  62% {
    transform: scaleY(0.12);
  }
}

.profile {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portrait {
  display: flex;
  justify-content: center;
  width: 100%;
  background: none;
}

.cutout {
  display: block;
  width: min(320px, 88%);
  height: auto;
  background: none;
  border: 0;
  box-shadow: none;
}

.about {
  margin: 6px 0 0;
  max-width: 22rem;
  text-align: center;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: -0.02em;
}

.about:focus {
  outline: none;
}

.about:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.stack {
  width: 100%;
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.card.half {
  min-width: 0;
}

.card.half .head {
  gap: 8px;
  padding-inline: 14px 12px;
}

.card.half .heading {
  gap: 8px;
}

.card.half .num {
  font-size: 11px;
  letter-spacing: 0.08em;
}

.card.half .name {
  font-size: clamp(16px, 1.35vw, 22px);
}

.card.half .plus {
  width: 30px;
  height: 30px;
}

.card {
  background: var(--paper);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 12px 32px rgba(17, 17, 17, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:has(.head:hover) {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 18px 40px rgba(17, 17, 17, 0.08);
}

.card:has(.head:active) {
  transform: translateY(0);
}

.head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 88px;
  padding: 0 22px 0 24px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.sparks {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
}

.head:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.head::-webkit-details-marker {
  display: none;
}

.head::marker {
  content: "";
}

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

.num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #9a9a9a;
  font-variant-numeric: tabular-nums;
}

.name {
  font-family: Merriweather, Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 1.7vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.plus {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: transparent;
  position: relative;
  transition: transform 0.22s ease;
}

.plus::before,
.plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.plus::before {
  width: 12px;
  height: 1.5px;
}

.plus::after {
  width: 1.5px;
  height: 12px;
}

.card[open] .plus {
  transform: rotate(45deg);
}

.card > .panel {
  display: block;
  height: 0;
  overflow: hidden;
  transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.card::details-content {
  content-visibility: visible;
  height: auto;
  overflow: visible;
}

.panel-inner {
  min-height: 0;
}

.panel-body {
  padding: 4px 18px 18px 22px;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
}

.entry {
  position: relative;
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f4f7fb;
  color: #1d4ed8;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  text-decoration: none;
}

.project-link::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.project-link:hover {
  background: #e7eefb;
}

.project-link:hover::after {
  transform: translate(3px, -3px) rotate(45deg);
}

.social-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f4f7fb;
  color: #1d4ed8;
  text-decoration: none;
}

.social-link:hover {
  background: #e7eefb;
}

.social-k {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #8a8a8a;
}

.social-k::after {
  content: ":";
}

.social-v {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.entry-url {
  justify-self: start;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.bullets {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.bullet {
  position: relative;
  margin: 0;
  padding: 11px 4px 11px 22px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.011em;
  line-height: 1.55;
  color: #242424;
}

.bullet::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.15em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #38bdf8;
}

.bullet-text {
  min-width: 0;
}

.entry:last-of-type {
  border-bottom: 0;
}

.entry-name,
.entry-meta,
.entry-detail,
.skill-name {
  min-width: 0;
}

.entry-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.entry-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--soft);
  text-align: right;
  line-height: 1.4;
}

.entry-detail {
  grid-column: 1 / -1;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.011em;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 2px;
}

.skill {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  background: #fff0f6;
  color: #9d174d;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

@media (min-width: 980px) {
  .stage {
    width: min(1440px, 100%);
    display: grid;
    grid-template-columns: 572fr 161fr 548fr;
    align-content: safe center;
    align-items: center;
    column-gap: 0;
    row-gap: 0;
    padding: 40px 86px 40px 73px;
  }

  .mark-wrap {
    width: 100%;
    max-width: none;
    transform: translateY(6.9%);
  }

  .profile {
    grid-column: 3;
    width: 100%;
    min-width: 0;
    transform: translateY(12px);
  }

  .cutout {
    width: 320px;
  }

  .name {
    font-size: 26px;
  }
}

@media (max-width: 979px) {
  .mark-wrap:hover .eye {
    animation: none;
  }

  .stack {
    margin-top: 36px;
    gap: 18px;
  }

  .head {
    height: 76px;
    padding-inline: 16px 14px;
  }

  .plus {
    width: 32px;
    height: 32px;
  }

  .panel-body {
    padding-inline: 14px 14px;
  }
}

@media (max-height: 820px) {
  .stage {
    justify-content: flex-start;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .cutout {
    width: min(240px, 78%);
  }

  .about {
    font-size: 17px;
    line-height: 24px;
  }

  .stack {
    margin-top: 28px;
    gap: 12px;
  }

  .head {
    height: 68px;
  }
}

@media (min-width: 980px) and (max-height: 820px) {
  .stage {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .cutout {
    width: 220px;
  }

  .profile {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
