/* Normoda Doley — personal site */

:root {
  --slide-h: 440px;
  --ink: #14343f;
  --muted: #517686;
  --line: #d3e3ea;
  --accent: #0d7490;
  --accent-dark: #0a5a71;
  --accent-soft: #e3f1f6;
  --bg: #ffffff;
  --bg-soft: #f1f8fb;
  --wrap: 1020px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: #0b2733;
}

/* Dark scrim so the name stays readable over any photo */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  background: linear-gradient(to bottom, rgba(6, 32, 43, 0), rgba(6, 32, 43, 0.72));
  pointer-events: none;
}

.hero img {
  width: 100%;
  height: auto;          /* follows the shape of the cropped photo */
  max-height: 360px;     /* keeps the banner slim on wide screens */
  object-fit: cover;
  object-position: center 48%;
  opacity: 0.88;
}

.hero-text {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 26px;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
  padding: 0 20px;
}

.hero-text h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 3px;
  font-weight: normal;
  text-transform: uppercase;
}

.hero-text p {
  margin: 6px 0 0;
  font-size: 16px;
  letter-spacing: 2px;
  font-family: Helvetica, Arial, sans-serif;
}

/* Slim hero for inner pages */

.hero.small img { height: 170px; max-height: 170px; }
.hero.small .hero-text { bottom: 18px; }
.hero.small .hero-text h1 { font-size: 26px; }

/* ---------- Navigation ---------- */

.nav {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 12px 24px;
  max-width: var(--wrap);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a {
  display: block;
  padding: 10px 20px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.nav a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Sections ---------- */

.section { padding: 56px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

h2 {
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: Helvetica, Arial, sans-serif;
  color: var(--muted);
  margin: 0 0 26px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

h2.sub { margin-top: 48px; }

/* ---------- About ---------- */

.about {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.about .text { flex: 1 1 auto; }

.about .photo {
  flex: 0 0 300px;
  max-width: 300px;
}

.about .photo img {
  width: 100%;
  border: 1px solid var(--line);
  padding: 6px;
  background: #fff;
}

.about p { margin: 0 0 16px; }

/* ---------- Slider ---------- */

.slider {
  position: relative;
  overflow: hidden;
}

.slides {
  display: flex;
  transition: transform 0.4s ease;
}

.slides figure {
  margin: 0;
  min-width: 100%;
}

.slides img {
  width: 100%;
  height: var(--slide-h);
  object-fit: contain;
  background: #0b2733;
}

/* Caption sits directly under its photo and travels with it */
.slides figcaption {
  color: var(--muted);
  text-align: center;
  padding: 14px 40px 0;
  font-size: 15.5px;
  line-height: 1.5;
  min-height: 62px;   /* same height on every slide so the dots never jump */
}

.slider button {
  position: absolute;
  top: calc(var(--slide-h) / 2);   /* centred on the photo, not the caption */
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--accent);
  border-radius: 4px;
  width: 42px;
  height: 52px;
  font-size: 22px;
  cursor: pointer;
  color: var(--accent-dark);
  line-height: 1;
}

.slider button:hover { background: var(--accent); color: #fff; }
.slider .prev { left: 14px; }
.slider .next { right: 14px; }

.dots { text-align: center; padding: 8px 0 0; }

.dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  border-radius: 50%;
  background: #b9d3de;
  cursor: pointer;
}

.dots span.on { background: var(--accent); }

/* ---------- Lists ---------- */

ol.list, ul.plain {
  padding-left: 0;
  list-style: none;
  margin: 0;
  counter-reset: item;
}

ol.list li {
  counter-increment: item;
  position: relative;
  padding: 16px 0 16px 46px;
  border-bottom: 1px solid var(--line);
}

ol.list li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 18px;
  width: 30px;
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 0;
  line-height: 1.4;
}

ol.list li a {
  display: inline-block;
  margin-top: 6px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  word-break: break-all;
}

.grant {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.grant .year {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
}

.grant p { margin: 4px 0 0; }

table.contact {
  border-collapse: collapse;
  width: 100%;
}

table.contact th, table.contact td {
  text-align: left;
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.contact th {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: normal;
  width: 210px;
}

td.value { word-break: break-word; }

/* ---------- Download button ---------- */

.btn {
  display: inline-block;
  margin-top: 8px;
  padding: 11px 22px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn.small {
  margin-top: 0;
  padding: 8px 16px;
  font-size: 12.5px;
}

/* ---------- Cards on home ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card {
  display: block;
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
}

.card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.card strong {
  display: block;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.card span { font-size: 15px; color: var(--muted); }

/* ---------- Footer ---------- */

.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 26px 0;
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  .about {
    display: flex;
    flex-direction: column-reverse;  /* photo first, then the text */
    gap: 24px;
  }
  .about .photo { flex: none; max-width: 100%; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero img { max-height: 260px; }
  .hero-text h1 { font-size: 22px; letter-spacing: 2px; }
  .hero-text p { font-size: 14px; }
  :root { --slide-h: 300px; }
  .slides figcaption { padding: 12px 8px 0; font-size: 14.5px; min-height: 78px; }
  .nav ul { gap: 8px; padding: 10px 16px; }
  .nav a { padding: 9px 14px; font-size: 12.5px; }
  table.contact th { width: auto; display: block; padding-bottom: 0; border: 0; }
  table.contact td { display: block; padding-top: 2px; }
}

@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
}
