/* ==========================================================================
   Komla Gnona, personal site
   Plain CSS, no build step. Every color is a variable in the :root blocks
   below, so re-theming the site is a handful of edits in one place.
   ========================================================================== */

:root {
  /* --- light (default) --- */
  --paper:        #FAFAF8;
  --surface:      #FFFFFF;
  --line:         #DDE3E2;

  --ink:          #1D2530;
  --ink-soft:     #4B5560;
  --heading:      #0F2A4A;

  --accent:       #1E7F72;
  --accent-hover: #28998A;
  --accent-soft:  #E3F0EE;
  --accent-line:  #CFE4E0;
  --accent-ink:   #145C52;

  /* dark panels: the hero and the contact footer, in both themes */
  --panel-from:   #0A1D33;
  --panel-to:     #0F2A4A;
  --panel-solid:  #0F2A4A;
  --panel-ink:    #EDF2F1;
  --panel-soft:   #B9C6D4;
  --panel-body:   #D3DCE3;
  --panel-eyebrow:#7FBDB2;
  --panel-fine:   #7C8DA0;
  --panel-rule:   rgba(255, 255, 255, .14);
  --panel-btn-ink:#08221D;

  --nav-bg:       rgba(250, 250, 248, .92);

  --serif: 'Fraunces', ui-serif, Georgia, serif;
  --sans:  'IBM Plex Sans', ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1040px;
}

/* Dark theme follows the OS, and the toggle's data-theme overrides it. */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:        #0B1622;
    --surface:      #101E2E;
    --line:         #1E3247;

    --ink:          #E6ECF2;
    --ink-soft:     #9FB0C0;
    --heading:      #F2F6FA;

    --accent:       #4FC3B0;
    --accent-hover: #6FD8C6;
    --accent-soft:  #12312C;
    --accent-line:  #1C4740;
    --accent-ink:   #7FD9C7;

    --panel-from:   #050D16;
    --panel-to:     #0A1B2C;
    --panel-solid:  #0A1B2C;

    --nav-bg:       rgba(11, 22, 34, .92);
  }
}

:root[data-theme="dark"] {
  --paper:        #0B1622;
  --surface:      #101E2E;
  --line:         #1E3247;

  --ink:          #E6ECF2;
  --ink-soft:     #9FB0C0;
  --heading:      #F2F6FA;

  --accent:       #4FC3B0;
  --accent-hover: #6FD8C6;
  --accent-soft:  #12312C;
  --accent-line:  #1C4740;
  --accent-ink:   #7FD9C7;

  --panel-from:   #050D16;
  --panel-to:     #0A1B2C;
  --panel-solid:  #0A1B2C;

  --nav-bg:       rgba(11, 22, 34, .92);
}

/* --------------------------------------------------------------- base --- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--heading);
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
}

p { margin: 0 0 1rem; }
ul, ol, dl { margin: 0; padding: 0; }

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--accent-soft);
  border-radius: 2px;
  padding: .08em .35em;
}

em { color: inherit; }
strong { color: var(--ink); font-weight: 600; }

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; }

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

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-head { margin-bottom: 44px; max-width: 62ch; }
.section-head h2 { font-size: clamp(24px, 3vw, 30px); }
.section-head p { color: var(--ink-soft); margin: 12px 0 0; font-size: 15.5px; }

section { padding: 84px 0; border-bottom: 1px solid var(--line); }

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

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 60px;
}

.nav__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: .01em;
}

.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: 14px;
  margin-left: auto;
}
.nav__links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--accent); border-color: var(--accent); }

.nav__actions { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 7px;
  display: grid;
  place-items: center;
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}

.nav__toggle { display: none; flex-direction: column; gap: 3.5px; padding: 9px 7px; }
.nav__toggle span {
  display: block;
  width: 16px; height: 1.6px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.1px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.1px) rotate(-45deg); }

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

.hero {
  background: linear-gradient(180deg, var(--panel-from) 0%, var(--panel-to) 100%);
  color: var(--panel-ink);
  padding: 96px 0 84px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg,  rgba(255,255,255,.035) 0 1px, transparent 1px 96px);
  pointer-events: none;
}
.hero__inner { position: relative; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--panel-eyebrow);
  margin-bottom: 18px;
}

.hero__name {
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.05;
  color: #fff;
  max-width: 14ch;
}

.hero__role {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--panel-soft);
  margin: 14px 0 0;
}

.hero__thesis {
  margin: 28px 0 0;
  max-width: 56ch;
  font-size: 16.5px;
  color: var(--panel-body);
}

.hero__cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--mono);
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 2px;
  text-decoration: none;
  letter-spacing: .02em;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-block;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn--solid {
  background: var(--accent);
  color: var(--panel-btn-ink);
  font-weight: 500;
}
.btn--solid:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn--ghost {
  border-color: rgba(255, 255, 255, .35);
  color: var(--panel-ink);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* -------------------------------------------------------------- about --- */

.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.about__text h2 { font-size: clamp(24px, 3vw, 30px); margin-bottom: 18px; }
.about__text p { color: var(--ink-soft); font-size: 15.5px; }

.fact-card {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 3px;
  padding: 22px 24px;
}
.fact-card dt {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-top: 18px;
}
.fact-card dt:first-child { margin-top: 0; }
.fact-card dd {
  margin: 5px 0 0;
  font-size: 14.5px;
  color: var(--heading);
  line-height: 1.5;
}

/* "verify this" style link: quieter than the surrounding text, with a small
   outbound arrow so it reads as leaving the site */
.fact-card .verify {
  display: inline-block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 1px;
}
.fact-card .verify::after { content: " \2197"; }
.fact-card .verify:hover { border-bottom-color: var(--accent); }

/* ----------------------------------------------------------- timeline --- */

.timeline {
  list-style: none;
  border-left: 2px solid var(--line);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.tl-item { position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -33.5px;
  top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--accent);
}

.tl-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 6px;
  letter-spacing: .01em;
}
.tl-role { font-size: 18px; font-weight: 600; }
.tl-org {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  margin: 3px 0 0;
}

.tl-desc { list-style: none; margin-top: 12px; display: grid; gap: 7px; max-width: 66ch; }
.tl-desc li {
  position: relative;
  padding-left: 15px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.tl-desc li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 5px; height: 5px;
  background: var(--accent);
  opacity: .6;
}

/* ----------------------------------------------------------- projects --- */

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.proj {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 26px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.proj:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px -12px rgba(15, 42, 74, .35);
}

.proj__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.proj__title { font-size: 17.5px; font-weight: 600; line-height: 1.3; }
.proj__desc { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

.metric { text-align: right; flex-shrink: 0; }
.metric__val {
  font-family: var(--mono);
  font-size: 20px;
  color: var(--accent-ink);
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
}
.metric__label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 2px 0 0;
}

.roc { display: block; width: 56px; height: 40px; margin-left: auto; }
.roc__diag  { stroke: var(--accent-line); stroke-width: 2; stroke-dasharray: 3 4; }
.roc__curve { fill: none; stroke: var(--accent); stroke-width: 3; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; list-style: none; }
.tags li {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 4px 9px;
  border-radius: 2px;
}

.projects__footer {
  margin: 28px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}
.projects__footer a { color: var(--accent); }

/* ------------------------------------------------------------- skills --- */

.skills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.skill-col h3 {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
  margin-bottom: 14px;
}
.skill-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.skill-col li {
  font-size: 14px;
  color: var(--ink-soft);
  padding-left: 14px;
  position: relative;
}
.skill-col li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 5px; height: 5px;
  background: var(--accent);
}

/* ------------------------------------------------------------ contact --- */

.contact {
  background: var(--panel-solid);
  color: var(--panel-ink);
  padding: 72px 0 48px;
}
.contact h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); max-width: 16ch; }
.contact p { color: var(--panel-soft); margin: 14px 0 0; max-width: 52ch; font-size: 15px; }

.contact__links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 30px; }

.contact__fine {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--panel-rule);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--panel-fine);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ------------------------------------------------------------ reveals --- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------- responsive --- */

@media (max-width: 900px) {
  .skills { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
  .projects { grid-template-columns: 1fr; }

  .nav__toggle { display: flex; }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 4px 32px 12px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { border-top: 1px solid var(--line); }
  .nav__links a { display: block; padding: 12px 0; font-size: 15px; border-bottom: none; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 20px; }
  section { padding: 60px 0; }
  .hero { padding: 68px 0 60px; }

  .skills { grid-template-columns: 1fr; }

  .proj__top { flex-direction: column; gap: 10px; }
  .metric { text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .metric__label { margin: 0; }
  .roc { display: none; }

  .contact__fine { flex-direction: column; }
}

/* -------------------------------------------------------------- print --- */

@media print {
  .nav, .hero__cta, .contact__links, .icon-btn { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero, .contact { background: #fff; color: #000; padding: 1rem 0; }
  .hero::before { display: none; }
  .hero__name, .contact h2 { color: #000; }
  .hero__role, .hero__thesis, .contact p { color: #333; }
  section { padding: 1rem 0; }
  .proj, .fact-card, .skill-col { break-inside: avoid; }
  .reveal { opacity: 1; transform: none; }
}
