/* =========================================================
   Junbong Jang — Modern Portfolio Styles (Minimal / Monochrome)
   ========================================================= */

:root {
  --ink: #111214;
  --ink-soft: #5b5f6b;
  --ink-faint: #9aa0ac;
  --paper: #ffffff;
  --paper-alt: #f4f5f7;
  --line: #e6e7eb;
  --accent: #2f5df5;
  --accent-ink: #ffffff;
  --shadow-sm: 0 2px 10px rgba(17, 18, 20, 0.05);
  --shadow-md: 0 10px 28px rgba(17, 18, 20, 0.08);
  --shadow-lg: 0 25px 55px rgba(17, 18, 20, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1120px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: "Poppins", "Inter", sans-serif;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

section { position: relative; }

.section-head {
  max-width: 640px;
  margin: 0 0 3rem;
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 700;
}

.section-head p {
  color: var(--ink-soft);
  margin-top: 0.8rem;
  font-size: 1.05rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(.22,.61,.36,1), transform 0.7s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Navigation
   ========================================================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 22px 0;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav.scrolled {
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: var(--paper-alt);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 24px;
    right: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }
  .nav-links.open {
    max-height: 320px;
    opacity: 1;
    margin-top: 12px;
  }
  .nav-links a { text-align: center; padding: 12px 16px; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  background: var(--paper);
  color: var(--ink);
  padding: 168px 0 100px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-alt);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}

.hero h1 .gradient-text {
  color: var(--accent);
}

.hero .role {
  margin-top: 14px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hero p.lead {
  margin-top: 22px;
  font-size: 1.04rem;
  color: var(--ink);
  max-width: 560px;
}

.hero p.lead a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.hero p.lead a:hover { border-bottom-color: var(--accent); }

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--accent); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.hero-socials {
  margin-top: 30px;
  display: flex;
  gap: 14px;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 1.05rem;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.social-icon:hover {
  transform: translateY(-3px);
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.hero-photo-wrap {
  position: relative;
  justify-self: center;
}

.hero-photo-ring {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 28px;
  padding: 0;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.hero-photo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  display: block;
  background: var(--paper-alt);
}

.hero-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
}

.hero-badge .num {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
}

.hero-badge .label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.2;
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-actions, .hero-socials { justify-content: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-photo-wrap { order: -1; }
  .hero-badge { left: 50%; transform: translateX(-50%); }
}

/* =========================================================
   Info cards (education / contact) — sits below hero
   ========================================================= */
.info-strip {
  background: var(--paper-alt);
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }

.info-card .icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.info-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.info-card .sub {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.info-card .time {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.info-card a { color: var(--ink); text-decoration: none; }
.info-card a:hover { color: var(--accent); }

@media (max-width: 820px) {
  .info-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Projects
   ========================================================= */
.projects-section {
  padding: 100px 0 60px;
  background: var(--paper);
}

.project-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ink-faint);
}

.project-media {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  aspect-ratio: 4/3;
  padding: 12px;
}

.project-media img,
.project-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease;
}

.project-card:hover .project-media img,
.project-card:hover .project-media video {
  transform: scale(1.06);
}

.project-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-alt);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  width: fit-content;
}

.project-body h3 {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.project-body .authors {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.project-body .authors b { color: var(--ink); }

.project-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.pill-link:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

@media (max-width: 760px) {
  .project-card { grid-template-columns: 1fr; }
}

/* =========================================================
   Talks
   ========================================================= */
.talks-section {
  padding: 100px 0;
  background: var(--paper-alt);
}

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

.talk-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.talk-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--ink-faint); }

.talk-media {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--paper-alt);
  border-bottom: 1px solid var(--line);
  padding: 12px;
}
.talk-media img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.4s ease; }
.talk-card:hover .talk-media img { transform: scale(1.05); }

.talk-body { padding: 22px 24px 26px; }

.talk-body p { margin: 0 0 8px; font-size: 0.92rem; color: var(--ink-soft); }
.talk-body p strong { color: var(--ink); }

@media (max-width: 760px) {
  .talks-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: var(--ink-faint);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid var(--ink);
}

.site-footer a { color: #d7d9de; text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* Back to top */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 900;
}
.back-to-top:hover { background: var(--accent); }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
