@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400&display=swap');


:root{
  --sidebar-left: 100px;  /* matches .left-sidebar { left:100px } */
  --sidebar-w:    170px;  /* matches .left-sidebar { width:170px } */
  --gutter:       40px;   /* space between sidebar and content */
}

header{
  position: relative;   /* gives .navbar a positioning context */
  min-height: 120px;    /* space so it doesn't overlap the H2 */
}

.section-divider {
    border-top: 2px solid #352aff4f;
    margin-top: 1;
    margin-bottom: 1rem;
    width: 100%; 
    margin-left: auto; 
    margin-right: auto;
}

body {
    font-family: 'EB Garamond', 'Georgia', serif;
    line-height: 1.6;
    color: #333;
}

.header-content {
    padding-top: 40px; /* Adjust this value to your liking */
}

a {
    color: #1268ae; /* Replace with the color you want */
}

.header-content {
    font-family: 'EB Garamond', serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding-left: 7rem; 
}

main {
    padding: 30px 2rem;
    flex-grow: 1; 
}

.main-content {
    flex: 1;
    max-width: 900px;
    padding-left: 15rem;
    font-size: large;
}

.container {
    max-width: 1300px; 
    margin: 0 auto;    
    padding: 0 20px;   
}

li {
    font-family: 'EB Garamond', serif;
    font-weight: 100;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3 {
    font-family: 'EB Garamond', 'Georgia', serif;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a365d; /* Professional dark blue */
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; border-bottom: 1px solid #eaeaea; padding-bottom: 0.5rem; }
h3 { font-size: 1.5rem; }

h4 {
    margin-bottom: 0;
    font-weight: 100;
    font-style: italic;
    color: rgb(0, 0, 0);
    font-size: large;
}

p {
    font-weight: 200;
    margin-bottom: 1.5rem;
}

.profile-picture {
    width: 170px;
    height: 180px;
    display: block;
    border-radius: 5%;
    margin-bottom: 30px;
    background: url('data/profile_pic/profile_gs.jpg') no-repeat center center; /* Replace with your grayscale image */
    background-size: cover;
    transition: background 0.2s ease-in-out;
}

.profile-picture:hover {
    background: url('data/profile_pic/profile_color.jpg') no-repeat center center; /* Replace with your colored image */
    background-size: cover;
}

/* Enhanced left sidebar with name */
.left-sidebar {
    position: fixed;
    left: 100px;
    top: 68px; /* Move down from 0px to 100px */
    width: 170px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    z-index: 100;
}

.sidebar-name {
    font-family: 'EB Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #1a365d;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 0.8rem;
}

/* Ensure the sidebar name styling looks professional */
.sidebar-name h1 {
    font-size: 1.8rem;
    margin: 0;
    padding: 0;
}

.left-sidebar .header-content {
    padding-top: 0;
    padding-left: 0;
    text-align: center;
    justify-content: center;
}

.left-sidebar .header-content h1 {
    font-size: 2.5rem;
    font-weight: 500;
    margin: 0 0 1.3rem;
    color: #1a365d;
    line-height: 1.2;
}

.profile-picture {
    margin-bottom: 20px; /* Reduced from 30px */
}

.location {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
  
.location-icon {
    width: 20px;
    height: 20px;
}

.location span {
    margin-left: 10px;
    font-size: 12px;
    color: rgb(0, 0, 0);
}

.social-media {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: left;
    margin-bottom: 20px;
    text-decoration: none;
}
  
.social-icon {
    margin: 5px 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.social-icon span {
    margin-left: 10px;
    font-size: 12px;
    color: rgb(0, 0, 0);
}
  
.social-icon img {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}
  
.social-icon:hover img {
    transform: scale(1.3);
}

.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carousel::before,
.carousel::after {
    content: "";
    position: absolute;
    top: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, white 0%, transparent 100%);
    z-index: 2;
}

.carousel::after {
    right: 0;
    transform: rotateZ(180deg);
}

/* .carousel__track {
    display: flex;
    animation: scrollPX 40s linear infinite;
    will-change: transform;
} */

.carousel__track {
    display: flex;
    will-change: transform;
    transform: translate3d(0,0,0); /* force GPU compositing on Safari */
}

/* How many cards should fit in the viewport width */
.carousel { --cards-per-view: 4; }  /* desktop default */

.carousel__img {
  flex: 0 0 calc(100% / var(--cards-per-view));
  height: clamp(160px, 28vw, 300px);   /* responsive height cap */
  margin: 5px;
  object-fit: cover;
  border-radius: 2%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Tweak per breakpoint if you want */
@media (max-width: 1024px) {
  .carousel { --cards-per-view: 3; }
}
@media (max-width: 768px) {
  .carousel { --cards-per-view: 2.5; }  /* shows 2 full + a peek */
}
@media (max-width: 480px) {
  .carousel { --cards-per-view: 2; }
}


.project-container {
    display: flex;
    width: 80%;
    align-items: center;
    margin-bottom: 3rem;
}

.project-description {
    flex: 1;
    margin-right: -100px;
}

.project-video {
    flex: 1;
    margin-left: 140px;
    margin-right: -150px;
}

.project-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-video-container {
    position: relative;
    cursor: pointer;
}

.project-video-container video {
    width: 80%;
    height: auto;
    border-radius: 5%;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s;
    border-radius: 5%;
}

.overlay p {
    color: white;
    font-size: 1.5rem;
    text-align: center;
    padding: 0 1rem;
}

.project-video-container:hover .overlay {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.5);
}



ul {
    padding-left: 1rem;
}

li {
    margin-bottom: 1rem;
}


footer {
    background-color: #ffffff;
    padding: 2rem;
    border-top: 1px solid #e5e5e5;
    margin-top: 100px;
    box-sizing: border-box;
    width: 100%;
}

.footer-content {
    justify-content: space-between;
    text-align: center;
    margin: 0 auto;
    padding-left: 3rem
}

@media (min-width: 1024px){
  .navbar{
    position: absolute;
    top: 75px;
    left: calc(var(--sidebar-left) + var(--sidebar-w) + var(--gutter));
    display: flex;
    gap: 20px;
  }
  .main-content{
    padding-left: calc(var(--sidebar-left) + var(--sidebar-w) + var(--gutter));
  }
}

.navbar a {
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    margin: 10px;
    color: #dddddd;
    text-decoration: none;
    transition: color 0.3s ease;
}
  
.navbar a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #343a40;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}
  
.navbar a:hover {
    color: #36414d;
 }
  
.navbar a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* This section to make it suitable for iphone */
@media screen and (max-width: 1024px) {
    .left-sidebar {
      position: static;
      padding: 0;
      text-align: center;
    }
  
    .main {
      display: block;
    }
  
    .main-content {
      padding-left: 0;
    }

    .demos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {

    .navbar {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 20px;
        left: auto;
    }
    
    .navbar a {
        margin: 5px 0;
    }
  
    .left-sidebar .social-icon {
      font-size: 14px;
    }
  
    .left-sidebar .location-icon {
      width: 14px;
      height: 14px;
    }

    .main-content {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.3rem; }
    
    .project-container {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .project-description {
        margin-right: 0;
    }
    
    .project-video {
        margin-right: 0;
    }
    
    .demos-grid {
        gap: 1.5rem;
    }
  
    .container {
      width: 95%;
    }
  
    .project-container {
      flex-direction: column;
    }
  
    .project-video {
      margin-left: 0;
      margin-top: 20px;
    }
  
    .project-video-container video {
      width: 100%;
    }
  
    .overlay {
      width: 100%;
    }
    
}

/* @media screen and (min-width: 769px) and (max-width: 1023px) {
    .left-sidebar {
        left: 30px;
    }
    
    .navbar {
        left: 240px;
    }
    
    .main-content {
        padding-left: 240px;
        max-width: 100%;
    }
    
    .project-container {
        width: 100%;
    }
    
    .project-video {
        margin-left: 60px;
        margin-right: -60px;
    }

    .demos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
} */

@media screen and (max-width: 480px) {
    .header-content {
        padding: 0;
        flex-direction: column;
    }
    
    .main-content {
        padding: 0 0.5rem;
    }
    
    .demo-info h3 {
        font-size: 1.1rem;
    }
    
    .demo-info p {
        font-size: 0.9rem;
    }
    
    .tech-tags {
        gap: 5px;
    }
    
    .tech-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    .footer-content {
        padding-left: 0;
    }

    .demos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Elegant Demonstrations Section */
.demos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
}
  
.demo-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.demo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.demo-video-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background-color: #f8f9fa;
    padding-top: 56.25%;
}

.demo-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    display: block;
}

.demo-info {
    padding: 1.5rem;
}

.demo-info h3 {
    font-size: 1.3rem;
    margin: 0 0 0.8rem;
    color: #1a365d;
}

.demo-info p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 1.2rem;
    color: #4a5568;
}

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

.tech-tag {
    background-color: #e6f7ff;
    color: #0072b1;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    transition: all 0.2s ease-in-out;
}

.tech-tag:hover {
    background-color: #bae7ff;
    transform: translateY(-2px);
}


.section-divider {
    margin: 3rem 0;
    border: none;
    height: 2px;
    background-color: #352aff4f;
    width: 100%;
}

/* Utilities */
.underline { text-decoration: underline; }
.font-bold { font-weight: 700; }

/* Unscramble */
.linklike { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font: inherit; }
.hidden { display: none !important; }
#email-scramble { display:inline-block; white-space:nowrap; letter-spacing:.02em; }
#email-scramble .ch { display:inline-block; will-change: transform; }


/* Robots section */
.robots-intro { padding-left: 0; padding-right: 0; }

.robot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  /* padding: 0 0; */
  align-items: start;
}

.robot-card {
  text-align: center;
  padding: 6px 4px;
}

.robot-card img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.robot-card p {
  margin-top: 6px;
  font-size: 0.95rem;
  line-height: 1.3;
}

/* Respect your link color; underline for clarity */
.robot-card a { text-decoration: underline; }

/* Mobile tweaks */
@media screen and (max-width: 480px) {
  .robot-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}

/* ===== Mobile-only fixes ===== */

/* Mobile: make "unscramble" look like normal link color */
@media screen and (max-width: 768px) {
  #unscramble.linklike {
    color: #000 !important;          /* match <a> color */
    -webkit-appearance: none;        /* avoid iOS blue button tint */
    appearance: none;
  }
  #unscramble.linklike:hover,
  #unscramble.linklike:focus {
    color: #36414d;                  /* optional: match your link hover */
    outline: none;
  }
}

/* 2) Robots grid: consistent sizing and alignment on phones/tablets */
@media screen and (max-width: 768px) {
  .robot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .robot-card { padding: 6px 0; }
  .robot-card img {
    width: 100%;
    max-width: 140px;
    aspect-ratio: 1 / 1;   /* keep square */
    height: auto;
    object-fit: cover;
    display: block;
    margin: 0 auto;
  }
}
@media screen and (max-width: 480px) {
  .robot-card img { max-width: 120px; }
}

/* 3) Writing cards: prevent squeeze */
@media screen and (max-width: 1024px) {       /* tablets and below: 2 columns */
  .demos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 600px) {        /* phones: single column */
  .demos-grid { grid-template-columns: 1fr; }
  .demo-info h3 { font-size: 1.1rem; }
  .demo-info p  { font-size: 0.95rem; }
}

/* Mobile: hide navbar entirely */
@media screen and (max-width: 768px) {
  .navbar { display: none !important; }
}

@media screen and (max-width: 768px) {
  /* hide the four <br> immediately after .left-sidebar */
  .left-sidebar + br,
  .left-sidebar + br + br,
  .left-sidebar + br + br + br,
  .left-sidebar + br + br + br + br { display: none; }
}

@keyframes scrollPX {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--loop-distance, 0px))); }
}