/* ============================================
   JÖRN LUTTER — Portfolio CSS
   Minimal · Editorial · Industrial
   ============================================ */

  @font-face {
font-family: 'Orbitron';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('fonts/orbitron-400.ttf') format('truetype');
}

  @font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/orbitron-600.ttf') format('truetype');
  }

  @font-face {
    font-family: 'DM Mono';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/dmmono-300.ttf') format('truetype');
  }

  @font-face {
    font-family: 'DM Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/dmmono-400.ttf') format('truetype');
}

:root {
  --white:   #ffffff;
  --off:     #f5f4f2;
  --light:   #e8e6e2;
  --mid:     #999690;
  --dark:    #2a2826;
  --black:   #111110;
  --accent:  #1a82c8;

  --font-display: 'Orbitron', Georgia, serif;
  --font-mono:    'DM Mono', monospace;

  --nav-h: 80px;
  --max-w: 1280px;
  --gap:   clamp(16px, 2.5vw, 32px);
}

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

html { scroll-behavior: smooth; }

body {
  animation: pageFadeIn 0.3s ease;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 300;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

@view-transition {
  navigation: auto;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--off); }
::-webkit-scrollbar-thumb { background: var(--light); }

/* ============================================
   NAVIGATION
   ============================================ */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 2px solid var(--light);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1400px;
  margin: 0 auto;
  transition: opacity 0.3s ease;
  animation: pageFadeIn 0.01s ease;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo / Name */
.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--black);
  background: var(--white);
  padding: 2px 2px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Main nav links — centered */
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  background: var(--white);
  padding: 2px 2px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 5px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover
 {
  color: var(--black);
  
}


.nav-links a.active {
  color: var(--black);
  border-bottom-color: var(--accent);
}

.nav-contact {
  position: relative;
  cursor: pointer;
}

.nav-contact span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dark);
  letter-spacing: 0.04em;
}

.contact-popup {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--light);
  padding: 16px 20px;
  min-width: 220px;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.nav-contact:hover .contact-popup,
.nav-contact.pinned .contact-popup {
  display: block;
}

.contact-popup-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.contact-popup-row:last-child {
  margin-bottom: 0;
}

.contact-popup-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
}

.contact-popup-row a {
  font-size: 13px;
  color: var(--dark);
  text-decoration: none;
}

.contact-popup-row a:hover {
  color: var(--accent);
}

/* Contact — right side */
.nav-contact a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-contact a:hover { color: var(--accent); }

/* Hamburger (mobile) */
.nav-burger {
  display: none;
  flex-direction: row;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  transition: transform 0.3s ease;
}
.nav-burger span {
  display: block;
  width: 2px;
  height: 18px;
  background: var(--dark);  
  transform-origin: center;
  
}

.nav-burger.open {
  transform: rotate(90deg);
  
}

.nav-burger.open span {
  width: 3px;
  height: 22px;
}

/* Mobile menu */
.nav-mobile {
  display: flex;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--light);
  padding: 24px var(--gap) 32px;
  flex-direction: column;
  gap: 20px;
  z-index: 99;
  max-height: 0;  
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.5s ease, visibility 0.3s ease;
}

.nav-mobile.open { 
  opacity: 1;
  visibility: visible;
  max-height: 400px;  
}

.nav-mobile a {
  font-family: var(--font-mono);
  color: var(--mid);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;  
  text-decoration: none;
  
}
.nav-mobile a.active { 
  color: var(--black);
  display: inline-block;
  width: fit-content;
  border-bottom: 4px solid var(--accent);
  padding-bottom: 2px
}


/* ============================================
   PAGE WRAPPER
   ============================================ */

.page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ============================================
   PAGE HEADER (section title)
   ============================================ */

.page-header {
  padding: clamp(32px, 4vw, 56px) 0 clamp(20px, 2.5vw, 40px);
  /*padding: 56px 0 40px;*/
  border-bottom: 1px solid var(--light);
  /*margin-bottom: 48px;*/
  margin-bottom: clamp(24px, 3vw, 48px);
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--black);
  line-height: 1;
}

.page-header .subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
}



/* ============================================
   PROJECT GRID (Industrial Design & Photography)
   ============================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding-bottom: 80px;
}

.grid-item {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.grid-item:hover .thumb-overlay { opacity: 1; }
.grid-item:hover .thumb-img { transform: scale(1.03); }

.thumb-wrap {
  position: relative;
  overflow: hidden;
  background: var(--off);
  aspect-ratio: 4/3;
  margin-bottom: 14px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 0 100%);
  transition: clip-path 0.3s ease;
}

.grid-item:hover .thumb-wrap {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

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

/* Placeholder when no image */
.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grid-item:hover .thumb-placeholder { transform: scale(1.03); }

.thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 130, 200, 0.35);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-overlay span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--accent);
  padding: 6px 12px;
  font-weight: 600;
}

.grid-item-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--dark);
  margin-bottom: 4px;
}

.grid-item-meta {
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 0.06em;
}

/* ============================================
   SCOPE PAGE
   ============================================ */

.scope-item-content p,
.scope-item-p-wrap {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scope-item:hover .scope-item-content p,
.scope-item:hover .scope-item-p-wrap,
.scope-item.pinned .scope-item-content p,
.scope-item.pinned .scope-item-p-wrap {
  opacity: 1;
}

.scope-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--light);
  margin-bottom: 80px;
}

.scope-item {
  background: var(--white);
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

/* Background image — inset 10px on all sides */
.scope-bg {
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  display: block;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.scope-item:hover .scope-bg {
  opacity: 0.28;
}

/* Text content sits on top of image */
.scope-item-content {
  position: relative;
  z-index: 1;
  padding: 36px 36px 10px;
  color: var(--black); 
  display: flex;
  flex-direction: column;  
  align-items: flex-start;
  height: 100%;
  box-sizing: border-box;

}

.scope-item-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.scope-item-content p {
  display: inline;
  background: rgba(255,255,255,0.9);
  padding: 1px 8px;  
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  line-height: 1.7;
  margin-top: auto;
  margin-bottom: 20px;
  font-weight: 400;
  font-size: 12px;
  color: var(--black);
}

.scope-item-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  color: var(--light);
  line-height: 1;
  margin-bottom: 16px;
}

.scope-item h3 {
  font-family: var(--font-display);
  background: rgba(255,255,255,0.9);
  padding: 2px 8px; 
  font-size: 22px;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.scope-item-p-wrap {
  margin-top: auto;
  margin-bottom: 20px;
  
}

.scope-intro {
  max-width: 640px;
  margin-bottom: 56px;
}

.scope-intro p {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--dark);
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  padding-bottom: 80px;
  align-items: start;
}

.about-sidebar {}

.about-photo-wrap {
  aspect-ratio: 3/4;
  background: var(--off);
  margin-bottom: 32px;
  overflow: hidden;
  max-width: clamp(220px, 25vw, 320px);
}

.about-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  max-width: 320px;
  aspect-ratio: 3/4;
  background: var(--off);
  margin-bottom: 32px;
}

.about-info dt {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 16px;
  margin-bottom: 4px;
}

.about-info dd {
  font-size: 13px;
  color: var(--dark);
  line-height: 1.5;
}

.about-info dd a {
  color: var(--accent);
  text-decoration: none;
}

.about-main {}

.about-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--light);
}

.about-section:last-child {
  border-bottom: none;
}

.about-section-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 24px;
}

.about-section h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  color: var(--black);
  margin-bottom: 20px;
  line-height: 1.2;
}

.edu-item, .intern-item, .project-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: baseline;
}

.edu-year {
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 0.06em;
}

.edu-detail {
  font-size: 13px;
  color: var(--dark);
  line-height: 1.5;
}

.edu-detail strong {
  font-weight: 400;
  color: var(--black);
}

.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-list li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 16px;
  font-size: 12px;
  color: var(--dark);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--off);
  line-height: 1.4;
}

.project-list li span:first-child {
  color: var(--mid);
  font-size: 11px;
}

/* ============================================
   PROJECT VIEWER (Fullscreen Scroll Gallery)
   ============================================ */

/* Overlay backdrop */
.project-viewer {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
}

.project-viewer.open {
  display: block;
}

/* Fade-in animation */
@keyframes viewerIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.project-viewer.open {
  animation: viewerIn 0.35s ease both;
}

/* Close button */

.viewer-header-close {
  position: fixed;
  top: clamp(30px, 4vw, 48px);
  left: 50%;
  transform: translateX(calc(min(50vw, calc(var(--max-w) / 2)) - 100px));
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  z-index: 500;  
  transition: opacity 0.2s;
}


.viewer-header-close:hover {
  color: var(--accent);
  opacity: 0.5;
}

.viewer-header-close svg {
  width: 100%;
  height: 100%;
}

.viewer-header-close svg line:nth-child(1),
.viewer-header-close svg line:nth-child(2) { 
  stroke: white; stroke-width: 3.6; 
  stroke-linecap: butt;
}

.viewer-header-close svg line:nth-child(3),
.viewer-header-close svg line:nth-child(4) { 
  stroke: var(--dark); stroke-width: 1.2;
  stroke-linecap: square; 
}


/* Info button — bottom-left of first image */
.viewer-info-btn {
  position: absolute;  
  z-index: 210;
  width: 40px;
  height: 40px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  user-select: none;
  transition: color 0.2s;
}

.viewer-info-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  transition: clip-path 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  z-index: -1;
}

.viewer-info-btn:hover::before {
  background: var(--white);
  box-shadow: 0 4px 18px rgba(0,0,0,0.16);
}



.viewer-info-btn.pos-top-left     { top: 24px; left: 20px; }
.viewer-info-btn.pos-top-right    { top: 24px; right: 20px; }
.viewer-info-btn.pos-bottom-left  { bottom: 24px; left: 20px; }
.viewer-info-btn.pos-bottom-right { bottom: 24px; right: 20px; }

.viewer-info-box.pos-top-left     { 
  top: 24px;    left: 20px;  bottom: auto;
  transform-origin: top left; 
}

.viewer-info-box.pos-top-right    { 
  top: 24px;    right: 20px; left: auto; bottom: auto; 
  transform-origin: top right;
}

.viewer-info-box.pos-bottom-left  { 
  bottom: 24px; left: 20px;  top: auto; 
  transform-origin: bottom left;
}

.viewer-info-box.pos-bottom-right { 
  bottom: 24px; right: 20px; left: auto; top: auto;
  transform-origin: bottom right; 
}

.viewer-info-btn.active {
  color: var(--white);
  font-size: 0;
}

.viewer-info-btn.pos-bottom-left.active::before {
  background: var(--accent);
  clip-path: polygon(0% 100%, 100% 100%, 0% 0%);
  border-color: var(--accent);
}

.viewer-info-btn.pos-bottom-right.active::before {
  background: var(--accent);
  clip-path: polygon(0% 100%, 100% 100%, 100% 0%);
  border-color: var(--accent);
}

.viewer-info-btn.pos-top-left.active::before {
  background: var(--accent);
  clip-path: polygon(0% 0%, 100% 0%, 0% 100%);
  border-color: var(--accent);
}

.viewer-info-btn.pos-top-right.active::before {
  background: var(--accent);
  clip-path: polygon(100% 0%, 100% 100%, 0% 0%);
  border-color: var(--accent);
}

/* Info box — floating panel over first image */
.viewer-info-box {
  position: absolute;
  bottom: 64px;
  left: 12px;
  z-index: 210;
  width: clamp(260px, 40%, 420px);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 8px 32px rgba(0,0,0,0.16);
  padding: 20px 24px;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-height: calc(100% - 40px);
  overflow-y: auto;
}

.viewer-info-box.open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.viewer-info-box p {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--dark);
  margin-bottom: 16px;
}

.viewer-info-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
}

.viewer-info-fields dt {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  padding-top: 1px;
}

.viewer-info-fields dd {
  font-size: 12px;
  color: var(--dark);
}

/* Viewer header */
.viewer-header {
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 36px) var(--gap) clamp(8px, 2vw, 40px);
  border-bottom: 1px solid var(--light);
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.viewer-header h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 300;
  color: var(--black);
  line-height: 1;
}

.viewer-header .viewer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
}

/* Images stacked vertically, full width */
.viewer-images {
  max-width: var(--max-w);
  margin: 0 auto;
  margin-top: 10px;
  padding: clamp(0px, 1vw, 40px) var(--gap) 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.viewer-img-inner {
  position: relative;
}

.viewer-video-wrap {
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  background: #000;
}

.viewer-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Each image: full container width */
.viewer-images img,
.viewer-img-placeholder {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* Placeholder block when no real image yet */
.viewer-img-placeholder {
  background: var(--off);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.viewer-img-placeholder.portrait {
  aspect-ratio: 3/4;
}

.viewer-img-placeholder.square {
  aspect-ratio: 1/1;
}

/* Caption below each image */
.viewer-img-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.viewer-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 0.06em;
}

/* Back to overview — bottom of viewer */
.viewer-back {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap) 64px;
}

.viewer-back button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  background: none;
  border: 1px solid var(--light);
  padding: 12px 24px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.viewer-back button:hover {
  color: var(--black);
  border-color: var(--dark);
}

/* ============================================
   FOOTER
   ============================================ */

.imprint-short { display: none; }

footer {
  border-top: 1px solid var(--light);
  padding: 24px var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
}

footer p {
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 0.08em;
}

footer a {
  font-size: 11px;
  color: var(--mid);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}
footer a:hover { color: var(--accent); }

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.grid-item {
  animation: fadeUp 0.5s ease both;
}

.grid-item:nth-child(1)  { animation-delay: 0.05s; }
.grid-item:nth-child(2)  { animation-delay: 0.10s; }
.grid-item:nth-child(3)  { animation-delay: 0.15s; }
.grid-item:nth-child(4)  { animation-delay: 0.20s; }
.grid-item:nth-child(5)  { animation-delay: 0.25s; }
.grid-item:nth-child(6)  { animation-delay: 0.30s; }
.grid-item:nth-child(7)  { animation-delay: 0.35s; }
.grid-item:nth-child(8)  { animation-delay: 0.40s; }
.grid-item:nth-child(9)  { animation-delay: 0.45s; }
.grid-item:nth-child(n+10) { animation-delay: 0.50s; }

/* ============================================
   RESPONSIVE
   ============================================ */
.info-btn-mobile { display: none; }
.info-btn-desktop { display: flex; }

@media (max-width: 900px) {

  
  :root {
    --nav-h: clamp(48px, 6vw, 80px);
  }
  

  .grid { grid-template-columns: repeat(2, 1fr); }
  .scope-grid { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .about-sidebar {
    display: grid;
    grid-template-columns: clamp(160px, 30vw, 220px) 1fr;
    gap: 24px;
    align-items: start;
    border-bottom: 1px solid var(--light);
    padding-bottom: 32px;
    margin-top: 0px;
    margin-bottom: 8px;
  }
.about-photo-wrap {
  max-width: 100%;
  margin-bottom: 0;
  margin-top: 18px;
}
.about-info {
  padding-top: 4px;
}
  .nav-links, .nav-contact { display: none; }
  .nav-burger { display: flex; }

    .nav-logo {
    font-size: clamp(15px, 2vw, 20px);
  }

  .page-header { 
    flex-direction: column; 
    gap: 8px; 
    padding: 16px 0 16px; 
    border-bottom: none; 
    margin-bottom: 8px;
  }

  .thumb-wrap {
    margin-bottom: 8px;
  }

.page-header .subtitle {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
}

.page-header .subtitle::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light);
}

.viewer-header-close {
  width: clamp(20px, 4vw, 36px);
  height: clamp(20px, 4vw, 36px);  
  transform: translateX(calc(min(50vw, calc(var(--max-w) / 2)) - clamp(44px, 11.1vw, 100px)));}
}

@media (max-width: 600px) {

  .imprint-full { display: none; }
  .imprint-short { display: inline; }

  .viewer-header {
    padding: 24px var(--gap) 8px;
    align-items: flex-end;
    flex-wrap: wrap;    
  }

  .viewer-images {
    padding-top: 12px;
    margin-top: 0px;
  }

  /* Info box — full width static block below button */
  .viewer-info-box {
    position: static !important;
    width: 100%;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: none;
    pointer-events: none;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid var(--light);    
    border-radius: 0;
    padding: 0 var(--gap);
    transition: opacity 0.25s ease, max-height 0.3s ease, padding 0.3s ease;
    top: auto !important; right: auto !important;
    bottom: auto !important; left: auto !important;
  }

  .viewer-info-box.open {
    opacity: 1;
    max-height: 600px;
    padding: 10px var(--gap) 20px;
    pointer-events: auto;
    transform: none;
  }

  .info-btn-mobile { display: inline; }
  .info-btn-desktop { display: none; }


}

@media (max-width: 560px) {
  .grid { 
    grid-template-columns: 1fr; 
  }
  .edu-item, .intern-item, .project-item { 
    grid-template-columns: 1fr; 
    gap: 2px; 
  }
  .project-list li { 
    grid-template-columns: 1fr; 
    gap: 4px; 
  }


  /* Employer grouping in project record */
.pr-employer {
  margin-top: 28px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--light);
}

.pr-employer-name {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
}

.pr-period {
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.pr-entries {
  margin-bottom: 8px;
}
  .scope-item-content {
    padding: 30px 30px;
  }

}


/* ============================================
   PHOTOGRAPHY GALLERY
   ============================================ */

.photo-gallery {
  display: flex;
  overflow: hidden;
  flex-wrap: wrap;
  gap: 16px;
  align-content: flex-start;
  margin-bottom: 80px;
}

.photo-item {
  height: 280px;
  max-width: 100%;
  flex-grow: 0;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--light);
}

/* No crop: fill container at fixed height */
.photo-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Crop active: JS sets position/size, CSS must not interfere */
.photo-item img.has-focus {
  width: auto;
  height: auto;
  object-fit: fill;
}

/* Hover zoom on container — works for both cropped and uncropped */
.photo-item {
  transition: opacity 0.25s ease;
}
.photo-item:hover {
  opacity: 0.88;
}

.photo-item-loading {
  background: var(--light);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ============================================
   PHOTOGRAPHY FULLSCREEN VIEWER
   ============================================ */

.photo-viewer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 400;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.photo-viewer.open {
  display: flex;
  animation: viewerIn 0.25s ease both;
}

.photo-viewer-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  padding: 60px 20px 20px;
  cursor: pointer;
  box-sizing: border-box;
}

.photo-viewer-img-wrap img {
  max-width: 100%;
  max-height: min(80vh, 1600px);
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.photo-viewer-close {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 410;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.2s;
}

.photo-viewer-close:hover { background: rgba(255,255,255,0.25); }

.photo-viewer-close svg {
  width: 14px;
  height: 14px;
  stroke: var(--white);
  stroke-width: 1.8;
}

.photo-viewer-prev,
.photo-viewer-next {
  position: static;
  transform: none;
  z-index: 410;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  flex-shrink: 0;
}

.photo-viewer-prev:hover,
.photo-viewer-next:hover { background: rgba(255,255,255,0.22); }

.photo-viewer-prev svg,
.photo-viewer-next svg {
  width: 14px;
  height: 14px;
  stroke: var(--white);
  stroke-width: 1.8;
  fill: none;
}

.photo-viewer-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 0 20px 8px;
  min-height: 20px;
}

.photo-viewer-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.3);
  text-align: center;
  flex: 1;
}

.photo-viewer-nav {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  padding: 0 20px 16px;
  width: 100%;
}

@media (max-width: 600px) {
  .photo-viewer-img-wrap {
    padding: 60px 8px 12px;
  }
}
