/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
a:link, a:visited, a:hover, a:active, a:focus {
text-decoration: none;
}
@font-face {
font-family: 'Pikorua';
src: url('assets/fonts/pikorua.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Satista';
src: url('fonts/Satista.otf') format('opentype');
font-weight: normal;
font-style: normal;
font-display: swap;
}

body {
  font-family: "Helvetica Neue", sans-serif;
  background: #f6f6f6;
  color: #111;
  padding: 4rem;
}

/* Homepage loading mark */
.site-loader {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  place-items: center;
  background: #f6f6f6;
  opacity: 1;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.site-loader--visible,
.site-loader--paintings {
  display: grid;
}
.site-loader__mark {
  display: block;
  font-family: "Pikorua", sans-serif;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: normal;
  line-height: 1;
  text-transform: lowercase;
  animation: pikorua-spiral 1.1s cubic-bezier(.65, 0, .35, 1) infinite;
}
.site-loader--complete {
  opacity: 0;
  visibility: hidden;
}
@keyframes pikorua-spiral {
  from { transform: rotate(0deg) scale(.82); }
  55% { transform: rotate(300deg) scale(1); }
  to { transform: rotate(540deg) scale(.82); }
}
@media (prefers-reduced-motion: reduce) {
  .site-loader__mark { animation: none; }
}

/* Header */
header {
  margin-bottom: 3rem;
}

h1 {
  font-size: 3rem;
  font-weight: 500;
  letter-spacing: -1px;
  font-family:"Pikorua";
  text-transform: capitalize;
}

.tagline {
  font-family: monospace;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0.6;
}

/* Gallery Grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 3rem;
}

.frame {
  border: 32px solid transparent;
  border-image: url("images/decorativeframe.avif") 64 stretch;  
  padding: 0;                       /* remove vertical padding */
  transition: filter 0.3s ease, opacity 0.3s ease;
  cursor: pointer;

}
.frame-style1 {
  border: 32px solid transparent;
  border-image: url("images/frames/decorativegoldframe.png") repeat;
  border-image-slice: 64;
}

.frame-style2 {
  border: 20px solid transparent;
  border-image: url("images/frames/goldenframe.png") round;
  border-image-slice: 256;
}

.frame-style3 {
  border: 32px solid transparent;
  border-image: url("images/frames/greenframe.png") 32 fill;
  border-image-slice: 32; /* Adjust this value to fit the border */
}

.frame-style4 {
  border: 32px solid transparent;
  border-image: url("images/frames/cornered.png") round;
  border-image-slice: 70;
}


.lower{
  padding-top:100px;
}
.frame1 img{
  width: 100%;
  display:block;
  box-shadow: inset 0px -10px 15px rgba(0, 0, 0, 0.5); /* Inner shadow at the top */
}

/* Artwork */
.frame img {
  width: 100%;
  display: block;
}

/* Hover */
.frame:hover {
  transform: translateY(-6px);
}
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 80%;
  max-height: 80%;
}

.close {
  position: absolute;
  top: 40px;
  right: 60px;
  font-size: 3rem;
  color: white;
  cursor: pointer;
}



.viewer {
width:400px;
display: inline-block;
}

.viewer img {
width: 100%;
height:auto;
/**object-fit: cover;**/
display: block;
}
.gallery-trio {
display: flex;
justify-content: center;
align-items: center;
gap: 3rem;
transition: transform 0.3s ease;
}

.walk-container{
display:flex;
justify-content: center;
align-items: center;
width: 100%;
gap: 1rem;
height: 100vh;
position:relative;
}

/* Modal styling */
.modal {
display: flex;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.85);
justify-content: center;
align-items: center;
z-index: 1000;
overflow-y: auto; /* Allow scrolling if content overflows */
padding: 1rem; /* Add padding for smaller screens */
}

.modal-content {
display: flex;
flex-direction: column; /* Stack the image, title, and status vertically */
align-items: center; /* Center the content horizontally */
text-align: center;
max-width: 90%; /* Ensure the modal content fits smaller screens */
max-height: 90%; /* Prevent the modal from overflowing the viewport */
}

.modal-content img {
max-width: 100%; /* Ensure the image scales properly */
max-height: 60vh; /* Limit the image height to fit the screen */
display: block;
}

.title-card {
margin-top: 1rem;
padding: 1rem;
width:100%;
background: white;
color: #111;
font-family: monospace; /* Change to a sans-serif font */
font-size: 1.5rem;
text-align: center;
border: 1px solid #ccc;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.status-card {
margin-top: 0.5rem;
padding: 0.5rem;
background: white;
color: #111;
width:100%;
font-family: "Arial", sans-serif; /* Change to a sans-serif font */
font-size: 1rem;
text-align: center;
border: 1px solid #ddd;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
text-transform: uppercase; /* Make the status uppercase */
}
.enquiry-link {
margin-top: 0.5rem;
padding: 0.65rem;
width: 100%;
background: white;
color: #111;
border: 1px solid #ddd;
font-family: Arial, sans-serif;
font-size: 0.9rem;
text-align: center;
}
.enquiry-link:hover {
background: #111;
color: white;
}

.close {
position: absolute;
top: 20px;
right: 20px;
font-size: 2rem;
color: white;
cursor: pointer;
}
.back-link {
display: inline-block;
margin-bottom: 2rem;
font-family: monospace;
font-size: 0.9rem;
opacity: 0.6;
}
.back-link:hover {
opacity: 1;
}
* -----------------------------
 DIGITAL PAGE EDITORIAL LAYOUT
 ----------------------------- */

/* Makes the page feel like an article */
.digital-page {
max-width: 1200px;
margin: 0 auto;
}

/* Only use custom font for main page heading */
.digital-page h1 {
font-family: "Pikorua";
font-size: clamp(4rem, 10vw, 7rem);
font-weight: normal;
letter-spacing: -2px;
line-height: 0.9;
text-transform: lowercase;
}

/* Keep all other headings clean */
.project-title {
font-family: "Helvetica Neue", sans-serif;
font-size: 2.2rem;
font-weight: 500;
letter-spacing: -0.5px;
}

/* Narrow reading width */
.project-desc,
.project-overview,
.intro {
max-width: 650px;
line-height: 1.75;
}

/* More editorial spacing */
.intro {
margin-bottom: 8rem;
}

.project {
margin-bottom: 12rem;
}

/* Main project hero images */
.project-image img {
width: 100%;
max-width: 1000px;
display: block;
margin-bottom: 2rem;
}

/* Supporting gallery images */
.gallery-row {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 2rem;
max-width: 850px;
margin: 3rem 0;
}

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

/* Individual images inside project sections */
.project > img {
width: 30%;
height: auto;
display: block;
margin: 0 auto;
}

/* Slight playful interaction */
.project-image img:hover,
.gallery-row img:hover {
transform: translateY(-4px);
transition: transform 0.3s ease;
}

/* Cleaner metadata */
.project-meta {
font-family: monospace;
font-size: 0.75rem;
opacity: 0.55;
text-transform: uppercase;
letter-spacing: 0.5px;
}

/* Article-style links */
.project-links a {
font-family: monospace;
border-bottom: 1px solid #111;
padding-bottom: 3px;
}

.project-links a:hover {
opacity: 0.5;
}

/* =========================================================
 SITE NAV — used on every page
 ========================================================= */
.site-nav {
display: flex;
justify-content: flex-end;
gap: 2rem;
padding: 0 0 2rem 0;
}
.site-nav a {
font-family: monospace;
font-size: 0.85rem;
opacity: 0.6;
}
.site-nav a:hover,
.site-nav a.is-active {
opacity: 1;
}

.atmosphere-strip {
width: 100vw;
height: clamp(7rem, 13vw, 11rem);
margin: 0 calc(50% - 50vw) 0;
overflow: hidden;
}
.atmosphere-strip img {
width: 100%;
height: calc(100% + 2.25rem);
object-fit: cover;
object-position: center 72%;
display: block;
filter: grayscale(1);
transform: translateY(calc(-1.125rem + var(--atmosphere-shift, 0px))) scale(1.03);
will-change: transform;
}

/* =========================================================
 MARQUEE — scrolling name band
 ========================================================= */
.marquee {
overflow: hidden;
width: 100vw;
margin: 0 calc(50% - 50vw) 4rem;
border-top: 1px solid #d0d0d0;
border-bottom: 1px solid #d0d0d0;
}
.marquee__track {
display: flex;
width: max-content;
animation: marquee 32s linear infinite;
}
.marquee__track span {
font-family: "Helvetica Neue", Arial, sans-serif;
font-size: clamp(1.25rem, 3vw, 2.25rem);
font-weight: 400;
text-transform: uppercase;
letter-spacing: 0.02em;
color: #777;
white-space: nowrap;
padding-right: 1.5rem;
}
@keyframes marquee {
from { transform: translateX(0); }
to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
.marquee__track { animation: none; }
}

/* =========================================================
 HOME PAGE
 ========================================================= */
.home {
max-width: 1200px;
margin: 0 auto;
}

.about {
display: grid;
grid-template-columns: 280px 1fr;
gap: 3rem;
align-items: start;
margin-bottom: 7rem;
}
.about-photo {
width: 100%;
aspect-ratio: 4 / 5;
background-image: url("images/selfimage.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.about h2 {
font-family: "Helvetica Neue", sans-serif;
font-size: 1.6rem;
font-weight: 500;
margin-bottom: 1rem;
}
.about p {
font-family: "Helvetica Neue", sans-serif;
line-height: 1.7;
max-width: 520px;
margin-bottom: 1.25rem;
}
.about-name {
font-family: "Pikorua", "Helvetica Neue", sans-serif;
font-size: 2rem;
}
.about ul {
font-family: "Helvetica Neue", sans-serif;
line-height: 1.8;
max-width: 520px;
padding-left: 1.2rem;
}

.section-heading {
font-family: "Helvetica Neue", sans-serif;
font-size: 1.6rem;
font-weight: 500;
margin-bottom: 2.5rem;
}

.portfolio-grid {
columns: 5;
column-gap: 1.5rem;
margin-bottom: 6rem;
}
.portfolio-featured {
margin-bottom: 2.5rem;
}
.portfolio-primary-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 2.5rem;
margin-bottom: 3.5rem;
}
.portfolio-featured .portfolio-card {
margin-bottom: 0;
}
.portfolio-primary-grid .portfolio-card {
margin-bottom: 0;
}
.portfolio-grid--secondary .portfolio-card {
margin-bottom: 1.5rem;
}
.portfolio-primary-grid .portfolio-card-image {
display: grid;
place-items: center;
height: clamp(15rem, 30vw, 22rem);
}
.portfolio-primary-grid .portfolio-card-image img {
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
}
.portfolio-grid--secondary {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 1.5rem;
columns: unset;
}
.portfolio-grid--secondary .portfolio-card-image {
display: grid;
place-items: center;
height: 10rem;
}
.portfolio-grid--secondary .portfolio-card-image img {
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
}
.portfolio-card--featured .portfolio-card-title {
font-size: 1.5rem;
}
.portfolio-card--featured .portfolio-card-desc {
font-size: 1rem;
}
.portfolio-card {
display: block;
color: inherit;
break-inside: avoid;
margin-bottom: 2.5rem;
}
.portfolio-card-image {
position: relative;
width: 100%;
background: #f1f1f1;
overflow: hidden;
}
.portfolio-card-image img {
width: 100%;
height: auto;
display: block;
}
.portfolio-card-info {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 1.5rem;
color: #fff;
background: rgba(0, 0, 0, 0.72);
opacity: 0;
transition: opacity 0.25s ease;
}
.portfolio-card:hover .portfolio-card-info,
.portfolio-card:focus-visible .portfolio-card-info {
opacity: 1;
}
.portfolio-card-image.is-placeholder {
aspect-ratio: 4 / 3;
display: flex;
align-items: center;
justify-content: center;
background: #e2e2e2;
}
.portfolio-card-title {
font-family: "Helvetica Neue", sans-serif;
font-size: 1.15rem;
font-weight: 500;
margin-bottom: 0.35rem;
}
.portfolio-card-title .tag {
font-weight: 400;
opacity: 0.5;
}
.portfolio-card-desc {
font-family: "Helvetica Neue", sans-serif;
font-size: 0.9rem;
line-height: 1.5;
opacity: 0.85;
max-width: 34ch;
}
@media (hover: none) {
.portfolio-card-info {
  opacity: 1;
}
}

.site-footer {
margin-top: 4rem;
}
.footer-quote {
border-top: 1px solid #111;
padding-top: 2rem;
padding-bottom: 2rem;
}
.footer-quote p {
font-family: "Pikorua";
font-size: clamp(1.4rem, 3vw, 2rem);
max-width: 700px;
}
.footer-links {
display: flex;
justify-content: flex-end;
gap: 1.5rem;
}
.footer-links a {
font-family: monospace;
font-size: 0.85rem;
opacity: 0.6;
}
.footer-links a:hover {
opacity: 1;
}

/* =========================================================
 CASE STUDY (PROJECT) PAGE
 ========================================================= */
.case-study {
max-width: 1100px;
margin: 0 auto;
}
.case-hero {
width: 100%;
aspect-ratio: 16 / 10;
margin: 0 auto 4rem;
overflow: hidden;
border: 1px solid #111;
position: relative;
background: #fff;
}
.case-hero img {
width: 100%;
height: 100%;
object-fit: contain;
display: block;
}
.case-hero__content {
position: absolute;
left: 2rem;
bottom: 2rem;
max-width: min(560px, calc(100% - 4rem));
background: #fff;
padding: 1.25rem 1.5rem 1.4rem;
}
.case-kicker,
.case-sidebar__label {
font-family: monospace;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #666;
margin-bottom: 0.75rem;
}
.case-hero h1 {
font-family: "Helvetica Neue", sans-serif;
font-size: clamp(2rem, 5vw, 4rem);
line-height: 0.98;
font-weight: 500;
letter-spacing: -0.06em;
margin-bottom: 0.85rem;
}
.case-hero .case-intro {
font-family: "Helvetica Neue", sans-serif;
line-height: 1.55;
margin-bottom: 1rem;
}
.case-repo-link {
font-family: monospace;
font-size: 0.8rem;
display: inline-block;
border-bottom: 1px solid #111;
padding-bottom: 2px;
}
.case-repo-link:hover { opacity: 0.6; }
.case-hero__links {
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.case-article-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) 230px;
gap: 5rem;
align-items: start;
}
.case-study > .case-section,
.case-study > .case-links {
width: calc(100% - 310px);
}
.case-study > .case-section--wide {
width: 100%;
}
.case-subtitle {
font-family: "Helvetica Neue", sans-serif;
font-size: 1.1rem;
opacity: 0.5;
margin-bottom: 1.5rem;
}
.case-intro {
font-family: "Helvetica Neue", sans-serif;
line-height: 1.7;
max-width: 60ch;
}
.case-sidebar {
border-top: 1px solid #111;
padding-top: 1rem;
position: sticky;
top: 2rem;
}
.case-meta dt {
font-family: monospace;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.5px;
opacity: 0.5;
margin-bottom: 0.35rem;
}
.case-meta dd {
font-family: "Helvetica Neue", sans-serif;
font-size: 0.95rem;
margin-bottom: 1.75rem;
line-height: 1.5;
}

.case-section {
margin-bottom: 4.5rem;
}
.case-section h2 {
font-family: "Helvetica Neue", sans-serif;
font-size: 1.3rem;
font-weight: 500;
margin-bottom: 1rem;
}
.case-section p {
font-family: "Helvetica Neue", sans-serif;
line-height: 1.7;
max-width: 65ch;
margin-bottom: 1rem;
}
.case-image {
width: 100%;
background: #fff;
margin-top: 1.5rem;
}
.case-image--full { margin-top: 1.5rem; }
.case-image img {
width: 100%;
height: auto;
display: block;
}
.case-image figcaption {
font-family: monospace;
font-size: 0.75rem;
line-height: 1.5;
padding: 0.75rem;
color: #666;
}
.case-image-row {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
margin-top: 1.5rem;
}

.case-links {
display: flex;
gap: 2rem;
flex-wrap: wrap;
padding-top: 2rem;
border-top: 1px solid #ccc;
}
.case-links a {
font-family: monospace;
font-size: 0.85rem;
border-bottom: 1px solid #111;
padding-bottom: 2px;
}
.case-links a:hover {
opacity: 0.6;
}

@media (max-width: 800px) {
body { padding: 2rem; margin-left: 0 !important; }
.marquee { margin-bottom: 3rem; }
.about,
.case-article-layout { grid-template-columns: 1fr; gap: 2rem; }
.case-study > .case-section,
.case-study > .case-links { width: auto; }
.case-sidebar { position: static; }
.case-hero { margin-bottom: 3rem; }
.case-hero__content { left: 1rem; bottom: 1rem; max-width: calc(100% - 2rem); padding: 1rem; }
.portfolio-grid { columns: 1; }
.portfolio-grid--secondary { grid-template-columns: 1fr; }
.portfolio-primary-grid { grid-template-columns: 1fr; }
.case-image-row { grid-template-columns: 1fr; }
}

/* =========================================================
 PHONE REFINEMENTS (max-width 800px only; laptop untouched)
 ========================================================= */
@media (max-width: 800px) {
body { padding: 1.25rem; }

/* Never let any image or figure be wider than the screen */
.case-study img,
.case-study figure { max-width: 100%; }

/* Nav: bigger tap targets, no cramped overflow */
.site-nav {
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding-bottom: 1rem;
}
.site-nav a {
  font-size: 0.95rem;
  padding: 0.6rem 0;
}

/* Home: about section */
.about { margin-bottom: 4rem; }
.about-photo { max-width: 260px; }
.about p,
.about ul { max-width: none; }
.section-heading { margin-bottom: 1.5rem; }

/* Home: portfolio cards. Show the title/description under the image
   instead of covering it with the dark hover overlay. */
.portfolio-featured { margin-bottom: 2rem; }
.portfolio-primary-grid { gap: 2rem; margin-bottom: 2rem; }
.portfolio-grid--secondary { gap: 2rem; margin-bottom: 3rem; }
.portfolio-primary-grid .portfolio-card-image,
.portfolio-grid--secondary .portfolio-card-image {
  display: block;
  height: auto;
}
.portfolio-primary-grid .portfolio-card-image img,
.portfolio-grid--secondary .portfolio-card-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
}
.portfolio-card-info {
  position: static;
  inset: auto;
  opacity: 1;
  background: #fff;
  color: #111;
  padding: 0.9rem 0 0;
}
.portfolio-card-desc { max-width: none; }
.portfolio-card-image.is-placeholder {
  flex-direction: column;
  aspect-ratio: auto;
  padding: 1.25rem;
  align-items: flex-start;
  justify-content: center;
}
.portfolio-card-image.is-placeholder .portfolio-card-info {
  background: transparent;
  padding: 0;
}
.portfolio-grid--secondary .portfolio-card { margin-bottom: 0; }

/* Footer */
.footer-quote p { overflow-wrap: anywhere; }
.footer-links { justify-content: flex-start; flex-wrap: wrap; }
.footer-links a { padding: 0.5rem 0; }

/* Case study hero: title + intro first, then the full (uncropped) image */
.case-hero {
  display: flex;
  flex-direction: column-reverse;
  aspect-ratio: auto;
  overflow: visible;
  border: 1px solid #111;
}
.case-hero img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.case-hero__content {
  position: static;
  max-width: none;
  padding: 1.25rem 1rem 1.4rem;
  border-bottom: 1px solid #111;
}

/* Project info + description come before the long article content */
.case-article-layout { grid-template-columns: minmax(0, 1fr); }
.case-sidebar { order: -1; }
.case-meta dd { margin-bottom: 1rem; }
.case-image-row { grid-template-columns: minmax(0, 1fr); }
.case-hero h1 { letter-spacing: -0.04em; }
.case-hero__links { gap: 0.75rem 1.25rem; }
.case-repo-link { padding: 0.35rem 0; }
.case-section { margin-bottom: 3rem; }
.case-section p,
.case-intro { max-width: none; }
.case-links a { padding: 0.5rem 0; }

/* Paintings gallery: stack the three frames, pin the arrows to the bottom */
.walk-container {
  flex-direction: column;
  height: auto;
  min-height: calc(100vh - 8rem);
  gap: 2rem;
  padding: 0 0 6rem;
}
.gallery-trio {
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  width: 100%;
}
/* One painting at a time on phones (script.js steps by 1 here) */
.gallery-trio .frame:nth-child(n + 2) { display: none !important; }
.viewer {
  width: 100%;
  max-width: 380px;
  display: block;
  margin: 0 auto;
}
.arrow {
  position: fixed;
  bottom: 1rem;
  z-index: 20;
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid #111;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.arrow.left { left: 1rem; }
.arrow.right { right: 1rem; }
/* Tapping a frame triggers "hover" on touch; don't leave others greyed out */
.frame {
  filter: none !important;
  opacity: 1 !important;
}
.back-link { padding: 0.5rem 0; margin-bottom: 1rem; }

/* Painting modal */
.modal-content { max-width: 100%; }
.modal-content img { max-height: 55vh; }
.title-card { font-size: 1.15rem; }
.close {
  top: 6px;
  right: 8px;
  font-size: 2.5rem;
  padding: 0.5rem 0.9rem;
  z-index: 2;
}
.enquiry-link { padding: 0.9rem; }
}