/*
Theme Name: Nastaran Portfolio
Theme URI: https://example.com
Author: ChatGPT
Description: Minimal fullscreen portfolio theme with animated fixed typography navigation for Nastaran Mohseni.
Version: 1.0.0
License: GPL v2 or later
Text Domain: nastaran-portfolio
*/

:root {
  --font-main: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #ffffff;
  --text: #000000;
  --muted: #666666;
  --soft: #d2d2d2;
  --soft-light: #eeeeee;
  --line: #000000;
  --radius: 34px;
  --radius-lg: 42px;
  --rail-x: clamp(24px, 13.1vw, 235px);
  --rail-width: clamp(260px, 28vw, 560px);
  --content-left: clamp(560px, 42vw, 760px);
  --page-pad-y: clamp(44px, 8.5vh, 110px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.nm-site {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--content-left) minmax(0, 1fr);
}

/* Fixed left navigation */
.nm-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--content-left);
  height: 100vh;
  background: #fff;
  z-index: 20;
  pointer-events: none;
}
.nm-sidebar-inner {
  position: relative;
  width: 100%;
  height: 100%;
}
.nm-sidebar-line {
  position: absolute;
  left: var(--rail-x);
  top: 12vh;
  bottom: 12vh;
  width: 4px;
  background: var(--line);
  transform-origin: center;
  animation: nm-line-in .9s var(--ease) both;
}
.nm-menu-stage {
  position: absolute;
  left: calc(var(--rail-x) + 32px);
  top: 50%;
  width: min(470px, calc(100vw - var(--rail-x) - 50px));
  transform: translateY(-50%);
  pointer-events: auto;
}
.nm-menu-stack {
  transition: transform .66s var(--ease);
  will-change: transform;
}
.nm-brand {
  display: block;
  font-size: clamp(26px, 2.15vw, 39px);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -0.045em;
  margin: 0 0 22px;
  transition: transform .62s var(--ease), font-size .62s var(--ease), opacity .35s ease;
}
.nm-main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nm-main-nav li { margin: 0; }
.nm-main-nav a {
  display: inline-block;
  font-size: clamp(28px, 2.3vw, 42px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.055em;
  transform-origin: left center;
  transition: transform .55s var(--ease), font-size .55s var(--ease), font-weight .55s var(--ease), letter-spacing .55s var(--ease), opacity .3s ease;
  will-change: transform, font-size;
}
.nm-main-nav a:hover,
.nm-main-nav a:focus-visible,
.nm-main-nav li.is-active > a,
.nm-main-nav li.is-hover > a {
  font-size: clamp(58px, 5vw, 92px);
  font-weight: 950;
  line-height: .95;
  letter-spacing: -0.075em;
}
.nm-main-nav li:not(.is-active):not(.is-hover) a { opacity: 1; }
.nm-main-nav:hover li:not(.is-hover):not(.is-active) a { opacity: .98; }
body.nm-has-active .nm-brand,
body.nm-menu-preview .nm-brand {
  font-size: clamp(24px, 2vw, 36px);
  transform: translateY(-8px);
}
.nm-home .nm-brand {
  font-size: clamp(46px, 4.15vw, 78px);
  margin-bottom: 18px;
}
.nm-home .nm-main-nav a {
  font-size: clamp(28px, 2.15vw, 40px);
}
.nm-home .nm-main-nav a:hover,
.nm-home .nm-main-nav li.is-hover > a {
  font-size: clamp(58px, 5vw, 90px);
}

/* Main content */
.nm-content {
  grid-column: 2;
  min-height: 100vh;
  padding: var(--page-pad-y) clamp(40px, 6vw, 120px) var(--page-pad-y) 0;
  opacity: 0;
  transform: translateX(24px);
  animation: nm-content-in .72s var(--ease) .12s forwards;
}
.nm-content.is-empty { pointer-events: none; }
.nm-content-inner {
  width: min(100%, 1040px);
}
.nm-center-content {
  min-height: calc(100vh - (var(--page-pad-y) * 2));
  display: flex;
  align-items: center;
}

/* Shared cards */
.nm-shape,
.nm-thumb,
.nm-placeholder,
.nm-text-card,
.nm-festival-card {
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  overflow: hidden;
}
.nm-thumb,
.nm-placeholder {
  background: #000;
  color: #fff;
  flex: 0 0 auto;
}
.nm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nm-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  font-weight: 900;
  font-size: clamp(18px, 1.8vw, 30px);
  text-align: center;
  padding: 20px;
}

.nm-reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: nm-reveal-in .75s var(--ease) forwards;
}
.nm-reveal:nth-child(2) { animation-delay: .08s; }
.nm-reveal:nth-child(3) { animation-delay: .16s; }
.nm-reveal:nth-child(4) { animation-delay: .24s; }

/* Bio */
.nm-bio-layout {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(360px, 820px);
  align-items: start;
  gap: 0;
  margin-left: -70px;
}
.nm-bio-image {
  width: 190px;
  height: 280px;
  position: relative;
  z-index: 2;
  transform: translate(84px, -105px);
}
.nm-text-card {
  background: var(--soft);
  color: #000;
  padding: clamp(26px, 3.4vw, 48px);
  font-size: clamp(20px, 2vw, 34px);
  line-height: 1.2;
  max-height: 66vh;
  overflow: auto;
}
.nm-text-card p:first-child { margin-top: 0; }
.nm-text-card p:last-child { margin-bottom: 0; }

/* Art Gallery category panel */
.nm-art-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(34px, 5vw, 85px);
  align-items: start;
}
.nm-category-block {
  position: sticky;
  top: 31vh;
  min-height: 220px;
  display: grid;
  grid-template-columns: 120px 3px 1fr;
  align-items: center;
}
.nm-category-line-h {
  height: 4px;
  background: #000;
  transform-origin: right center;
  animation: nm-grow-x .55s var(--ease) both;
}
.nm-category-line-v {
  width: 4px;
  height: 180px;
  background: #000;
  transform-origin: center top;
  animation: nm-grow-y .55s var(--ease) .34s both;
}
.nm-category-list {
  list-style: none;
  padding: 0 0 0 22px;
  margin: 0;
}
.nm-category-list li {
  opacity: 0;
  transform: translateX(-12px);
  animation: nm-cat-in .55s var(--ease) forwards;
}
.nm-category-list li:nth-child(1) { animation-delay: .58s; }
.nm-category-list li:nth-child(2) { animation-delay: .66s; }
.nm-category-list li:nth-child(3) { animation-delay: .74s; }
.nm-category-list li:nth-child(4) { animation-delay: .82s; }
.nm-category-list li:nth-child(5) { animation-delay: .90s; }
.nm-category-list li:nth-child(6) { animation-delay: .98s; }
.nm-category-list a {
  display: inline-block;
  font-size: clamp(20px, 1.65vw, 31px);
  font-weight: 850;
  line-height: 1.5;
  letter-spacing: -0.045em;
  transition: transform .45s var(--ease), font-size .45s var(--ease), font-weight .45s var(--ease);
  transform-origin: left center;
}
.nm-category-list a:hover,
.nm-category-list li.is-active a {
  font-size: clamp(26px, 2.1vw, 39px);
  font-weight: 950;
}

/* Lists */
.nm-list {
  display: grid;
  gap: clamp(32px, 4.8vh, 56px);
}
.nm-list-item {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.nm-list-item .nm-thumb,
.nm-list-item .nm-placeholder {
  width: 260px;
  height: 310px;
}
.nm-list-title {
  margin: 0;
  font-size: clamp(34px, 3vw, 56px);
  line-height: .98;
  letter-spacing: -0.065em;
  font-weight: 950;
}
.nm-list-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: clamp(15px, 1.05vw, 20px);
  line-height: 1.25;
}
.nm-list-excerpt {
  margin: 28px 0 0;
  font-size: clamp(13px, .92vw, 16px);
  line-height: 1.45;
  font-weight: 750;
  max-width: 720px;
}
.nm-list-item:hover .nm-thumb img { transform: scale(1.035); }
.nm-list-item .nm-thumb img { transition: transform .65s var(--ease); }

/* Festival */
.nm-festival-card {
  width: min(100%, 900px);
  max-height: 66vh;
  overflow: auto;
  background: var(--soft);
  padding: clamp(28px, 3.2vw, 52px);
}
.nm-festival-list { margin: 0; padding: 0; list-style: none; }
.nm-festival-list li {
  color: #fff;
  font-size: clamp(24px, 2.2vw, 38px);
  line-height: 1.35;
  padding: 0 0 18px;
  margin: 0 0 18px;
  border-bottom: 2px dashed rgba(255,255,255,.95);
}
.nm-festival-empty { font-size: 24px; margin: 0; }

/* Contact */
.nm-contact-wrap {
  width: min(100%, 520px);
}
.wpcf7 form p { margin: 0 0 14px; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  width: 100%;
  border: 0;
  background: #c9c9c9;
  color: #000;
  padding: 14px 22px;
  font-family: var(--font-main);
  font-size: 24px;
  line-height: 1.2;
  outline: none;
  border-radius: 0;
}
.wpcf7 textarea { min-height: 220px; resize: vertical; }
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder { color: #111; opacity: 1; }
.wpcf7 input[type="submit"] {
  display: block;
  width: 100%;
  border: 0;
  background: #000;
  color: #fff;
  padding: 12px 20px;
  font-family: var(--font-main);
  font-size: 26px;
  cursor: pointer;
  transition: opacity .25s ease;
}
.wpcf7 input[type="submit"]:hover { opacity: .82; }
.nm-socials {
  margin-top: 24px;
  font-size: clamp(20px, 1.6vw, 28px);
  line-height: 1.35;
}
.nm-socials a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* Single pages */
.nm-single-head {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-bottom: 34px;
}
.nm-single-head .nm-thumb,
.nm-single-head .nm-placeholder {
  width: 280px;
  height: 340px;
}
.nm-single-title {
  margin: 0;
  font-size: clamp(38px, 3.2vw, 62px);
  font-weight: 950;
  line-height: .98;
  letter-spacing: -0.065em;
}
.nm-single-inline-meta {
  font-weight: 400;
  font-size: .62em;
  letter-spacing: -0.04em;
  color: #111;
}
.nm-single-text {
  font-size: clamp(14px, .95vw, 17px);
  line-height: 1.45;
  font-weight: 750;
  max-height: 260px;
  overflow: auto;
  margin-top: 22px;
}
.nm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 18px 0 34px;
  font-size: clamp(20px, 1.5vw, 28px);
}
.nm-tab-button {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: #111;
  transition: font-weight .25s ease, transform .25s var(--ease);
}
.nm-tab-button:hover,
.nm-tab-button.is-active {
  font-weight: 850;
  transform: translateY(-2px);
}
.nm-tab-panel { display: none; }
.nm-tab-panel.is-active { display: block; animation: nm-reveal-in .45s var(--ease) both; }
.nm-post-meta-bar {
  margin-top: 34px;
  border-top: 4px solid #000;
  border-bottom: 4px solid #000;
  padding: 7px 0;
  color: #555;
  font-size: 18px;
}

/* WordPress gallery */
.nm-gallery-area,
.gallery {
  margin-top: 34px;
}
.gallery {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(72px, 1fr));
  gap: 18px;
}
.gallery br { display: none; }
.gallery-item {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}
.gallery-icon a,
.gallery-icon img {
  display: block;
  width: 100% !important;
  height: auto !important;
}
.gallery-icon img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 0 !important;
  border-radius: 0 16px 16px 16px;
  background: #000;
  transition: transform .45s var(--ease), opacity .3s ease;
}
.gallery-icon a:hover img { transform: scale(1.04); opacity: .88; }
.gallery-caption { display: none; }

/* Generic content */
.nm-entry-content { font-size: 18px; line-height: 1.65; }
.nm-entry-content > *:first-child { margin-top: 0; }

@keyframes nm-line-in { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
@keyframes nm-content-in { to { opacity: 1; transform: translateX(0); } }
@keyframes nm-reveal-in { to { opacity: 1; transform: translateY(0); } }
@keyframes nm-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes nm-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes nm-cat-in { to { opacity: 1; transform: translateX(0); } }

@media (max-width: 1180px) {
  :root { --content-left: 470px; --rail-x: 86px; }
  .nm-art-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .gallery { grid-template-columns: repeat(5, minmax(66px, 1fr)); }
}

@media (max-width: 900px) {
  .nm-site { display: block; }
  .nm-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 420px;
  }
  .nm-sidebar-line { left: 24px; top: 40px; bottom: 40px; width: 3px; }
  .nm-menu-stage {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    padding: 82px 24px 72px 56px;
    width: 100%;
  }
  .nm-menu-stack { transform: none !important; }
  .nm-main-nav a,
  .nm-home .nm-main-nav a { font-size: 30px; }
  .nm-main-nav a:hover,
  .nm-main-nav li.is-active > a,
  .nm-main-nav li.is-hover > a,
  .nm-home .nm-main-nav a:hover,
  .nm-home .nm-main-nav li.is-hover > a { font-size: 54px; }
  .nm-content { padding: 30px 24px 70px 56px; min-height: auto; }
  .nm-center-content { min-height: auto; display: block; }
  .nm-bio-layout,
  .nm-art-layout,
  .nm-list-item,
  .nm-single-head {
    display: block;
    margin-left: 0;
  }
  .nm-bio-image {
    width: 190px;
    height: 230px;
    transform: none;
    margin-bottom: 18px;
  }
  .nm-category-block {
    position: static;
    grid-template-columns: 76px 3px 1fr;
    margin-bottom: 34px;
  }
  .nm-category-line-v { height: 150px; }
  .nm-list-item .nm-thumb,
  .nm-list-item .nm-placeholder,
  .nm-single-head .nm-thumb,
  .nm-single-head .nm-placeholder {
    width: min(100%, 280px);
    height: 300px;
    margin-bottom: 22px;
  }
  .nm-list-title { font-size: 42px; }
  .gallery { grid-template-columns: repeat(3, minmax(64px, 1fr)); gap: 12px; }
}
