:root {
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --heading-font: "Times New Roman", Times, serif;
  --body-font: "Times New Roman", Times, serif;
  --nav-font: "Raleway", "Century Gothic", Futura, "Gill Sans", sans-serif;
  --page-width: min(1040px, calc(100vw - 192px));

  --color-primary: #a02337;
  --color-accent: #7d1a2a;
  --color-background: #ffffff;
  --color-foreground: #454545;
  --color-muted-foreground: #666666;
  --color-border: #e6e6e6;
  --color-ring: #a02337;
  --color-muted: #ffffff;
  --color-footer: #58595b;
  --elevation-1: 0 1px 3px rgba(0,0,0,0.10);
  --elevation-2: 0 4px 6px rgba(0,0,0,0.10);
  --elevation-3: 0 10px 20px rgba(0,0,0,0.12);
  --elevation-4: 0 20px 40px rgba(0,0,0,0.15);
  --blur-amount: 8px;
  --radius: 10px;
  --header-height: 140px;
  --nav-content-gap: 16px;
  --red-title-size: 1.35rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: var(--color-primary);
  text-underline-offset: 0.2em;
  cursor: pointer;
}

a:hover {
  color: var(--color-accent);
}

:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 80;
  padding: 10px 14px;
  background: var(--color-primary);
  color: var(--color-on-primary, #fff);
  text-decoration: none;
  font-weight: 700;
}

.skip:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 0;
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: var(--page-width);
  max-width: 100%;
  margin: 0 auto;
  padding: 28px 0 20px;
}

.site-name {
  color: #2c2c2c;
  font-family: var(--nav-font);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 400;
  letter-spacing: 0.32em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.site-name:hover {
  color: #2c2c2c;
  opacity: 0.7;
}

.nav-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 18px;
}

.nav-rule {
  flex: 1 1 40px;
  height: 1px;
  min-width: 20px;
  background: #d7a3ab;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 8px;
  flex: 0 1 auto;
}

.nav a {
  color: var(--color-primary);
  font-family: var(--nav-font);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  min-height: 34px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.nav a:hover {
  color: var(--color-accent);
}

.nav a[aria-current="page"] {
  color: var(--color-primary);
  background: #f6e8ea;
}

.page {
  width: var(--page-width);
  max-width: 100%;
  margin: 0 auto 40px;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile {
  display: grid;
  grid-template-columns: 220px minmax(280px, 460px);
  justify-content: center;
  justify-items: start;
  gap: 96px;
  align-items: center;
  padding: 80px 0 96px;
}

.portrait {
  width: 220px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.identity h1 {
  margin: 0;
  font-family: var(--heading-font);
  font-size: clamp(2.2rem, 3.4vw, 2.9rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-foreground);
}

.preferred {
  margin: 6px 0 0;
  color: var(--color-muted-foreground);
  font-size: 0.95rem;
}

.role {
  margin: 22px 0 0;
  line-height: 1.8;
}

.contact {
  margin-top: 18px;
  display: grid;
  gap: 4px;
}

.contact a,
.links a {
  color: inherit;
  cursor: pointer;
}

.links {
  margin-top: 14px;
}

.page-section {
  scroll-margin-top: calc(var(--header-height) + var(--nav-content-gap));
}

.page-section + .page-section {
  margin-top: 0;
  padding-top: 24px;
}

.page-section:last-of-type {
  min-height: calc(100dvh - var(--header-height));
}

.is-home {
  margin-top: 0;
  padding-top: var(--nav-content-gap);
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
}

.is-home .profile {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  grid-template-columns: 240px minmax(0, 1fr);
  justify-content: stretch;
  justify-items: stretch;
  gap: 72px;
  padding: 28px 0 32px;
}

.is-home .opening {
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
  grid-template-areas: "intro bio";
  align-items: start;
  gap: 28px 48px;
  padding: 0 0 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.is-home .opening .intro-stack {
  grid-area: intro;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-width: 0;
  width: 100%;
  text-align: center;
}

.is-home .opening .portrait {
  width: 78%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 16px;
}

.is-home .opening .identity,
.is-home .opening .bio-side {
  min-width: 0;
  width: 100%;
}

.is-home .opening .identity {
  text-align: center;
}

.is-home .opening .identity h1 {
  font-family: var(--heading-font);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #2c2c2c;
}

.is-home .opening .role {
  margin-top: 14px;
  line-height: 1.75;
}

.contact-actions {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 22px;
  width: 100%;
  margin: 20px auto 0;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c44759;
  color: #fff;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
}

.contact-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.contact-btn:hover {
  background: #b03d4e;
  color: #fff;
}

.contact-btn[aria-expanded="true"],
.contact-btn:active {
  background: #b03d4e;
}

.contact-pop {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  z-index: 20;
  min-width: 220px;
  max-width: min(280px, 100%);
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  text-align: left;
  transform: translateX(-50%);
}

.contact-pop[hidden] {
  display: none;
}

.contact-pop-label {
  display: block;
  margin: 0 0 4px;
  font-family: var(--nav-font);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.contact-pop-value {
  margin: 0;
  font-family: var(--heading-font);
  font-size: 0.95rem;
  line-height: 1.45;
  color: #2c2c2c;
  user-select: all;
}

.is-home .opening .bio-side {
  grid-area: bio;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 0;
}

.is-home .opening .cv-title {
  margin: 0 0 12px;
  font-size: var(--red-title-size);
  line-height: 1;
}

.is-home .opening .bio-side > :first-child .cv-title {
  margin-top: 0;
}

.is-home .opening .interest-block p {
  margin: 0;
}

.is-home .opening .bio-side p {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.75;
}

.is-home .opening .edu-block .degree {
  margin: 0 0 14px;
  font-size: 1.1rem;
  line-height: 1.5;
}

.is-home .opening .edu-block .degree:last-child {
  margin-bottom: 0;
}

.is-home .opening .edu-block .degree-name {
  display: block;
  font-weight: 400;
  font-size: inherit;
  color: #2c2c2c;
}

.is-home .opening .edu-block .degree span:not(.degree-name) {
  display: block;
  font-weight: 400;
  font-size: 0.92em;
  color: var(--color-muted-foreground);
}

.is-home .opening .edu-block .degree time {
  font-weight: 400;
  font-size: 0.92em;
  color: var(--color-muted-foreground);
}

.cv-title,
.block h2,
.block h3 {
  margin: 0 0 14px;
  font-family: var(--nav-font);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--color-primary);
  scroll-margin-top: calc(var(--header-height) + var(--nav-content-gap));
}

.page-section:not(.is-home) .block h3 {
  margin: 0 0 12px;
  font-size: var(--red-title-size);
  line-height: 1;
}

.block .contact-label,
.contact-label {
  margin: 0;
  font-family: var(--nav-font);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.cv-split {
  grid-area: cv;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 48px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

.cv-split .cv-group + .cv-group {
  margin-top: 0;
}

.job span:not(.degree-name),
.degree span:not(.degree-name) {
  display: block;
  color: var(--color-muted-foreground);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.contact-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.contact-icon {
  width: 24px;
  height: 24px;
  margin-top: 3px;
  color: var(--color-foreground);
}

.contact-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}


.contact-list a,
.contact-list span {
  color: var(--color-foreground);
  text-decoration: none;
  line-height: 1.5;
}

.contact-list a {
  color: var(--color-primary);
}

.contact-list a:hover {
  color: var(--color-accent);
}

.is-home .opening + .block {
  margin-top: 12px;
}

.is-home .identity {
  max-width: none;
  width: 100%;
}

.is-home .role {
  margin-top: 12px;
}

.is-home .contact {
  margin-top: 10px;
}

.is-home .links {
  margin-top: 8px;
}

.is-home .block {
  max-width: none;
  padding: 4px 0 16px;
}

.is-home .block h2,
.is-home .block h3 {
  margin-bottom: 8px;
}

.is-home .job,
.is-home .degree {
  margin-bottom: 8px;
  gap: 6px 32px;
}

.is-home .list li {
  margin-bottom: 6px;
}

.block {
  max-width: none;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 8px 0 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.block p {
  margin: 0 0 12px;
  line-height: 1.75;
}

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

.page-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  scroll-margin-top: var(--header-height);
}

.inner {
  max-width: none;
  width: 100%;
  margin: 0 auto;
}

.list {
  margin: 0;
  padding: 0 0 0 1.15rem;
}

.list li {
  margin: 0 0 12px;
  padding-left: 4px;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.is-home .opening .bio-side p,
.is-home .opening .edu-block .degree,
.block p:not(.contact-label),
.contact-copy {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.list li[hidden] {
  display: none;
}

.meta {
  color: var(--color-muted-foreground);
}

.job,
.degree {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 32px;
  margin: 0 0 16px;
}

.job time,
.degree time {
  color: var(--color-muted-foreground);
  white-space: nowrap;
}

.job strong,
.degree strong {
  display: block;
}

.footer {
  width: var(--page-width);
  max-width: 100%;
  margin: 48px auto 32px;
  padding: 18px 0 0;
  border-top: 1px solid #ececec;
  background: transparent;
  color: #b3b3b3;
  font-family: var(--nav-font);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 800px) {
  .topbar,
  .page {
    width: min(calc(100vw - 32px), 1360px);
  }

  .footer {
    width: 100%;
    padding: 22px 16px;
  }

  .topbar {
    gap: 14px;
    padding: 18px 0 14px;
  }

  .site-name {
    letter-spacing: 0.18em;
    white-space: normal;
    text-align: center;
  }

  .nav-row {
    gap: 10px;
  }

  .nav a {
    letter-spacing: 0.1em;
    padding: 8px 8px;
    font-size: 0.8rem;
  }

  .profile {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 28px;
    padding-top: 16px;
  }

  .is-home .opening {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    padding: 0 0 16px;
    gap: 24px;
  }

  .is-home .opening .intro-stack,
  .is-home .opening .portrait,
  .is-home .opening .identity,
  .is-home .opening .bio-side {
    grid-area: auto;
    text-align: left;
  }

  .is-home .opening .bio-side {
    gap: 32px;
  }

  .is-home .opening .intro-stack {
    align-items: center;
    width: 100%;
    text-align: center;
  }

  .is-home .opening .identity {
    text-align: center;
  }

  .is-home .opening .portrait {
    width: min(100%, 240px);
    height: auto;
  }

  .identity {
    max-width: 420px;
  }

  .is-home .identity {
    max-width: none;
    width: 100%;
  }

  .job,
  .degree {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

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

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


.page-section .block + .block { margin-top: 8px; }
.is-home .block + .block { margin-top: 8px; }
.portrait {
  box-shadow: var(--elevation-4);
  background: #fff;
  border: 0;
  position: relative;
  z-index: 2;
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.identity h1 { font-weight: 400; }

@media (max-width: 1100px) and (min-width: 801px) {
  .is-home .opening {
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.15fr);
    gap: 24px 28px;
    padding: 0 0 16px;
  }

  .is-home .opening .portrait {
    width: 78%;
    max-width: 280px;
    height: auto;
  }
}

@media (min-width: 801px) {
  :root {
    --red-title-size: 1.6rem;
  }

  .block,
  .is-home .opening {
    font-size: 1.25rem;
  }

  .is-home .opening .bio-side p {
    font-size: 1.47rem;
  }

  .is-home .opening .edu-block .degree {
    font-size: 1.32rem;
  }

  .contact-icon {
    width: 28px;
    height: 28px;
  }
}
