/* ==========================================================================
   Cece Kou — Online Personal Portfolio
   IN3010 Part 1 · Week 9 · Online Personal Portfolio Development
   Design language: "Paper, Ink, Moss, Ochre"
   Palette: paper #F4EFE6 · ink #2B2B28 · moss #40584A · ochre #A65C2E
   Type: Noto Serif (display) · Noto Sans (body)
   ========================================================================== */

:root {
  --paper: #F4EFE6;
  --paper-deep: #EBE3D4;
  --ink: #2B2B28;
  --ink-soft: rgba(43, 43, 40, 0.72);
  --ink-faint: rgba(43, 43, 40, 0.45);
  --moss: #40584A;
  --moss-dark: #2E4034;
  --ochre: #A65C2E;
  --ochre-soft: rgba(166, 92, 46, 0.14);
  --line: rgba(43, 43, 40, 0.16);
  --line-strong: rgba(43, 43, 40, 0.32);
  --serif: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Microsoft YaHei", Arial, Helvetica, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --nav-h: 76px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--moss); color: var(--paper); }

h1, h2, h3, h4, .serif {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Utility ---------- */
.container { width: min(1080px, 92vw); margin: 0 auto; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 600;
}

.mono {
  font-family: "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.ghost {
  position: absolute;
  font-family: var(--serif);
  color: var(--ink);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  white-space: nowrap;
  z-index: 0;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
.nav-inner {
  width: min(1280px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav.scrolled {
  background: rgba(244, 239, 230, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 8px 32px rgba(43, 43, 40, 0.06);
}
.brand {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand .cn { color: var(--ochre); font-size: 15px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  position: relative;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--ink);
  opacity: 0.85;
  padding: 6px 0;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--ochre);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover { opacity: 1; color: var(--ochre); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--moss); opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    padding: 12px 24px 26px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    transition: transform 0.45s var(--ease);
    box-shadow: 0 24px 48px rgba(43, 43, 40, 0.08);
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 13px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 30px;
  font-size: 13px;
  letter-spacing: 0.16em;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  border: 1px solid transparent;
}
.btn-solid { background: var(--moss); color: var(--paper); }
.btn-solid:hover { background: var(--moss-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(64, 88, 74, 0.28); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ochre); color: var(--ochre); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img,
.hero-media video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: heroZoom 18s var(--ease) forwards;
}
@keyframes heroZoom {
  to { transform: scale(1); }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(43, 43, 40, 0.62) 0%,
    rgba(43, 43, 40, 0.38) 46%,
    rgba(43, 43, 40, 0.12) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: min(1080px, 92vw);
  margin: 0 auto;
  color: #F7F3EA;
  padding: 120px 0 80px;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(247, 243, 234, 0.86);
  margin-bottom: 28px;
}
.hero-kicker::before {
  content: "";
  width: 44px; height: 1px;
  background: var(--ochre);
}
.hero-title {
  font-size: clamp(40px, 6.4vw, 74px);
  line-height: 1.16;
  font-weight: 600;
  margin-bottom: 26px;
  max-width: 15ch;
}
.hero-title .accent { color: #E3B48F; }
.hero-sub {
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.9;
  max-width: 46ch;
  color: rgba(247, 243, 234, 0.92);
  letter-spacing: 0.04em;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn-ghost { border-color: rgba(247, 243, 234, 0.5); color: #F7F3EA; }
.hero .btn-ghost:hover { border-color: #E3B48F; color: #E3B48F; }
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(247, 243, 234, 0.75);
  font-size: 11px;
  letter-spacing: 0.34em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-scroll::after {
  content: "";
  width: 1px; height: 46px;
  background: linear-gradient(rgba(247,243,234,0.8), transparent);
  animation: scrollHint 2s ease-in-out infinite;
}
@keyframes scrollHint {
  0% { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Section ---------- */
.section { position: relative; padding: 96px 0; }
.section-head { margin-bottom: 56px; }
.section-head .eyebrow { display: block; margin-bottom: 16px; }
.section-title {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.3;
  max-width: 20ch;
}
.section-intro {
  margin-top: 18px;
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: 15px;
}
.rule {
  height: 1px;
  background: var(--line);
  margin: 0 auto 68px;
  width: min(1080px, 92vw);
}

/* ---------- Statement strip ---------- */
.statement {
  padding: 110px 0 60px;
  position: relative;
}
.statement .container { position: relative; z-index: 1; }
.statement-quote {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.6;
  max-width: 22ch;
  margin-bottom: 18px;
}
.statement-quote em { font-style: normal; color: var(--ochre); }
.statement-sub {
  color: var(--ink-soft);
  max-width: 62ch;
  font-size: 15px;
  line-height: 2;
}
.thread-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}
.thread-pill {
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--moss);
  transition: all 0.3s ease;
}
.thread-pill:hover { border-color: var(--ochre); color: var(--ochre); transform: translateY(-2px); }

/* ---------- Work grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 36px;
}
.work-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--paper-deep);
}
.work-card-media {
  position: relative;
  aspect-ratio: 4 / 3.1;
  overflow: hidden;
}
.work-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.work-card:hover .work-card-media img { transform: scale(1.06); }
.work-card-num {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 2;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: #F7F3EA;
  background: rgba(43, 43, 40, 0.5);
  padding: 6px 12px;
  border-radius: 2px;
  backdrop-filter: blur(4px);
}
.work-card-body { padding: 22px 24px 26px; }
.work-card-cat {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 8px;
}
.work-card h3 {
  font-size: 22px;
  margin-bottom: 8px;
}
.work-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.85;
}
.work-card-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--moss);
  transition: gap 0.3s ease, color 0.3s ease;
}
.work-card:hover .work-card-more { gap: 14px; color: var(--ochre); }

@media (max-width: 720px) {
  .work-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Index highlights ---------- */
.highlight-strip {
  position: relative;
  background: var(--ink);
  color: #F1EBDD;
  padding: 96px 0;
  overflow: hidden;
}
.highlight-strip .ghost { color: #F1EBDD; opacity: 0.05; }
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.highlight-item .num {
  font-family: var(--serif);
  font-size: 40px;
  color: var(--ochre);
  display: block;
  margin-bottom: 14px;
}
.highlight-item h3 { font-size: 18px; margin-bottom: 10px; color: #F1EBDD; }
.highlight-item p { font-size: 13.5px; color: rgba(241, 235, 221, 0.72); line-height: 1.9; }

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

/* ---------- Journal & Article teaser ---------- */
.dual-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.dual-card {
  position: relative;
  display: block;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  overflow: hidden;
}
.dual-card:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(43, 43, 40, 0.12); }
.dual-card-media { aspect-ratio: 16 / 9.4; overflow: hidden; }
.dual-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.dual-card:hover .dual-card-media img { transform: scale(1.05); }
.dual-card-body { padding: 26px 28px 30px; }
.dual-card-body .tag {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 10px;
  display: block;
}
.dual-card-body h3 { font-size: 21px; margin-bottom: 10px; }
.dual-card-body p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.85; margin-bottom: 14px; }

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

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 90px) 0 70px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero .ghost { font-size: 200px; right: -30px; top: 30px; }
.page-hero-title {
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.24;
  max-width: 18ch;
  margin-top: 18px;
}
.page-hero-sub {
  margin-top: 18px;
  color: var(--ink-soft);
  max-width: 58ch;
  font-size: 15px;
  line-height: 2;
}
.breadcrumb {
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--moss);
}
.breadcrumb a:hover { color: var(--ochre); }

/* ---------- Project detail layout ---------- */
.proj-hero-img { width: 100%; max-height: 76vh; object-fit: cover; }
.proj-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}
.proj-meta .k {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ochre);
  display: block;
  margin-bottom: 8px;
}
.proj-meta .v { font-size: 14px; color: var(--ink); line-height: 1.7; }

.proj-section { padding: 80px 0 20px; }
.proj-section .container { max-width: 860px; }
.proj-section h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 24px;
  position: relative;
  padding-left: 22px;
}
.proj-section h2::before {
  content: "";
  position: absolute;
  left: 0; top: 0.18em;
  width: 5px; height: 0.72em;
  background: var(--ochre);
}
.proj-section p { color: var(--ink-soft); line-height: 2.05; margin-bottom: 18px; font-size: 15px; }
.proj-section .lead { color: var(--ink); font-size: 16.5px; }
.proj-fig { margin: 30px 0 40px; }
.proj-fig img { width: 100%; }
.proj-fig figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.proj-img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 30px 0 40px; }
.proj-img-grid img { width: 100%; }
.proj-img-grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) {
  .proj-meta-grid { grid-template-columns: repeat(2, 1fr); }
  .proj-img-grid, .proj-img-grid.four { grid-template-columns: 1fr 1fr; }
}

.proj-quote {
  border-left: 3px solid var(--ochre);
  padding: 6px 0 6px 26px;
  margin: 34px 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
  color: var(--moss);
}

.proj-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 90px;
  border-top: 1px solid var(--line);
  padding-top: 36px;
}
.proj-nav a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  transition: color 0.3s ease, gap 0.3s ease;
}
.proj-nav a:hover { color: var(--ochre); gap: 16px; }

/* ---------- Journal page ---------- */
.journal-block { max-width: 820px; }
.journal-block .block-head { margin-bottom: 40px; }
.journal-block h2 { font-size: clamp(24px, 3vw, 34px); margin: 70px 0 22px; }
.journal-block p { color: var(--ink-soft); line-height: 2.1; margin-bottom: 18px; font-size: 15px; }
.journal-block .lemma {
  font-style: italic;
  color: var(--moss);
  border-left: 3px solid var(--ochre);
  padding-left: 22px;
  margin: 30px 0;
  font-size: 16.5px;
  line-height: 2;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 60px;
  align-items: start;
}
.about-photo {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-body p { color: var(--ink-soft); line-height: 2.1; margin-bottom: 18px; font-size: 15px; }
.skills { margin-top: 36px; }
.skills h3 { font-size: 13px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ochre); margin-bottom: 18px; }
.skill-group { margin-bottom: 20px; }
.skill-group .k { font-size: 12.5px; letter-spacing: 0.14em; color: var(--ink); display: block; margin-bottom: 8px; font-weight: 600; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
  padding: 5px 13px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.contact-line { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 16px; }
.contact-line a, .contact-line span {
  font-size: 13.5px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.contact-line a:hover { color: var(--ochre); }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-photo { position: static; max-width: 380px; }
}

/* ---------- Contact CTA ---------- */
.cta-section {
  background: var(--ink);
  color: #F1EBDD;
  padding: 90px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section .ghost { color: #F1EBDD; opacity: 0.05; font-size: 180px; left: 50%; top: -30px; transform: translateX(-50%); }
.cta-section h2 { font-size: clamp(26px, 3.6vw, 40px); margin-bottom: 16px; }
.cta-section p { color: rgba(241, 235, 221, 0.7); margin-bottom: 34px; font-size: 15px; }
.cta-section .btn-solid { background: var(--ochre); }
.cta-section .btn-solid:hover { background: #C06B35; }
.cta-section .btn-ghost { border-color: rgba(241, 235, 221, 0.45); color: #F1EBDD; }
.cta-section .btn-ghost:hover { border-color: #E3B48F; color: #E3B48F; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(241, 235, 221, 0.6);
  padding: 54px 0 40px;
  font-size: 13px;
}
.footer-inner {
  width: min(1080px, 92vw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.footer .brand { color: #F1EBDD; }
.footer a:hover { color: #E3B48F; }

/* ---------- Video blocks ---------- */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #141414;
  overflow: hidden;
  margin: 30px 0 40px;
}
.video-frame video, .video-frame iframe {
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}
.video-caption { font-size: 12.5px; color: var(--ink-faint); margin-top: -24px; margin-bottom: 40px; letter-spacing: 0.06em; }

/* ---------- Utility spacing ---------- */
.mt-0 { margin-top: 0; }
.ta-c { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero-media img { animation: none; }
}