/* =========================================================
   Diploma thesis website, Marcelo Rigoto, 2026
   Palette: charcoal night, boreal spruce, ember, amber, fog
   ========================================================= */

:root {
  --night: #14181d;
  --night-2: #1c2229;
  --spruce: #223028;
  --ember: #e8621f;
  --amber: #f2a33c;
  --fog: #f2f2ee;
  --fog-2: #e9eae4;
  --ink: #23281f;
  --ink-soft: #55594f;
  --line: #d5d6cd;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--fog);
}

.mono {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  letter-spacing: 0.06em;
}

h1, h2, h3 {
  font-family: "Space Grotesk", Arial, sans-serif;
  line-height: 1.15;
}

a { color: var(--ember); }

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

/* ---------------- header / nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--night);
  border-bottom: 1px solid #2a313a;
}

.site-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav .brand {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  color: var(--amber);
  text-decoration: none;
  letter-spacing: 0.12em;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav ul a {
  color: #cfd3d8;
  text-decoration: none;
  font-size: 0.92rem;
}

.site-nav ul a:hover { color: var(--amber); }

/* ---------------- hero ---------------- */

.hero {
  background: linear-gradient(180deg, #14181d 0%, #1c2229 100%);
  color: #e8eaec;
  padding: 4.5rem 1.25rem 0;
}

.hero > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  color: var(--amber);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 3rem);
  font-weight: 700;
  margin: 0 0 2rem;
  max-width: 900px;
}

.hero-meta dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem 2rem;
  margin: 0 0 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid #333b45;
  border-bottom: 1px solid #333b45;
}

.hero-meta dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8d949c;
  margin-bottom: 0.2rem;
}

.hero-meta dd {
  margin: 0;
  font-weight: 600;
  color: #f2f3f4;
}

.workplace {
  color: #aab0b6;
  font-size: 0.92rem;
  max-width: 760px;
}

.hero-actions { margin: 2rem auto 1rem; }

.button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  margin: 0 0.6rem 0.6rem 0;
  border: 1px solid var(--amber);
  border-radius: 2px;
  color: var(--amber);
  text-decoration: none;
  font-family: "Space Grotesk", Arial, sans-serif;
  font-weight: 500;
}

.button.primary {
  background: var(--ember);
  border-color: var(--ember);
  color: #fff;
}

.button:hover { background: #262d35; }
.button.primary:hover { background: #c94f14; }

.hero-graphic {
  margin: 1.5rem auto 0;
  padding-bottom: 0.75rem;
}

.hero-graphic svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero-graphic .contour {
  stroke: #39424d;
  stroke-width: 1.5;
}

.hero-graphic .contour.faint { stroke: #2b323b; }

.hero-graphic .dots circle {
  fill: var(--ember);
  opacity: 0.9;
}

.hero-graphic .days text {
  fill: #7d858e;
  font-size: 11px;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.1em;
}

.hero-graphic figcaption {
  color: #6f767e;
  font-size: 0.72rem;
  text-transform: uppercase;
  padding: 0.5rem 0 1.25rem;
}

/* ---------------- fact strip ---------------- */

.facts {
  background: var(--spruce);
  color: var(--fog);
  padding: 1.5rem 1.25rem;
}

.facts ul {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.facts .num {
  display: block;
  font-family: "Space Grotesk", Arial, sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--amber);
}

.facts .lab {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #c8cfc6;
}

/* ---------------- content sections ---------------- */

.content {
  padding: 3.5rem 1.25rem;
}

.content.alt { background: var(--fog-2); }

.content > * {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.content h2 {
  font-size: 1.7rem;
  margin: 0 0 1.5rem;
  color: var(--spruce);
}

.content h3 {
  font-size: 1.15rem;
  margin: 2rem auto 0.75rem;
  color: var(--spruce);
}

.sec-mark {
  color: var(--ember);
  font-size: 0.95rem;
  vertical-align: 0.35em;
  margin-right: 0.5rem;
}

.content p { margin: 0 auto 1rem; }

.objectives-list,
.downloads-list {
  padding-left: 1.2rem;
}

.objectives-list li { margin-bottom: 0.75rem; }

.downloads-list {
  list-style: square;
  color: var(--ink-soft);
}

.downloads-list li { margin-bottom: 0.5rem; }

/* ---------------- figures / placeholders ---------------- */

figure.placeholder {
  margin: 2rem auto;
  border: 1px dashed #b9bcae;
  background: #fbfbf8;
  padding: 0.75rem;
}

figure.placeholder img {
  display: block;
  width: 100%;
  height: auto;
}

figure.placeholder figcaption {
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding-top: 0.6rem;
}

/* ---------------- table ---------------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

thead th {
  background: var(--spruce);
  color: var(--fog);
  font-family: "Space Grotesk", Arial, sans-serif;
  font-weight: 500;
}

tbody tr:nth-child(even) { background: #ecece5; }

/* ---------------- footer ---------------- */

.site-footer {
  background: var(--night);
  color: #aab0b6;
  padding: 2.5rem 1.25rem;
  font-size: 0.9rem;
}

.site-footer p {
  max-width: 1100px;
  margin: 0 auto 0.5rem;
}

.site-footer .mono {
  color: var(--amber);
  letter-spacing: 0.12em;
}

.site-footer a { color: var(--amber); }

/* ---------------- small screens ---------------- */

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero { padding-top: 3rem; }
  .site-nav { gap: 0.75rem; }
}

/* ---------------- application section ---------------- */

.content figure {
  margin: 2rem auto;
}

.content figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.content figure figcaption {
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding-top: 0.6rem;
}

.ui-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 1.5rem;
  align-items: start;
}

.ui-grid figure { margin: 1rem 0; }

.ui-grid figure img {
  width: auto;
  max-width: 100%;
  background: var(--night);
}

.embed-wrap {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%;
  background: var(--night);
  border: 1px solid var(--line);
  margin: 1rem auto 0.75rem;
}

.embed-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
