﻿/* ===== CSS Variables ===== */
:root {
  --orange: #ff5700;
  --navy: #1a1f6c;
  --white: #ffffff;
  --beige: #d6d1c4;
  --dark: #333333;
  --light-gray: #f7f7f5;
  --max-width: 960px;
  --nav-height: 64px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--dark);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--navy); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--navy);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
  text-decoration: none;
}
.nav-logo:hover { color: var(--orange); }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--orange);
}

/* Language Switcher */
.lang-switch {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 24px;
}
.lang-switch a {
  display: block;
  width: 28px;
  height: 20px;
  border-radius: 3px;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 0.2s;
  border: 1px solid rgba(255,255,255,0.2);
}
.lang-switch a:hover,
.lang-switch a.active {
  opacity: 1;
}
.lang-switch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Hero ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 48px;
  background: var(--white);
}
.hero-inner {
  max-width: 1000px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  align-items: start;
}
.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 8px;
}
.hero-text h1 span { font-weight: 300; }
.hero-text .subtitle {
  font-size: 1.2rem;
  color: var(--dark);
  margin-bottom: 8px;
}
.hero-text .institution {
  font-size: 1.05rem;
  color: #666;
  margin-bottom: 32px;
}
.hero-text .institution a { color: var(--orange); }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero Right Column */
.hero-right {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: start;
}

/* Photo */
.hero-photo {
  position: relative;
}
.hero-photo img {
  width: 300px;
  height: 380px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.hero-photo::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: -12px;
  bottom: -12px;
  border: 3px solid var(--orange);
  border-radius: 6px;
  z-index: -1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover { background: #e04d00; color: var(--white); }
.btn-outline {
  border: 2px solid var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ===== Sections ===== */
.section {
  padding: 36px 24px;
}
.section-alt {
  background: var(--light-gray);
}
.section-beige {
  background: var(--beige);
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--orange);
  display: inline-block;
}

/* ===== Bio ===== */
.bio-text p {
  margin-bottom: 6px;
  text-align: justify;
  max-width: 760px;
  line-height: 1.2;
}

/* ===== Contact Row ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.95rem;
}
.contact-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: var(--orange);
}
.twitter-embed {
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  overflow: hidden;
  max-height: 450px;
}
.twitter-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: #f7f9fa;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  text-align: center;
  gap: 10px;
  max-width: 160px;
}
.twitter-fallback svg {
  width: 32px;
  height: 32px;
  fill: var(--dark);
}
.twitter-fallback .tf-handle {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}
.twitter-fallback .tf-text {
  font-size: 0.85rem;
  color: #666;
}
.twitter-fallback .tf-btn {
  display: inline-block;
  padding: 8px 20px;
  background: #000;
  color: #fff;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.twitter-fallback .tf-btn:hover {
  background: var(--orange);
  color: #fff;
}

/* ===== Research Page ===== */
.page-header {
  padding: 100px 24px 40px;
  background: var(--navy);
  color: var(--white);
  text-align: center;
}
.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-header p {
  font-size: 1.3rem;
  opacity: 0.9;
}
.page-header a.ssrn-link {
  color: var(--orange);
  font-size: 1.3rem;
  font-weight: 600;
  border-bottom: 2px solid rgba(255,87,0,0.3);
  padding-bottom: 2px;
}
.page-header a.ssrn-link:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}
.page-header a { color: var(--orange); }

.paper {
  padding: 10px 0;
  border-bottom: 1px solid #e5e5e5;
}
.paper:last-child { border-bottom: none; }
.paper-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}
.paper-title .paper-number {
  color: var(--navy);
  font-weight: 700;
}
.paper-title a { color: var(--navy); text-decoration: underline; }
.paper-title a:hover { color: var(--orange); }
.paper-authors {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 4px;
}
.paper-meta {
  font-size: 0.88rem;
  color: #888;
  font-style: italic;
}
.paper-note {
  font-size: 0.85rem;
  color: var(--orange);
  margin-top: 4px;
  font-weight: 500;
}
.paper-status {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 3px;
  background: #fff3ed;
  color: var(--orange);
  margin-top: 4px;
}

/* ===== Workshop Page ===== */
.workshop-hero {
  padding: 100px 24px 40px;
  background: var(--navy);
  color: var(--white);
  text-align: center;
}
.workshop-hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.workshop-meta {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 1rem;
  opacity: 0.9;
}
.workshop-meta span { display: flex; align-items: center; gap: 6px; }

.callout {
  background: #fff3ed;
  border-left: 4px solid var(--orange);
  padding: 20px 24px;
  border-radius: 0 6px 6px 0;
  margin: 24px 0;
}
.callout strong { color: var(--orange); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
}
.detail-card {
  background: var(--white);
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 28px;
}
.detail-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.detail-card p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--beige);
  padding: 40px 24px;
  text-align: center;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--dark);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-links a:hover { color: var(--orange); }
.footer-links a svg { width: 18px; height: 18px; fill: var(--dark); }
.footer-links a:hover svg { fill: var(--orange); }
.footer-copy {
  font-size: 0.8rem;
  color: #888;
}

/* ===== Slides Section ===== */
.slides-list { margin-top: 8px; }
.slides-list li {
  padding: 12px 0;
  border-bottom: 1px solid #e5e5e5;
}
.slides-list li:last-child { border-bottom: none; }
.slides-list a { font-weight: 500; }
.slides-list .desc { font-size: 0.88rem; color: #666; margin-top: 2px; }

/* ===== Old Papers ===== */
.old-papers { margin-top: 8px; }
.old-papers .paper { opacity: 0.75; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-right { flex-direction: column; align-items: center; }
  .hero-photo { margin: 0 auto; }
  .hero-buttons { justify-content: center; }
  .hero-text h1 { font-size: 2.2rem; }

  .contact-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 16px 24px;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .nav-links.open a { padding: 12px 0; border-bottom: none; }
  .nav-toggle { display: block; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.8rem; }
  .hero-photo img { width: 240px; height: 300px; }
  .section-title { font-size: 1.5rem; }
  .page-header h1 { font-size: 1.8rem; }
  .workshop-hero h1 { font-size: 1.8rem; }
  .workshop-meta { flex-direction: column; align-items: center; gap: 8px; }
}
