/* Andrea Ramazzotti — personal site
   Design system: flat geometric blocks, thick black rules, ink & rust palette
   No gradients, no shadows, no texture. Static, no animation. */

@font-face {
  font-family: 'Poppins';
  font-weight: 500;
  src: url('fonts/Poppins-Medium.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  font-weight: 600;
  src: url('fonts/Poppins-SemiBold.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  font-weight: 700;
  src: url('fonts/Poppins-Bold.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  font-weight: 100 900;
  src: url('fonts/WorkSans-VariableFont_wght.ttf') format('truetype-variations');
  font-display: swap;
}
   
:root {
  --ink: #111111;
  --paper: #ffffff;
  --deep: #0a5775;   /* ink blue */
  --rust: #c43c0a;   /* rust accent */
  --sand: #fac940;   /* warm neutral */
  --text-secondary: #555555;
  --text-muted: #8a8a8a;
  --rule: 2px;
  --rule-heavy: 3px;
  --divider: 1.5px;
  --max-width: 900px;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Work Sans', -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, .site-header .name, .pub-item .title {
  font-family: var(--font-heading);
}

a.text-link {
  border-bottom: 1px solid var(--ink);
}
a.text-link:hover {
  border-bottom-color: var(--rust);
  color: var(--rust);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ---- Header / nav ---- */
header.site-header {
  border-bottom: var(--rule-heavy) solid var(--ink);
}
.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
}
.site-header .name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
nav.main-nav {
  display: flex;
  gap: 24px;
  font-size: 16px;
  color: var(--text-secondary);
}
nav.main-nav a:hover {
  color: var(--rust);
}
nav.main-nav a.current {
  color: var(--ink);
  font-weight: 700;
}

/* mobile nav */
@media (max-width: 640px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px;
  }
  nav.main-nav {
    gap: 16px;
    flex-wrap: wrap;
  }
}

/* ---- Footer ---- */
footer.site-footer {
  border-top: var(--rule) solid var(--ink);
  margin-top: 60px;
}
footer.site-footer.flush {
  margin-top: 0;
}
footer.site-footer .wrap {
  padding: 18px 24px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}
@media (max-width: 640px) {
  footer.site-footer .wrap {
    flex-direction: column;
    gap: 6px;
  }
}

/* ---- Generic content page ---- */
main.page {
  padding: 48px 24px 24px;
}
main.page h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
}
main.page .lede {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 40px;
  max-width: 560px;
}

/* ---- Home hero grid ---- */
.hero-grid {
  display: grid;
  grid-template-columns: 300px 1fr 90px;
  border-bottom: var(--rule) solid var(--ink);
}
.hero-photo {
  background: var(--sand);
  border-right: var(--rule) solid var(--ink);
  overflow: hidden;
  position: relative;
}
.hero-photo img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}
.hero-text {
  border-right: var(--rule) solid var(--ink);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-text h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 14px;
  line-height: 1.35;
}
.hero-text p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 14px;
  max-width: 560px;
  line-height: 1.75;
}
.hero-text p:last-child {
  margin-bottom: 0;
}
.hero-text p:first-of-type {
  color: var(--ink);
}
.hero-accent {
  background: var(--deep);
}
@media (max-width: 640px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
.hero-photo {
  border-right: none;
  border-bottom: var(--rule) solid var(--ink);
  position: relative;
  height: 340px;
}
.hero-photo img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 27%;
}
  .hero-text {
    border-right: none;
    border-bottom: var(--rule) solid var(--ink);
    padding: 24px 20px;
  }
  .hero-accent {
    min-height: 24px;
  }
}

.hero-strip {
  display: grid;
  grid-template-columns: 100px 1fr 90px;
}
.hero-strip .block-deep {
  background: var(--rust);
}
.hero-strip .info {
  border-right: var(--rule) solid var(--ink);
  border-left: var(--rule) solid var(--ink);
  display: flex;
  align-items: center;
  padding: 0 28px;
  font-size: 12px;
  color: var(--text-muted);
  min-height: 64px;
}
.hero-strip .block-sand {
  background: var(--sand);
}
@media (max-width: 640px) {
  .hero-strip {
    grid-template-columns: 1fr;
  }
  .hero-strip .block-deep,
  .hero-strip .block-sand {
    min-height: 20px;
  }
  .hero-strip .info {
    border-left: none;
    border-right: none;
    border-top: var(--rule) solid var(--ink);
    border-bottom: var(--rule) solid var(--ink);
    padding: 14px 20px;
  }
}

/* ---- Research page: full-width composition ---- */
.research-page {
  padding: 0;
}
.research-header {
  display: grid;
  grid-template-columns: 1fr 160px 80px;
  border-bottom: var(--rule) solid var(--ink);
  align-items: stretch;
}
.research-title {
  padding: 32px 28px 32px 118px;
}
.research-title h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 6px;
}
.research-title .lede {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}
.research-header .patch-sand {
  background: var(--deep);
  border-left: var(--rule) solid var(--ink);
}
.research-header .patch-rust {
  background: var(--rust);
  border-left: var(--rule) solid var(--ink);
}
.research-body {
  display: grid;
  grid-template-columns: 90px 1fr 240px;
}
.research-rightframe {
  border-left: var(--rule) solid var(--ink);
}
.research-band {
  background: var(--sand);
  border-right: var(--rule) solid var(--ink);
}
.research-items {
  padding: 36px 40px 40px;
}
.research-item {
  padding: 22px 80px;
  margin: 0 -40px;
  border-bottom: var(--divider) solid var(--ink);
}
.research-item:first-child {
  padding-top: 0;
}
.research-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.research-item h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  max-width: 900px;
}
.research-item p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.7;
}
@media (max-width: 640px) {
  .research-header {
    grid-template-columns: 1fr 70px 40px;
  }
  .research-title {
    padding: 24px 20px;
  }
  .research-title h1 {
    font-size: 26px;
  }
  .research-body {
    grid-template-columns: 6px 1fr;
  }
  .research-rightframe { display: none; }
  .research-items {
    padding: 28px 0 28px 18px;
  }
}

/* ---- Publications page: matches research composition, rust band ---- */
.pub-page {
  padding: 0;
}
.pub-header {
  display: grid;
  grid-template-columns: 1fr 160px 80px;
  border-bottom: var(--rule) solid var(--ink);
  align-items: stretch;
}
.pub-title {
  padding: 32px 28px 32px 118px;
}
.pub-title h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 6px;
}
.pub-title .lede {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}
.pub-header .patch-deep {
  background: var(--deep);
  border-left: var(--rule) solid var(--ink);
}
.pub-header .patch-sand {
  background: var(--sand);
  border-left: var(--rule) solid var(--ink);
}
.pub-body {
  display: grid;
  grid-template-columns: 90px 1fr 240px;
}
.pub-rightframe {
  border-left: var(--rule) solid var(--ink);
}
.pub-band {
  background: var(--rust);
  border-right: var(--rule) solid var(--ink);
}
.pub-list {
  padding: 36px 40px 40px;
}
.pub-item {
  display: flex;
  gap: 20px;
  padding: 22px 80px;
  margin: 0 -40px;
  border-bottom: var(--divider) solid var(--ink);
  align-items: baseline;
}
.pub-item:first-child {
  padding-top: 0;
}
.pub-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.pub-item .year {
  font-size: 13px;
  color: var(--text-muted);
  width: 44px;
  flex-shrink: 0;
}
.pub-item .details {
  flex: 1;
  max-width: 900px;
}
.pub-item .title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
}
.pub-item .venue {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.7;
}
.pub-item .links {
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .pub-header {
    grid-template-columns: 1fr 70px 40px;
  }
  .pub-title {
    padding: 24px 20px;
  }
  .pub-title h1 {
    font-size: 26px;
  }
  .pub-body {
    grid-template-columns: 6px 1fr;
  }
  .pub-rightframe { display: none; }
  .pub-list {
    padding: 28px 20px;
  }
}

/* ---- Teaching page: bolder color-block composition ---- */
.teaching-page {
  padding: 0;
}
.teaching-header {
  display: grid;
  grid-template-columns: 1fr 120px 120px 120px;
  border-bottom: var(--rule) solid var(--ink);
  align-items: stretch;
}
.teaching-title {
  padding: 32px 28px 32px 118px;
}
.teaching-title h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 6px;
}
.teaching-title .lede {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}
.teaching-header .patch-sand { background: var(--sand); border-left: var(--rule) solid var(--ink); }
.teaching-header .patch-deep { background: var(--deep); border-left: var(--rule) solid var(--ink); }
.teaching-header .patch-rust { background: var(--rust); border-left: var(--rule) solid var(--ink); }

.teaching-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-bottom: var(--rule) solid var(--ink);
  min-height: 180px;
}
.teaching-row:last-of-type {
  border-bottom: none;
}
.teaching-block-color {
  border-right: var(--rule) solid var(--ink);
}
.teaching-block-color.color-sand { background: var(--sand); }
.teaching-block-color.color-deep { background: var(--deep); }
.teaching-block-color.color-rust { background: var(--rust); }
.teaching-content {
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 820px;
}
.teaching-content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
}
.teaching-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.75;
}
@media (max-width: 640px) {
  .teaching-header {
    grid-template-columns: 1fr 50px 50px 50px;
  }
  .teaching-title {
    padding: 24px 20px;
  }
  .teaching-title h1 {
    font-size: 26px;
  }
  .teaching-row {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .teaching-block-color {
    border-right: none;
    border-bottom: var(--rule) solid var(--ink);
    min-height: 40px;
  }
  .teaching-content {
    padding: 24px 20px;
  }
}

/* ---- Contacts page: bold Mondrian color composition ---- */
.contacts-page {
  padding: 0;
}
.contacts-header {
  display: grid;
  grid-template-columns: 1fr 200px;
  border-bottom: var(--rule) solid var(--ink);
  align-items: stretch;
}
.contacts-title {
  padding: 32px 28px 32px 118px;
}
.contacts-title h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
}
.contacts-header .patch-deep {
  background: var(--deep);
  border-left: var(--rule) solid var(--ink);
}
.contacts-composition {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 200px 160px;
}
.contacts-info {
  grid-column: 1 / 3;
  grid-row: 1 / 2;
  padding: 36px 40px 36px 118px;
  border-right: var(--rule) solid var(--ink);
  border-bottom: var(--rule) solid var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contacts-info .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 2px;
}
.contacts-info .value {
  font-size: 15px;
  margin: 0 0 18px;
}
.contacts-info .value:last-child {
  margin-bottom: 0;
}
.cell-rust  { background: var(--rust); grid-column: 3 / 4; grid-row: 1 / 2; border-bottom: var(--rule) solid var(--ink); }
.cell-sand  { background: var(--sand); grid-column: 1 / 2; grid-row: 2 / 3; border-right: var(--rule) solid var(--ink); }
.cell-deep  { grid-column: 2 / 3; grid-row: 2 / 3; border-right: var(--rule) solid var(--ink); }
.cell-white { grid-column: 3 / 4; grid-row: 2 / 3; }

@media (max-width: 640px) {
  .contacts-header {
    grid-template-columns: 1fr 90px;
  }
  .contacts-title {
    padding: 24px 20px;
  }
  .contacts-title h1 {
    font-size: 26px;
  }
  .contacts-composition {
    display: block;
  }
  .contacts-info {
    border-right: none;
    border-bottom: var(--rule) solid var(--ink);
    padding: 28px 20px;
  }
  .cell-rust,
  .cell-sand,
  .cell-deep {
    display: block;
    grid-column: auto;
    grid-row: auto;
    border-right: none;
    height: 56px;
    border-bottom: var(--rule) solid var(--ink);
  }
  .cell-white { display: none; }
}

/* ---- CV button ---- */
.cv-link {
  display: inline-block;
  border: var(--rule) solid var(--ink);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}
.cv-link:hover {
  background: var(--ink);
  color: var(--paper);
}
