/* Portfolio hub — responsive layout */

:root {
  --color-bg-top: var(--n-02);
  --color-bg-bottom: var(--n-01);
  --color-text: var(--n-d);
  --color-accent: var(--n-02);
  --shadow-card: var(--ef01);
  --radius: 12px;
  --radius-lg: 20px;
  
  --space: clamp(1rem, 4vw, 2rem);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .project-card {
    transition: none;
  }
  .map-circle {
    animation: none;
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Montserrat", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--color-text);
  background: linear-gradient(180deg, rgba(222, 181, 105, 0.35) 0%, var(--n-01) 42%, #f5f0e8 100%);
  line-height: 1.5;
  overflow-x: hidden;
  overflow-y: hidden;
}

#phase1 {
  min-height: 100vh;
  width: 100%;
}

.app-shell {
  height: 100vh;
  box-sizing: border-box;
}

.app-frame {
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--n-d);
  color: var(--n-01);
  font-weight: 600;
}

.skip-link:focus {
  left: var(--space);
  top: var(--space);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono {
 
  font-size: 0.9em;
}

/* Header */
.site-header {
  padding: var(--space);
  padding-bottom: clamp(1.5rem, 5vw, 3rem);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
}

.site-header__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(68, 49, 48, 0.65);
  margin: 0 0 0.75rem;
}

.site-header__title {
  flex: 1;
  text-align: center;
 
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.15;
  margin: 0;
  background: linear-gradient(180deg, var(--n-02) 0%, #a67c3d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 520px) {
  .site-header__inner {
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

.site-header__lede {
  max-width: 36rem;
  margin: 0 auto;
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: rgba(68, 49, 48, 0.82);
}

/* Fixed 2-column layout: left stays static, right scrolls */
.page-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 0;
  overflow: hidden;
}

.page-left {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page-left-top {
  flex: 0 0 40%;
  height: 40%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #f1ebe1;
}

.page-left-bottom {
  flex: 0 0 60%;
  height: 60%;
  overflow: hidden;
  padding: clamp(0.6rem, 1.2vw, 1rem);
  border-bottom: 1px solid #f1ebe1;
  position: relative;
}

.position-absolute {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: top 0.25s ease, left 0.25s ease;
}

.map-circle {
  width: clamp(24px, 3.4vw, 54px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(180deg, #DEB569 0%, #C08B4A 100%);
  padding: clamp(3px, 0.5vw, 6px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: map-marker-blink 1.35s ease-in-out infinite;
}

.map-circle__middle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #F1EBE1;
  padding: clamp(3px, 0.5vw, 6px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-circle__inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(180deg, #DEB569 0%, #C08B4A 100%);
}

@keyframes map-marker-blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.58;
    transform: scale(0.92);
  }
}

.page-left-bottom img {
  width: 100%;
  height: auto;
  max-height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.page-right {
  height: 100%;
  overflow: hidden;
  min-width: 0;
}

.page-right .projects {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  flex: initial;
}

@media (max-width: 960px) {
  .page-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .page-right .projects {
    /* keep only projects scrollable */
    height: 100%;
  }
}

/* Dream home selector (left top) */
.dream-home-panel {
  height: 100%;
  background: var(--n-01);
  padding: clamp(0.9rem, 2.0vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  flex: 1;
  min-height: 0;
}

.dream-home-title {
  margin: 0;
  
  font-weight: 600;
  font-size: clamp(1.1rem, 2.2vw, 2.0rem);
  line-height: 1.05;
  color: var(--n-02);
}

.sidebar-site-header {
  flex: 0 0 auto;
  padding: 0;
}

.sidebar-site-header .site-header__inner {
  max-width: none;
  margin: 0;
  padding: 0.6rem 0.2rem 0.25rem;
}

.sidebar-title {
 
  font-size: clamp(1.45rem, 2.9vw, 2.2rem);
  margin: 0;
}

.sidebar-site-header img {
  width: 85px;
  height: 85px;
}

.dream-home-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.25rem;
  align-content: start;
}

.dream-pill {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #e7d8c3;
  background: #f1ebe1;
  padding: 0.5rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dream-pill:hover {
  background: linear-gradient(180deg, #DEB569 0%, #C08B4A 100%);
  border-color: rgba(255, 255, 255, 0.4);
}

.dream-pill:hover .dream-pill__label {
  color: #fff;
}

.dream-pill:hover .dream-pill__num {
  border-color: transparent;
}

.dream-pill__num {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(180deg, #DEB569 0%, #C08B4A 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.2rem;
  flex: 0 0 auto;
}

.dream-pill__label {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--n-02);
  white-space: nowrap;
}

.dream-pill.is-selected {
  background: var(--n-02);
  border-color: rgba(255, 255, 255, 0.25);
}

.dream-pill.is-selected .dream-pill__label {
  color: #fff;
}

.dream-pill.is-selected .dream-pill__num {
  background: var(--n-01);
  border-color: var(--n-02);
  color: var(--n-02);
}

.dream-pill.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dream-pill.is-disabled:hover {
  background: #f1ebe1;
  border-color: #e7d8c3;
}

.dream-pill.is-disabled:hover .dream-pill__label {
  color: var(--n-02);
}

@media (max-width: 520px) {
  .dream-home-grid {
    grid-template-columns: 1fr;
  }

  .dream-pill__label {
    font-size: 1rem;
  }
}

/* Grid */
.projects {
  flex: 1;
  padding: 0 var(--space) clamp(2rem, 6vw, 4rem);
}

.project-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--max-width);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 4vw, 2rem);
}

@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 960px) {
  .project-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (min-width: 1180px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;

  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  text-decoration: none;
  color: inherit;

  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* On larger screens, show image (left) + content (right) */
@media (min-width: 720px) {
  .project-card {
    flex-direction: row;
    align-items: stretch;
  }

  .project-card__media {
    flex: 0 0 42%;
  }

  .project-card__body {
    padding: 1.75rem 1.8rem 1.75rem;
  }
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: none;
  background: linear-gradient(180deg, #DEB569 0%, #C08B4A 100%);
}

.project-card:focus {
  outline: none;
}

.project-card:focus-visible {
  outline: 3px solid var(--n-02);
  outline-offset: 3px;
}

.project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: inherit;
  overflow: hidden;
}

.project-card__img {
  box-sizing: border-box;
  padding: 12px 0 12px 12px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card__body {
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.project-card__tag {
  margin: 0;
  margin-top: auto;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(68, 49, 48, 0.55);
  transform: translateY(0);
  transition: color 0.25s ease;
}

.project-card__name {
  margin: 0;
  
  font-size: clamp(1.9rem, 2.5vw, 2.35rem);
  font-weight: 600;
  color: var(--n-d);
  transform: translateY(0);
  transition: color 0.25s ease;
}

.project-card__meta {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(68, 49, 48, 0.7);
  transform: translateY(0);
  transition: color 0.25s ease;
}

.project-card__cta {
  position: absolute;
  left: 1.35rem;
  right: 1.35rem;
  bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 42px;
  width: min(220px, calc(100% - 2.7rem));
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #F1EBE1;
  font-weight: 500;
  font-size: 0.95rem;
  color: #443130;
  letter-spacing: 0.01em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card__cta span[aria-hidden="true"] {
  font-size: 1rem;
  line-height: 1;
}

.project-card:hover .project-card__tag,
.project-card:focus-visible .project-card__tag {
  color: rgba(255, 255, 255, 0.85);
}

.project-card:hover .project-card__name,
.project-card:focus-visible .project-card__name {
  color: #fff;
}

.project-card:hover .project-card__meta,
.project-card:focus-visible .project-card__meta {
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(0);
  margin-bottom: auto;
}

.project-card:hover .project-card__tag,
.project-card:focus-visible .project-card__tag,
.project-card:hover .project-card__name,
.project-card:focus-visible .project-card__name {
  transform: translateY(0);
}

.project-card:hover .project-card__tag,
.project-card:focus-visible .project-card__tag {
  margin-top: 0;
}

.project-card:hover .project-card__cta,
.project-card:focus-visible .project-card__cta {
  opacity: 1;
  visibility: visible;
  color: #443130;
  transform: translateY(0) translateX(2px);
  box-shadow: 0 4px 10px rgba(68, 49, 48, 0.15);
}

/* Footer */
.site-footer {
  padding: 1.25rem var(--space);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(68, 49, 48, 0.55);
  border-top: 1px solid rgba(192, 138, 74, 0.25);
}

.site-footer p {
  margin: 0;
}

/* Phase 1 hero responsiveness */
#phase1 .site-header__inner {
  gap: clamp(0.5rem, 2vw, 1rem);
}

#phase1 .site-header__inner img {
  width: clamp(84px, 18vw, 130px) !important;
  height: auto !important;
  object-fit: contain;
}

.phase1-hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 0 2.5rem;
}

.phase1-hero-image {
  width: 90% !important;
  height: auto !important;
  max-height: min(72vh, 760px);
}

#phase1StartBtn {
  left: 50% !important;
  top: auto !important;
  bottom: clamp(1.5rem, 4vw, 3rem);
  transform: translateX(-50%) !important;
  max-width: calc(90% - 1rem);
  font-size: clamp(0.95rem, 2.8vw, 1.75rem) !important;
  padding: clamp(0.65rem, 1.6vw, 1.1rem) clamp(1rem, 3.2vw, 2.4rem) !important;
  white-space: normal;
  justify-content: center;
}

#phase1StartBtn span {
  text-align: center;
}

@media (max-width: 520px) {
  .phase1-hero {
    padding-bottom: 2rem;
  }

  #phase1StartBtn {
    width: min(92vw, 330px);
    gap: 0.5rem !important;
  }
}
