/* ===== Base ===== */
body {
  background-color: #fff8e7;
  font-family: 'Roboto Slab', 'Times New Roman', serif;
}
img { max-width: 100%; height: auto; }

/* ===== Layout ===== */
.container {
  max-width: 800px;
  min-width: 200px;
  width: 100%;
  margin: 0 auto;
  padding-top: 3%;
}

.container h1 {
  text-align: left;
  font-family: 'Roboto Slab', 'Times New Roman', serif;
  font-size: 30px;
  margin-top: 0;   /* so it hugs the top next to the photo */
}

.container h1 a { color: black; text-decoration: none; }
.container h1 a:hover { color: blue; text-decoration: none; }

/* ===== Nav (unchanged) ===== */
.nav { width: 100%; max-width: 840px; float: left; }
.nav ul {
  max-width: 800px; width: 100%; margin: auto;
  float: left; padding-left: 2.5px; padding-right: 2.5px;
  margin-bottom: 3%; list-style-type: none;
}
.nav ul li {
  width: 200px; height: 22px; margin: auto; float: left;
  background-color: #B3A891; text-align: center; font-weight: bold;
  list-style-type: none; border-radius: 10px;
}
.nav ul a { text-decoration: none; color: #E7EEFF; }
.nav ul li:hover { background-color: black; }

/* ===== Header / Intro ===== */
.header {
  font-size: 20px;
  line-height: 30px;
  max-width: 800px;
  width: 100%;
  margin-bottom: 3%;
  margin-right: 2%;
}

/* your body copy */
.header p {
  font-family: 'Roboto Slab', 'Times New Roman', serif;
  font-weight: normal;
  text-align: justify;
}
.header p a {
  font-weight: bold;
  text-decoration: underline;
  color: #7F8FB3;
  text-align: left;
}
.header p a:hover { color: #ff842e; }

/* IMPORTANT:
   don't let old rules hijack the hero photo.
   (we'll float the dedicated .intro-photo instead) */
.header img { max-width: 100%; height: auto; }

/* right-aligned portrait that the text wraps around */
.intro-photo{
  float: right;
  width: clamp(220px, 32vw, 380px);
  margin: 0 0 14px 22px;                 /* flush to top; space to the left */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0,0,0,.12);
  shape-outside: inset(0 round 16px);    /* wrap respects rounded corners */
  shape-margin: 10px;
}
.header .intro-photo img{
  display: block;
  width: 100%;
  height: auto;
}

/* ensure the header container expands around the float */
.header::after { content: ""; display: block; clear: both; }

.header h4 { margin-left: 1%; }
.header ul { list-style-type: square; }

.more { font-weight: bold; text-decoration: underline; }

.selected {
  max-width: 800px; width: 100%; height: 25px; text-align: center;
  font-family: 'Roboto Slab', 'Times New Roman', serif; font-size: 15px;
  margin-bottom: 1%;
}

/* ===== Cards / Boxes (unchanged) ===== */
.outbox {
  width: 220px; height: 220px; border-style: solid; border-width: 1px;
  float: left; margin-left: 2%; margin-right: 2%; margin-bottom: 2%;
  -webkit-box-shadow: 5px 5px 5px 5px rgba(10, 10, 10, 0.4);
  box-shadow: 5px 5px 5px 5px rgba(10, 10, 10, 0.4);
  background-color: white; border-radius: 5px;
}
.outbox:hover { opacity: 0.50; }
.outbox a { text-decoration: none; color: black; }
.outbox h1,
.resume .outbox h1 {
  font-family: 'Roboto Slab', 'Times New Roman', serif;
  font-size: 12px; font-weight: bold; text-align: center;
}
.outbox hr { width: 100px; }
.box { width: 150px; height: 150px; background: white; margin: auto; }
.box img { width: 100%; height: 100%; }

/* ===== About ===== */
.about {
  width: 100%; max-width: 800px;
  border-bottom: 1px solid #ccc;
  margin-bottom: -4px;
  font-family: 'Roboto Slab', 'Times New Roman', serif;
}
.abouttext {
  font-family: 'Roboto Slab', 'Times New Roman', serif;
  font-size: 14px; line-height: 1em; color: black;
}

/* ===== Resume ===== */
.resume { float: left; width: 100%; max-width: 800px; text-align: left; }
.resume h1 { font-family: 'Roboto Slab', 'Times New Roman', serif; font-size: 22px; color: #888; text-align: left; }
.resume h2 { font-family: 'Roboto Slab', 'Times New Roman', serif; font-size: 18px; color: black; line-height: 10px; }
.resume h3 {
  font-family: 'Roboto Slab', 'Times New Roman', serif; font-size: 18px;
  color: black; line-height: 10px; font-style: italic;
}
.resume p { font-family: 'Roboto Slab', 'Times New Roman', serif; font-size: 18px; }
.resume li { font-family: 'Roboto Slab', 'Times New Roman', serif; font-size: 16px; }

/* ===== Footer ===== */
.footer {
  font-family: 'Roboto Slab', 'Times New Roman', serif;
  width: 100%; text-align: center;
  border-top: 1px solid #ccc; margin-top: 3%; display: inline;
}
.footer p { font-size: 14px; }   /* fix the accidental 180px */
.footer ul { width: 100%; list-style-type: none; margin-left: auto; margin-right: auto; }
.footer ul li { width: 100%; margin-left: auto; margin-right: auto; }

/* ===== Misc ===== */
.row { width: 800px; height: 220px; margin: 0; clear: both; }

/* ===== Responsive ===== */
@media (max-width: 760px){
  .intro-photo{ float: none; width: auto; margin: 10px 0 16px; }
}

/* Desktop wrap */
.intro-photo{
  float:right;
  width: clamp(200px, 27vw, 320px);
  margin: 0 0 14px 22px;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 8px 22px rgba(0,0,0,.12);
  shape-outside: inset(0 round 16px);
  shape-margin:10px;
}
.header .intro-photo img{
  display:block;
  width:100%;
  height:auto;
}
/* Ensure section clears the float */
.header::after{ content:""; display:block; clear:both; }

@media (max-width:760px){
  .intro-photo{
    float:none;
    width:100vw;                     /* span the viewport */
    max-width:100vw;
    margin:0 calc(50% - 50vw) 16px;  /* negative side margins to bleed */
    border-radius:0;                 /* typical hero look */
    box-shadow:none;
    shape-outside:none;
    shape-margin:0;
  }
}


