/* =============================================================
   Reset & Base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: "Spectral", Georgia, 'Times New Roman', serif;
  --color-black: rgba(0, 0, 0, 0.85);
  --color-blue:  rgb(0, 0, 255);
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  background: #fff;
  color: var(--color-black);
}

a {
  color: var(--color-blue);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* =============================================================
   Layout — two-column with independent scroll
   ============================================================= */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* =============================================================
   Nav
   ============================================================= */
.nav {
  width: 290px;
  flex-shrink: 0;
  padding: 22px 20px 30px 26px;
  overflow-y: auto;
  height: 100vh;
}

.site-title {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 20px;
  font-weight: normal;
  color: var(--color-black);
  margin-bottom: 10px;
  line-height: 1.2;
}

.nav-links {
  list-style: none;
  margin-bottom: 10px;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 20px;
}

.nav-links li { line-height: 1.65; }

.nav-section {
  font-family: var(--font-sans);
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  color: #000;
  margin-bottom: 4px;
  margin-top: 2px;
}

.nav-links a.active {
  outline: 1px solid var(--color-blue);
  padding: 0 2px;
}

/* =============================================================
   Homepage — image panel
   ============================================================= */
.main-home {
  flex: 1;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* =============================================================
   CMY Effect
   ============================================================= */
.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.cmy-wrapper {
  position: absolute;
  inset: 0;
  overflow: visible;
  cursor: crosshair;
}

.cmy-base {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.4);
  user-select: none;
  pointer-events: none;
}

.cmy-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.6;
  user-select: none;
  pointer-events: none;
}

.layer-cyan    { filter: url(#to-cyan); }
.layer-magenta { filter: url(#to-magenta); }
.layer-yellow  { filter: url(#to-yellow); }

/* =============================================================
   Bio page — scrollable content panel
   ============================================================= */
.main-bio {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 44px 60px 40px;
}

.bio-heading {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 20px;
  font-weight: normal;
  margin-bottom: 30px;
}

/* Bio intro: text left, photo right */
.bio-top {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin-bottom: 44px;
}

.bio-text {
  flex: 1;
  min-width: 0;
}

.bio-text p {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 18px;
}

.bio-resume {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-top: 4px;
}

.bio-photo {
  width: clamp(260px, 38%, 420px);
  flex-shrink: 0;
  display: block;
  border: 2px solid var(--color-blue);
}

/* =============================================================
   Bio table — WORK / EDUCATION / CONTACT rows
   ============================================================= */
.bio-table {
  width: 100%;
}

.bio-row {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  border-top: 1px solid #ccc;
  padding: 20px 0;
}

.bio-table .section-label {
  flex: 1;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-black);
  padding-top: 2px;
}

.bio-entries {
  width: clamp(260px, 38%, 420px);
  flex-shrink: 0;
}

.bio-entry {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}
.bio-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.entry-name {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-blue);
  margin-bottom: 2px;
}

.entry-name a {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 20px;
  color: var(--color-blue);
}

.entry-location {
  display: block;
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: italic;
  font-size: 18px;
}

.entry-degree {
  display: block;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 18px;
  margin-top: 1px;
}

/* Contact icons */
.contact-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.contact-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue);
}

.contact-icons a:hover { opacity: 0.75; text-decoration: none; }

.icon-email,
.icon-linkedin {
  width: 22px;
  height: 18px;
}

.icon-linkedin,
.icon-github {
  width: 22px;
  height: 22px;
}

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 768px) {
  html, body { height: auto; }

  .layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .nav {
    width: 100%;
    height: auto;
    overflow: visible;
    padding: 18px 20px;
    border-bottom: 1px solid #e8e8e8;
  }

  .main-home {
    height: auto;
    min-height: 80vw;
    overflow: hidden;
  }

  .cmy-wrapper {
    position: relative;
    width: 100%;
    height: 80vw;
  }

  .main-bio {
    height: auto;
    overflow: visible;
    padding: 20px 18px 40px;
  }

  .bio-top {
    flex-direction: column;
  }

  .bio-photo {
    width: 100%;
    max-width: 280px;
  }

  .bio-row { gap: 16px; }

  .bio-entries {
    width: auto;
    flex: 1;
  }
}
