/* =========================================================
   Google Fonts
   ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=VT323&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

/* =========================================================
   Design Tokens
   ========================================================= */
:root {
  /* Fonts */
  --font-display: "VT323", monospace;
  --font-body: "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --container: 1200px;
  --pad-x: 32px;
  --pad-y: 64px;

  /* Core colors */
  --c-bg: #F9F8F6;
  --c-text: #43334C;
  --c-muted: #819A91;
  --c-line: #e5e5e5;

  /* Accent palette */
  --c-pink: #F39EB6;
  --c-pink-hover: #E83C91;
  --c-green: #9fd6b2;
  --c-gray: #f3f3f3;

  /* Links */
  --c-link: var(--c-pink);
  --c-link-hover: var(--c-pink-hover);

  /* Shape */
  --radius-none: 0px;
}

/* =========================================================
   Base
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
}

a {
  color: var(--c-link);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

a:hover {
  color: var(--c-link-hover);
}

/* Headings */
h1,
h2,
.site-name,
.work-title,
.page-head h1,
#workDetail h1 {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}

/* =========================================================
   Layout
   ========================================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
}

/* =========================================================
   Header / Navigation
   ========================================================= */
.site-header {
  border-bottom: 1px solid var(--c-line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-name {
  font-size: 16px;
}

.nav {
  display: flex;
  align-items: center;
}

.nav a {
  margin-left: 24px;
  font-size: 13px;
  opacity: 0.7;
  color: var(--c-text);
}

.nav a:hover {
  opacity: 1;
  color: var(--c-link-hover);
}

.nav a.is-active {
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: var(--c-green);
  text-underline-offset: 4px;
}

/* =========================================================
   Home: Intro
   ========================================================= */
.intro h1 {
  font-size: 40px;
  margin-bottom: 22px;
  line-height: 1.15;
}

.intro p {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #333;
}

/* =========================================================
   Home: Intro Split
   ========================================================= */
.intro-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: start;
}

.intro-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

/* Floating frame (invisible boundary) */
.float-frame {
  position: relative;
  width: min(360px, 100%);
  height: 260px;
  background: transparent;
  border: none;
  overflow: hidden;
}

.float-card {
  position: absolute;
  width: 230px;
  max-width: 70%;
  left: 18px;
  top: 18px;
  border: 1px solid #111;
  background: #fff;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.06);
  user-select: none;
}

/* Profile links under photo */
.profile-links {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.profile-links a {
  color: var(--c-link);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.profile-links a:hover {
  color: var(--c-link-hover);
  border-bottom-color: var(--c-link-hover);
}

/* =========================================================
   Page Head (All Works, etc.)
   ========================================================= */
.page-head h1 {
  font-family: var(--font-display);
  font-size: 36px;
  margin-bottom: 18px;
}

.page-head p {
  max-width: 760px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #333;
}


/* =========================================================
   Works Grid (Home + All Works)
   ========================================================= */
.works {
  margin-top: 120px;
}

.works h2 {
  font-size: 22px; /* ⬅️ Selected Works 更大 */
  margin-bottom: 32px;
}

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

.work-card {
  display: block;
  transition: transform 0.2s ease;
}

.work-card:hover {
  transform: translateY(-3px);
}

.work-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--c-gray);
  overflow: hidden;
  border-radius: var(--radius-none);
}

.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-pink);
  opacity: 0;
  mix-blend-mode: multiply;
  transition: opacity 0.2s ease;
}

.work-card:hover .work-media::after {
  opacity: 0.25;
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-meta {
  padding-top: 14px;
}

.work-title {
  font-size: 16px;
  margin-bottom: 6px;
}

.work-sub {
  font-size: 13px;
  color: var(--c-muted);
}

/* =========================================================
   All Works: Filters
   ========================================================= */
.filters {
  margin: 44px 0 56px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px; /* ⬅️ description 与 tags 拉开 */
}

.tag {
  border: none;
  background: var(--c-gray);
  padding: 11px 16px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 999px;
}

.tag:hover {
  background: var(--c-pink);
}

.tag.is-active {
  background: var(--c-green);
}

/* =========================================================
   Work Detail Page
   ========================================================= */
#workDetail {
  max-width: 900px;
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--c-link);
}

.back-link:hover {
  color: var(--c-link-hover);
}

#workDetail h1 {
  font-size: 44px;
  margin-bottom: 12px;
}

.work-meta-line {
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 22px;
}

.work-intro {
  max-width: 680px;
  font-size: 14px;
  margin-bottom: 40px; /* ⬅️ intro 和 tags 分开 */
}

#workDetail .tag-row {
  margin-bottom: 52px;
}

/* Sections (Design statement etc.) */
.work-sections {
  max-width: 680px;
  margin-bottom: 56px;
}

.work-section {
  margin-bottom: 32px;
}

.work-section h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 10px;
}

.work-section p {
  font-size: 14px;
  line-height: 1.7;
}

/* Gallery */
.work-gallery {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.work-gallery img {
  width: 100%;
  height: auto;
  background: var(--c-gray);
  border-radius: var(--radius-none);
}

/* Credits */
.work-credits {
  margin-top: 52px;
  font-size: 13px;
  color: #444;
}

/* =========================================================
   Video
   ========================================================= */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--c-gray);
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .intro-right {
    align-items: flex-start;
  }

  #workDetail h1 {
    font-size: 38px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 44px 18px;
  }

  .header-inner {
    padding: 18px 18px;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .intro h1 {
    font-size: 34px;
  }
}
