/* Edwin En-Te Hwu personal homepage — MIDAS black/gold editorial */
:root {
  --black: #000000;
  --gold: #FFD63C;
  --gold-dim: #F4C527;
  --ink: #f5f5f0;
  --muted: #a8a898;
  --line: rgba(255, 214, 60, 0.35);
  --font: "Arial", "Helvetica Neue", Helvetica, sans-serif;
  --display: "Arial Black", "Arial", Impact, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }

.skip {
  position: absolute; left: -9999px;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--gold); color: var(--black); padding: .5rem 1rem; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: .85rem 1.5rem;
  background: rgba(0,0,0,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.nav-brand {
  display: flex; align-items: center; gap: .75rem;
  color: var(--gold); font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; font-size: .85rem;
}
.nav-brand img { height: 28px; width: auto; }
.nav-links {
  display: flex; gap: 1.25rem; flex-wrap: wrap;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink); font-size: .8rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.nav-links a:hover { color: var(--gold); text-decoration: none; }

/* HERO */
.hero {
  min-height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 4vw, 4rem);
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative;
}
.hero-kicker {
  color: var(--gold); font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; font-size: .75rem; margin-bottom: 1.25rem;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero h1 span { color: var(--gold); display: block; }
.hero-tag {
  margin: 1.75rem 0 0;
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  font-weight: 700; line-height: 1.2;
  max-width: 22ch;
  color: var(--ink);
}
.hero-role {
  margin: 1.5rem 0 0;
  color: var(--muted);
  max-width: 42ch;
  font-size: 1.05rem;
}
.hero-cta {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: 2.25rem;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 1.4rem;
  border: 2px solid var(--gold);
  font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  font-size: .78rem; text-decoration: none !important;
}
.btn-solid { background: var(--gold); color: var(--black); }
.btn-solid:hover { background: var(--gold-dim); }
.btn-ghost { background: transparent; color: var(--gold); }
.btn-ghost:hover { background: rgba(255,214,60,.12); }

.hero-visual {
  position: relative;
  min-height: 60vh;
  border-left: 1px solid var(--line);
  overflow: hidden;
  background: #0a0a0a;
}
.hero-visual img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  filter: contrast(1.05) saturate(.95);
  transform: scale(1.02);
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.55), transparent 35%),
    linear-gradient(0deg, rgba(0,0,0,.45), transparent 40%);
  pointer-events: none;
}
.hero-mark {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 2;
  width: min(220px, 45%);
  opacity: .95;
}

/* SECTIONS */
.section {
  padding: clamp(3rem, 8vw, 7rem) clamp(1.25rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.section-label {
  color: var(--gold); font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; font-size: .72rem; margin: 0 0 1rem;
}
.section h2 {
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
  max-width: 16ch;
}
.lead {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 700; line-height: 1.35;
  max-width: 38ch; margin: 0 0 1.25rem;
}
.prose { max-width: 62ch; color: #d8d8cc; }
.prose p { margin: 0 0 1rem; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  align-items: start;
}
.work-block {
  border-top: 3px solid var(--gold);
  padding-top: 1.25rem;
}
.work-block h3 {
  margin: 0 0 .75rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.05;
}
.work-block p { margin: 0; color: #d0d0c4; }

/* SELECTED WORK */
.work-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0;
}
.work-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.5rem;
  padding: 1.35rem 0;
  border-top: 1px solid rgba(255,255,255,.12);
  align-items: baseline;
}
.work-list li:last-child { border-bottom: 1px solid rgba(255,255,255,.12); }
.work-num {
  font-family: var(--display);
  color: var(--gold);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}
.work-list a.work-title {
  color: var(--ink); font-weight: 800;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.25; text-decoration: none;
}
.work-list a.work-title:hover { color: var(--gold); }
.work-meta { color: var(--muted); font-size: .92rem; margin-top: .35rem; }

/* GALLERY */
.gallery-intro { max-width: 48ch; color: var(--muted); margin: -.5rem 0 2rem; }
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: .35rem;
}
.gallery figure {
  margin: 0; position: relative;
  overflow: hidden; background: #111;
  border: 1px solid transparent;
  cursor: zoom-in;
}
.gallery figure:hover { border-color: var(--gold); }
.gallery figure img {
  width: 100%; height: 100%;
  object-fit: cover; aspect-ratio: 4/3;
  transition: transform .45s ease, filter .45s ease;
}
.gallery figure:hover img { transform: scale(1.04); filter: brightness(1.08); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .55rem .7rem;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  color: var(--ink); font-size: .72rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  opacity: 0; transition: opacity .25s ease;
}
.gallery figure:hover figcaption { opacity: 1; }

.g-wide { grid-column: span 6; }
.g-mid { grid-column: span 4; }
.g-sm { grid-column: span 3; }
.g-tall img { aspect-ratio: 3/4; }
@media (max-width: 900px) {
  .g-wide, .g-mid, .g-sm { grid-column: span 6; }
}
@media (max-width: 560px) {
  .g-wide, .g-mid, .g-sm { grid-column: span 12; }
}

/* FIND ME */
.find-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .5rem;
  margin: 1.5rem 0 2rem;
}
.find-grid a {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,.16);
  color: var(--ink); font-weight: 700;
  text-decoration: none !important;
  transition: border-color .2s, background .2s, color .2s;
}
.find-grid a:hover {
  border-color: var(--gold); color: var(--gold);
  background: rgba(255,214,60,.06);
}
.find-grid span {
  display: block; color: var(--muted); font-size: .75rem;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: .25rem;
}
.note {
  border-left: 3px solid var(--gold);
  padding: .25rem 0 .25rem 1.1rem;
  color: #d8d8cc; max-width: 60ch;
}

/* IDUN ASSISTANT SECTION */
.assistant {
  background: #070707;
}
.assistant-wrap {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 2rem;
  align-items: stretch;
}
.assistant-panel {
  border: 1px solid var(--line);
  background: #0c0c0c;
  min-height: 520px;
  position: relative;
  overflow: hidden;
}
.assistant-panel iframe {
  width: 100%; height: 100%; min-height: 520px;
  border: 0; background: #fff;
}
.assistant-fallback {
  display: none;
  padding: 2rem;
  color: var(--muted);
}
.assistant-fallback.show { display: block; }
.assistant-fallback a.btn { margin-top: 1rem; }

/* FOOTER */
.footer {
  padding: 2.5rem clamp(1.25rem, 4vw, 4rem) 5rem;
  display: grid; gap: 1rem;
  color: var(--muted); font-size: .92rem;
}
.footer strong { color: var(--ink); }
.footer-domain { color: var(--gold); font-weight: 700; }

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(1200px, 94vw);
  max-height: 88vh;
  object-fit: contain;
  border: 1px solid var(--line);
}
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: transparent; border: 1px solid var(--gold);
  color: var(--gold); width: 44px; height: 44px;
  font-size: 1.4rem; font-weight: 700;
}
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-cap {
  position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  color: var(--muted); font-size: .85rem; text-align: center;
}

/* FLOATING CHAT LAUNCHER */
.chat-launch {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 50;
  background: var(--gold); color: var(--black);
  border: 0; padding: .95rem 1.15rem;
  font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  font-size: .72rem;
  box-shadow: 0 0 0 1px #000;
}
.chat-launch:hover { background: var(--gold-dim); }
.chat-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: min(440px, 100vw);
  background: #0a0a0a;
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform .28s ease;
  display: flex; flex-direction: column;
}
.chat-drawer.open { transform: translateX(0); }
.chat-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--line);
}
.chat-drawer-head strong {
  color: var(--gold); text-transform: uppercase;
  letter-spacing: .08em; font-size: .8rem;
}
.chat-drawer-head button {
  background: transparent; border: 1px solid var(--gold);
  color: var(--gold); width: 36px; height: 36px; font-size: 1.2rem;
}
.chat-drawer iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.chat-drawer-foot {
  padding: .75rem 1rem; border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--muted);
}
.chat-drawer-foot a { color: var(--gold); }


/* VIDEOS */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.video-card {
  margin: 0;
  border: 1px solid rgba(255,214,60,.35);
  background: #0a0a0a;
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-card figcaption {
  padding: .85rem 1rem 1rem;
  color: #e8e8dc;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
}
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.playlist-grid a {
  display: block;
  background: var(--black);
  padding: 1.1rem 1.2rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  line-height: 1.3;
}
.playlist-grid a span {
  display: block;
  color: var(--gold);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: .35rem;
  font-weight: 800;
}
.playlist-grid a:hover { color: var(--gold); }

/* MOTION */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual {
    min-height: 48vh; order: -1;
    border-left: 0; border-bottom: 1px solid var(--line);
  }
  .split, .assistant-wrap, .video-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gallery figure img { transition: none; }
}
