/*
  Eran Amsalem — personal site
  Minimal academic style: white background, plain sans-serif,
  circular photo + icon link list in a left sidebar, simple
  underlined tab navigation, generous whitespace.
*/

:root {
  --bg: #faf9f6;
  --text: #1d1d1f;
  --text-secondary: #6b6862;
  --border: #e5e1d8;
  --link: #1d1d1f;
  --orcid: #a6ce39;

  --font: Georgia, Cambria, "Times New Roman", Times, serif;

  --content-width: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.07rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
}

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

h1 {
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  color: var(--text);
}

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 2.25rem;
}

/* --- Site header / nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 2.25rem;
  flex-wrap: wrap;
}

.wordmark {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 1.4rem;
}

.tabs {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

.tab {
  font-size: 1.07rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding-bottom: 1.4rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab:hover {
  color: var(--text);
}

.wordmark[aria-current="page"],
.tab[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--text);
}

/* --- Page layout: sidebar + content --- */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3.5rem;
  padding: 3.75rem 0 5.25rem;
  align-items: start;
}

.layout--single {
  grid-template-columns: 1fr;
}

/* --- Sidebar --- */
.profile-photo {
  width: 220px;
  height: 220px;
  border-radius: 20px; /* במקום 50% */
  overflow: hidden;
  background: #eef0f2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.profile-photo .initial {
  font-size: 4.5rem;
  font-weight: 700;
  color: #b7bcc4;
}

.profile-name {
  margin-top: 1.1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-title {
  margin-top: 0.3rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.profile-links {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--border);
}

.profile-links li + li {
  margin-top: 0.15rem;
}

.profile-links a,
.profile-links span.static {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.45rem 0;
}

.profile-links a {
  transition: color 0.15s ease;
}

.profile-links a:hover {
  color: var(--text-secondary);
}

.profile-links svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.profile-links .icon-orcid {
  color: var(--orcid);
}

/* --- Content --- */
.content {
  max-width: 42rem;
}

.content p {
  margin: 0 0 1.5em;
  color: #2b2a28;
}

.content em {
  font-style: italic;
}

.content a {
  text-decoration: underline;
  text-decoration-color: #c9c9c9;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease;
}

.content a:hover {
  text-decoration-color: var(--text);
}

/* --- Research listing --- */
.section-heading {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 2.75rem 0 1.25rem;
}

.section-heading:first-child {
  margin-top: 0;
}

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.3rem 0;
  border-top: 1px solid var(--border);
}

.pub-list li:last-child {
  border-bottom: 1px solid var(--border);
}

.pub-main {
  min-width: 0;
}

.pub-title {
  font-weight: 600;
  margin: 0 0 0.3rem;
  line-height: 1.4;
}

.pub-meta {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.pub-links {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  padding-top: 0.1rem;
}

.pub-links a {
  font-size: 0.88rem;
  text-decoration: underline;
  text-decoration-color: #c9c9c9;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease;
}

.pub-links a:hover {
  text-decoration-color: var(--text);
}

.intro-text {
  color: var(--text-secondary);
  margin: -0.5rem 0 0.5rem;
}

/* --- CV page --- */
.cv-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
}

.cv-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
}

.cv-year {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.cv-list--simple li {
  grid-template-columns: 1fr;
}

.btn-download {
  display: inline-block;
  margin: 0 0 2.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--bg);
  background: var(--text);
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.btn-download:hover {
  background: #3a3a3c;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem 0 3.25rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.site-footer p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.site-footer p + p::before {
  content: "·";
  margin-right: 0.5rem;
}

/* --- Responsive --- */
@media (max-width: 720px) {
  .header-inner {
    padding: 1rem 1.25rem;
    gap: 1.25rem;
  }

  .wordmark {
    font-size: 1.15rem;
    padding-bottom: 0.5rem;
  }

  .tab {
    font-size: 0.95rem;
    padding-bottom: 0.5rem;
  }

  .wrap {
    padding: 0 1.25rem;
  }

  .tabs {
    gap: 1rem;
    margin-left: 0;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0 3rem;
  }

  .profile-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
  }

  .profile-photo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    flex-shrink: 0;
  }

  .profile-photo .initial {
    font-size: 1.5rem;
  }

  .profile-name {
    margin-top: 0;
    font-size: 1.05rem;
  }

  .profile-title {
    margin-top: 0.15rem;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .profile-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 1.25rem;
    row-gap: 0.3rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    text-align: left;
  }

  .profile-links li + li {
    margin-top: 0;
  }

  .cv-list li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .pub-list li {
    flex-direction: column;
    gap: 0.6rem;
  }

  .pub-links {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .site-footer p + p::before {
    content: none;
    margin-right: 0;
  }
}
