/* ==========================================================================
   yourname.art — editorial monochrome portfolio
   Original stylesheet. Edit tokens in :root, then sections below.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --ink-soft: #222222;
  --muted: #666666;
  --line: #e2e2df;
  --line-strong: #000000;
  --accent: #0000cc;
  --accent-alt: #cc0000;
  --tint: #f7f7f4;

  --display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Courier New", monospace;

  --max: 1024px;
  --gutter: 1.6rem;
  --header-h: 2.65rem;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-alt);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* Hide the native cursor only when the custom one is active. */
.has-custom-cursor,
.has-custom-cursor a,
.has-custom-cursor button {
  cursor: none;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 400;
  padding: 0.5rem 0.8rem;
  background: #fff;
  border: 1px solid #000;
  font-family: var(--mono);
  font-size: 0.65rem;
}

.skip-link:focus {
  top: 0.5rem;
}

/* ------------------------------- layout --------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.rule {
  border: 0;
  border-top: 1px solid var(--line-strong);
  height: 0;
}

.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.86;
  text-transform: uppercase;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------- header --------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-strong);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-dot {
  width: 4px;
  height: 4px;
  margin-left: 0.45em;
  background: var(--accent-alt);
}

.nav {
  display: none;
  gap: 1.85rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.nav a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  padding: 0.35rem 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.2rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav a:hover::after,
.nav a.is-active::after {
  transform: scaleX(1);
}

.menu-btn {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

.menu-btn:hover {
  color: var(--accent);
}

/* ---------------------------- mobile menu ------------------------------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}

.mobile-menu[hidden] {
  display: block;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-inner {
  height: 100%;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mobile-menu-inner a {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: 2.6rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.mobile-menu-inner a:hover {
  color: var(--accent);
}

.mm-num {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--muted);
}

.mobile-menu-foot {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* -------------------------------- hero ---------------------------------- */

.hero {
  padding-top: calc(var(--header-h) + 2.4rem);
}

.hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.4rem 1.2rem;
}

.hero-title {
  font-size: clamp(3.6rem, 13vw, 5.6rem);
  letter-spacing: 0.01em;
}

.hero-tagline {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: #333;
  padding-bottom: 0.55rem;
}

.hero-rule {
  margin-top: 1.15rem;
}

.hero-body {
  display: grid;
  grid-template-columns: 1fr;
}

.hero-story {
  padding-top: 1.4rem;
}

.timeline {
  margin-top: 1rem;
}

.timeline li {
  position: relative;
  display: flex;
  gap: 0.55rem;
  padding: 0.56rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.79rem;
  line-height: 1.45;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.timeline li:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.timeline .num {
  font-variant-numeric: tabular-nums;
  flex: none;
}

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 1.2rem 0 0;
}

.still-life {
  width: 100%;
  max-width: 500px;
  overflow: visible;
}

.parallax {
  transform: translate3d(
    calc(var(--px, 0) * var(--d, 1) * 10px),
    calc(var(--py, 0) * var(--d, 1) * 10px),
    0
  );
  transition: transform 0.5s var(--ease);
}

.parallax[data-depth="2.4"] {
  --d: 2.4;
}
.parallax[data-depth="1.8"] {
  --d: 1.8;
}
.parallax[data-depth="1.5"] {
  --d: 1.5;
}
.parallax[data-depth="1.1"] {
  --d: 1.1;
}
.parallax[data-depth="0.7"] {
  --d: 0.7;
}
.parallax[data-depth="0.4"] {
  --d: 0.4;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.1rem;
  margin-top: 1.4rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.meta-name {
  font-weight: 500;
}

.meta-sep {
  color: var(--line);
}

.meta-arrow {
  color: var(--muted);
}

.meta-more {
  margin-left: auto;
  color: var(--ink);
}

.meta-more:hover {
  color: var(--accent);
}

/* ------------------------------ sections -------------------------------- */

.section {
  margin-top: 2.6rem;
  padding: 2.3rem 0 2.6rem;
  border-top: 1px solid var(--line-strong);
  scroll-margin-top: var(--header-h);
}

.section-last {
  padding-bottom: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.9rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 1.6rem;
}

.section-head h2 {
  font-size: clamp(2.1rem, 7vw, 2.9rem);
}

.section-suffix {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: #444;
}

/* ------------------------------- spec table ----------------------------- */

.spec {
  border: 1px solid var(--line-strong);
}

.spec-row {
  display: grid;
  grid-template-columns: 7.4rem minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}

.spec-row:last-child {
  border-bottom: 0;
}

.spec-row:hover {
  background: var(--tint);
}

.spec dt,
.spec dd {
  padding: 0.5rem 0.7rem;
  font-size: 0.74rem;
  line-height: 1.45;
}

.spec dt {
  color: var(--ink-soft);
  border-right: 1px solid var(--line);
}

.spec dd {
  color: var(--ink);
  margin: 0;
}

/* ------------------------------- projects ------------------------------- */

.projects {
  display: grid;
  gap: 1.5rem;
}

.project {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  width: 100%;
  height: 100%;
  padding: 1.4rem 1.4rem 1.2rem;
  border: 1px solid var(--line-strong);
  text-align: left;
  background: var(--paper);
  transition: background 0.25s var(--ease);
}

.project-card:hover,
.project.is-open .project-card {
  background: var(--tint);
}

.project-card:hover .project-title {
  color: var(--accent);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-meta .dot {
  color: var(--ink);
}

.project-title {
  font-size: clamp(1.7rem, 5vw, 2.1rem);
  line-height: 0.95;
  transition: color 0.2s var(--ease);
}

.project-desc {
  font-size: 0.79rem;
  line-height: 1.6;
  max-width: 42ch;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.55rem;
}

.tags li {
  padding: 0.12rem 0.4rem;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.05em;
  color: #444;
  text-transform: none;
}

.project-hint {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Media block: portrait, so photos keep their full frame. */
.project-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: var(--tint);
}

.project-media img,
.placeholder-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-details {
  grid-column: 1 / -1;
  border: 1px solid var(--line-strong);
  border-top: 0;
  padding: 1.1rem 1.4rem 1.2rem;
  background: #fcfcfa;
}

.project-details[hidden] {
  display: none;
}

.details-grid {
  display: grid;
  gap: 1rem;
}

.details-grid p {
  font-size: 0.76rem;
  line-height: 1.55;
  margin-bottom: 0.4rem;
}

.details-grid > div > p:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-family: var(--mono) !important;
  font-size: 0.56rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.details-grid .detail-label:not(:first-child) {
  margin-top: 0.75rem;
}

/* Optional photo strip inside an expanded project. */
.gallery {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.gallery figure {
  margin: 0;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--tint);
  border: 1px solid var(--line);
}

.gallery figcaption {
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

@media (max-width: 639px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.detail-hint {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  margin-top: 0.8rem;
}

.after-note {
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
}

/* -------------------------------- papers -------------------------------- */

.papers {
  border-top: 1px solid transparent;
}

.paper {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  padding: 0.95rem 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}

.paper:hover {
  background: var(--tint);
}

.paper-year {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
  padding-top: 0.1rem;
}

.paper-type {
  justify-self: start;
  align-self: start;
  padding: 0.14rem 0.4rem;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #444;
  white-space: nowrap;
}

.paper-body {
  grid-column: 2 / -1;
}

.paper-body h3 {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
}

.paper-body h3 a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.paper-body h3 a:hover {
  color: var(--accent);
}

.paper-body p {
  font-size: 0.72rem;
  line-height: 1.5;
  color: #444;
  margin-top: 0.2rem;
}

.paper-body .tags {
  margin-top: 0.5rem;
  padding-top: 0;
}

/* Optional photo on a research row. */
.paper-media {
  grid-column: 2 / -1;
  margin-top: 0.7rem;
  border: 1px solid var(--line);
  overflow: hidden;
}

.paper-media img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@media (min-width: 640px) {
  .paper-media img {
    aspect-ratio: 3 / 4;
  }
}

/* --------------------------------- work --------------------------------- */

.work-grid {
  display: grid;
  gap: 1.6rem;
}

.work-grid p {
  font-size: 0.79rem;
  line-height: 1.55;
}

.work-grid .detail-label {
  margin-bottom: 0.7rem;
}

.work-list li + li {
  margin-top: 0.2rem;
}

.work-list a {
  font-size: 0.79rem;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 2.6rem;
  padding: 0.9rem 0 2rem;
  border-top: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  color: #333;
}

.to-top {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
}

.to-top:hover {
  color: var(--accent);
}

/* ------------------------------- cursor --------------------------------- */

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 300;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
  transition: opacity 0.2s;
}

.cursor-dot.is-ready,
.cursor-ring.is-ready {
  opacity: 1;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: var(--ink);
  transition: width 0.15s, height 0.15s, margin 0.15s, background 0.15s;
}

.cursor-ring {
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 1px solid var(--ink);
  transition: width 0.22s var(--ease), height 0.22s var(--ease), margin 0.22s var(--ease),
    border-color 0.15s, opacity 0.2s;
}

.cursor-dot.is-hover {
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  background: var(--accent);
}

.cursor-ring.is-hover {
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-color: var(--accent);
}

/* ------------------------------ reveal ---------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ----------------------------- breakpoints ------------------------------ */

@media (min-width: 640px) {
  :root {
    --gutter: 2rem;
  }

  .project {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 1rem;
  }

  .paper {
    grid-template-columns: 3.2rem 5.6rem minmax(0, 1fr);
    align-items: start;
  }

  .paper-body {
    grid-column: auto;
  }

  .paper--media {
    grid-template-columns: 3.2rem 5.6rem minmax(0, 1fr) 9.5rem;
  }

  .paper--media .paper-media {
    grid-column: 4;
    margin-top: 0;
  }

  .work-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }

  .details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }

  .hero-art {
    min-height: 380px;
  }
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
  }

  .menu-btn {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }

  .hero-body {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .hero-story {
    padding-right: 1.6rem;
    border-right: 1px solid var(--line);
  }

  .hero-art {
    min-height: 470px;
    padding-left: 1.6rem;
  }

  .hero-title {
    font-size: 5.6rem;
  }

  .section {
    margin-top: 3rem;
    padding: 2.8rem 0 3.2rem;
  }

  .spec-row {
    grid-template-columns: 11.5rem minmax(0, 1fr);
  }

  .spec dt,
  .spec dd {
    padding: 0.52rem 0.95rem;
  }
}

/* --------------------------- reduced motion ----------------------------- */

@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;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

@media (hover: none) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}
