/* Jaffa Lam — site stylesheet (flexbox redesign) */
:root {
  --bg: #f7f6f5;
  --text: #666666;
  --text-dark: #333333;
  --nav: #666666;
  --nav-hover: #4c3cc5;
  --accent-gold: #d3c38a;
  --panel-warm: #eeedea;
  --panel-brown: #55523f;
  --panel-contact: #4e4945;
  --news-purple: #3619cd;
  --news-year: #c4baf6;
  --news-year-alt: #6349e9;
  --news-title: #c8bfa4;
  --news-link: #fbd971;
  --menu-bar-bg: #6a6864;
  --menu-bar-text: #f0f1f3;
  --link-muted: #999999;
  --max: 900px;
  --font: Arial, Helvetica, sans-serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  font: 12px/1.5 var(--font);
  color: var(--text);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--nav-hover);
}

/* Layout shell */
.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 10px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 36px;
}

.site-nav a {
  color: var(--nav);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--nav-hover);
}

.site-brand {
  flex-shrink: 0;
}

.site-brand img {
  display: block;
  width: 94px;
  height: auto;
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 10px 24px;
}

.site-footer {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 10px 24px;
  text-align: right;
  font-size: 10px;
  color: var(--text-dark);
}

/* Home hero */
.hero {
  display: flex;
  justify-content: center;
  padding: 8px 0 16px;
}

.hero img {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
}

/* Page sections */
.page-panel {
  background: var(--panel-warm);
  color: var(--text-dark);
  padding: 20px 40px;
}

.page-panel a {
  color: var(--link-muted);
}

.page-panel a:hover {
  color: #000;
}

.page-title {
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  margin: 20px 0 0;
}

.sub-title {
  font-weight: bold;
  font-size: 13px;
  margin-top: 35px;
  margin-bottom: 8px;
}

.cv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 8px;
}

.cv-table td {
  vertical-align: top;
  padding: 2px 8px 6px 0;
}

.cv-table .table-year {
  width: 90px;
  white-space: nowrap;
}

/* News archive */
.news-panel {
  background: var(--news-purple);
  color: #fff;
  padding: 16px 20px 24px;
}

.news-panel .year {
  background: var(--news-year);
  color: var(--news-purple);
  font-weight: bold;
  padding: 6px 12px;
  margin: 16px 0 8px;
}

.news-panel .year:nth-of-type(even) {
  background: var(--news-year-alt);
  color: #fff;
}

.news-panel .record {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 10px 0;
  padding-left: 4px;
}

.news-panel .record img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  flex-shrink: 0;
}

.news-panel .record .name,
.news-panel .record .title,
.news-panel .record .page-title {
  color: var(--news-title);
}

.news-panel a {
  color: var(--news-link);
}

.news-panel a:hover {
  color: #fff;
}

/* Split panels (projects / contact) */
.split-panel {
  display: flex;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
  min-height: 472px;
}

.split-panel .split-media,
.split-panel .split-body {
  flex: 1 1 320px;
  min-height: 280px;
}

.split-panel .split-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 472px;
}

.split-panel .split-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 32px 24px;
  background: var(--panel-brown);
  color: var(--panel-warm);
  font-size: 18px;
  text-align: center;
}

.split-panel .split-body a {
  color: var(--panel-warm);
}

.split-panel .split-body a:hover {
  color: #2b2c26;
}

.split-panel.contact .split-body {
  background: var(--panel-contact);
  font-size: 16px;
}

.split-panel.contact .split-body a {
  color: var(--menu-bar-text);
}

.split-panel.contact .split-body a:hover {
  color: #9f726d;
}

/* Secondary menu bar (press / projects) */
.section-shell {
  min-height: 472px;
  background: var(--menu-bar-bg);
  padding-bottom: 24px;
}

.section-shell.press {
  background: linear-gradient(160deg, #6a6864 0%, #4e4945 55%, #3d3a36 100%);
}

.section-shell.current {
  background: linear-gradient(160deg, #5c6b5a 0%, #3e4a3c 100%);
}

.section-shell.past {
  background: linear-gradient(160deg, #6b5c4a 0%, #4a3e32 100%);
}

.menu-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--menu-bar-text);
}

.menu-bar a {
  color: var(--menu-bar-text);
  white-space: nowrap;
}

.menu-bar a:hover {
  color: var(--accent-gold);
}

.menu-bar .sep {
  width: 1px;
  height: 14px;
  background: rgba(240, 241, 243, 0.45);
  flex-shrink: 0;
}

.section-body {
  padding: 20px;
  color: #eee;
}

.section-body a {
  color: var(--accent-gold);
}

.section-body a:hover {
  color: #fff;
}

/* Generic content pages */
.content-panel {
  background: #fff;
  border: 1px solid #e4e2de;
  padding: 20px 24px;
  color: var(--text-dark);
}

.content-panel .name {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 8px;
}

.content-panel .detail {
  margin: 12px 0;
}

.content-panel img {
  margin: 8px 0;
}

.year-bar,
.yearBar {
  background: #e8e4dc;
  color: var(--text-dark);
  font-weight: bold;
  padding: 6px 12px;
  margin: 16px 0 8px;
}

.page-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 8px;
}

.page-panel table td {
  vertical-align: top;
  padding: 2px 8px 6px 0;
}

.menu-bar a + a {
  margin-left: 4px;
}

.menu-bar a + a::before {
  content: "|";
  margin-right: 10px;
  color: rgba(240, 241, 243, 0.45);
  font-weight: normal;
}

.press-record {
  margin: 10px 0 14px;
}

.press-record .info {
  color: #888;
  font-size: 11px;
}

/* Blog listing / article shell helpers */
.page-header {
  margin: 8px 0 16px;
}

.page-header h1 {
  margin: 0;
  font-size: 22px;
  color: var(--text-dark);
  font-weight: normal;
}

.romlicontainer {
  max-width: var(--max);
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-list article {
  padding-bottom: 16px;
  border-bottom: 1px solid #ddd;
}

.blog-list h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: normal;
}

.blog-list h2 a {
  color: var(--nav-hover);
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav ul {
    gap: 8px 18px;
  }

  .page-panel {
    padding: 16px 18px;
  }

  .split-panel {
    min-height: 0;
  }

  .split-panel .split-media img {
    max-height: 280px;
  }
}
