*, *::before, *::after {
    box-sizing: border-box;
}

:root{
  --card-w: 320px;
  --card-gap: 56px;
}

html, body{
    height: 100vh;
    margin: 0;
}

body{
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    color: rgb(17, 29, 66);
    overflow-x: hidden;
}



h1 {
  font-family: 'Playfair Display', serif;
}

h2, h3, p, li {
  font-family: 'IBM Plex Mono', monospace;
}


.container{
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-snap-stop: always;  
}

.page{
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.home{
  position: relative;
  background-color: rgb(255, 255, 255);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; 
  padding-top: 70px;          
}

.name{
    width: 100%;
    display: flex;
    justify-content: center;
    align-content: center;
}

.home-bottom{
  width: min(1100px, calc(100% - 140px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 80px);
  margin-top: 20px;
}

.home .name h1{
  font-size: clamp(40px, 4vw, 56px);
  letter-spacing: 1px;
  margin-bottom: 30px;
}

.portrait{
  flex: 0 0 clamp(280px, 34vw, 420px);
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
}

.portrait img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 8%;
    width: 100%;
    padding: 20px 70px;
    font-size: 20px;
    background-color: rgb(255, 255, 255);
    position: fixed;
    top:0;
    z-index: 1000;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 15px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-icon{
    width: 37px;
    height: 37px;
    display: block;
    padding: 5px;
    border: 0.5px solid rgb(17, 29, 66);
    border-radius: 50%;
}

.nav-right a:hover{
    background-color: rgba(196, 209, 247,0.293);
    border-radius: 50%;
}

.navbar a{
    text-decoration: none;
}

.navbar a.active{
  text-decoration: underline rgb(196, 209, 247);
  text-underline-offset: 6px;
}

.nav-right a.tooltip{
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-right a.tooltip .tooltip-text{
    position: absolute;
    top: calc(100% + 10px);
    bottom: -38px;
    left: 50%;
    transform: translateX(-50%) translateY(40%);
    background: rgba(196, 209, 247,0.293);
    color: rgb(17,29,66);
    font-size: 12px;
    padding: 6px 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
}

.nav-right a.tooltip:hover .tooltip-text{
    opacity: 1;
    transform: translateX(-50%) translateY(4px);
}

.about{
    background-color: rgb(255, 255, 255);
    height: 100vh;
}

.skills{
    background-color: rgb(255, 255, 255);
    height: 100vh;
    display: flex;
}
.projects{
    background-color: rgb(255, 255, 255);
    height: 100vh;
    padding: 64px 0;
}

.projects-wrap{
    width: 100%;
    margin: 0 auto;
    position: relative;
    padding: 0 70px;
}

.projects-viewport{
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    padding: 40px 0;
}

.projects-track {
    display: flex;
    gap: var(--card-gap);
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: nowrap;
    padding: 40px 20px;
    transition: transform 350ms ease;
}

.project-card {          
    background: #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    padding: 18px 18px 46px;     
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
    transition: transform 180ms ease, box-shadow 180ms ease;
    flex: 0 0 var(--card-w);
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.14);
}

.project-img {
    width: 100%;
    height: 170px; 
    border-radius: 10px;
    overflow: hidden;
    background: #d7c5c5;
    margin-bottom: 16px;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;           
    display: block;
}

.project-content .project-title {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.15;
}

.project-content p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.45;
    opacity: 0.9;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    background:  rgba(196, 209, 247, 0.293);
    border: 1px solid rgba(0,0,0,0.08);
}

.project-link {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 22px;
    height: 22px;
    display: inline-block;
    opacity: 0.85;
}

.project-link::after {
    content: "↗";
    position: absolute;
    inset: 0;
    font-size: 20px;
    line-height: 22px;
    text-align: center;
}

.project-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.projects-arrow{
    position:absolute;
    top:50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: rgb(17, 29, 66);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 10px 15px;
    opacity: .75;
    z-index: 5; 
}

.projects-arrow:hover{
    opacity: 1;
}

.projects-arrow.left{
    left: 18px;
}

.projects-arrow.right{
    right: 18px;
}

.about-me{
    display: flex;
    width: 100vw;
    height: 100vh;
    flex-wrap: wrap;
}

.intro{
  flex: 1;
  width: auto;
  max-width: 520px;
  padding: 0;
  box-sizing: border-box;
  text-align: left;

}

.home .intro h1{
    font-size: clamp(15px, 2vw, 24px);
    margin-bottom: 12px;
}

.home .intro p{
    margin: 0 0 16px 0;
    line-height: 1.7;
    font-size: clamp(14px, 1.2vw, 16px);
    opacity: 0.9;
}

.CV{
    display: inline-block;
    margin-top: 0px;
    border-radius: 50%;
    padding: 0 5px 0 5px;
    border: 1px solid rgb(17,29,66);
    text-decoration: none;
}

.home .intro a:hover{
  background: rgba(196, 209, 247,0.293);
}

.experience{
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    padding-top: 40px;   
    gap: 40px;
}

.experience .work{
    width:50%;
    padding: 20px;
    padding-left: 30px;
}

.experience .education{
    width: 50%;
    padding: 20px;
}

a, a:visited, a:hover, a:active {
  color: inherit; 
}

.timeline {
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.timeline::before{
    content: '';
    position: absolute;
    left: 215px;
    top: 25px;
    bottom: 0px;
    width: 2px;
    background-color: rgb(196, 209, 247);
}

.timeline-item{
    display: flex;
    gap: 20px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 209px;
    top: 25px;
    width: 14px;
    height: 14px;
    background: rgb(196, 209, 247);
    border: 2px solid rgb(196, 209, 247);
    border-radius: 50%;
}

.timeline-item h3 {
  margin-bottom: 5px;
}

.timeline-item p{
  margin-top: 5px;
}

.ex-details{
    position: relative;
    z-index: 1;
    padding-left: 24px;
}

.year{
    min-width: 100px;
    flex-shrink: 0; 
    padding-right: 20px;
}

.topic-group{
    padding-bottom: 20px;
}

.topic{
    border: 1px solid rgb(196, 209, 247);
    border-radius: 30px;
    padding: 2px 10px 2px 10px;
    background-color:rgba(196, 209, 247, 0.293);
    color: black;
}


@media (max-width: 860px){
  .home-bottom{
    width: min(92vw, 1100px);
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .home .intro{
    text-align: center;
  }
}