* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
  box-sizing: border-box;
}

/* ---- typo ---- */
@font-face {
  font-family: 'Source Sans 3';
  src: url(/font/SourceSans3-VariableFont_wght.ttf) format('truetype');
  font-style: normal;
  font-weight: 100 900;
}

@font-face {
  font-family: 'Source Sans 3';
  src: url(/font/SourceSans3-Italic-VariableFont_wght.ttf) format('truetype');
  font-style: italic;
  font-weight: 100 900;
}

@font-face {
  font-family: 'DM Serif Display';
  src: url(/font/DMSerifDisplay-Regular.ttf) format('truetype');
  font-style: normal;
  font-weight: 100 900;
}

@font-face {
  font-family: 'DM Serif Display';
  src: url(/font/DMSerifDisplay-Italic.ttf) format('truetype');
  font-style: italic;
  font-weight: 100 900;
}

h1 {
  font-family: "DM Serif Display", "Georgia", "Times New Roman", serif;
  font-size: 5.5rem;
  line-height: 1;
  margin-top: 4rem;
  margin-bottom: 1rem;
}

h2 {
  font-family: "DM Serif Display", "Georgia", "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.2;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

h3 {
  font-family: "DM Serif Display", "Georgia", "Times New Roman", serif;
  font-size: 1.3rem;
  line-height: 1.2;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

p.big {
  font-size: 1.5rem;
  line-height: 1.2;
}

p.small {
  font-size: 0.7rem;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  background-color: #ffffff;
  width: 0%;
  transition: width 0.3s ease;
}

a:hover::after {
  width: 100%;
}

a.link-icon::after {
display: none;
}

a.link-icon:hover {
filter: brightness(0) saturate(100%) invert(11%) sepia(71%) saturate(1319%) hue-rotate(197deg) brightness(97%) contrast(91%);
}


@media (max-width: 1024px) {
  h1 {
    font-size: 4rem;
  }

  p.big {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 3rem;
    margin-top: 0;
  }

  p.big {
    font-size: 1rem;
  }
}

/* ---- base ---- */

html,
body {
  width: 100%;
  height: 100%;
  background: #061125;
  color: #ffffff;
  font-family: "Source Sans 3", "Inter", "Helvetica Neue", Arial, sans-serif;
  scroll-behavior: smooth;
}

.light {
  background: #172B4E;
}

::selection {
  background-color: #091B3A;
}

.divider {
  height: 4.3rem;
}

.divider-small {
  height: 2rem;
}

nav {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 100px;
  justify-content: center;
  padding: 1rem;
}

@media (max-width: 500px) {
  nav {
    gap: 30px;
  }
}

/* ---- grid ---- */
.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 30px;
  padding: 4rem 4rem;
}

.col-1 {
  grid-column: span 1;
}

.col-2 {
  grid-column: span 2;
}

.col-3 {
  grid-column: span 3;
}

.col-4 {
  grid-column: span 4;
}

.col-6 {
  grid-column: span 6;
}

.col-8 {
  grid-column: span 8;
}

.col-10 {
  grid-column: span 10;
}

@media (max-width: 768px) {
  .row {
    padding: 4rem 2rem;
  }

  .col-1,
  .col-2,
  .col-3,
  .col-4,
  .col-6,
  .col-8,
  .col-10 {
    grid-column: span 12;
  }
}

/* ---- particles.js ---- */
canvas {
  display: block;
}

#particles-js {
  width: 100%;
  height: 500px;
  background-color: #172B4E;
  background-image: url('');
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  position: absolute;
}

/* ---- hero ---- */
.hero {
  padding-bottom: 0;
  padding-top: 10rem;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.hero .col-4 {
  position: relative;
}

.hero img {
  width: 100%;
  border-radius: 20px;
  max-width: 400px;
  float: right;
}

@media (max-width: 1250px) {

  .hero .col-6,
  .hero .col-8 {
    grid-column: span 8;
  }
}

@media (max-width: 1024px) {
  .hero {
    padding-top: 12rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding-top: 2rem;
  }

  .hero .col-6,
  .hero .col-8 {
    grid-column: span 12;
  }

  .hero img {
    max-width: 200px;
    float: left;
  }

  #particles-js {
    height: 580px;
  }
}

/* ---- skills ---- */
.skills img {
  width: 100%;
  max-width: 160px;
}

@media (max-width: 1024px) {
  .skills .col-3 {
    grid-column: span 6;
  }
}

@media (max-width: 600px) {
  .skills .col-3 {
    grid-column: span 12;
  }
}

/* ---- publications ---- */
table {
  border-collapse: collapse;
  margin-bottom: 2rem;
}

td {
  padding: 2rem 0;
  border-bottom: #fff solid 1px;
}

tr td:first-of-type {
  width: 60px;
}

tr td:last-of-type {
  width: 150px;
  text-align: right;
}

/*
table tr:last-of-type td {
  border-bottom: none;
}
*/



@media (max-width: 600px) {

  table,
  tr,
  td {
    display: block;
  }

  td {
    padding: 1rem 0;
    border: none;
    width: 100% !important;
  }

  tr td:last-of-type {
    padding: 2rem 0;
    border-bottom: #fff solid 1px;
    text-align: left;
  }
}

/* ---- contact ---- */
.divider-contact {
  height: 102.4px;
}

.mail-icon {
  top: 4px;
  position: relative;
  margin-right: 8px;
}

@media (max-width: 768px) {
  .divider-contact {
    height: 0;
  }
}

/* ---- Modal Overlay ---- */
body.modal-open {
  overflow: hidden;
  padding-right: var(--scrollbar-width);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Visible State */
.modal.active {
  display: flex;
}

/* Modal Box */
.modal-content {
  background: #172B4E;
  color: #ffffff;
  max-width: 900px;
  width: 90%;
  max-height: 80vh;
  padding: 2rem;
  border-radius: 20px;
  overflow-y: auto;
  position: relative;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #e5e7eb;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Prevent background scroll */
body.modal-open {
  overflow: hidden;
}

/* Modal scrollbar – WebKit (Chrome, Edge, Safari) */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.4); /* slate-400 */
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(148, 163, 184, 0.7);
}

/* Firefox */
.modal-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}
