/* ------------- Base ------------- */
body {
  margin: 0;
  background: rgb(6, 4, 7);
  color: white;
  font-family: sans-serif;
  width: 100%;
  
}

/* ------------- Portfolio wrapper ------------- */
.portfolio {
  display: grid;
    /* gap | meta | image | gap   = equal outer gutters  */
  grid-template-columns: minmax(160px,1fr) 260px 600px minmax(160px,1fr); /* NEW */
  grid-auto-rows: auto;
  gap: 0;
  padding: 10rem 0;
  box-sizing: border-box;
  
}


/* ------------- Branding block ------------- */
.branding .logo {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.links a {
  color: white;
  text-decoration: none;
  margin-right: 1rem;
  font-size: 0.9rem;
}


.project {
  display: grid;
  grid-template-columns: 260px 1fr;  /* meta | image */
  align-items: flex-start;           /* top-align meta + image */
  grid-column: 2 / 5; 
  color: #fff;               /* NEW – default white */
  transition: color 0.3s;    /* NEW – smooth tint change */
  cursor: pointer;            /* NEW – show hand cursor on hover */
  overflow: hidden;            /* NEW – crops the scaled image */
  position: relative; /* ← this is the critical piece */

}

/* Meta text inside each row */
.meta h2 {                 /* NEW – remove default top margin */
  margin: 0 0 1rem 0;          /* 1 rem gap under title */
  font-size: 1.5rem;
  position: relative;          /* so the pseudo-line sits under it */
}

.meta span {
  display: block;
  font-size: 0.85rem;
  color: #ffffff;
  transition: color 0.3s; /* NEW – prepare for hover tint */
}

.thumb img {                          /* NEW – no extra margin */
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  transform-origin: center;
}

.meta {                   /* NEW – resets container spacing */
  margin: 0;              /* NEW – eliminate default margin so meta top aligns
                             perfectly with image top */
}

.meta h2::after {              /* NEW – the line you want */
  content: "";
  display: block;
  width: 3rem;                 /* customise length */
  height: 2px;                 /* line thickness */
  background: currentColor;    /* same white as text */
  margin: 1rem 0;              /* 1 rem gap above & below—matches others */
  transform: scaleX(0);       /* NEW – start hidden */
  transform-origin: left;     /* NEW – grow from left edge */
  transition: transform 0.3s; /* NEW – smooth reveal */
}

.project:hover .meta h2::after {   /* NEW */
  transform: scaleX(1);            /* underline appears on hover */
}

.logo-row {
  grid-column: 2 / 4; 
  margin-bottom: 10rem;      /* NEW – separates links from “Drawings” */
}

.projects  { grid-column: 2 / 4;
  display: flex;
  flex-direction: column;
  gap: 8rem;               /* this is the only gap we need */
}


.name {                 /* NEW */
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.tag {                /* NEW – bold only the descriptor */
  font-weight: bold;
  margin-bottom: 1rem;   /* same 1 rem gap */
}

.meta span:last-child {
  margin-bottom: 0;      /* no extra space after the year */
}

.project:hover {
  color: #a88ef5;             /* NEW – your lavender accent */
}

.project:hover .meta span {   /* NEW */
  color: #a88ef5;             /* same lavender as heading */
}



/* rigid 600×300 frame that crops overflow */
.thumb {                           /* NEW */
  width: 600px;                    /* keep your size */
  height: 300px;
  overflow: hidden;                /* clips the zoom on all four sides */
  position: relative;
}

.project:hover .thumb img {        /* NEW */
  transform: scale(1.06);
}

/* ---------- EMAIL INTERACTION ---------- */
.email-link {                     /* context shown for clarity */
  color: #fff;
  text-decoration: none;
  position: relative;
  display: inline-block;          /* ⭐ NEW – give the link its own box   */
  transition: color .3s;
  cursor: pointer;
}

/* hover tint – ADD / RESTORE */
.email-link:hover {        /* ⭐ NEW | restore */
  color: #a88ef5;          /* luscious lavender 💜 */
}


/* tooltip */
.email-link::after {
  content: "click to copy";
  position: absolute;
  left: 50%;                      /* centre horizontally in the link box */
  top: calc(100% + 0rem);       /* ⭐ CHANGED – tidy 0.4 rem gap below  */
  transform: translate(-50%, -4px);/* ⭐ CHANGED – pull back 50 % & lift  */
  background: transparent;
  color: #fff;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}

.email-link:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);  /* centred X & slides up neatly 🖤 */
}

/* flash when copied */
.email-link.copied {             /* NEW */
  color: #8EF5A8;                /* mint flash (tweak if desired) */
}

.email-link.copied::after {      /* NEW */
  content: "copied!";            /* tooltip text swap */
  transform: translate(-50%, 0);
}

/* ---------- page-load fade ------------- */
.page-fade {
  opacity: 0;                           /* start hidden */
  animation: fadeIn .9s ease-out .2s
            forwards;                   /* play once, 0.2 s delay */
}

@keyframes fadeIn {
  to { opacity: 1; }
}

html {
  overflow-y: scroll;
}

.project-link {
  display: block;
  text-decoration: none; /* remove underline from link */
  color: inherit;        /* keep text colors */
}

.meta .desc {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.4;
}

/* Enable transition always */
.thumb img {
  transition: transform 0.4s ease;
}

body:not(.no-zoom) .thumb img {
  transition: transform 0.4s ease;
}
body:not(.no-zoom) .project:hover img {
  transform: scale(1.06);
}

/* This should NOT exist if you want zoom off */
body.no-zoom .project:hover img,
body.no-zoom .thumb:hover img {
  transform: none !important;
}

.thumb .popup {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translate(-50%, -0.4rem);
  background: transparent;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 2;
}

.project:hover .thumb .popup {
  opacity: 1;
  transform: translate(-50%, 0); /* matches email hover */
}

body.no-zoom .portfolio {
  overflow: visible !important;
}

body.no-zoom .project {
  overflow: visible !important;
}

body.no-zoom .thumb {
  overflow: visible;
}

/* === GALLERY MODAL POLISH FINAL === */
#gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 4, 7, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 2rem;
  display: flex; /* always flex */
}

#gallery-modal.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.gallery-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

.gallery-image {
  width: 800px;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 0;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(6, 4, 7, 9);
  transition: opacity 0.3s ease; /*  FADE IN/OUT NICE */
  opacity: 1;
}

/* Now style the actual arrows individually */
.prev, .next {
  position: relative; /* not absolute anymore */
  top: 0; /* reset */
  transform: none; /* reset */
  font-size: 2rem;
  color: white;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  width: 2rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 1rem; /* <- this is the new perfect spacing */
  opacity: 0.7; /* normal softness */
transition: opacity 0.4s ease; /* smooth breathing */
}
/* Fade Transition for the Image */
.gallery-image {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-image.loaded {
  opacity: 1;
}

.gallery-arrows {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px; /* match your image */
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Individual Arrows */
#prev-image,
#next-image {
  pointer-events: auto;
  font-size: 1.2rem; /* smaller */
  color: white;
  cursor: pointer;
  user-select: none;
}

/* Specific positions */
.prev {
  left: -3rem; /* adjust distance from the left of the image */
}

.next {
  right: -3rem; /* adjust distance from the right of the image */
  
}

.gallery-content:hover .gallery-arrows {
  opacity: 1;
  pointer-events: auto;
}

.prev:hover, .next:hover {
  opacity: 1;
}

body.no-pointer .project {
  cursor: default;
}

.description {
  max-width: 200px; /* or 30ch, or 40ch */
  margin-top: 1rem; /* optional, to separate from the tag */
  line-height: 1.2; /* better spacing between lines */
  color: #ccc; /* optional, softer text */
}

