:root{
  --max: 1100px;
  --pad: 20px;
  --line: #e6e6e6;
  --accent: #c00;

  --cv-shift: 210px;
}

/* ===== Base ===== */
body{
  margin: 0;
  font-family: "Lora", serif;
  background: #fff;
  color: #000;
}

a{
  color:#000;
  text-decoration:none;
}
a:hover{
  color: var(--accent);
}

.graphy-window{
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ===== Header ===== */
.graphy-titlewrap{
  padding: 30px 0 14px;
  text-align: center;
}

.graphy-title{
  margin: 0;
  font-family: "Lora", serif;
  font-weight: 500;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: 0.2px;
}

.graphy-rule{
  height: 1px;
  background: var(--line);
}

.graphy-navwrap{
  padding: 16px 0;
}

.graphy-nav{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  flex-wrap: wrap;
}

.graphy-nav a{
  font-family: "Bitter", serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.graphy-nav a.is-active{
  color: var(--accent);
}

/* ===== Two-column layout (HOME page only) ===== */
.page-grid{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  padding-top: 34px;
  padding-bottom: 40px;
}

.sidebar{
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.main-col{
  min-width: 0;
  font-size: 18px;
  line-height: 1.8;
}

.sidebar-logo,
.sidebar-photo{
  display: block;
  height: auto;
  max-width: 77%;
}

.sidebar-logo{
  margin: 0 0 20px 0;
}

.sidebar-photo{
  margin: 0 0 36px 0;
}

.contact{
  font-style: normal;
  font-size: 18px;
  line-height: 1.7;
}

.contact-gap{
  height: 14px;
}

.contact-row{
  display: grid;
  grid-template-columns: 55px 1fr;
  column-gap: 6px;
  align-items: start;
}

.label{
  font-weight: 400;
}

/* ===== CV page ===== */
.cv-page{
  padding-top: 34px;
  padding-bottom: 40px;
}

.cv-wrap{
  font-family: "Lora", serif;
  font-size: 17px;
  line-height: 1.8;
  margin-left: var(--cv-shift);
}

/* ===== CV Title Row + Custom PDF Badge ===== */

.cv-title-row{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px; /* space between title and badge */
  margin-left: calc(-1 * var(--cv-shift));
  margin-bottom: 40px;
}

.cv-title-main{
  margin: 0;
  text-align: center;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.05;
}

/* Custom PDF badge */
.cv-pdf-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 4px 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;

  color: #c00;
  border: 2px solid #c00;
  border-radius: 4px;

  text-decoration: none;
  transition: all 0.2s ease;
}

/* subtle hover */
.cv-pdf-badge:hover{
  background: #c00;
  color: #fff;
}

/* Custom PDF badge for pubs */
.cv-pdf-badge2{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 1px 5px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;

  color: #c00 !important;
  
  text-decoration: none;
  transition: all 0.2s ease;
}

/* ===== Address block ===== */
.cv-address-grid{
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.cv-address-grid .cv-row{
  display: grid;
  grid-template-columns: 320px 1fr;
  column-gap: 24px;
  align-items: baseline;
  margin: 10px 0;
  line-height: 1.15;
}

.cv-right{
  display: grid;
  grid-template-columns: 70px 1fr;
  column-gap: 8px;
  align-items: baseline;
}

.cv-address-grid .cv-row > div:last-child{
  justify-self: start;
  white-space: nowrap;
}

/* ===== CV section headings ===== */
.cv-h{
  font-variant: small-caps;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 42px;
  margin-bottom: 12px;
  position: relative;
}

.cv-h::after{
  content: "";
  display: block;
  height: 1px;
  background: #000;
  margin-top: 8px;
}

/* CV content links */
.cv-content a{
  color:#6600CC;
}
.cv-content a:visited{
  color:#6600CC;
}
.cv-content a:hover{
  color: var(--accent);
}

.cv-section{
  margin-top: 26px;
}

.cv-section p{
  margin: 10px 0;
}

/* ===== Footer ===== */
.footer{
  padding: 0 0 40px;
  font-size: 14px;
}

.footer-inner{
  text-align: center;
  padding-top: 18px;
}

/* ===== Responsive ===== */
@media (max-width: 980px){

  .page-grid{
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sidebar{
    border-right: none;
    padding-right: 0;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-logo,
  .sidebar-photo{
    max-width: 60%;
  }

  .main-col{
    font-size: 17px;
  }

  .contact{
    font-size: 17px;
  }

  .cv-wrap{
    margin-left: 0;
  }

  .cv-title-row{
    margin-left: 0;
  }

  .cv-address-grid .cv-row{
    grid-template-columns: 1fr;
    row-gap: 4px;
    white-space: normal;
  }
}

/* ===== Publications list spacing ===== */
.cv-pub-list{
  margin-top: 14px;
  padding-left: 34px;  /* controls indentation of numbers */
}

.cv-pub-list li{
  margin: 16px 0;      /* controls space between publications */
  line-height: 1.65;   /* controls spacing inside long entries */
}

/* ===== Visiting Appointments spacing refinement ===== */
.cv-visiting p{
  line-height: 1.35;   /* tighter inside each entry */
  margin: 18px 0;      /* more space between entries */
}

/* Referee journal list */

.cv-referee{
  column-count: 2;
  column-gap: 60px;
}

.cv-referee p{
  margin: 0 0 6px 0;
  line-height: 1.25;
  break-inside: avoid;
}

/* Subsection header inside a main CV section */
.cv-sub{
  font-variant: small-caps;
  font-weight: 700;
  font-size: 23px;
  margin-top: 28px;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 4px;
}

/* Short underline */
.cv-sub::after{
  content: "";
  display: block;
  width: 160px;          /* short line */
  height: 1px;
  background-color: #000;
  margin-top: 4px;
}

/* Subsection header inside a main CV section */
.cv-sub1{
  font-variant: small-caps;
  font-weight: 700;
  font-size: 23px;
  margin-top: 28px;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 4px;
}

/* Short underline */
.cv-sub1::after{
  content: "";
  display: block;
  width: 630px;          /* short line */
  height: 1px;
  background-color: #000;
  margin-top: 4px;
}

/* Subsection header inside a main CV section */
.cv-sub2{
  font-variant: small-caps;
  font-weight: 700;
  font-size: 23px;
  margin-top: 28px;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 4px;
}

/* Short underline */
.cv-sub2::after{
  content: "";
  display: block;
  width: 190px;          /* short line */
  height: 1px;
  background-color: #000;
  margin-top: 4px;
}

/* Subsection header inside a main CV section */
.cv-sub3{
  font-variant: small-caps;
  font-weight: 700;
  font-size: 23px;
  margin-top: 28px;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 4px;
}

/* Short underline */
.cv-sub3::after{
  content: "";
  display: block;
  width: 310px;          /* short line */
  height: 1px;
  background-color: #000;
  margin-top: 4px;
}

/* Subsection header inside a main CV section */
.cv-sub4{
  font-variant: small-caps;
  font-weight: 700;
  font-size: 23px;
  margin-top: 28px;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 4px;
}

/* Short underline */
.cv-sub4::after{
  content: "";
  display: block;
  width: 105px;          /* short line */
  height: 1px;
  background-color: #000;
  margin-top: 4px;
}

@media (max-width: 768px){
  .graphy-title{
    font-size: 34px;
  }
  .graphy-nav{
    gap: 18px;
  }
  .graphy-nav a{
    font-size: 16px;
    letter-spacing: 1px;
  }
}

cv-pdf-badge2,
.cv-pdf-badge2:visited,
.cv-pdf-badge2:hover{
  color: #c00 !important;
}