/* h-nu site. Colours: navy #00102e, ice blue #e8eef6, orange #F0AD4E for links on navy. */

* { box-sizing:border-box }
html { color:#e3ebf7; background:#081c36; font: 17px/1.55 "Segoe UI",Arial,sans-serif }
body, figure { margin:0 }
a { color:#9ed0ff; text-underline-offset:.2em }
a:hover { text-decoration:underline }
a:focus-visible { outline:3px solid #4297cb; outline-offset:3px }
h1,h2 { line-height:1.1; letter-spacing:-.03em; text-wrap:balance }
.load-error { padding:2rem 6% }

/* Header: logo, name, tagline and menu */
header { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:8px max(6%, calc((100% - 1100px) / 2)); min-height:100px; background-color:#00102e; color:white }
header a { color:white; text-decoration:none }
.brand { display:flex; align-items:center; gap:18px }
.brand img { width:84px; height:84px }
.brand-name { display:block; font-size:30px; font-weight:650; line-height:1.15 }
.brand-tag { display:block; font-size:17px; font-weight:400 }
nav { display:flex; flex-wrap:wrap; align-items:center; gap:.3rem 1.6rem; font-size:19px }

/* Home: opening over the hero image */
.hero { background-color:#00102e; color:white; background-image:linear-gradient(90deg,rgba(0,16,46,.80),rgba(0,16,46,.2)),url('images/hero.png'); background-size:cover; background-position:center; min-height:calc(100svh - 100px); display:grid; align-content:center; padding:5vh max(6%, calc((100% - 1100px) / 2)) }
.hero h1 { font-size:clamp(1.35rem,2.4vw,1.9rem); font-weight:600; letter-spacing:normal; margin:0 0 .85rem }
.hero-bio { max-width:32rem; margin-bottom:1.4rem }
.hero-bio p { font-size:clamp(1.05rem,2vw,1.3rem); margin:0 0 .75rem }
.hero a { color:white }
.hero-actions { display:flex; flex-direction:column; align-items:flex-start; gap:.6rem }

/* Home: bands under the opening */
.wrap { width:min(88%,1100px); margin:auto; padding:2rem 0 }
.wrap > h2 { font-size:clamp(2rem,4vw,3.8rem); margin:.4em 0 .65em }

/* Light band with the projects, one row per project: text left, figure right */
.projects { background:#e8eef6; color:#152d47; box-shadow:0 0 0 100vmax #e8eef6; clip-path:inset(0 -100vmax); padding-block:clamp(2.5rem,5vw,5rem) }
.projects article { border-top:1px solid #c3d0de; padding-block:clamp(2rem,4vw,3.8rem); display:grid; grid-template-columns:1.2fr 1fr; gap:5%; align-items:start }
.projects h3 { margin:0; max-width:22ch; font-size:clamp(1.45rem,2.1vw,2.1rem); line-height:1.1; letter-spacing:-.03em; text-wrap:balance }
.projects a { color:#164e78 }
.projects footer { font-size:.86rem }
.projects figure { min-width:0 }
.projects img { max-width:100%; max-height:460px; display:block; margin:auto; border-radius:12px }
/* Charts and diagrams (.png) blend into the band; photos (.jpg) keep their own background. */
.projects img[src$=".png"] { mix-blend-mode:multiply }
.projects figcaption { font-size:.86rem; color:#344e68; max-width:48ch; margin:.9rem auto 0 }

/* Dark band of plain text, such as Photonics */
.text-band { background:#00102e; color:#e3ebf7; box-shadow:0 0 0 100vmax #00102e; clip-path:inset(0 -100vmax); padding-block:clamp(2.5rem,5vw,5rem) }
.text-band p { max-width:65ch; font-size:1.05rem }
.text-band a { color:#F0AD4E }

/* About */
.about-intro { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); column-gap:5%; align-items:start; padding:clamp(2.5rem,6vw,5rem) max(6%, calc((100% - 1100px) / 2)); background:#00102e; color:#e3ebf7 }
.about-intro h1 { font-size:clamp(2rem,4vw,3.2rem); margin:0 0 1rem; color:white }
.about-intro p { font-size:1.12rem; max-width:40rem }
.about-intro blockquote { margin:1.4rem 0; padding-left:1.2rem; border-left:3px solid #F0AD4E }
.about-intro blockquote p { font-size:1.12rem; font-style:italic }
.about-intro > div { display:contents }
.about-intro > div > * { grid-column:1 }
.about-intro > div > p, .about-intro > div > blockquote { margin-top:0 }
.about-intro > img { grid-column:2; grid-row:3 / span 2; width:200px; height:auto; border-radius:12px; justify-self:start; align-self:start; display:block; margin:0 0 0 1.5rem }
.about-facts { background:#e8eef6; color:#152d47; padding:clamp(2.5rem,5vw,4.5rem) max(6%, calc((100% - 1100px) / 2)) }
.about-facts .cols { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:2.5rem 5% }
.about-facts h2 { font-size:1.45rem; margin:0 0 .8rem }
.about-facts ul { padding:0; list-style:none }
.about-facts li { border-top:1px solid #c3d0de; padding:.7rem 0; font-size:1.02rem }
.about-facts li:last-child { border-bottom:1px solid #c3d0de }
/* The bold words at the start of a line, such as **Naquidis**, sit on their own line. */
.about-facts li > strong:first-child { display:block; font-weight:600 }
.about-facts a { color:#164e78 }

/* News, Contact and Thanks: dark title band, then a light band */
.page-top { background:#00102e; color:white; padding:clamp(2.5rem,6vw,4.5rem) max(6%, calc((100% - 1100px) / 2)) 2rem }
.page-top h1 { font-size:clamp(2rem,4vw,3.2rem); margin:0 }
.page-body { background:#e8eef6; color:#152d47; padding:clamp(2rem,4vw,3.5rem) max(6%, calc((100% - 1100px) / 2)) }
.page-body .inner { max-width:900px }
.page-body a { color:#164e78 }

/* News: date on the left, item on the right */
.entry { display:grid; grid-template-columns:9.5rem 1fr; gap:1.5rem; align-items:start; border-top:1px solid #c3d0de; padding:1.8rem 0 }
.entry:last-child { border-bottom:1px solid #c3d0de }
.entry .date { font-size:1rem; color:#344e68; padding-top:.3rem; margin:0 }
.entry h2 { font-size:clamp(1.3rem,2vw,1.6rem); margin:0 0 .6rem }
.entry p { margin:0 0 .6rem; font-size:1rem }

/* Contact form */
.contact-form { max-width:640px; display:grid; gap:1.1rem; margin-top:1.5rem }
.contact-form label { display:grid; gap:.35rem; font-weight:600; font-size:1rem }
.contact-form input, .contact-form textarea { font:inherit; font-weight:400; color:#152d47; background:#fff; border:1px solid #92a9be; border-radius:8px; padding:.7rem .8rem }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline:3px solid #4297cb; outline-offset:1px; border-color:#4297cb }
.contact-form textarea { min-height:10rem; resize:vertical }
.contact-form button { justify-self:start; font:inherit; font-weight:600; background:#F0AD4E; color:#00102e; border:0; border-radius:8px; padding:.75rem 1.4rem; cursor:pointer }
.contact-form button:hover { background:#f5c27a }
/* Field that people never see. Robots fill it in, and the message is then dropped. */
.contact-form .trap { position:absolute; left:-9999px }
.contact-note { font-size:.92rem; color:#344e68; max-width:640px }

/* Phones */
@media(max-width:680px) {
  header { align-items:flex-start }
  nav { justify-content:flex-end }
  .hero { background-color:rgba(0,16,46,.55); background-blend-mode:multiply }
  .projects article { grid-template-columns:1fr; gap:1rem }
  .about-intro { grid-template-columns:1fr }
  .about-intro > img { grid-column:1; grid-row:auto; margin:.5rem 0 0 }
  .entry { grid-template-columns:1fr; gap:.3rem }
}
/* Small phones: logo, name and the four menu items stay on one row. */
@media(max-width:480px) {
  header { gap:.5rem; padding-inline:4% }
  .brand-tag { display:none }
  .brand { gap:8px }
  .brand img { width:44px; height:44px }
  .brand-name { font-size:22px; white-space:nowrap }
  nav { font-size:15px; gap:.2rem .75rem; flex-wrap:nowrap }
  nav a { padding-block:2px }
}
@media(max-width:350px) {
  .brand img { width:38px; height:38px }
  .brand-name { font-size:20px }
  nav { font-size:14px; gap:.2rem .6rem }
}
