/* ============================================================
   style.css — Hanna Kamyshanska portfolio
   ============================================================ */

/* ── Self-hosted fonts ─────────────────────────────────────── */
@font-face {
  font-display: swap;
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  src: url('../fonts/cormorant-garamond-v21-latin-300.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300;
  src: url('../fonts/cormorant-garamond-v21-latin-300italic.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/cormorant-garamond-v21-latin-regular.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  src: url('../fonts/cormorant-garamond-v21-latin-italic.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/cormorant-garamond-v21-latin-500.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300;
  src: url('../fonts/dm-sans-v17-latin-300.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/dm-sans-v17-latin-regular.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/dm-sans-v17-latin-500.woff2') format('woff2');
}

/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Dark anthracite scheme */
  --ink:          #e8e4dc;          /* primary text — warm off-white */
  --base_background:       #171616;          /* base background —  carbon */
  --warm:         #1A2023;          /* slightly lighter surface carbon*/
  --surface:      #2d3133;          /* cards, elevated elements */
  --coral:        #FA7E61;          /* accent — unchanged */
  --coral-light:  #f5c4b3;
  --muted:         #7a8085;          /* subdued text */
  --light:         #D8CBC7;          /* subtle text */
  --border:       rgba(232,228,220,0.10);
  --green:        #4a8f1a;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;

  --nav-h:        80px;             /* thinner nav */
  --section-v:    6rem;
  --section-h:    5rem;
  --gap:          1.5rem;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--base_background);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  min-width: 320px;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

/* ── Typography helpers ────────────────────────────────────── */
.section-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3vw, 3.5rem);
  font-weight: 300;
  line-height: 1.08;
  margin-bottom: 2.5rem;
}

.empty-state {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  grid-column: 1 / -1;
  padding: 2rem 0;
}

/* ── Scroll reveal ─────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ── Navigation ────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: var(--nav-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--section-h);
  
  /* Transparent at top so hero bleeds through seamlessly */
  background: transparent;
  border-bottom: 1px solid transparent;
  
  transition: background 0.35s ease, border-color 0.35s ease;
}

/* Solid background once user scrolls down */
nav.scrolled {
  background: var(--base_background);
  border-bottom-color: var(--border);
}

/* Nav — avatar + name */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 1.0rem;           /* between avatar and signature */
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.nav-avatar {
  width: 32px;           /* slightly smaller to balance with signature */
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: grayscale(10%) brightness(0.95);
  transition: filter 0.3s ease;
}
.nav-logo:hover .nav-avatar {
  filter: grayscale(0%) brightness(1);
}

.nav-signature {
  height: 32px;          /* matches avatar height */
  width: auto;
  display: block;
  opacity: 0.65;         /* more subtle — was 0.85 */
  margin-left: 0;        /* no overlap */
  transform: translateY(1px);
  filter: brightness(0) invert(1); /* ensures it's white on dark nav */
  transition: opacity 0.25s ease;
}

.nav-logo:hover .nav-signature {
  opacity: 0.95;
}
.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-shrink: 0;
}

.nav-menu a {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(232, 228, 220, 0.65); /* Elegant, predictable off-white */
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav-menu a:hover {
  color: #ffffff;
}
/* "Apps" dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(232, 228, 220, 0.65);
  transition: color 0.3s ease;
}
.nav-dropdown-toggle::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 0.7rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle { color: #ffffff; }
.nav-dropdown.open .nav-dropdown-toggle::after { transform: rotate(-135deg) translateY(-1px); }

.nav-submenu {
  position: absolute;
  top: 100%;
  left: -1rem;
  min-width: 210px;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--base_background);
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.nav-dropdown.open .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
@media (hover: hover) {
  .nav-dropdown:not(.no-hover):hover .nav-submenu { opacity: 1; visibility: visible; transform: none; }
  .nav-dropdown:not(.no-hover):hover .nav-dropdown-toggle { color: #ffffff; }
}
.nav-submenu a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.75rem;
  letter-spacing: 0.12em;
}
.nav-submenu a:hover { background: var(--surface); }
.nav-app-logo {
  width: 28px;
  height: 28px;
  border-radius: 22%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Legal links (Impressum/Datenschutz) — only shown in the mobile menu */
.nav-legal { display: none; }
/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Sections ──────────────────────────────────────────────── */
section {
  padding: var(--section-v) var(--section-h);
}

/* ── Hero — full bleed painting ────────────────────────── */
#home {
  position: relative;
  /* Adjusts the height to account for the header area */
  height: calc(100vh - var(--nav-h)); 
  margin-top: var(--nav-h);
  overflow: hidden;
  padding: 0;
  display: block;
  border: none;
  outline: none;
}

#hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Top gradient so signature/nav links stay legible over the hero */
#home::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(23,22,22,0.55) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Vignette so caption stays readable */
#home::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(26,25,23,0.4) 100%);
  pointer-events: none;
}

.hero-caption {
  position: absolute;
  bottom: 3rem;
  left: var(--section-h);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  
  /* High contrast off-white text */
  color: rgba(232, 228, 220, 0.85); 
  letter-spacing: 0.08em;
  z-index: 1;
  
  /* Localized vignette fallback behind the text to separate it from the painting canvas */
  padding: 0.5rem 1rem;
  background: radial-gradient(circle at left, rgba(26, 25, 23, 0.6) 0%, transparent 80%);
  border-radius: 4px;
}

/* Animated scroll nudge */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: var(--section-h);
  color: rgba(232,228,220,0.4);
  z-index: 1;
  text-decoration: none;
  animation: bob 2.8s ease-in-out infinite;
  transition: color 0.2s;
}
.hero-scroll-hint:hover { color: rgba(232,228,220,0.85); }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* ── Gallery ───────────────────────────────────────────────── */
#art { background: var(--warm); }

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.gallery-desc {
  max-width: 440px;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.8;
}

.gallery-filters {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.gallery-filters button {
  background: none;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.gallery-filters button:hover,
.gallery-filters button.active {
  border-color: var(--ink);
  color: var(--ink);
}
.gallery-filters button.active { background: var(--ink); color: var(--base_background); }

#gallery-grid {
  position: relative;
  /* height is set dynamically by JS masonry */
}

.gallery-item {
  position: absolute;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  /* width set by JS */
  transition: opacity 0.55s ease;
}

/* Gallery items fade in opacity-only */
.gallery-item.fade-in { opacity: 0; }
.gallery-item.fade-in.visible { opacity: 1; }

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.95;
  transition: transform 0.5s ease, opacity 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.03); opacity: 0.82; }

.gallery-item-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem 1.25rem 1.25rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.62));
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-item-info { transform: none; }

.gallery-item-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: #fff;
}
.gallery-item-meta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* ── Sketch Notes ──────────────────────────────────────────── */
#notes { background: var(--base_background); }

#notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

/* Card is NOT an <a> anymore — it's a <div> with links inside */
.note-card {
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  transition: border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
  position: relative;
}
.note-card:hover {
  border-color: rgba(250,126,97,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

/* Thumbnail — image-first, square-ish for sketchnote proportions */
.note-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: var(--warm);
  aspect-ratio: 4/3;
}

.note-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.note-card:hover .note-thumb { transform: scale(1.03); }

.note-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(232,228,220,0.12);
}
.note-thumb-placeholder svg { width: 56px; height: 56px; }

/* Topic chip overlaid on image bottom-left */
.note-topic {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  background: rgba(23,22,22,0.82);
  backdrop-filter: blur(6px);
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(250,126,97,0.25);
}

/* Text body */
.note-body {
  padding: 1.25rem 1.25rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.note-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  color: var(--ink);
}

.note-desc {
  font-size: 0.83rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.75;
  flex: 1;
}

/* Link footer — always at bottom, never wraps awkwardly */
.note-links {
  display: flex;
  gap: 0;
  margin-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.note-link {
  flex: 1;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.7rem 0.5rem;
  text-align: center;
  transition: color 0.2s, background 0.2s;
  border-right: 1px solid var(--border);
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.note-link:last-child { border-right: none; }
.note-link:hover { color: var(--coral); background: rgba(250,126,97,0.06); }

.note-link-icon { font-size: 0.85rem; opacity: 0.5; }

/* No-links card: just bottom padding */
.note-card.no-links .note-body { padding-bottom: 1.25rem; }

/* ── App sections (Proyav, Arkusch, …) ─────────────────────── */
.app-title-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0;
}
.app-logo {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 22%;
  object-fit: cover;
  border: 1px solid rgba(240, 235, 226, 0.12);
}
.app-title-text .section-title { margin-bottom: 0.25rem; }

.app-title-block .section-title {
  margin-bottom: 0;
}

.app-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--coral);
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.app-meta .section-label {
  margin-bottom: 0;
}

.app-section {
  background: #1c1c1a;
  color: #f0ebe2;
  padding: 5rem 0;
}
.app-section .section-title { 
  color: #f0ebe2; 
  font-size: 2.5rem;
  margin: 0.25rem 0 1rem 0; 
  text-transform: uppercase;
}
.app-section .section-label { 
  color: var(--coral); 
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Master inner wrapper forced into a strict top-down layout column */
.app-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Row 1: The Horizontal Screenshot Track */
.app-screens {
  display: flex;
  gap: 0.75rem; /* Tight, premium clustering */
  overflow-x: auto;
  justify-content: flex-start;
  padding: 1rem 0;
  scrollbar-width: none;
}
.app-screens::-webkit-scrollbar {
  display: none;
}

/* Flat, pristine uniform application cards */
.app-screen {
  flex: 0 0 160px;
  width: 160px;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(240, 235, 226, 0.12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transform: none !important;
  margin: 0 !important;
  transition: transform 0.3s ease;
}
.app-screen:hover {
  transform: translateY(-4px) !important;
}

/* Row 2: Bottom Details Component split cleanly on desktop */
.app-details {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 767px) {
  .app-details { grid-template-columns: 1fr; }
  .app-meta { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

.app-desc {
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(240, 235, 226, 0.85);
  margin-bottom: 2rem;
}

.app-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.app-features-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}
.app-link {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: rgba(240, 235, 226, 0.7);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.app-link:hover { color: var(--coral); }
/* a second app section follows the first one */
.app-section { scroll-margin-top: 2rem; }
.app-section + .app-section {
  border-top: 1px solid rgba(240, 235, 226, 0.08);
}
.app-features li {
  display: grid;
  grid-template-columns: 90px 1fr;
  column-gap: 0.5rem;
  line-height: 1.5;
  align-items: baseline;
  list-style: none;
  padding-left: 0;
}

.app-features li::before { display: none; }

.feature-heading {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
}

.feature-text {
  color: rgba(240, 235, 226, 0.7);
}

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #f0ebe2;
  color: #1c1c1a;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.btn-appstore:hover { background: #ffffff; }
.btn-appstore svg { width: 16px; height: 16px; }

/* Desktop Grid Adjustments */
@media (min-width: 768px) {
  .app-details {
    
    align-items: start;
  }
  .app-features {
    grid-template-columns: 1fr 1fr;
  }
  .app-screens {
    justify-content: center;
  }
  .app-screen {
    flex: 1 1 0;
    width: auto;
    max-width: 220px;
  }
}

/* ── About ─────────────────────────────────────────────────── */
#about { background: var(--warm); }

.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 220px) 1fr;
  gap: 5rem;
  align-items: start;
}

.about-photo-wrap { position: relative; }

.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: grayscale(15%);
}

.about-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #2d3133;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: rgba(232,228,220,0.2);
  letter-spacing: 0.05em;
}

.about-accent { display: none; }

#about-body {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.9;
  margin-bottom: 0;
}
#about-body strong { color: var(--ink); font-weight: 400; }

#about-tags { display: none; }
#about-tags:empty { display: none; }

.tag { display: none; }

/* ── Contact ───────────────────────────────────────────────── */
#contact { background: var(--base_background); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.contact-inner--links-only {
  grid-template-columns: minmax(0, 560px);
}

.contact-desc {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.9;
  margin-bottom: 2.5rem;
}

#contact-links { display: flex; flex-direction: column; gap: 0.75rem; }

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.contact-link:hover { border-color: var(--coral); background: var(--surface); }

.contact-link-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--warm);
  flex-shrink: 0;
}
.contact-link-icon svg {
  width: 17px; height: 17px;
  stroke: var(--muted);
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-link-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.contact-link-value { font-size: 0.9rem; }

.contact-form-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  margin-bottom: 1.75rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); opacity: 0.6; }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--coral); }
.form-group textarea { min-height: 110px; }

.btn-send {
  background: var(--coral);
  color: #fff;
  border: none;
  padding: 0.9rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.btn-send:hover:not(:disabled) { background: #d45538; }
.btn-send:disabled { opacity: 0.6; cursor: default; }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: #161819;
  color: rgba(232,228,220,0.3);
  text-align: center;
  padding: 2.25rem var(--section-h);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
footer a { color: rgba(232,228,220,0.45); text-decoration: none; }
footer a:hover { color: var(--coral); }

/* ── Lightbox ──────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(26,25,22,0.96);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
}
#lightbox.open { display: flex; }

#lightbox-img {
  max-width: min(90vw, 1000px);
  max-height: 85vh;
  object-fit: contain;
}

#lightbox-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(248,246,241,0.45);
  letter-spacing: 0.04em;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: rgba(248,246,241,0.5);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}
.lightbox-close:hover { color: #fff; }

/* ── Lightbox layout ───────────────────────────────────────── */
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: min(85vw, 1000px);
}

/* ── Lightbox navigation arrows ────────────────────────────── */
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(248, 246, 241, 0.4);
  font-size: 3.5rem;
  font-weight: 200;
  cursor: pointer;
  padding: 2rem;
  z-index: 10010;
  transition: color 0.2s;
  user-select: none;
  line-height: 1;
}
.lightbox-nav:hover { color: var(--coral); }
#lb-prev { left: 1rem; }
#lb-next { right: 1rem; }

/* ── Lightbox counter ──────────────────────────────────────── */
.lightbox-counter {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 0.4rem;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

/* Tablet: 768–1024 */
@media (max-width: 1024px) {
  :root {
    --section-h: 3rem;
    --section-v: 5rem;
  }

  /* gallery columns handled by JS masonry */

  .app-inner { gap: 3rem; }
  .app-screen { width: 150px; }

  .about-inner { gap: 3.5rem; }
  .contact-inner { gap: 3.5rem; }
}

/* Mobile: ≤ 767 */
@media (max-width: 767px) {
  :root {
    --section-h: 1.5rem;
    --section-v: 4rem;
    --nav-h: 60px;
    --gap: 1rem;
  }

  /* Nav — hamburger */
  nav { padding: 0 1.5rem; }

  .nav-toggle { display: flex; }

#nav-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  /* Fix 1: Ensure it has the carbon base background instead of transparency or surface-gray */
  background: var(--base_background);
  padding: calc(var(--nav-h) + env(safe-area-inset-top)) var(--section-h) 2rem var(--section-h);
  border-bottom: 1px solid var(--border);
  transform: translateY(-110%);
  transition: transform 0.3s ease;
  /* Fix 2: Give it a z-index layer, but make sure it plays nice with your logo */
  z-index: 99;
  list-style: none;
  margin: 0;
}
  #nav-menu.open {
    display: flex;
    flex-direction: column;
    transform: none;
  }
  #nav-menu li { width: 100%; border-bottom: 1px solid var(--border); }
  #nav-menu a {
    display: block;
    width: 100%;
    padding: 1rem 0;
    font-size: 0.85rem;
    color: var(--ink);
    white-space: nowrap;
  }

  /* "Apps" dropdown — expands inline inside the mobile menu */
  #nav-menu .nav-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0;
    font-size: 0.85rem;
    color: var(--ink);
  }
  #nav-menu .nav-submenu {
    position: static;
    display: none;
    min-width: 0;
    padding: 0 0 0.75rem;
    border: none;
    background: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  #nav-menu .nav-dropdown.open .nav-submenu { display: block; }
  #nav-menu .nav-submenu li { border-bottom: none; }
  #nav-menu .nav-submenu a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 0;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
  }
  #nav-menu .nav-submenu a:hover { background: none; }

  /* Legal links — shown inside the mobile menu only */
  #nav-menu .nav-legal {
    display: block;
    border-bottom: none;
  }
  #nav-menu .nav-legal:first-of-type {
    margin-top: 1rem;
    border-top: 1px solid var(--border);
  }
  #nav-menu .nav-legal a {
    padding: 0.75rem 0;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--muted);
    text-transform: uppercase;
  }

  /* Hero — full bleed, shorter on mobile */
  #home { height: 70vw; min-height: 320px; max-height: 85vh; }
  .hero-caption { left: var(--section-h); font-size: 0.78rem; }

  /* gallery columns handled by JS masonry */
  .gallery-header { flex-direction: column; align-items: flex-start; }

  /* Notes — single col */
  #notes-grid { grid-template-columns: 1fr; }

  /* Apps — stacked */
  .app-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .app-logo { width: 56px; height: 56px; }
  .app-screens { order: -1; }
  .app-screen { width: 130px; border-radius: 14px; }
  .app-screen:first-child { transform: rotate(-2deg) translateY(12px); }
  .app-screen:last-child  { transform: rotate(2deg)  translateY(6px); }

  /* About — stacked */
  .about-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-photo-wrap { max-width: 220px; }
  .about-accent { bottom: -1rem; right: -1rem; width: 44px; height: 44px; }

  /* Contact — stacked */
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }

  /* Lightbox */
  #lightbox { padding: 1rem; }
  .lightbox-nav { font-size: 2.5rem; padding: 1rem; }
  #lb-prev { left: 0.25rem; }
  #lb-next { right: 0.25rem; }
}

/* Very small screens — JS masonry drops to 1 col */