/* ============================================================
   PORTFOLIO STYLES — visual design lives here
   ============================================================ */

/* Font variables injected by JS from config */
:root {
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Outfit', sans-serif;
  --color-bg: #ffffff;
  --color-text: #FF5722;
  --color-muted: #393E46;
  --color-accent: #393E46;
  --color-overlay: rgba(0,0,0,0.5);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }

/* ---- Layout ---- */
.site-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* ---- Header ---- */
.site-header {
  padding: 1.75rem 0 1.25rem;
  border-bottom: 0.5px solid rgba(0,0,0,0.12);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 100;
}

.site-header .site-wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--font-display-weight, 300);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.site-logo a { color: var(--color-text); }

.logo-img {
  height: 80px;
}

/* ---- Nav ---- */
.site-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.15s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

/* ---- Hero image (optional) ---- */
.site-hero {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
}
.site-hero img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* ---- Project Grid ---- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px 0;
}

.project-tile {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background: #ddd;
}

/* ---- Doodles: fully non-interactive ---- */
.doodle-tile {
  cursor: default;
}

.doodle-tile:hover .project-tile-img {
  transform: none !important;
}

.doodle-tile:hover .project-tile-overlay {
  opacity: 0 !important;
}

.doodle-tile:hover .project-tile-label {
  transform: none !important;
}

.project-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-tile-placeholder {
  width: 100%;
  height: 100%;
}

.project-tile:hover .project-tile-img {
  transform: scale(1.05);
}

.project-tile-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  transition: opacity 0.3s ease;
}

.project-tile:hover .project-tile-overlay {
  opacity: 1;
}

.project-tile-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  transform: translateY(6px);
  transition: transform 0.3s ease;
}

.project-tile:hover .project-tile-label {
  transform: translateY(0);
}

/* ---- Section pages (About / Contact) ---- */
.page-section {
  padding: 2rem 0;
  max-width: 680px;
}

.page-section h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--color-muted);
  font-weight: var(--font-display-weight, 300);
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
}

.page-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

.page-section .about-photo {
  width: 100%;
  max-width: 420px;
  margin-bottom: 2.5rem;
}

/* Contact page email */
.contact-email {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 300;
  display: inline-block;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-muted);
}

/* About page email (and any links in bio) */
.about-text a {
  color: var(--color-text);
}

.contact-email:hover,
.about-text a:hover {
  color: var(--color-muted);
}

/* ---- About layout ---- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  padding: 2rem 0;
}
.about-layout h1 {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--color-muted);
  font-weight: var(--font-display-weight, 300);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
.about-layout img {
  width: 70%;
}
.about-layout p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}
@media (max-width: 640px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ---- Project Detail Page ---- */
.project-detail {
  padding: 3.5rem 0 6rem;
}

.project-detail-back {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2.5rem;
  transition: color 0.15s;
}
.project-detail-back:hover { color: var(--color-text); }
.project-detail-back::before { content: "←"; }

.project-detail-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: var(--font-display-weight, 300);
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
  line-height: 1.15;
  font-style: normal;
  color: var(--color-muted);
}

.project-detail-media {
  width: 100%;
  margin-bottom: 3rem;
  background: #111;
}

.project-detail-media iframe {
  width: 100%;
  border: none;
  display: block;
}

.project-detail-media img {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
}

.project-detail-body {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 640px) {
  .project-detail-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.project-detail-description {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-muted);
}

.project-detail-description p + p {
  margin-top: 1rem;
}

.project-detail-meta {
  border-top: 0.5px solid rgba(0,0,0,0.12);
  padding-top: 1.5rem;
}

.project-detail-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1.25rem;
}

.meta-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
}

.meta-value {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.project-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 0.5px solid rgba(0,0,0,0.12);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-nav a {
  color: var(--color-text);
  transition: color 0.15s;
}

.project-nav a:hover { color: var(--color-text); }

/* ---- Doodles Masonry Layout ---- */
#project-grid[data-category="doodles"] {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

#project-grid[data-category="doodles"] .project-tile {
  width: 100%;
  max-width: 350px;
  aspect-ratio: 4 / 3;
}

@media (max-width: 900px) {
  #project-grid[data-category="doodles"] {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  #project-grid[data-category="doodles"] {
    column-count: 1;
  }
}

/* ---- Footer ---- */
.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 0.5px solid rgba(0,0,0,0.12);
}

.site-footer .site-wrap {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.site-footer a {
  color: var(--color-text);
  transition: color 0.2s ease;
}

.site-footer a i {
  font-size: 1.5rem;
}

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


/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  opacity: 0.7;
  z-index: 10000;
  transition: opacity 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox.hidden {
  display: none;
}

/* ---- Utilities ---- */
.hidden { display: none !important; }

/* ---- Mobile ---- */
@media (max-width: 750px) {

  .site-header .site-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
  }

  .site-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9rem;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .site-wrap {
    padding: 0 1.2rem;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-layout img {
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
  display: block;
}

  .site-footer {
    margin-top: 1rem;
    padding: 1.5rem 0;
  }

  .site-logo img {
    height: 50px;
  }

  .site-footer a i {
    font-size: 1.25rem;
  }

    /* Remove hover overlays on mobile */
  .project-tile-overlay {
    display: none;
  }

}