/* ==========================================================================
   Jungchan Ryu — portfolio design
   Layout inspired by a Next.js + Tailwind developer portfolio, rebuilt as
   plain CSS so GitHub Pages can serve it without a build step.
   Colours: edit the tokens below. Content: assets/js/data.js
   ========================================================================== */

:root {
  --dark: #1b1b1b;
  --light: #f5f5f5;
  --primary: #b63e96;
  --primary-dark: #58e6d9;

  --bg: var(--light);
  --fg: var(--dark);
  --accent: var(--primary);
  --muted: rgba(27, 27, 27, 0.75);
  --soft: rgba(27, 27, 27, 0.08);
  --card: var(--light);
  --ring-line: rgba(0, 0, 0, 0.4);

  --font: "Montserrat", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 8rem;
  --header-h: 8rem;
  color-scheme: light;
}

html.dark {
  --bg: var(--dark);
  --fg: var(--light);
  --accent: var(--primary-dark);
  --muted: rgba(245, 245, 245, 0.75);
  --soft: rgba(245, 245, 245, 0.1);
  --card: var(--dark);
  --ring-line: rgba(255, 255, 255, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  transition: background-color 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--fg); color: var(--bg); padding: 0.6rem 1rem; border-radius: 0.5rem;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; padding-inline: var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 20;
  width: 100%;
  height: var(--header-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
}
.nav-desktop, .header-right { display: flex; align-items: center; }
.nav-desktop { gap: 0 2.5rem; }
.nav-link {
  position: relative;
  text-decoration: none;
  padding: 0.25rem 0;
}
.nav-link .underline {
  position: absolute; left: 0; bottom: -0.15rem;
  height: 1px; width: 0; background: currentColor;
  transition: width 0.3s ease;
}
.nav-link:hover .underline, .nav-link[aria-current="page"] .underline { width: 100%; }

.logo-wrap { position: absolute; left: 50%; top: 2rem; transform: translateX(-50%); }
.logo {
  width: 4rem; height: 4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--dark); color: var(--light);
  border: 2px solid transparent;
  font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.2s ease;
}
html.dark .logo { border-color: var(--light); }
.logo:hover { animation: logo-colors 2s linear infinite; transform: scale(1.05); }
@keyframes logo-colors {
  0%, 100% { background: #121212; }
  20% { background: rgb(131, 58, 180); }
  40% { background: rgb(253, 29, 29); }
  60% { background: rgb(252, 176, 69); }
  80% { background: rgb(131, 58, 180); }
}

.social { display: flex; align-items: center; gap: 0 1rem; }
.icon-link {
  display: inline-grid; place-items: center;
  width: 1.75rem; height: 1.75rem;
  transition: transform 0.2s ease;
}
.icon-link:hover { transform: translateY(-2px) scale(1.1); }
.icon-link svg { width: 100%; height: 100%; }
.icon-link.github { color: var(--fg); }
.icon-link.mail { color: #ea4335; }
.icon-link.scholar { color: #4285f4; }
.icon-link.lab { color: var(--accent); }
.icon-link.linkedin { color: #0a66c2; }
.icon-link.orcid { color: #a6ce39; }
.icon-link.web { color: var(--fg); }

.theme-toggle {
  margin-left: 0.75rem;
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--fg); color: var(--bg);
  transition: transform 0.2s ease;
}
.theme-toggle:hover { transform: rotate(-20deg) scale(1.08); }
.theme-toggle svg { width: 1.3rem; height: 1.3rem; }
.theme-toggle .sun { display: none; }
html.dark .theme-toggle .sun { display: block; }
html.dark .theme-toggle .moon { display: none; }

.lang-switch {
  margin-left: 0.75rem;
  display: inline-flex; align-items: center;
  border: 2px solid var(--fg); border-radius: 999px;
  overflow: hidden; font-size: 0.8rem; font-weight: 600;
}
.lang-switch button {
  border: 0; background: transparent; padding: 0.2rem 0.55rem; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  width: 2.5rem; height: 2.5rem; padding: 0;
  border: 0; background: transparent; cursor: pointer;
}
.menu-toggle span {
  display: block; width: 1.5rem; height: 2px; border-radius: 2px;
  background: var(--fg); transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle span + span { margin-top: 0.3rem; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(0.45rem) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-0.45rem) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; top: 50%; left: 50%; z-index: 30;
  transform: translate(-50%, -50%) scale(0.9);
  min-width: 70vw; padding: 2rem 1.5rem;
  flex-direction: column; align-items: center; gap: 1.5rem;
  border-radius: 1rem;
  background: rgba(27, 27, 27, 0.9); color: var(--light);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
html.dark .mobile-menu { background: rgba(245, 245, 245, 0.85); color: var(--dark); }
.mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.mobile-menu .nav-link { font-size: 1.1rem; }
.mobile-menu .icon-link.github, .mobile-menu .icon-link.web { color: currentColor; }
.mobile-menu .lang-switch { border-color: currentColor; margin: 0; }
.mobile-menu .lang-switch button[aria-pressed="true"] { background: currentColor; }
.mobile-menu .lang-switch button[aria-pressed="true"] span { color: var(--light); }
html.dark .mobile-menu .lang-switch button[aria-pressed="true"] span { color: var(--dark); }
.mobile-menu .theme-toggle { margin: 0; background: currentColor; }
.mobile-menu .theme-toggle svg { color: var(--light); }
html.dark .mobile-menu .theme-toggle svg { color: var(--dark); }
.mobile-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.menu-open .mobile-menu { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

/* ---------- Page layout ---------- */
main { flex: 1; width: 100%; overflow-x: clip; }
.page { padding-block: 2rem 4rem; }
.page-title {
  text-align: center;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 700;
  margin: 1rem auto 4rem;
  max-width: 18ch;
  overflow-wrap: normal;
}
.section-title {
  text-align: center;
  font-size: clamp(2.25rem, 5vw, 5rem);
  font-weight: 700;
  margin: 8rem 0 4rem;
}
.section-title.small { font-size: clamp(2rem, 3.5vw, 3rem); margin: 6rem 0 3rem; }

/* Animated headline: words rise one after another */
.anim-text .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px);
  animation: word-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(0.35s + var(--i) * 0.08s);
}
@keyframes word-in { to { opacity: 1; transform: none; } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* Offset-shadow frame (about photo, cards) */
.frame {
  position: relative;
  border: 2px solid var(--fg);
  border-radius: 2rem;
  background: var(--card);
  padding: 2rem;
}
.frame::before {
  content: "";
  position: absolute; z-index: -1;
  top: 0; right: -0.75rem;
  width: 102%; height: 103%;
  border-radius: 2rem;
  background: var(--fg);
}
.frame img { border-radius: 1rem; width: 100%; height: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 0.6rem;
  border: 2px solid transparent;
  background: var(--fg); color: var(--bg);
  font-weight: 600; font-size: 1.1rem; text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--bg); color: var(--fg); border-color: var(--fg); }
.btn svg { width: 1.2rem; height: 1.2rem; }
.btn-small { font-size: 0.95rem; padding: 0.45rem 1rem; }
.text-btn { font-weight: 500; font-size: 1.1rem; text-decoration: underline; text-underline-offset: 4px; }
.text-btn:hover { color: var(--accent); }

/* ---------- Home ---------- */
.home {
  position: relative;
  min-height: calc(100vh - var(--header-h) - 5rem);
  display: flex; align-items: center;
  padding-block: 1rem 4rem;
}
.hero { display: flex; align-items: center; gap: 4rem; width: 100%; }
.hero-visual { width: 45%; display: flex; justify-content: center; }
.hero-photo {
  position: relative;
  width: min(100%, 26rem);
  isolation: isolate;
}
.hero-photo::after {
  content: "";
  position: absolute; z-index: -2;
  inset: -18% -22%;
  border-radius: 50%;
  background: repeating-radial-gradient(var(--ring-line) 2px, var(--bg) 5px, var(--bg) 60px);
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 70%);
          mask-image: radial-gradient(circle, #000 35%, transparent 70%);
}
.hero-photo .frame { padding: 1.25rem; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.hero-copy { width: 55%; }
.hero-copy h1 {
  font-size: clamp(2.25rem, 4.2vw, 3.75rem);
  font-weight: 700;
  line-height: 1.12;
}
.hero-role {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.hero-copy p.lead { margin: 1.5rem 0 2rem; font-size: 1rem; font-weight: 500; max-width: 42rem; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

.hire-badge {
  position: absolute; left: 1rem; bottom: 0; z-index: 5;
  width: 12rem; height: 12rem;
  display: grid; place-items: center;
}
.hire-badge svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 10s linear infinite; fill: var(--fg); }
.hire-badge text { font-family: var(--font); font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; }
.hire-badge a {
  position: relative;
  width: 5.5rem; height: 5.5rem;
  display: grid; place-items: center; text-align: center;
  border-radius: 50%;
  background: var(--fg); color: var(--bg);
  border: 2px solid var(--fg);
  font-weight: 600; font-size: 0.95rem; line-height: 1.2;
  text-decoration: none; box-shadow: 0 0 0 2px var(--bg);
  transition: background-color 0.2s, color 0.2s;
}
.hire-badge a:hover { background: var(--bg); color: var(--fg); }
@keyframes spin { to { transform: rotate(360deg); } }

.wave-art {
  position: absolute; right: 2rem; bottom: 2rem;
  width: 8rem; display: flex; align-items: center; justify-content: space-between; height: 6rem;
}
.wave-art span {
  width: 0.55rem; border-radius: 1rem; background: var(--accent);
  height: 100%;
  transform-origin: center;
  animation: wave 1.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.13s);
}
@keyframes wave { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 3fr 3fr 2fr;
  gap: 4rem;
  align-items: start;
}
.eyebrow {
  font-size: 1.1rem; font-weight: 700; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem; letter-spacing: 0.03em;
}
.bio p { font-weight: 500; margin-bottom: 1rem; }
.bio a.inline-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.bio a.inline-link:hover { text-decoration: underline; }
.interests { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; padding: 0; list-style: none; }
.interests li {
  padding: 0.3rem 0.8rem; border-radius: 999px;
  border: 2px solid var(--fg); font-size: 0.85rem; font-weight: 600;
}
.stats { display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; text-align: right; height: 100%; }
.stat-number { display: block; font-size: 4.25rem; font-weight: 700; line-height: 1; }
.stat-label { display: block; font-size: 1.15rem; font-weight: 500; color: var(--muted); margin-top: 0.4rem; }

/* Skills */
.skills {
  position: relative;
  width: 100%; height: 100vh; max-height: 52rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: repeating-radial-gradient(var(--ring-line) 2px, var(--bg) 5px, var(--bg) 100px);
}
.skill {
  position: absolute; left: 50%; top: 50%;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-weight: 600; white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translate(-50%, -50%);
  transition: transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: default;
}
.skill:hover { filter: brightness(1.15); }
.skills.in .skill:not(.center) { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))); }
.skill.center { padding: 2rem; border-radius: 50%; font-size: 1.1rem; box-shadow: 0 0 0 2px var(--bg), 0 10px 30px rgba(0, 0, 0, 0.25); z-index: 1; }

/* Timeline (experience / education) */
.timeline { position: relative; width: 75%; margin: 0 auto; }
.timeline-line {
  position: absolute; left: calc(2.35rem - 2px); top: 0;
  width: 4px; height: 100%;
  background: var(--fg);
  transform-origin: top;
  transform: scaleY(var(--progress, 0));
}
.timeline ul { list-style: none; margin: 0; padding: 0; }
.timeline li {
  width: 60%; margin: 0 auto 4rem;
  display: flex; flex-direction: column;
}
.timeline li:last-child { margin-bottom: 0; }
.li-icon {
  position: absolute; left: 0;
  width: 4.7rem; height: 4.7rem;
  margin-top: -0.6rem;
  transform: rotate(-90deg);
}
.li-icon circle { fill: var(--bg); }
.li-icon .track { stroke: var(--accent); stroke-width: 1; }
.li-icon .progress { stroke: var(--accent); stroke-width: 5; fill: none; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); }
.li-icon .dot { fill: var(--accent); }
.timeline h3 { font-size: 1.5rem; font-weight: 700; text-transform: capitalize; }
.timeline h3 .at { color: var(--accent); }
.timeline .meta { display: block; font-weight: 500; color: var(--muted); margin: 0.2rem 0 0.4rem; }
.timeline p { font-weight: 500; }

/* ---------- Projects ---------- */
.feature-card {
  position: relative;
  display: flex; align-items: center; gap: 3rem;
  width: 100%;
  padding: 3rem;
  border: 2px solid var(--fg);
  border-radius: 1.5rem;
  border-bottom-right-radius: 2.5rem;
  background: var(--card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  margin-bottom: 6rem;
}
.feature-card::before {
  content: "";
  position: absolute; z-index: -1;
  top: 0; right: -0.75rem;
  width: 101%; height: 103%;
  border-radius: 2.5rem; border-bottom-right-radius: 1.5rem;
  background: var(--fg);
}
.feature-media {
  width: 50%;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.feature-card:hover .feature-media img { transform: scale(1.05); }
.feature-body { width: 50%; display: flex; flex-direction: column; align-items: flex-start; }
.kicker { color: var(--accent); font-weight: 500; font-size: 1.25rem; }
.feature-body h3 { font-size: clamp(1.6rem, 2.4vw, 2.25rem); font-weight: 700; margin: 0.5rem 0; }
.feature-body p { font-weight: 500; margin: 0.5rem 0 1rem; }
.feature-body .status { color: var(--muted); font-size: 0.95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.25rem 0 1.25rem; padding: 0; list-style: none; }
.tags li { font-size: 0.8rem; font-weight: 600; padding: 0.15rem 0.65rem; border-radius: 999px; background: var(--soft); }
.feature-actions { display: flex; align-items: center; gap: 1rem; }

.award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 3rem 2.5rem;
}
.award-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.75rem;
  border: 2px solid var(--fg);
  border-radius: 1.5rem;
  background: var(--card);
}
.award-card::before {
  content: "";
  position: absolute; z-index: -1;
  top: 0; right: -0.6rem;
  width: 102%; height: 103%;
  border-radius: 2rem; border-bottom-right-radius: 1.5rem;
  background: var(--fg);
}
.award-rank { font-size: 3.5rem; font-weight: 700; line-height: 1; color: var(--accent); }
.award-rank.word { font-size: 2.5rem; }
.award-sub { font-weight: 600; color: var(--muted); margin: 0.5rem 0 0.75rem; font-size: 0.9rem; }
.award-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.award-card p { font-size: 0.92rem; font-weight: 500; margin-bottom: 1rem; flex: 1; }
.award-card .cert { margin: 0 0 1rem; border-radius: 0.75rem; overflow: hidden; border: 1px solid var(--soft); }
.award-card .cert img { width: 100%; height: 9rem; object-fit: cover; object-position: top; }
.award-card .text-btn { font-size: 1rem; align-self: flex-start; }

/* ---------- Publications ---------- */
.pub-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 2.5rem;
}
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  padding: 0.4rem 1rem; border-radius: 999px;
  border: 2px solid var(--fg); background: transparent;
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.search {
  display: flex; align-items: center; gap: 0.5rem;
  border: 2px solid var(--fg); border-radius: 999px;
  padding: 0.35rem 1rem; min-width: min(100%, 20rem);
}
.search svg { width: 1.1rem; height: 1.1rem; flex: none; }
.search input { border: 0; background: transparent; color: var(--fg); font: inherit; width: 100%; outline: none; }

.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-item {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.5rem 1.75rem;
  border: 2px solid var(--fg);
  border-right-width: 5px; border-bottom-width: 5px;
  border-radius: 0.9rem;
  background: var(--card);
  transition: transform 0.2s ease;
}
.pub-item:hover { transform: translateY(-3px); }
.pub-top { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.4rem; }
.pub-type { font-weight: 600; color: var(--accent); font-size: 0.95rem; }
.pub-year { font-weight: 600; color: var(--accent); }
.pub-item h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.5rem; }
.pub-authors { font-size: 0.95rem; color: var(--muted); }
.pub-authors strong { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.pub-venue { font-style: italic; font-weight: 500; margin-top: 0.2rem; }
.pub-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.pill-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.85rem; border-radius: 999px;
  border: 2px solid var(--fg); background: transparent;
  font-size: 0.85rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.pill-link:hover, .pill-link[aria-expanded="true"] { background: var(--fg); color: var(--bg); }
.bibtex {
  margin-top: 1rem; position: relative;
  background: var(--soft); border-radius: 0.6rem; padding: 1rem;
}
.bibtex pre { margin: 0; overflow-x: auto; font-size: 0.8rem; line-height: 1.5; }
.bibtex .pill-link { position: absolute; top: 0.6rem; right: 0.6rem; background: var(--bg); }
.empty { text-align: center; font-weight: 500; color: var(--muted); padding: 2rem; }

/* ---------- News ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  margin-bottom: 1.75rem;
  padding: 1.1rem 1.5rem;
  border: 2px solid var(--fg);
  border-right-width: 5px; border-bottom-width: 5px;
  border-radius: 0.9rem;
  background: var(--card);
}
.news-main { display: flex; flex-direction: column; gap: 0.35rem; }
.news-cat { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.news-text { font-weight: 600; font-size: 1.05rem; }
.news-text a.inline-link { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.news-res { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.news-res a, .news-res button {
  font-size: 0.9rem; font-weight: 600; color: var(--accent);
  text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
}
.news-res a:hover, .news-res button:hover { text-decoration: underline; }
.news-date { flex: none; color: var(--accent); font-weight: 600; font-size: 0.95rem; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 2.5rem;
}
.gallery-card { margin: 0; }
.gallery-card button {
  display: block; width: 100%; padding: 0; border: 2px solid var(--fg);
  border-radius: 1.25rem; overflow: hidden; cursor: zoom-in; background: var(--card);
  aspect-ratio: 4 / 5;
}
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-card button:hover img { transform: scale(1.06); }
.gallery-card figcaption { padding: 0.9rem 0.25rem 0; }
.gallery-card time { color: var(--accent); font-weight: 600; font-size: 0.85rem; }
.gallery-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0.2rem 0; }
.gallery-card p { font-size: 0.9rem; color: var(--muted); font-weight: 500; }

/* Lightbox */
.photo-dialog {
  border: 0; padding: 0; background: transparent; color: var(--light);
  max-width: min(92vw, 70rem); max-height: 92vh;
}
.photo-dialog::backdrop { background: rgba(10, 10, 10, 0.88); }
.photo-dialog img { max-height: 76vh; width: auto; margin: 0 auto; border-radius: 0.75rem; }
.photo-dialog .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; }
.photo-dialog p { text-align: center; font-size: 0.9rem; }
.photo-dialog button {
  border: 2px solid var(--light); background: transparent; color: var(--light);
  border-radius: 999px; padding: 0.3rem 0.9rem; font-weight: 600; cursor: pointer;
}
.photo-dialog button:hover { background: var(--light); color: var(--dark); }

/* ---------- Footer ---------- */
.site-footer {
  width: 100%;
  border-top: 2px solid var(--fg);
  padding: 2rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-weight: 500; font-size: 1.05rem;
}
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .heart { color: var(--accent); }

/* ---------- Page transition ---------- */
.transition-panels { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.transition-panels div {
  position: absolute; inset: 0;
  transform: translateX(-100%);
}
.transition-panels div:nth-child(1) { background: var(--primary); }
.transition-panels div:nth-child(2) { background: var(--light); }
.transition-panels div:nth-child(3) { background: var(--dark); }
html.dark .transition-panels div:nth-child(1) { background: var(--primary-dark); }
.transition-panels div { animation: panel-out 0.8s cubic-bezier(0.7, 0, 0.3, 1) both; }
.transition-panels div:nth-child(2) { animation-delay: 0.1s; }
.transition-panels div:nth-child(3) { animation-delay: 0.2s; }
.transition-panels.leave div { animation: panel-in 0.55s cubic-bezier(0.7, 0, 0.3, 1) both; }
.transition-panels.leave div:nth-child(2) { animation-delay: 0.08s; }
.transition-panels.leave div:nth-child(3) { animation-delay: 0.16s; }
@keyframes panel-out { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes panel-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

.noscript-message { padding: 2rem; text-align: center; font-weight: 600; }
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 70;
  background: var(--fg); color: var(--bg); padding: 0.6rem 1.2rem; border-radius: 999px; font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 1535px) { :root { --gutter: 6rem; } }
@media (max-width: 1279px) {
  :root { --gutter: 4rem; }
  .nav-desktop { gap: 0 1.5rem; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-grid .stats { grid-column: 1 / -1; flex-direction: row; justify-content: space-around; text-align: center; }
  .hire-badge { width: 9rem; height: 9rem; }
  .hire-badge a { width: 4.5rem; height: 4.5rem; font-size: 0.8rem; }
  .hire-badge text { font-size: 11px; }
}
@media (max-width: 1023px) {
  :root { --header-h: 6rem; --gutter: 3rem; }
  .nav-desktop, .header-right { display: none; }
  .menu-toggle { display: flex; }
  .mobile-menu { display: flex; }
  .logo-wrap { position: static; transform: none; order: 2; }
  .logo { width: 3.5rem; height: 3.5rem; font-size: 1.25rem; }
  .menu-toggle { order: 1; }
  .site-header::after { content: ""; order: 3; width: 2.5rem; }
  .hero { flex-direction: column; gap: 3rem; text-align: center; }
  .hero-visual, .hero-copy { width: 100%; }
  .hero-photo { width: min(80%, 22rem); }
  .hero-actions { justify-content: center; }
  .hero-copy p.lead { margin-inline: auto; }
  .wave-art { display: none; }
  .hire-badge { position: absolute; left: auto; right: 0.5rem; top: -1rem; bottom: auto; width: 7rem; height: 7rem; }
  .hire-badge a { width: 3.5rem; height: 3.5rem; font-size: 0.65rem; }
  .hire-badge text { font-size: 11.5px; }
  .feature-card { flex-direction: column; padding: 2rem; gap: 1.5rem; }
  .feature-media, .feature-body { width: 100%; }
  .timeline { width: 100%; }
  .timeline li { width: 80%; }
  .section-title { margin-top: 6rem; }
}
@media (max-width: 767px) {
  :root { --gutter: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .frame { order: -1; max-width: 22rem; margin: 0 auto; }
  .about-grid .stats { flex-direction: column; gap: 1.5rem; }
  .stat-number { font-size: 3rem; }
  .skills { height: 70vh; border-radius: 0; background: repeating-radial-gradient(var(--ring-line) 2px, var(--bg) 5px, var(--bg) 40px); }
  .skills { height: auto; max-height: none; flex-wrap: wrap; gap: 0.75rem; padding: 3rem 0.5rem; }
  .skill, .skills.in .skill:not(.center) { position: static; transform: none; font-size: 0.85rem; padding: 0.5rem 1rem; }
  .skill.center { flex-basis: 100%; max-width: 6rem; aspect-ratio: 1; display: grid; place-items: center; margin: 0 calc(50% - 3rem) 0.5rem; padding: 0; }
  .timeline-line { left: calc(1.5rem - 2px); }
  .timeline li { width: calc(100% - 4rem); margin-left: 4rem; margin-bottom: 3rem; }
  .li-icon { width: 3rem; height: 3rem; margin-top: -0.4rem; }
  .timeline h3 { font-size: 1.15rem; }
  .news-item { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .site-footer { flex-direction: column; text-align: center; font-size: 0.95rem; }
  .pub-item, .news-item { padding: 1.1rem 1.1rem; }
  .pub-item h3 { font-size: 1.1rem; }
  .page-title { margin-bottom: 2.5rem; }
}
@media (max-width: 479px) {
  :root { --gutter: 1rem; }
  .feature-card { padding: 1.25rem; border-radius: 1.25rem; }
  .feature-card::before { right: -0.5rem; border-radius: 1.75rem; }
  .btn { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .anim-text .word, .reveal { opacity: 1; transform: none; }
  .transition-panels { display: none; }
}
@media print {
  .site-header, .site-footer, .hire-badge, .wave-art, .transition-panels { display: none !important; }
}
