@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;1,400&display=swap");

:root {
  --page: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f3f5f8;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --experience-card-width: clamp(190px, 17vw, 260px);
  --experience-card-height: clamp(130px, 12vw, 180px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 40px 200px;
  font-family: "Open Sans", sans-serif;
  font-size: clamp(14px, 0.85vw, 18px);
  color: var(--text);
  background: var(--page);
  line-height: 1.5;
}

h1,
h2,
h3 {
  font-family: Helvetica, Arial, sans-serif;
}

h2 {
  font-size: clamp(1.35em, 1.5vw, 1.8em);
  margin-block-start: 2em;
  margin-block-end: 0;
}

h3 {
  font-size: clamp(1em, 1vw, 1.25em);
  margin-block-end: 0;
  line-height: 1.2;
}

.box .dense,
.large-box .dense {
  margin-bottom: 0.75em;
}

.experience-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75em;
  margin-bottom: 0.6em;
}

.experience-titles {
  flex: 1 1 auto;
  min-width: 0;
}

.experience-logo-wrap {
  width: 3.75em;
  height: 3.75em;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55em;
  color: var(--muted);
}

.experience-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

svg.experience-logo {
  fill: currentColor;
}

.experience-logo-mark {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  color: #fff;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 1.1em;
  letter-spacing: 0.02em;
  background: var(--muted);
}

.subtitle-line {
  display: block;
  font-size: 0.9em;
  line-height: 1.25;
}

.box h3 {
  font-size: 1.05em;
  line-height: 1.25;
}

.box h3.small {
  font-size: 0.95em;
}

.box .subtitle-line {
  font-size: 0.95em;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
  margin-top: 0.15em;
}

.experience-list,
.oss-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5em;
}

.experience-row {
  display: grid;
  grid-template-columns: 1.9em minmax(12em, 14em) 1fr;
  align-items: center;
  gap: 0.9em;
  padding: 0.7em 0.4em;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 0.12s ease;
}

.oss-row {
  border-bottom: 1px solid var(--line);
}

.oss-row-content {
  display: grid;
  grid-template-columns: 1.9em minmax(8em, 12em) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9em;
  min-height: 3.25em;
  padding: 0.55em 0.4em;
  color: inherit;
  text-decoration: none;
  transition: background 0.12s ease;
}

.experience-row:hover,
.oss-row-link:hover {
  background: rgba(37, 99, 235, 0.04);
}

.oss-row-link:hover::before,
.experience-row:hover::before {
  display: none;
}

.experience-row:last-child,
.oss-row:last-child {
  border-bottom: 0;
}

.experience-list-logo,
.oss-logo-wrap {
  width: 1.9em;
  height: 1.9em;
  border-radius: 5px;
  padding: 0.3em;
  flex: 0 0 auto;
}

.experience-company,
.oss-project {
  font-weight: 600;
  min-width: 0;
}

.oss-impact {
  min-width: 0;
  color: var(--muted);
  font-size: 0.95em;
}

.experience-role {
  color: var(--muted);
  font-size: 0.95em;
}

.oss-project {
  line-height: 1.25;
}

.experience-detail,
.oss-link {
  color: var(--accent);
  font-size: 0.9em;
  white-space: nowrap;
}

.oss-link-placeholder {
  color: var(--muted);
}

@media (max-width: 700px) {
  .experience-row {
    grid-template-columns: 1.9em 1fr;
  }

  .oss-row-content {
    grid-template-columns: 1.9em minmax(0, 1fr) auto;
    gap: 0.45em 0.8em;
    min-height: 0;
    padding: 0.75em 0.4em;
  }

  .experience-role {
    grid-column: 2;
  }

  .oss-impact {
    grid-column: 2 / -1;
    font-size: 0.92em;
    line-height: 1.35;
  }

  .oss-link {
    justify-self: end;
  }
  .experience-detail {
    grid-column: 2;
    margin-left: 2.8em;
  }
}

img,
video {
  max-width: 100%;
  max-height: 50vh;
  margin: auto;
  display: block;
}

a,
.pseudo-link {
  color: var(--accent);
  position: relative;
  text-decoration: underline;
}

a:hover::before,
.pseudo-link:hover::before {
  background-color: var(--accent-soft);
  content: "";
  position: absolute;
  width: calc(100% + 4px);
  height: 80%;
  left: -2px;
  bottom: 0;
  z-index: -1;
  transform: rotate(-2deg);
}

a.large-box,
a.box,
.pseudo-link.large-box,
.pseudo-link.box {
  color: inherit;
  text-decoration: none;
  transition: ease-out 0.15s box-shadow;
}

a.large-box:hover::before,
.pseudo-link.large-box:hover::before {
  background: none;
}

a.large-box:hover,
.pseudo-link.large-box:hover {
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1em;
  margin: 1em 0;
}

.dense > * {
  margin: 0;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

#profile-picture {
  width: clamp(6em, 8vw, 9em);
  height: clamp(6em, 8vw, 9em);
  margin: 0.5em 1em 0.5em 0;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--surface-muted);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25em;
  letter-spacing: 0.03em;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.08);
}

#profile-picture img {
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  display: block;
}

#hero-intro {
  margin-top: 0;
}

#hero-status {
  margin: 0.3em 0 0;
  color: var(--muted);
  font-size: 0.9em;
}

#links {
  gap: 0.2em 0.75em;
  flex-wrap: wrap;
  margin-top: 0.25em;
}

#links > a {
  color: var(--muted);
  text-decoration: none;
}

#links > a:hover {
  color: var(--accent);
  text-decoration: underline;
}

#links > a:hover::before {
  background: none;
}

.link-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.link-icon {
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
  display: inline-block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.subtitle {
  text-align: center;
  display: block;
  font-style: normal;
  font-weight: bold;
  font-size: 0.9em;
  color: var(--muted);
}

.small {
  font-size: 0.75em;
}

.large-box {
  border-radius: 5px;
  border: solid 0.5px var(--line);
  padding: 1em;
  color: inherit;
  background: var(--surface);
}

.box {
  padding: 0.2em 0;
  color: inherit;
}

.scroll .box {
  flex: 0 0 auto;
  margin-right: 2.5em;
}

.scroll .box:last-child {
  margin-right: 0;
}

.large-box {
  height: fit-content;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.box > *:first-child,
.large-box > *:first-child {
  margin-top: 0;
}

.box > *:last-child,
.large-box > *:last-child {
  margin-bottom: 0;
}

.scroll {
  overflow-y: hidden;
  overflow-x: auto;
  flex-wrap: wrap;
  gap: 0.5em 0;
  align-items: flex-start;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: #b8c2d1 transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  cursor: grab;
  box-shadow:
    inset -18px 0 14px -18px rgba(37, 99, 235, 0.35),
    inset 18px 0 14px -18px rgba(37, 99, 235, 0.2);
}

.scroll:active {
  cursor: grabbing;
}

.scroll::-webkit-scrollbar {
  height: 10px;
}

.scroll::-webkit-scrollbar-track {
  background: var(--surface-muted);
  border-radius: 999px;
}

.scroll::-webkit-scrollbar-thumb {
  background: #b8c2d1;
  border-radius: 999px;
}

.scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  row-gap: 1em;
  column-gap: 1em;
  margin: 1em 0;
}

.grid .large-box {
  height: 100%;
  margin: 0;
}

.preview {
  width: 100%;
  margin: 1em 0 0;
  padding: 0;
  display: block;
  border-radius: 3px;
  background: var(--surface-muted);
  border: 0.5px solid var(--line);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  max-height: none;
  align-self: stretch;
}

.preview-placeholder {
  width: 100%;
  margin: 1em 0 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  border: 0.5px dashed #c3ccda;
  border-radius: 3px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(37, 99, 235, 0.03),
      rgba(37, 99, 235, 0.03) 6px,
      rgba(37, 99, 235, 0.03) 6px,
      rgba(37, 99, 235, 0.06) 12px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75em;
  letter-spacing: 0.02em;
  align-self: stretch;
}

.large-box .preview,
.large-box .preview-placeholder {
  flex: 0 0 auto;
}

.large-box > p:last-child {
  margin-top: 1em;
}

.site-footer {
  margin-top: 4em;
  padding-top: 1.5em;
  border-top: 0.5px solid var(--line);
  color: var(--muted);
}

@media (max-width: 1400px) {
  body {
    margin: 40px 80px;
  }
}

@media (max-width: 900px) {
  body {
    margin: 20px;
  }

  .grid {
    grid-template-columns: repeat(1, 1fr);
    row-gap: 1em;
  }

  .grid .large-box {
    margin: 0;
  }
}
