/* Base */ 
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background: #fafafa;
}

/****************   Nav Section **********************/
nav {
  background: #0f172a;
  color: #e2e8f0;
  border-bottom: 4px solid #1e293b;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;

  position: sticky;
  top: 0;
  z-index: 1000;
}

nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
}
nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/***********************  Footer Section   **************************/
footer {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem 1rem;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}
footer a { color: #93c5fd; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer a:visited { color: #93c5fd; }

/*********** Splash / Header ************************/
header.splash {
  background:
    linear-gradient(135deg, rgba(238,242,255,0.55) 0%, rgba(224,242,254,0.55) 100%),
    url("../images/back.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  padding: 3rem 1rem;
  text-align: center;
  display: grid;
  place-items: center;
  row-gap: 1rem;
  align-content: center;
  min-height: 470px;
}

header.splash h1 {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #0b3d91;
  margin: 0.25rem 0 0.5rem;
}

header.splash img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

header.splash p { margin: 0.25rem 0; }

.address { font-style: normal; color: #111111; }
.tagline { font-size: 1.05rem; font-weight: 600; color: #0b3d91; }

/************* Sections ********************/
section {
  padding-left: 1rem;
  margin-bottom: 2.5rem;
}

hr {
  border: none;
  height: 1px;
  background: #e5e7eb;
  margin: 1rem 0;
}

section h2, section h3 {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: #0b3d91;
  margin: 0 0 0.75rem;
}

section:not(.projects) {
  max-width: 1000px;
  margin: 0 auto 2.5rem;
  padding: 0 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.25rem 1.5rem 1.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
  overflow: hidden;
}

section:not(.projects) h2 {
  text-align: center;
  margin: 0 0 1rem;
}

/* Left/Right grid inside sections */
section dl {
  display: grid;
  /* 2 columns on desktop: content left (flexible), dates right (fit-content) */
  grid-template-columns: minmax(420px, 1fr) max-content;
  column-gap: 2rem;
  row-gap: 0.5rem;
  align-items: start;
}

section dt {
  font-weight: 700;
  color: #111827;
}

section dd {
  margin: 0;
  color: #374151;
  /* Right column stays on the right */
  justify-self: end;
  text-align: right;
}

section ul {
  list-style: square;
  padding-left: 1.25rem;
  margin: 0.5rem 0 0;
}

section a { color: #0b3d91; text-decoration: none; }
section a:hover { color: #0a2f6b; text-decoration: underline; }

/**************   Cards / Projects   *****************/
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.projects {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 0 0 1px #e5e7eb, 0 8px 20px rgba(0,0,0,0.04);
  padding: 0.75rem 1rem 1.25rem;
  margin: 0 auto 2.5rem;
  max-width: 1500px;
}

.projects > h2 {
  text-align: center;
  margin: 1.25rem auto 1rem;
}

.projects .card h3 {
  text-align: center;
  margin: 0 0 0.75rem;
}

.projects .card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  padding: 1rem;
}
.projects .card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 12px 20px rgba(0,0,0,0.2);
}
.projects .card img { transition: transform 0.3s ease; border-radius: 6px; }
.projects .card:hover img { transform: scale(1.05); }

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 10px 18px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.card img {
  width: auto;
  max-width: 400px;
  height: auto;
  max-height: 340px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  margin: 0 auto 1rem;
  display: block;
}

/**************   Responsiveness   *****************/
@media (max-width: 680px) {
  nav, .three-col {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  nav {
    flex-direction: column;     /* REQUIRED by tests */
    align-items: center;         /* center horizontally */
    justify-content: center;     /* center within the bar */
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
  }
  
  nav p, nav a {
    margin: 0;
    font-size: 1rem;
    line-height: 1.25;
  }

  .three-col {
    display: grid;
    max-width: 100%;
    margin: 0 auto;
    gap: 1rem;
  }

  
  /* Other mobile tweaks */
  header.splash { min-height: 470px; }
  section dl { grid-template-columns: 1fr; }
  section dd { justify-self: start; text-align: left; white-space: normal; }
}



/**************   Contact Page   *****************/
.one-col {
  max-width: 680px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr; /* REQUIRED by the test */
  gap: 1rem;
}

input, textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
}

textarea { min-height: 140px; resize: vertical; }

.one-col textarea {
  resize: both;        /* allows horizontal resizing inside the card */
  max-width: 100%;
  min-width: 260px;
  overflow: auto;
}

/**************   Contact Form Button   *****************/
button {
  background-color: #1e3a8a;
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}
button:hover { background-color: #2563eb; }

*, *::before, *::after { box-sizing: border-box; }

.one-col form button { margin-top: 0.75rem; }

/**************   Work Experience (Resume Style)   *****************/

.experience-item {
  margin-bottom: 1.8rem;
}

.row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.row.sub {
  font-weight: normal;
  font-style: italic;
  margin-top: 2px;
  margin-bottom: 6px;
}

.left {
  color: #111827;
}

.right {
  color: #6b7280;
}

.experience-item ul {
  margin: 0;
  padding-left: 1.25rem;
}