/* Minimal layout + image constraints to prevent overflow */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Ensure all images are responsive and never overflow */
img { max-width: 100%; height: auto; display: block; }

/* Common helpers used in markup */
.rounded { border-radius: 12px; overflow: hidden; }
.hover-zoom { transition: transform .3s ease; }
.hover-zoom:hover { transform: scale(1.02); }

/* Simple grids for image groups */
.image-grid { display: grid; gap: 16px; }
.image-stack { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }

/* Basic hero layout that won’t let images spill */
.hero { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
@media (min-width: 840px) { .hero { grid-template-columns: 1.1fr .9fr; align-items: center; } }

.profile { margin: 0; }

/* Simple section spacing */
.site-main { padding: 24px 0 48px; }
.portfolio-section { padding: 24px 0; }
.grid-2 { display: grid; gap: 28px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media screen and (max-width: 1000px) {
  #img.rounded img {width:50%;}
}

/* Divider block between sections */
.divider { width: 100%; height: 56px; background: #e5e7eb; }

/* Basic text styles */
body { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; background: #0a0a0a; color: #f5f5f5; }
.site-header { background: #0a0a0a; }
.tag { display: inline-block; background: #f5f5f5; color: #0a0a0a; padding: 4px 10px; border-radius: 999px; font-size: 12px; letter-spacing: .06em; font-weight: 700; }
.hero-title { font-size: clamp(32px, 6vw, 64px); line-height: 1.05; margin: 8px 0 12px; font-weight: 800; }
.hero-bio, .section-text { color: #d1d5db; max-width: 60ch; }
.section-title { color: #111827; font-size: 28px; margin: 8px 0; font-weight: 800; }
.site-main { background: #f5f6f8; color: #111827; }
.site-footer { padding: 20px 0 40px; background: #0a0a0a; color: #9ca3af; }

/* Base */
:root {
  --bg-dark: #0b0b0c;
  --bg-light: #f7f7f8;
  --text: #0f1115;
  --muted: #6b7280;
  --primary: #111827;
  --accent: #111827;
  --gray: #e5e7eb;
  --pill-bg: #111827;
  --pill-text: #ffffff;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.08);
  --shadow-md: 0 6px 24px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg-light);
  /* 50% black overlay */
  background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5));
  background-blend-mode: multiply;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Hero */
.site-header {
  background: var(--bg-dark);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

/* Profile left of icons and fill column height */
.hero-right { display: grid; grid-template-columns: minmax(280px, 480px) 1fr; gap: 16px; align-items: stretch; }

.tag {
  display: inline-block;
  background: var(--pill-bg);
  color: var(--pill-text);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 600;
}

.site-header .tag {
  background: #1f2937;
}

.hero-title {
  margin: 16px 0 12px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  font-weight: 800;
}
.hero-title span { display: block; }

.hero-bio {
  color: #d1d5db;
  max-width: 50ch;
}

.hero-right { text-align: left; }
.profile { margin: 0; }
.profile img { width: 100%; height: 100%; display: block; object-fit: cover; }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list a { color: #e5e7eb; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; margin-right:16px; }
.contact-list a:hover { text-decoration: underline; }
.location { color: #9ca3af; }
.icon { display: inline-flex; line-height: 0; }

/* Divider */
.divider {
  height: 10px;
  background: #d1d5db;
}

/* Portfolio */
/* Project sections */
.project { padding: 56px 0; }
.project--highlight { padding: 100px 0; }
.project--dark { background: #0a0a0a; color: #f5f5f5; }
.project--light { background: #ffffff; color: #111827; }
.project--light.project--with-bg { color: #ffffff; }
.project--light.project--with-bg .project-text { color: #f3f4f6; }
.project--with-video { position: relative; overflow: hidden; min-height: clamp(420px, 60vh, 720px); }
.project--with-video .container { position: relative; z-index: 1; min-height: inherit; display: flex; flex-direction: column; justify-content: center; }
.project-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) brightness(0.5);
  transform: scale(1.08);
  z-index: 0;
}
/* Background image variant (like video but with an <img>) */
.project--with-bg { position: relative; overflow: hidden; }
.project--with-bg .container { position: relative; z-index: 1; }
.project-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) brightness(0.75);
  transform: scale(1.08);
  z-index: 0;
}
/* Optional right-side full-height image */
.project--with-side { position: relative; }
.project--with-side .container { padding-right: clamp(240px, 30vw, 380px); }
.project-side {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: clamp(220px, 28vw, 360px);
  padding: 24px 16px;
  display: flex;
  align-items: stretch;
}
.project-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.project-header { margin-bottom: 18px; }
.project-actions { margin: 14px 0 20px; }
.project-title { font-size: clamp(26px, 4vw, 40px); line-height: 1.15; font-weight: 800; margin: 6px 0; }
.project-text { color: #9ca3af; max-width: 70ch; }
.project--light .project-text { color: #4b5563; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-grid img { width: 100%; height: auto; }
.project--with-bg .project-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project--with-bg .project-grid img { aspect-ratio: 3 / 4; object-fit: cover; }

/* RCS section layout: 2 horizontal images beneath text, 1 vertical next to text */
.project--rcs .project-layout-rcs {
  display: grid;
  grid-template-columns: 1fr clamp(220px, 28vw, 360px);
  gap: 32px;
  align-items: start;
}
.project-content-rcs { display: flex; flex-direction: column; gap: 20px; }
.project-grid-rcs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.rcs-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.project-side-rcs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-side-rcs .rcs-img {
  width: 100%;
  height: auto;
}

/* Branding section layout: keep existing layout, just update class names */
.project-grid-branding {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.branding-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}
.project-side-branding {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: clamp(220px, 28vw, 360px);
  padding: 24px 16px;
  display: flex;
  align-items: stretch;
}
.project-side-branding .branding-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Bold section layout: 2 vertical images next to text, 1 horizontal beneath text */
.project--bold .project-layout-bold {
  display: grid;
  grid-template-columns: 1fr clamp(220px, 28vw, 360px);
  gap: 32px;
  align-items: stretch; /* Match height of both columns */
}
.project-content-bold { display: flex; flex-direction: column; gap: 20px; }
.project-grid-bold-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.bold-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.project-side-bold {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%; /* Fill available height */
}
.project-side-bold .bold-img {
  width: 85%;
  height: auto;
}
.bold-iframe {
  width: 100%;
  height: 100%; /* Fill available height of parent */
  min-height: 300px; /* Minimum height for readability */
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
}

.section-header { margin-bottom: 8px; }
.section-title {
  margin: 8px 0 8px;
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.2;
  font-weight: 800;
}
.section-text { color: var(--muted); max-width: 60ch; }

/* Legacy grid retained for hero posters if needed */
.image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.image-stack img + img { margin-top: 14px; }

.rounded { border-radius: var(--radius); }
.hover-zoom { transition: transform .35s ease, box-shadow .35s ease; }
.hover-zoom:hover, .hover-zoom.is-zoomed { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-md); }

/* Footer */
.site-footer { padding: 30px 0 60px; color: var(--muted); }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-right { order: -1; display: block; }
  
}

@media (max-width: 500px) {
  .profile img { width: 75%; height: auto; }
  .frontp-button{
    margin-top: -25px;
  }
}
@media (min-width: 501px) {
  .profile img { width:300px; height:auto; }
  .frontp-button{
    margin-top: -125px;
  }
}

.project-text-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}
.project-text-link:hover {
  text-decoration: underline;
}
.lightbox[hidden] { display: none !important; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .25s ease;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0); /* keep only blur visually */
  backdrop-filter: blur(3px);
}
/* Darker backdrop variant for specific items */
.lightbox.dark .lightbox-backdrop { background: rgba(0, 0, 0, 0.608); }
.lightbox-content {
  position: relative;
  max-width: min(92vw, 1400px);
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  overflow: hidden;
}
#lightbox .lightbox-controls {
  position: absolute; top: 8px; right: 8px; z-index: 2;
}
.zoom-btn {
  appearance: none; border: 1px solid rgba(255,255,255,.25); background: rgba(17,24,39,.6);
  color: #fff; border-radius: 999px; padding: 6px 10px; cursor: pointer; font-weight: 700;
}
.zoom-btn:hover { background: rgba(17,24,39,.8); }
#lightbox-img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}
.lightbox.open { opacity: 1; }
/* Pan when zoomed */
.lightbox-content.zoomed { overflow: auto; cursor: grab; }
#lightbox-img.zoomed {
  max-width: none;
  max-height: none;
  width: 110%;
  height: auto;
  cursor: inherit;
}
.lightbox-content.zoomed:active { cursor: grabbing; }

/* Zoomed-in state for lightbox image */
/* removed transform-based zoom in favor of scrollable pan */

/* Reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.in-view { opacity: 1; transform: none; }
  .reveal-stagger > * { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
  .reveal-stagger.in-view > * { opacity: 1; transform: none; }
  .reveal-stagger.in-view > *:nth-child(1) { transition-delay: .05s; }
  .reveal-stagger.in-view > *:nth-child(2) { transition-delay: .1s; }
  .reveal-stagger.in-view > *:nth-child(3) { transition-delay: .15s; }
  .reveal-stagger.in-view > *:nth-child(4) { transition-delay: .2s; }
  .reveal-stagger.in-view > *:nth-child(5) { transition-delay: .25s; }
}

@media (max-width: 720px) {
  .image-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .project--with-side .container { padding-right: 16px; }
  .project-side { position: static; width: auto; height: auto; padding: 0; margin-top: 12px; }
  .project-side img { height: auto; }
  /* RCS layout responsive */
  .project--rcs .project-layout-rcs { grid-template-columns: 1fr; }
  .project-side-rcs { margin-top: 16px; }
  /* Branding layout responsive */
  .project-side-branding { position: static; width: auto; height: auto; padding: 0; margin-top: 16px; }
  .project-side-branding .branding-img { height: auto; }
  /* Bold layout responsive */
  .project--bold .project-layout-bold { grid-template-columns: 1fr; }
  .project-side-bold { margin-top: 16px; }
  .bold-iframe { height: 250px; }
}


.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s ease, opacity .2s ease, background .2s ease;
  max-width: 300px;
}


.btn:hover { transform: translateY(-1px); }
.btn--light { background: #f5f5f5; color: #111827; border-color: #e5e7eb; }
.btn--light:hover { opacity: .90; }
.btn--dark { background: #111827; color: #f5f5f5; border-color: #1f2937; }
.btn--dark:hover { opacity: .95; }

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998; /* Below lightbox (999) but above most content */
  padding: 10px 14px;
  border-radius: 999px;
  background: #000000;
  border: 1px solid #ffffff;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  pointer-events: none;
}
.scroll-to-top:not([hidden]) {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.scroll-to-top:hover {
  background: #ffffff;
  color: #000000;
  transform: translateY(-2px) scale(1.05);
}
.scroll-to-top:active {
  transform: translateY(0) scale(1);
}
.scroll-to-top svg {
  display: block;
  flex-shrink: 0;
}
.scroll-to-top span {
  white-space: nowrap;
}


