/* ============================================
   RYO KANNO — v2
   Matches mechphnguyen.com: top nav, beige bg,
   wide full-page layout, large Playfair serif
   ============================================ */

:root {
  --bg:        #e8e4d9;   /* warm beige matching reference */
  --bg-card:   #ddd9cd;
  --text:      #1c1b18;
  --text-mid:  #4a4740;
  --text-muted:#7a7670;
  --accent:    #4a6741;   /* muted olive-green, matches reference buttons */
  --accent-hover: #37502f;
  --border:    rgba(0,0,0,0.12);
  --nav-h:     64px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
  --max-w:     1100px;
  --pad-x:     5vw;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

/* ============================================
   TOP NAV
   ============================================ */

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.site-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-mid);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--text);
  font-weight: 500;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.2rem;
}

/* Mobile nav dropdown */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem var(--pad-x);
  gap: 0.8rem;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  font-size: 0.95rem;
  color: var(--text-mid);
  text-decoration: none;
  padding: 0.3rem 0;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  display: flex;
  align-items: flex-start;
  gap: 4rem;
  padding: 5rem var(--pad-x) 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-left { flex: 1; min-width: 0; }

.hero-left h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--accent);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.hero-affil {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-affil a {
  color: var(--text-mid);
  text-decoration: underline;
  text-decoration-color: var(--border);
  transition: color 0.15s;
}
.hero-affil a:hover { color: var(--accent); }

.hero-bio {
  font-size: 1.05rem;
  line-height: 1.78;
  color: var(--text);
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-ctas {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.65rem 1.3rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.63rem 1.3rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover { border-color: var(--text); }

.hero-right { flex-shrink: 0; }

.hero-right img {
  width: 260px;
  height: 300px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.photo-placeholder {
  width: 240px;
  height: 280px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ============================================
   SHARED SECTION LAYOUT
   ============================================ */

.section {
  padding: 3.5rem var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
}

.inner-section {
  /* same as .section but used inside page layouts */
}

.full-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 var(--pad-x);
}

.section h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  color: var(--text);
}

/* ============================================
   EXPERTISE GRID
   ============================================ */

.expertise-section { padding-top: 3rem; 
 .expertise-banner-wrapper {
  width: stretch;
 }
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.expertise-item {
  background: var(--bg-card);
  border-radius: 4px;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--border);
}

.expertise-item h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.expertise-item p {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ============================================
   EXPERTISE BANNER
   ============================================ */

.expertise-banner-wrapper {
  width: 100%;
  margin: 0 0 2.5rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.expertise-banner-img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
}

/* safety net: no image can ever overflow the page */
img { max-width: 100%; }

@media (max-width: 860px) {
  .expertise-banner-img { height: 180px; }
}

@media (max-width: 480px) {
  .expertise-banner-img { height: 140px; }
}

/* ============================================
   RECENT LIST
   ============================================ */

.recent-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.recent-list li {
  display: flex;
  gap: 2.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.65;
}

.recent-list li:first-child { border-top: none; }
.recent-list li:last-child { border-bottom: none; }

.recent-date {
  flex-shrink: 0;
  width: 72px;
  color: var(--text-muted);
  font-size: 0.84rem;
  padding-top: 0.05rem;
}

.recent-text { flex: 1; }
.recent-text a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); }
.recent-text a:hover { color: var(--accent); }

/* ============================================
   PAGE HERO (inner pages)
   ============================================ */

.page-hero {
  padding: 4rem var(--pad-x) 2.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.page-sub {
  font-size: 1rem;
  color: var(--text-muted);
}

.page-sub a { color: var(--accent); text-decoration: none; }
.page-sub a:hover { text-decoration: underline; }

/* ============================================
   ABOUT — long-form text
   ============================================ */

.about-lead {
  font-size: 1.08rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
  max-width: 680px;
  color: var(--text);
}

.about-lead a { color: var(--accent); text-decoration: none; }
.about-lead a:hover { text-decoration: underline; }

/* ============================================
   CV ENTRIES (Education / Work)
   ============================================ */

.cv-entry {
  display: flex;
  gap: 2.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}

.cv-entry:last-child { border-bottom: none; }

.cv-meta {
  flex-shrink: 0;
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.15rem;
}

.cv-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.cv-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cv-body h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.cv-place {
  font-size: 0.87rem;
  color: var(--text-mid);
  margin-bottom: 0.35rem;
}

.cv-place a {
  color: var(--text-mid);
  text-decoration: underline;
  text-decoration-color: var(--border);
}

.cv-body p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.65;
}

.cv-note {
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
  margin-top: 0.2rem;
}

/* ============================================
   PROJECT CARDS
   ============================================ */

.project-card {
  display: flex;
  gap: 2.5rem;
  padding: 2.5rem 0;
  align-items: flex-start;
}

.project-image-placeholder,
.project-card img,
.project-card video {
  flex-shrink: 0;
  width: 320px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  border-radius: 4px;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.project-info { flex: 1; }

.project-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.project-info h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
}

.project-info p {
  font-size: 0.93rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 0.6rem;
}

.project-outcome {
  font-size: 0.85rem !important;
  color: var(--accent) !important;
  font-style: italic;
}

/* ============================================
   PUBLICATIONS
   ============================================ */

.pub-entry {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-entry:last-child { border-bottom: none; }

.pub-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem;
  border-radius: 2px;
  margin-bottom: 0.45rem;
}

.pub-pill.spotlight { background: #dce8d4; color: #3a5c31; }
.pub-pill.cover     { background: #d4e8e0; color: #1f5940; }
.pub-pill.finalist  { background: #f0e8d0; color: #7a5a10; }

.pub-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.pub-title a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s;
}

.pub-title a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.pub-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-style: italic;
}

.scholar-cta {
  padding: 2.5rem var(--pad-x) 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
  font-size: 1rem;
}

.scholar-cta a { color: var(--accent); text-decoration: none; font-weight: 500; }
.scholar-cta a:hover { text-decoration: underline; }

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: 1.8rem var(--pad-x);
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: block; }

  .hero {
    flex-direction: column-reverse;
    gap: 2rem;
    padding-top: 3rem;
  }

  .photo-placeholder,
  .hero-right img {
    width: 160px;
    height: 190px;
  }

  .project-card {
    flex-direction: column;
    gap: 1.2rem;
  }

  .project-image-placeholder,
  .project-card img {
    width: 100%;
    height: 200px;
  }

  .cv-entry {
    flex-direction: column;
    gap: 0.4rem;
  }

  .cv-meta {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .full-divider { margin: 0 1.5rem; }
}

@media (max-width: 480px) {
  :root { --pad-x: 1.5rem; }

  .recent-list li { flex-direction: column; gap: 0.3rem; }
  .recent-date { width: auto; }
}
