/* ============================================================
   Yooshan EC — Portfolio
   Design tokens
   ============================================================ */

:root {
  --black: #000000;
  --white: #ffffff;
  --off-white: #f5f5f5;
  --gray: #8a8a8a;
  --gray-line: #e0e0e0;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1360px;
  --gutter: clamp(24px, 5vw, 96px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01' 1, 'cv01' 1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--black);
  color: var(--white);
}

/* ---------- Typography scale ---------- */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.type-hero {
  font-size: clamp(44px, 8vw, 104px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.type-h1 {
  font-size: clamp(36px, 5.5vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.type-h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.type-h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: -0.01em;
  line-height: 1.3;
  font-weight: 500;
}

.type-body {
  font-size: 19px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--black);
}

.type-body-lg {
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.55;
  font-weight: 400;
}

.type-meta {
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.type-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gray);
}

p {
  margin: 0;
  max-width: 62ch;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

section {
  padding-top: clamp(72px, 10vw, 140px);
  padding-bottom: clamp(72px, 10vw, 140px);
}

.rule {
  height: 1px;
  background: var(--gray-line);
  border: none;
  margin: 0;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--gray-line);
}

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

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

.logo img {
  height: 38px; /* adjust until it visually balances against "Work / About / Resume" nav text */
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  font-size: 15px;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--black);
  transition: right 0.3s var(--ease);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  right: 0;
}

.nav-links a[aria-current="page"] {
  color: var(--black);
}

.nav-toggle {
  display: none;
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px var(--gutter);
    gap: 24px;
    font-size: 22px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .nav-links.open {
    opacity: 1;  height:100vh;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
  }
}

/* ---------- Buttons / links ---------- */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--black);
  padding-bottom: 2px;
}

.link-arrow .arrow {
  transition: transform 0.3s var(--ease);
}

.link-arrow:hover .arrow {
  transform: translateX(4px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--black);
  color: var(--white);
  padding: 16px 28px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 500;
  transition: opacity 0.25s var(--ease);
}

.btn:hover {
  opacity: 0.75;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(56px, 8vw, 100px);
}

.hero-lede {
  margin-top: 28px;
  max-width: 640px;
}

.hero-meta {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
}

.hero-meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray);
  display: inline-block;
}

.hero-cta {
  margin-top: 56px;
}

/* ---------- Section headers ---------- */

.section-head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-bottom: clamp(48px, 6vw, 88px);
  align-items: end;
}

.section-head .eyebrow-col {
  grid-column: 1 / 4;
}

.section-head .title-col {
  grid-column: 4 / 10;
}

.section-head .sub-col {
  grid-column: 10 / 13;
}

@media (max-width: 900px) {
  .section-head {
    display: block;
  }
  .section-head .sub-col {
    margin-top: 20px;
  }
}

/* ---------- Work index list (home + work page) ---------- */

.work-item {
  padding: clamp(56px, 7vw, 96px) 0;
  border-top: 1px solid var(--gray-line);
}

.work-item:first-of-type {
  border-top: 1px solid var(--gray-line);
}

.work-item-head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: start;
}

.work-item-num {
  grid-column: 1 / 2;
  font-size: 15px;
  color: var(--gray);
  font-weight: 500;
  padding-top: 6px;
}

.work-item-title {
  grid-column: 2 / 8;
}

.work-item-title h3 {
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.work-item-desc {
  grid-column: 8 / 13;
}

.work-item-desc .type-body {
  font-size: 17px;
}

.work-item-desc .type-meta {
  margin-top: 18px;
  display: block;
}

.work-item-visual {
  margin-top: 40px;
  aspect-ratio: 16 / 9.5;
  background: var(--off-white);
  overflow: hidden;
  position: relative;
}

.work-item-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.work-item:hover .work-item-visual img {
  transform: scale(1.02);
}

.work-item-link {
  margin-top: 28px;
}

@media (max-width: 900px) {
  .work-item-head {
    display: block;
  }
  .work-item-num {
    margin-bottom: 12px;
  }
  .work-item-desc {
    margin-top: 20px;
  }
}

/* ---------- How I work ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--gray-line);
  border-top: 1px solid var(--gray-line);
  border-bottom: 1px solid var(--gray-line);
}

.principle {
  background: var(--white);
  padding: clamp(36px, 4vw, 56px) clamp(24px, 3vw, 48px);
}

.principle .type-meta {
  margin-bottom: 20px;
}

.principle h3 {
  margin-bottom: 16px;
}

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

/* ---------- Experience / stats ---------- */

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

.exp-list {
  grid-column: 1 / 7;
}

.exp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--gray-line);
}

.exp-row:last-child {
  border-bottom: 1px solid var(--gray-line);
}

.exp-row .role {
  font-size: 15px;
  color: var(--gray);
}

.stats {
  grid-column: 8 / 13;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.stat-num {
  font-size: clamp(32px, 3.4vw, 44px);
  letter-spacing: -0.02em;
}

.stat-label {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .exp-grid {
    display: block;
  }
  .stats {
    margin-top: 48px;
  }
}

/* ---------- Beyond screens ---------- */

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

.pov-title {
  grid-column: 1 / 5;
}

.pov-body {
  grid-column: 5 / 11;
}

.pov-body p + p {
  margin-top: 20px;
}

@media (max-width: 900px) {
  .pov {
    display: block;
  }
  .pov-body {
    margin-top: 24px;
  }
}

/* ---------- Closing CTA ---------- */

/* Role & Context */
.role-context {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 56px;
  width: 100%;
}

.role-context-new {
  grid-template-columns: 220px minmax(0, 820px);
  column-gap: 56px;
}

/* Right-side content */
.numbered-points {
  display: flex;
  flex-direction: column;
  gap: 36px;
  width: 100%;
}

/* Each row */
.numbered-point {
  display: grid !important;
  grid-template-columns: 70px minmax(0, 1fr);
  column-gap: 24px;
  align-items: start;
  width: 100%;
  position: static !important;
}

/* Label */
.numbered-point .n {
  position: static !important;
  display: block;
  width: auto !important;
  margin: 0 !important;
  padding: 3px 0 0 !important;

  font-size: 14px;
  line-height: 1.5;
  color: #888;
  white-space: nowrap;
}

/* Description */
.numbered-point p {
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
}




.closing-cta {
  background: var(--black);
  color: var(--white);
}

.closing-cta .type-eyebrow {
  color: var(--gray);
}

.closing-cta .cta-title {
  margin-top: 20px;
  max-width: 780px;
}

.closing-cta .link-arrow {
  border-bottom: 1px solid var(--white);
  color: var(--white);
  margin-top: 44px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--black);
  color: var(--gray);
}

.site-footer .wrap {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: 24px;
}

/* ---------- About page ---------- */

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 80px;
  align-items: center;
}

.about-hero-text {
  max-width: 720px;
}

.portrait {
  width: 100%;
  max-width: 320px;
  height: 400px;
  justify-self: end;
  background: var(--off-white);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

/* Tablet */
@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 50px;
  }

  .portrait {
    max-width: 240px;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .about-hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-hero-text {
    max-width: none;
  }

  .portrait {
    max-width: 220px;
    justify-self: start;
  }
}

.belief-list {
  display: grid;
  gap: 40px;
}

.belief-item {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--gray-line);
}

.belief-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.belief-item .num {
  grid-column: 1 / 2;
  color: var(--gray);
  font-size: 15px;
}

.belief-item .stmt {
  grid-column: 2 / 12;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.015em;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .about-hero, .belief-item {
    display: block;
  }
  .belief-item .stmt {
    margin-top: 10px;
  }
}

.bg-list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.bg-col {
  grid-column: span 6;
}

.bg-col ul {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.bg-col li {
  padding: 12px 0;
  border-top: 1px solid var(--gray-line);
  font-size: 17px;
}

.bg-col li:last-child {
  border-bottom: 1px solid var(--gray-line);
}

@media (max-width: 720px) {
  .bg-col {
    grid-column: span 12;
  }
  .bg-col + .bg-col {
    margin-top: 40px;
  }
}

.hero-lede a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-lede a:hover {
  opacity: 0.65;
}

.pov-body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pov-body a:hover {
  opacity: 0.65;
}

/* ---------- Case study ---------- */

.cs-hero {
  padding-top: clamp(48px, 8vw, 96px);
}

.cs-hero .type-eyebrow {
  margin-bottom: 24px;
}

.cs-hero-visual {
  margin-top: clamp(48px, 6vw, 80px);
  aspect-ratio: 16 / 9;
  background: var(--off-white);
  overflow: hidden;
}

.cs-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-meta-row {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-line);
}

.cs-meta-row div .type-meta {
  margin-bottom: 8px;
}

.cs-section {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.cs-section .cs-label {
  grid-column: 1 / 4;
}

.cs-section .cs-content {
  grid-column: 4 / 11;
}

.cs-content p + p {
  margin-top: 20px;
}

@media (max-width: 900px) {
  .cs-section {
    display: block;
  }
  .cs-content {
    margin-top: 16px;
  }
  .cs-meta-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.numbered-points {
  display: grid;
  gap: 28px;
}

.numbered-point {
  display: flex;
  gap: 20px;
}

.numbered-point .n {
  color: var(--gray);
  font-size: 15px;
  padding-top: 4px;
  flex: none;
  width: 24px;
}

.cs-visual {
  margin: 12px 0 8px;
  aspect-ratio: 16 / 10;
  background: var(--off-white);
  overflow: hidden;
}

.cs-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-visual.tall {
  aspect-ratio: 4/3;
}

.outcome-list {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.outcome-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 19px;
}

.outcome-item .glyph {
  color: var(--gray);
  font-size: 16px;
}

.cs-next {
  background: var(--black);
  color: var(--white);
}

.cs-next .type-eyebrow {
  color: var(--gray);
}

.cs-next h2 {
  margin-top: 20px;
}

.cs-next .link-arrow {
  border-bottom: 1px solid var(--white);
  margin-top: 40px;
}

.cs-next-visual {
  margin-top: 48px;
  aspect-ratio: 21/9;
  background: #141414;
  overflow: hidden;
}

.cs-next-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

/* ---------- Reveal on load (hero only) ---------- */
.design-timeline {
  width: 100%;
  height: auto;
  background: transparent;
  padding: 0;
  margin-bottom: 0;
  min-height: 0;
}

.design-timeline img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}


.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* ---------- Case study — extended components (research-heavy studies) ---------- */

.persona-grid,
.req-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--gray-line);
  border-top: 1px solid var(--gray-line);
  border-bottom: 1px solid var(--gray-line);
}

.req-grid {
  grid-template-columns: repeat(2, 1fr);
}

.persona-card,
.req-card {
  background: var(--white);
  padding: clamp(28px, 3vw, 40px) clamp(20px, 2.4vw, 32px);
}

.persona-card .type-meta,
.req-card .type-meta {
  margin-bottom: 16px;
}

.persona-card h3,
.req-card h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

@media (max-width: 900px) {
  .persona-grid,
  .req-grid {
    grid-template-columns: 1fr;
  }
}

.flow-steps {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.flow-step {
  font-size: 17px;
  font-weight: 500;
  padding: 6px 0;
}

.flow-arrow {
  color: var(--gray);
  font-size: 15px;
  padding: 2px 0;
}

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  position: relative;
}

.carousel-slide {
  display: none;
  width: 100%;
}

.carousel-slide.active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 18px;
  z-index: 2;
}

.carousel-btn.prev {
  left: 16px;
}

.carousel-btn.next {
  right: 16px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
}

.carousel-dots button.active {
  background: #222;
}

.case-study-image {
  width: 120%;
  max-width: none;
  margin-left: -10%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

/* Make carousel wider than the standard case-study content */
.cs-visual.carouselnew {
  width: 120%;
  margin-left: -10%;
}

.cs-visual.carousel .carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Case study — pull quote / impact stats ---------- */

.pull-quote {
  border-left: 3px solid var(--black);
  padding: 4px 0 4px 28px;
  margin: 8px 0;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.015em;
  line-height: 1.4;
  max-width: 640px;
}

.pull-quote cite {
  display: block;
  font-style: normal;
  font-size: 14px;
  color: var(--gray);
  margin-top: 14px;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  background: var(--black);
  color: var(--white);
  padding: clamp(28px, 4vw, 44px) clamp(24px, 3vw, 40px);
}

.impact-grid .stat-num {
  color: var(--white);
}

.impact-grid .stat-label {
  color: #b9b9b9;
  font-size: 14px;
  margin-top: 10px;
  max-width: 220px;
}

/* ---------- Focus states ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 3px;
}

/* ---------- Utility ---------- */

.center-copy {
  max-width: 680px;
}

.mt-lg { margin-top: clamp(48px, 6vw, 56px); }


/* ---------- Back to top ---------- */

#backToTop {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 42px;
  height: 42px;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 0;
  border: 1px solid #aaa;
  border-radius: 50%;

  background: #fff;
  color: #333;

  font-size: 18px;
  line-height: 1;
  font-family: inherit;

  cursor: pointer;
  z-index: 9999;

  transition: background 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease;
}

#backToTop.show {
  display: flex;
}

#backToTop:hover {
  background: #333;
  color: #fff;
  border-color: #333;
}

@media (max-width: 720px) {
  #backToTop {
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
  }
}