/* ==========================================================================
   ARTIST PORTFOLIO — SHARED STYLESHEET
   Every page (index, project, contact) links to this single file.
   Edit colors/fonts once here and the whole site updates.
   ========================================================================== */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- Design tokens ---- */
:root {
  --white: #ffffff;
  --ink: #0a0a0a;
  --blue: #0033ff;      /* the one accent color — change this to retheme everything */
  --blue-tint: #eef1ff;
  --gray: #6e6e6e;
  --line: #0a0a0a;
  --line-soft: #dcdcdc;

  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --header-h: 76px;
  --gap: 32px;
  --edge: clamp(20px, 5vw, 64px); /* page side padding, scales with viewport */

  --speed: 0.15s;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* Nothing on this site is rounded. Keep it that way. */
* { border-radius: 0 !important; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

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

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

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo .cursor {
  display: inline-block;
  color: var(--blue);
  margin-left: 2px;
  animation: blink 1.1s steps(2, jump-none) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed) ease-out;
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform var(--speed) ease-out, opacity var(--speed) ease-out;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   MOBILE NAV OVERLAY — flips to solid electric blue
   ========================================================================== */

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--blue);
  color: var(--white);
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--edge);
  transform: translateY(-100%);
  transition: transform var(--speed) ease-out;
}

.mobile-nav.is-open { transform: translateY(0); }

.mobile-nav a {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  text-transform: uppercase;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.35);
}

/* ==========================================================================
   TAG CHIP — the recurring signature element
   ========================================================================== */

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 4px 10px;
  color: var(--ink);
  background: var(--white);
  transition: background var(--speed) linear, color var(--speed) linear, border-color var(--speed) linear;
}

.tag::before { content: '['; margin-right: 4px; color: var(--blue); }
.tag::after { content: ']'; margin-left: 4px; color: var(--blue); }

a:hover .tag,
.tag:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

a:hover .tag::before,
a:hover .tag::after,
.tag:hover::before,
.tag:hover::after {
  color: var(--white);
}

/* ==========================================================================
   IMAGE FRAME — shared by the homepage list, project pages, and contact
   ========================================================================== */

.thumb-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--blue-tint) 0px, var(--blue-tint) 10px,
      var(--white) 10px, var(--white) 20px
    );
}

/* Real photo goes on top of the placeholder pattern.
   If the file in /images doesn't exist yet, this layer just
   doesn't paint and the striped placeholder shows through. */
.thumb-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease-out;
}

.project-row:hover .thumb-frame img {
  transform: scale(1.03);
}

/* ==========================================================================
   PROJECT LIST (index page)
   ========================================================================== */

.project-list {
  padding: 0 0 40px;
}

.project-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--line-soft);
}

.project-list .project-row:last-child {
  border-bottom: 1px solid var(--line-soft);
}

/* Landscape widescreen frame — matches 1920x1080 source photos */
.project-row-thumb .thumb-frame {
  aspect-ratio: 16 / 9;
}

.project-row-text {
  max-width: 46ch;
}

.project-row-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.project-title {
  font-weight: 700;
  font-size: 1.6rem;
  text-transform: uppercase;
  transition: color var(--speed) linear;
}

.project-row:hover .project-title {
  color: var(--blue);
}

.project-desc {
  margin-top: 14px;
  color: var(--gray);
  font-size: 1rem;
  max-width: 46ch;
}

/* ==========================================================================
   PROJECT DETAIL PAGE
   ========================================================================== */

/* Text and images share the exact same left/right margin as the header —
   both use .wrap, so nothing (text or pictures) ever touches the browser
   edge, and everything lines up under the logo/nav above it. */

.detail-head {
  padding: 56px 0 48px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 28px;
}

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

.detail-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.02;
  margin-bottom: 16px;
}

/* Flexible label/value fields — Year, Role, and anything else added
   (Materials, Location, Size...) render the same way automatically. */
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.meta-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

.meta-value {
  font-size: 0.95rem;
  color: var(--ink);
}

.detail-desc {
  font-size: 1.05rem;
  color: var(--ink);
  max-width: 90ch;
}

.detail-desc a,
.content-text-desc a {
  color: var(--blue);
  border-bottom: 1px solid var(--blue);
  transition: opacity var(--speed) linear;
}

.detail-desc a:hover,
.content-text-desc a:hover {
  opacity: 0.7;
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 0 0 64px;
}

/* ---- Image blocks: contained within the same margins as everything else,
   shown at their original aspect ratio, never cropped ---- */

.content-img {
  position: relative;
  width: 100%;
  min-height: 220px;
  background: var(--white);
}

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

.content-row--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* ---- Video blocks: an embedded, playable YouTube video, same width as a full image ---- */

.content-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

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

/* ---- Text blocks: a title + description between images ---- */

.content-row--text {
  padding: 8px 0;
}

.content-text-title {
  font-weight: 700;
  font-size: 1.3rem;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.content-text-desc {
  font-size: 1rem;
  color: var(--ink);
  max-width: 90ch;
}

/* ---- Previous / next project navigation ---- */

.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line-soft);
}

.project-nav-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 32px 0;
  transition: color var(--speed) linear;
}

.project-nav-link:hover { color: var(--blue); }

.project-nav-link--next {
  align-items: flex-end;
  text-align: right;
}

.project-nav-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
}

.project-nav-title {
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.not-found {
  padding: 96px 0;
  text-align: center;
}

.not-found h1 {
  font-size: 2rem;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

.bio-block {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  padding: 56px 0 64px;
  align-items: start;
}

.bio-block .thumb-frame {
  aspect-ratio: 1 / 1;
}

.bio-text p {
  margin-bottom: 22px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.bio-name {
  font-size: 1.3rem;
  font-weight: 700;
}

.bio-alias {
  display: block;
  font-weight: 400;
}

.bio-alias em {
  font-style: italic;
  font-weight: 400;
}

.bio-text a {
  border-bottom: 1px solid var(--ink);
  transition: color var(--speed) linear, border-color var(--speed) linear;
}

.bio-text a:hover {
  color: var(--blue);
  border-color: var(--blue);
}

/* ---- CV-style sections: education, internships, exhibitions ---- */

.cv {
  padding: 8px 0 80px;
  border-top: 1px solid var(--line);
}

.cv-block {
  padding: 36px 0;
  border-bottom: 1px solid var(--line-soft);
}

.cv-block:last-child {
  border-bottom: none;
}

.cv-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: lowercase;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  margin-bottom: 18px;
}

.cv-note {
  color: var(--gray);
  margin-bottom: 6px;
}

.cv-line {
  font-size: 0.98rem;
  line-height: 1.7;
}

.cv-line + .cv-line {
  margin-top: 2px;
}

.cv-line a {
  color: var(--blue);
}

.cv-line a:hover {
  text-decoration: underline;
}

.cv-gap {
  height: 18px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer,
.site-footer a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
}

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 720px) {
  .project-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .content-row--pair {
    grid-template-columns: 1fr;
  }
  .project-nav {
    grid-template-columns: 1fr;
  }
  .project-nav-link--next {
    align-items: flex-start;
    text-align: left;
    border-top: 1px solid var(--line-soft);
  }
  .bio-block {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .bio-block .thumb-frame {
    max-width: 320px;
  }

  /* Contact page: keep a clear side gutter on mobile. */
  .bio-block.wrap,
  .cv.wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 680px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
}