/* Base */
:root{
  --bg:#fff;
  --ink:#111;
  --muted:#666;
  --line:#e6e6e6;
  --accent:#ff00ff;
  --sidebar-w: 280px;
  --radius:12px;
}

*{box-sizing:border-box}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* App layout: left + right, full viewport height */
.app{
  display:grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height:100vh;  /* makes the split-pane fill the screen */
}

/* Sidebar */
.sidebar{
  border-right:1px solid var(--line);
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:16px;
  min-width:0;
}
.brand{
  font-weight:700;
  font-size:18px;
}
.nav{
  display:flex; flex-direction:column; gap:6px;
}
.nav-section{
  margin-top:6px;
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
}
.nav-link{
  display:block;
  padding:8px 10px;
  border-radius:8px;
  color:inherit;
  text-decoration:none;
}
.nav-link:hover{
  background:#f6f6f6;
}
.nav-link.active,
.nav-link[aria-current="page"]{
  background:#eefaf8;
  color:var(--accent);
  font-weight:600;
}

.side-footer{
  margin-top:auto;
  padding-top:12px;
  border-top:1px solid var(--line);
}
.side-footer a{color:inherit; text-decoration:none}
.side-footer a:hover{color:var(--accent)}

/* Right panel (independently scrollable) */
.panel{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.scrollpane{
  height:100%;           /* fill the split-pane */
  overflow-y:auto;       /* independent scroll on the right */
  padding:24px clamp(16px, 4vw, 40px);
}

/* Content styling */
.view{max-width:900px; margin:0 auto}
h1{font-size:28px; line-height:1.25; margin:0 0 12px}
p{margin:0 0 14px}
a{color:var(--accent)}

figure{margin:16px 0}
figure img{
  width:100%; height:auto; display:block;
  border:1px solid var(--line); border-radius:var(--radius);
}
figcaption{font-size:14px; color:var(--muted); margin-top:6px}

.hero img{
  aspect-ratio: 16/10;          /* crop nicely even if large */
  object-fit: cover;
}

.page-footer{
  margin:28px auto 8px;
  padding-top:16px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:14px;
  max-width:900px;
}

/* Mobile: stack columns */
@media (max-width: 820px){
  .app{grid-template-columns: 1fr}
  .sidebar{border-right:0; border-bottom:1px solid var(--line)}
}

/* Make any image inside the right-side content look consistent */
.view img{
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Optional: a narrower figure when you don't want full width */
figure.narrow img{
  max-width: 640px;       /* tweak to your taste */
  margin-inline: auto;    /* center it */
}
/*for 3d model*/
#avatar{
  width:100%;
  aspect-ratio:16/10;
  min-height:300px;
  max-height:min(60vh,560px);
  display:block;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:#f6f6f6;
}

/* About layout: text left, image right */
.about-grid{
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* text wider than image */
  gap: 20px;
  align-items: start;
}

/* Typography tweaks for the intro */
.about-text h1{ margin-top: 0; margin-bottom: 10px; }

/* Photo styling (inherits your radius/border if you used .view img) */
.about-photo img{
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* keep a nice portrait box without getting huge */
  aspect-ratio: 4 / 5;      /* crop if the source is very tall/wide */
  object-fit: cover;
  max-height: min(60vh, 520px);
}

/* Stack on mobile */
@media (max-width: 900px){
  .about-grid{ grid-template-columns: 1fr; }
  .about-photo{ order: 2; }  /* image below text on small screens */
}
 

/*------------- carousel --------------------*/

<div class="carousel">
  <input type="radio" name="slides" id="slide1" checked>
  <input type="radio" name="slides" id="slide2">
  <input type="radio" name="slides" id="slide3">
  <input type="radio" name="slides" id="slide4">

  <div class="track">
    <div class="slide"><img src="assets/project/dial.png" alt="Dial prototype"></div>
    <div class="slide"><img src="assets/project/proximity.png" alt="Proximity test"></div>
    <div class="slide"><img src="assets/project/rabbit.png" alt="Rabbit model"></div>
    <div class="slide"><img src="assets/project/translation.png" alt="Translation experiment"></div>
  </div>

  <div class="dots">
    <label for="slide1" aria-label="Slide 1"></label>
    <label for="slide2" aria-label="Slide 2"></label>
    <label for="slide3" aria-label="Slide 3"></label>
    <label for="slide4" aria-label="Slide 4"></label>
  </div>
</div>
Replace your carousel CSS with this
css
Copy code
.carousel {
  position: relative;
  width: 100%;
  max-width: 800px;         /* tweak as you like */
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
}

/* Hide radios */
.carousel input[name="slides"] { display: none; }

/* Horizontal track of slides */
.track {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease;
}

/* Each slide takes full viewport width */
.slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Consistent window height; change to 4/3, 1/1, etc. */
  aspect-ratio: 16 / 9;
  background: #f6f6f6; /* neutral backplate behind images */
}

/* Prevent image warping */
.slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;  /* keeps aspect ratio, shows full image */
  display: block;
}

/* Slide positions */
#slide1:checked ~ .track { transform: translateX(0%); }
#slide2:checked ~ .track { transform: translateX(-100%); }
#slide3:checked ~ .track { transform: translateX(-200%); }
#slide4:checked ~ .track { transform: translateX(-300%); }

/* Dots */
.dots {
  text-align: center;
  margin-top: 10px;
  user-select: none;
}
.dots label {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 6px;
  background: #bbb;
  border-radius: 50%;
  cursor: pointer;
}

/* Active dot state */
#slide1:checked ~ .dots label[for="slide1"],
#slide2:checked ~ .dots label[for="slide2"],
#slide3:checked ~ .dots label[for="slide3"],
#slide4:checked ~ .dots label[for="slide4"] {
  background: #333;
}

/* Week 3 only, safely scoped */
#week-03 .w3-side-by-side {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 1rem 0;
}
#week-03 .w3-side-by-side figure {
  flex: 1 1 260px;
  max-width: 420px;
  margin: 0;
}
#week-03 .w3-side-by-side img {
  width: 100%;
  height: auto;
  display: block;
}
#week-03 .w3-side-by-side figcaption {
  text-align: center;
  margin-top: 6px;
  font-size: 0.9em;
  color: #555;
}
