/* =========================================================
   tomash.biz — styles.css
   Design: Univers Condensed + DM Mono
   Palette: Azure #0057A8 · Ink #0A1628 · Sun #F2A93B
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400&display=swap');

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

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

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

/* ===== ACCESSIBILITY HELPERS ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== TOKENS ===== */
:root {
  --az:    #0057A8;
  --az-d:  #003875;
  --az-l:  #E8F2FC;
  --sun:   #F2A93B;
  --ink:   #0A1628;
  --mid:   #5A6A7E;
  --line:  #E2EAF4;
  --bg:    #FAFBFD;
  --white: #FFFFFF;
  --nav-h: 64px;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; font-size: 18px; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== ANIMATIONS ===== */
@keyframes lineGrow  { to { transform: scaleY(1); } }
@keyframes fadeUp    { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ===== SITE NAV (public pages) ===== */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.75rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

nav.site-nav .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

nav.site-nav .logo .bracket { color: var(--az); }

.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.footer-logo .logo-img {
  height: 22px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.footer-logo:hover .logo-img { opacity: 1; }

nav.site-nav .nav-r {
  display: flex;
  align-items: center;
  gap: 3rem;
}

nav.site-nav .nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

nav.site-nav .nav-links a {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

nav.site-nav .nav-links a:hover,
nav.site-nav .nav-links a.active { color: var(--az); }

nav.site-nav .nav-links a {
  position: relative;
}
nav.site-nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 100%; height: 1px;
  background: var(--az);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
nav.site-nav .nav-links a:hover::after,
nav.site-nav .nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

nav.site-nav .nav-lang {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
  margin-left: -1rem;
}

nav.site-nav .nav-lang a {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}

nav.site-nav .nav-lang a:hover,
nav.site-nav .nav-lang a.active { color: var(--az); }

nav.site-nav .nav-lang span { color: var(--line); }

nav.site-nav .nav-cta {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  background: var(--az);
  color: white;
  padding: 0.55rem 1.3rem;
  border: none;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
  line-height: 1.6;
}

nav.site-nav .nav-cta:hover { background: var(--az-d); }

/* Lowercase UI chrome — nav, buttons, labels, meta (not headings or body copy) */
nav.site-nav .nav-links a,
nav.site-nav .nav-lang a,
nav.site-nav .nav-cta,
.btn-primary,
.btn-ghost,
.gallery-btn,
.detail-breadcrumb,
.detail-hero-label,
.detail-meta,
.footer-r,
.footer-social { text-transform: lowercase; }

/* ===== SHARED UTILITIES ===== */
.btn-primary {
  background: var(--az);
  color: white;
  padding: 1rem 2rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  transition: background 0.25s ease, gap 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.btn-primary:hover { background: var(--az-d); gap: 1.25rem; color: white; }

.btn-ghost {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--mid);
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-ghost:hover { color: var(--az); border-color: var(--az); }

.link-az {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--az);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  transition: letter-spacing 0.2s;
  text-decoration: none;
  display: inline-block;
}

.link-az:hover { letter-spacing: 0.25em; }

.section-h2 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.section-h2 em { font-style: normal; color: var(--az); }

/* ===== FOOTER (public pages) ===== */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer.site-footer .footer-logo {
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
}

footer.site-footer .footer-logo .bracket { color: var(--az); }

footer.site-footer .footer-r {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--mid);
  text-align: right;
  line-height: 1.8;
}

footer.site-footer .footer-r a { color: var(--az); text-decoration: none; }

.footer-social {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--az) !important;
  text-decoration: none;
  transition: opacity 0.2s;
}
.footer-social:hover { opacity: 0.65; }

/* ===== HOME — HERO ===== */
.hero {
  min-height: 100vh;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 10rem 4rem 6rem;
  position: relative;
  overflow: hidden;
}

.hero-memoji {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  height: 65%;
  max-height: 480px;
  width: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  animation: fadeIn 0.9s 0.8s ease forwards;
}

.hero-line {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--sun) 0%, var(--az) 40%);
  transform: scaleY(0);
  transform-origin: top;
  animation: lineGrow 1s 0.2s cubic-bezier(0.77,0,0.18,1) forwards;
}

.hero-tag {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--az);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.5s ease forwards;
}

.hero-h1 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(5rem, 10vw, 10rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--ink);
  max-width: 700px;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.65s ease forwards;
}

.hero-h1 em { font-style: normal; color: var(--az); }

.hero-body {
  font-size: 0.78rem;
  line-height: 2;
  color: var(--mid);
  max-width: 420px;
  margin-bottom: 3.5rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.8s ease forwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.95s ease forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 3rem; right: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.7s 1.2s ease forwards;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: var(--az);
  transform: scaleY(0);
  transform-origin: top;
  animation: lineGrow 1s 1.4s ease forwards;
}

/* ===== HERO DECORATION ===== */
.hero-deco {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 3rem;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  color: var(--az);
  font-family: 'Univers Condensed', sans-serif;
  font-weight: 300;
  font-size: clamp(12rem, 20vw, 28rem);
  line-height: 1;
  letter-spacing: 0.04em;
  opacity: 0.04;
  white-space: nowrap;
  z-index: 0;
}

.scroll-txt {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--mid);
  writing-mode: vertical-lr;
}

/* ===== HOME — DIVIDER ===== */
.divider {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 4rem;
  margin: 1rem 0;
}

.divider-line { flex: 1; height: 1px; background: var(--line); }

.divider-txt {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
}

/* ===== HOME — ABOUT ===== */
.about {
  padding: 8rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8rem;
  align-items: start;
}

.about-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--az);
  margin-bottom: 1.5rem;
}

.about-h2 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.01em;
  position: sticky;
  top: 8rem;
}

.about-h2 em { font-style: normal; color: var(--az); }

.about-p {
  font-size: 0.76rem;
  line-height: 2.1;
  color: var(--mid);
  margin-bottom: 2.5rem;
}

.skills-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--mid);
  margin-bottom: 0.75rem;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-chip {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--az);
  background: var(--az-l);
  border: 1px solid #c5d9f0;
  border-radius: 2px;
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  cursor: default;
}
.skill-chip:hover {
  background: var(--az);
  color: white;
  border-color: var(--az);
  transform: translateY(-2px);
}

/* keep old stat styles for any existing references */
.stat-l {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--mid);
  margin-top: 0.4rem;
}

/* ===== HOME — WORK PREVIEW ===== */
.home-work { padding: 0 4rem 5rem; }

.home-work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  margin-bottom: 3rem;
}

.proj-preview { display: flex; flex-direction: column; }

.proj {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 3rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.proj::before {
  content: '';
  position: absolute;
  left: -4rem; right: -4rem; top: 0; bottom: 0;
  background: var(--az-l);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: -1;
}

.proj:hover::before { opacity: 1; }

.proj-num {
  font-family: 'Univers Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.68rem;
  color: var(--line);
  letter-spacing: 0.1em;
  transition: color 0.2s;
}

.proj:hover .proj-num { color: var(--az); }

.proj-name {
  font-family: 'Univers Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}

.proj:hover .proj-name { color: var(--az); }

.proj-tags {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}

.proj-arrow {
  font-size: 1.1rem;
  color: var(--line);
  transition: all 0.2s;
}

.proj:hover .proj-arrow { color: var(--az); transform: translateX(6px); }

/* ===== HOME — SERVICES ===== */
.services {
  background: var(--az);
  padding: 8rem 4rem;
}

.services-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
}

.services-h2 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: white;
  letter-spacing: 0.01em;
  margin-bottom: 5rem;
  line-height: 1.1;
}

.services-h2 em { font-style: italic; color: var(--sun); }

.svcs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
}

.svc {
  background: var(--az);
  padding: 3rem 2.5rem;
  transition: background 0.3s;
  cursor: default;
}

.svc:hover { background: var(--az-d); }

.svc-n {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2rem;
}

.svc-name {
  font-family: 'Univers Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: white;
  margin-bottom: 1.2rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.svc-name em { font-style: italic; color: var(--sun); }

.svc-desc {
  font-size: 0.7rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2rem;
}

.svc-price {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--sun);
  opacity: 0;
  transition: opacity 0.3s;
}

.svc:hover .svc-price { opacity: 1; }

/* ===== HOME — CONTACT ===== */
.contact-s {
  padding: 8rem 4rem;
  max-width: 700px;
}

.contact-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--az);
  margin-bottom: 2rem;
}

.contact-h2 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin-bottom: 2rem;
}

.contact-h2 em { font-style: normal; color: var(--az); }

.contact-p {
  font-size: 0.76rem;
  line-height: 2;
  color: var(--mid);
  max-width: 380px;
  margin-bottom: 3rem;
}

/* ===== WORK PAGE ===== */
.work-page { padding-top: var(--nav-h); }

.work-hero {
  padding: 1.75rem 4rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.work-hero-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--az);
  margin-bottom: 1rem;
}

.work-hero-h1 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(3rem, 5.5vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.work-hero-h1 em { font-style: normal; color: var(--az); }

.work-hero-sub {
  font-size: 0.76rem;
  line-height: 2;
  color: var(--mid);
  max-width: 500px;
  margin-top: 1.5rem;
}

.work-hero-sub a { color: var(--az); text-decoration: none; }

/* Filter bar */
.filter-bar {
  padding: 1.5rem 4rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--mid);
  margin-right: 0.5rem;
}

.filter-btn {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  background: none;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  color: var(--mid);
  transition: all 0.2s;
  min-height: 36px;
}

.filter-btn:hover,
.filter-btn.active { background: var(--az); color: white; border-color: var(--az); }

/* Work list */
.work-list { padding: 0 0 6rem; }

.work-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 2.5rem;
  padding: 1.75rem 4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}

a.work-item { cursor: pointer; }
a.work-item:hover { background: var(--az-l); }

.work-item.locked { cursor: default; }
.work-item.locked:hover { background: #F8F9FA; }

.wi-body { min-width: 0; }

.wi-name {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
  transition: color 0.2s;
}

a.work-item:hover .wi-name { color: var(--az); }

.wi-excerpt {
  font-size: 0.72rem;
  color: var(--mid);
  line-height: 1.5;
  max-width: 680px;
}

.wi-badge {
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  color: var(--mid);
  white-space: nowrap;
}

.wi-badge.public  { border-color: var(--az); color: var(--az); }
.wi-badge.nda     { background: #F5F5F5; color: #AAA; border-color: #E0E0E0; }

.wi-arrow {
  font-size: 1.1rem;
  color: var(--line);
  transition: all 0.2s;
}

a.work-item:hover .wi-arrow { color: var(--az); transform: translateX(6px); }

.wi-lock {
  font-size: 0.9rem;
  color: #CCC;
}

.work-item-hidden { display: none; }

/* ===== BLOG PAGE ===== */
.blog-page { padding-top: var(--nav-h); }

.blog-hero {
  padding: 4rem 4rem 3rem;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: end;
}

.blog-hero-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--az);
  margin-bottom: 1rem;
}

.blog-hero-h1 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.4rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.blog-hero-h1 em { font-style: normal; color: var(--az); }

.blog-hero-sub {
  font-size: 0.76rem;
  line-height: 2;
  color: var(--mid);
  margin-top: 1.5rem;
}

.blog-topics-label {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--mid);
  margin-bottom: 1rem;
}

.blog-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.topic-pill {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  color: var(--mid);
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  font-family: 'DM Mono', monospace;
  min-height: 36px;
}

.topic-pill:hover,
.topic-pill.active { background: var(--az); color: white; border-color: var(--az); }

/* Featured post */
.blog-featured { padding: 4rem 4rem 0; }

.featured-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--mid);
  margin-bottom: 2rem;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.2s;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.featured-card:hover { border-color: var(--az); }

.featured-img {
  background: var(--az-d);
  min-height: 320px;
  position: relative;
  overflow: hidden;
}

.featured-img-inner {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(135deg, var(--az-d) 0%, var(--az) 60%, #1A7FD4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-img-txt {
  font-family: 'Univers Condensed', sans-serif;
  font-size: 3.5rem;
  font-weight: 300;
  color: rgba(255,255,255,0.07);
  letter-spacing: -0.05em;
  text-align: center;
  padding: 2rem;
  line-height: 1.1;
}

.featured-body { padding: 3rem; }

.feat-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.feat-tag {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--az-l);
  color: var(--az);
  padding: 0.3rem 0.7rem;
}

.feat-date { font-size: 0.62rem; color: var(--mid); }

.feat-h {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin-bottom: 1.2rem;
}

.feat-h em { font-style: normal; color: var(--az); }

.feat-excerpt {
  font-size: 0.74rem;
  line-height: 2;
  color: var(--mid);
  margin-bottom: 2rem;
}

.feat-read {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--az);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.2s;
}

.featured-card:hover .feat-read { gap: 1rem; }

/* Blog grid */
.blog-grid-header {
  padding: 3rem 4rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 3rem;
}

.blog-grid-count {
  font-size: 0.62rem;
  color: var(--mid);
}

.blog-grid {
  padding: 0 4rem 6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.post-card {
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.25s;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.post-card:hover { border-color: var(--az); transform: translateY(-3px); }

.post-card-hidden { display: none; }

.post-card-img {
  height: 160px;
  position: relative;
  overflow: hidden;
}

.post-card-img-inner {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  transition: transform 0.4s;
}

.post-card:hover .post-card-img-inner { transform: scale(1.04); }

.pc-img-1 { background: linear-gradient(135deg, #003875, #0057A8); }
.pc-img-2 { background: linear-gradient(135deg, #1A3A5C, #0D5C8A); }
.pc-img-3 { background: linear-gradient(135deg, #2D1B00, #854F0B); }
.pc-img-4 { background: linear-gradient(135deg, #1A4A2E, #2D7A4F); }
.pc-img-5 { background: linear-gradient(135deg, #3D1A4A, #7A2D8A); }
.pc-img-6 { background: linear-gradient(135deg, #1A1A3A, #2D2D6A); }

.post-card-body { padding: 1.5rem; }

.pc-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.pc-tag {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--az-l);
  color: var(--az);
  padding: 0.25rem 0.6rem;
}

.pc-date { font-size: 0.6rem; color: var(--mid); }

.pc-h {
  font-family: 'Univers Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.pc-h em { font-style: normal; color: var(--az); }

.pc-excerpt {
  font-size: 0.68rem;
  line-height: 1.9;
  color: var(--mid);
  margin-bottom: 1.2rem;
}

.pc-read {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--az);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s;
}

.post-card:hover .pc-read { gap: 0.8rem; }

/* Newsletter */
.newsletter {
  background: var(--az-l);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.nl-h {
  font-family: 'Univers Condensed', sans-serif;
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.nl-h em { font-style: normal; color: var(--az); }

.nl-sub {
  font-size: 0.72rem;
  line-height: 1.9;
  color: var(--mid);
  margin-top: 0.75rem;
}

.nl-form { display: flex; }

.nl-input {
  flex: 1;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-right: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  outline: none;
  background: white;
  transition: border-color 0.2s;
}

.nl-input:focus { border-color: var(--az); }

.nl-btn {
  background: var(--az);
  color: white;
  padding: 0.9rem 1.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
  transition: background 0.2s;
}

.nl-btn:hover { background: var(--az-d); }

.nl-note {
  font-size: 0.6rem;
  color: var(--mid);
  margin-top: 0.75rem;
}

/* ===== DETAIL PAGES (project / blog post) ===== */
.detail-page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.detail-breadcrumb {
  padding: 1.5rem 4rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--mid);
}

.detail-breadcrumb a {
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}

.detail-breadcrumb a:hover { color: var(--az); }

.detail-breadcrumb span { color: var(--line); }

.detail-hero {
  padding: 5rem 4rem 4rem;
  border-bottom: 1px solid var(--line);
  max-width: 860px;
}

/* Two-column layout when cover image is present */
.detail-hero.has-cover {
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  align-items: stretch;
  border-bottom: none;
}

.detail-hero-l {
  padding: 5rem 4rem 5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-bottom: 1px solid var(--line);
}

/* detail-body inside detail-hero-l — no extra padding, inherits column width */
.detail-hero-l .detail-body {
  padding: 2.5rem 0 0;
  max-width: none;
  font-size: 0.82rem;
  line-height: 2;
  color: var(--ink);
}

.detail-hero-l .detail-body h2 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 300;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.detail-hero-r {
  overflow: hidden;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
}

.detail-hero-r .detail-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-hero-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--az);
  margin-bottom: 1.5rem;
}

.detail-h1 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(3rem, 5.5vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin-bottom: 2rem;
}

.detail-h1 em { font-style: normal; color: var(--az); }

.detail-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.62rem;
  color: var(--mid);
  letter-spacing: 0.05em;
  flex-wrap: wrap;
}

.detail-meta .dm-tag {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--az-l);
  color: var(--az);
  padding: 0.25rem 0.65rem;
}
.detail-meta .dm-tag-link {
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.04em;
}
.detail-meta .dm-tag-link:hover { background: var(--az); color: #fff; }


.detail-body {
  padding: 4rem;
  max-width: 760px;
  font-size: 0.82rem;
  line-height: 2;
  color: var(--ink);
}

.detail-body p { margin-bottom: 1.5rem; }
.detail-body p:last-child { margin-bottom: 0; }

.detail-body h2 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 3rem 0 1.5rem;
}

.detail-body h3 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 300;
  margin: 2rem 0 1rem;
}

.detail-tags {
  padding: 0 4rem 4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detail-tag {
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  color: var(--mid);
}

/* ===== PRIVATE LOGIN ===== */
.private-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) 2rem 4rem;
}

.private-login-box {
  background: white;
  border: 1px solid var(--line);
  padding: 3rem;
  width: 100%;
  max-width: 420px;
}

.private-login-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--az);
  margin-bottom: 1rem;
}

.private-login-h {
  font-family: 'Univers Condensed', sans-serif;
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
}

.private-login-sub {
  font-size: 0.72rem;
  line-height: 1.8;
  color: var(--mid);
  margin-bottom: 2rem;
}

.private-login-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  outline: none;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
  background: white;
  color: var(--ink);
}

.private-login-input:focus { border-color: var(--az); }

.private-login-hint {
  font-size: 0.62rem;
  color: var(--mid);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.private-login-hint a { color: var(--az); text-decoration: none; }

/* Private portfolio page */
.private-page { padding-top: var(--nav-h); }

.private-header {
  padding: 4rem 4rem 3rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 2rem;
}

.private-header-left .private-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--az);
  margin-bottom: 1rem;
}

.private-header-left h1 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.private-header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.private-list {
  padding: 0 4rem 6rem;
}

/* ===== GALLERY GRID (detail pages) ===== */
.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2px;
  background: var(--line);
  margin: 2rem 0;
  border: 1px solid var(--line);
}

.gallery-thumb {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  border: none;
  padding: 0;
  background: var(--az-l);
  transition: opacity 0.2s;
}

.gallery-thumb:hover { opacity: 0.82; }

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.gallery-thumb:hover img { transform: scale(1.05); }

/* ===== GALLERY OVERLAY (scroll-based, do NOT use display:none on items) ===== */
.gallery-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(10,22,40,0.96);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.gallery-overlay[hidden] { display: none; }

.gallery-overlay-head {
  padding: 1rem 2rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: rgba(5,14,26,0.98);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Single-image display area */
.gallery-overlay-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gallery-overlay-body.is-zoomed {
  align-items: flex-start;
  justify-content: flex-start;
}

/* Each image item — one visible at a time */
.gallery-overlay-item {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  width: 100%;
  padding: 1.5rem 2rem;
  box-sizing: border-box;
}

.gallery-overlay-item.is-active {
  display: flex;
}

.gallery-full-image {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  display: block;
  user-select: none;
  cursor: zoom-in;
  object-fit: contain;
}

.gallery-full-image.zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

/* ===== ADMIN — CONTAINER & CARD ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 4rem;
  position: relative;
}

.card {
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.card:last-child { border-bottom: none; }

.card h1 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.card h2 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.card h3 {
  font-family: 'Univers Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.card h1 em, .card h2 em, .card h3 em { font-style: normal; color: var(--az); }

/* Admin nav inside card */
.card nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  align-items: center;
}

/* Meta text */
.meta {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--mid);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--az);
  border: 1px solid var(--az-l);
  padding: 0.2rem 0.55rem;
  background: var(--az-l);
  margin: 0 0.2rem 0.2rem 0;
}

/* Back link */
.container > a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--mid);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  margin-bottom: 2rem;
  margin-top: 1rem;
  transition: color 0.2s, border-color 0.2s;
}

.container > a:hover { color: var(--az); border-color: var(--az); }

/* Article cards inside .container */
article.card {
  counter-increment: item-counter;
}

.container { counter-reset: item-counter; }

/* ── Unified error / success messages ───────────────────────────────────────── */
.msg-error,
.msg-success,
.error-msg,
.private-login-error,
.nda-access-error {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: 0.68rem;
  line-height: 1.6;
  padding: .7rem 1rem;
  border-radius: 3px;
  margin-bottom: 1.25rem;
  border-left: 3px solid;
}
.msg-error,
.error-msg,
.private-login-error,
.nda-access-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #ef4444;
}
.msg-success {
  color: #166534;
  background: #f0fdf4;
  border-color: #22c55e;
}
.msg-error::before,
.error-msg::before,
.private-login-error::before,
.nda-access-error::before { content: '✕'; flex-shrink: 0; font-size: .65rem; margin-top: .1rem; }
.msg-success::before { content: '✓'; flex-shrink: 0; font-size: .65rem; margin-top: .1rem; }

/* Input error state */
input.error,
textarea.error,
select.error {
  border-color: #ef4444 !important;
}
input.error:focus,
textarea.error:focus { outline: none; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }

/* Admin background */
body:not(.copy-protected) {
  background: var(--bg);
}

/* ===== ADMIN — BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--az);
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  text-decoration: none;
  transition: all 0.25s;
  line-height: 1;
}

.btn:hover { background: var(--az-d); color: white; }

.btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn.secondary:hover {
  background: var(--az-l);
  color: var(--az);
  border-color: var(--az);
}

/* Gallery overlay — dedicated button style (white on dark bg) */
.gallery-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  background: transparent;
  color: #fff;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.gallery-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.6);
}
.gallery-btn-close {
  background: var(--az);
  border-color: var(--az);
}
.gallery-btn-close:hover {
  background: var(--az-d);
  border-color: var(--az-d);
}

/* Gallery thumb caption */
.gallery-thumb-caption {
  display: block;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: .4rem .6rem;
  background: rgba(10,22,40,.65);
  color: rgba(255,255,255,.88);
  font-family: 'DM Mono', monospace;
  font-size: .58rem;
  line-height: 1.4;
  text-align: left;
  pointer-events: none;
}

/* Gallery overlay caption */
.gallery-overlay-caption {
  margin: .6rem auto 0;
  max-width: 800px;
  font-family: 'DM Mono', monospace;
  font-size: .65rem;
  color: rgba(255,255,255,.6);
  text-align: center;
  line-height: 1.5;
}

/* ===== ADMIN — FORMS ===== */
form { max-width: 640px; }

label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--mid);
  margin-bottom: 0.4rem;
  margin-top: 1.5rem;
}

label:first-of-type { margin-top: 0; }

input:not([type="checkbox"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="radio"]),
textarea,
select {
  display: block;
  width: 100%;
  background: var(--white);
  text-transform: none;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  padding: 0.85rem 1rem;
  transition: border-left-color 0.2s;
  outline: none;
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

input:focus, textarea:focus, select:focus { border-left-color: var(--az); }
textarea { resize: vertical; }

/* ===== FOCUS STATES — keyboard navigation ===== */
:focus-visible {
  outline: 2px solid var(--az);
  outline-offset: 2px;
}
.btn-primary:focus-visible,
.btn-ghost:focus-visible { outline-offset: 3px; }
.gallery-btn:focus-visible { outline: 2px solid rgba(255,255,255,0.8); outline-offset: 2px; }
nav.site-nav .nav-links a:focus-visible { outline-offset: 4px; }
.filter-btn:focus-visible,
.topic-pill:focus-visible { outline-offset: 2px; }
a.work-item:focus-visible,
a.proj:focus-visible { outline: 2px solid var(--az); outline-offset: -2px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--az);
  cursor: pointer;
  margin: 0;
}

label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
  color: var(--ink);
  cursor: pointer;
  margin-top: 1.25rem;
}

input[type="file"] {
  display: block;
  font-size: 0.72rem;
  color: var(--mid);
  padding: 0.75rem;
  border: 1px dashed var(--line);
  width: 100%;
  cursor: pointer;
  transition: border-color 0.2s;
  background: transparent;
  font-family: 'DM Mono', monospace;
}

input[type="file"]:hover { border-color: var(--az); }

form > p {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* ===== ADMIN — TABLE ===== */
.table-responsive-cards {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  margin-top: 1rem;
}

.table-responsive-cards th {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--mid);
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 2px solid var(--az);
  background: var(--az-l);
  white-space: nowrap;
}

.table-responsive-cards td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}

.table-responsive-cards tr:hover td { background: var(--az-l); }

.table-responsive-cards a {
  color: var(--az);
  text-decoration: none;
  font-size: 0.65rem;
  transition: opacity 0.2s;
}

.table-responsive-cards a:hover { opacity: 0.65; }

.table-responsive-cards form { display: inline; max-width: none; margin: 0; }
.table-responsive-cards form > p { display: inline; margin: 0; }

.table-responsive-cards button[type="submit"] {
  background: none;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  padding: 0;
  transition: opacity 0.2s;
}

.table-responsive-cards button[type="submit"]:hover { opacity: 0.6; }

/* ===== ADMIN — MEDIA MANAGER ===== */
.image-remove-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--bg);
  margin-top: 0.5rem;
}

.media-manager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.media-item {
  width: 155px;
  border: 1px solid var(--line);
  background: var(--white);
  transition: border-color 0.2s;
  overflow: hidden;
  cursor: grab;
}

.media-item:hover { border-color: var(--az); }
.media-item.is-dragging  { opacity: 0.4; cursor: grabbing; }
.media-item.drop-before  { border-top: 3px solid var(--az); }
.media-item.drop-after   { border-bottom: 3px solid var(--az); }

.media-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.media-item-actions { padding: 0.5rem; }

.media-item-actions code {
  display: block;
  font-size: 0.52rem;
  color: var(--mid);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.5rem;
}

.media-item-buttons { display: flex; gap: 0.3rem; }

.media-move-btn,
.media-remove-btn {
  font-size: 0.58rem;
  padding: 0.3rem 0.5rem;
  line-height: 1;
}

/* ===== HIDE OLD STANDALONE LANG SWITCHER ===== */
p.meta[style*="text-align:right"] { display: none !important; }

/* ===== NDA ACCESS SECTION ===== */
.nda-access {
  padding: 5rem 4rem 6rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.nda-access-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--az);
  margin-bottom: 1rem;
}
.nda-access-h {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1rem;
}
.nda-access-sub {
  font-size: 0.76rem;
  line-height: 2;
  color: var(--mid);
  max-width: 380px;
}
.nda-access-error { margin-bottom: .85rem; }
.nda-access-input.error { border-color: #ef4444; }

.nda-access-row {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-bottom: 1rem;
}
.nda-access-input {
  flex: 1;
  padding: .7rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  font-size: 0.76rem;
  font-family: 'DM Mono', monospace;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s;
  min-width: 0;
}
.nda-access-input:focus { outline: none; border-color: var(--az); }
.nda-access-hint {
  font-size: 0.65rem;
  color: var(--mid);
  line-height: 1.8;
}
.nda-access-hint a { color: var(--az); text-decoration: none; }
.nda-access-hint a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .nda-access { grid-template-columns: 1fr; gap: 2rem; padding: 4rem 1.5rem; }
}

/* ===== LOCK MODAL ===== */
.lock-modal {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(10,22,40,.72);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lock-modal[hidden] { display: none; }

.lock-modal-box {
  background: #fff;
  border-radius: 8px;
  padding: 2.5rem 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(10,22,40,.18);
}
.lock-modal-label {
  font-size: .6rem;
  letter-spacing: .12em;
  color: var(--az);
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.lock-modal-h {
  font-family: 'Univers Condensed', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  letter-spacing: .01em;
  color: var(--ink);
  margin-bottom: .5rem;
}
.lock-modal-sub {
  font-size: .72rem;
  color: var(--mid);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}
.lock-modal-error {
  font-size: .68rem;
  color: #b91c1c;
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  padding: .5rem .75rem;
  margin-bottom: 1rem;
  border-radius: 3px;
}
.lock-modal-input {
  width: 100%;
  padding: .65rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  font-size: .82rem;
  font-family: 'DM Mono', monospace;
  color: var(--ink);
  margin-bottom: 1rem;
  box-sizing: border-box;
  transition: border-color .15s;
}
.lock-modal-input:focus { outline: none; border-color: var(--az); }
.lock-modal-actions {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.lock-modal-hint {
  font-size: .62rem;
  color: var(--mid);
  margin-top: 1.25rem;
  line-height: 1.5;
}
.lock-modal-hint a { color: var(--mid); }
.lock-modal-hint a:hover { color: var(--az); }

/* Locked item — cursor pointer when clickable */
.work-item.locked[data-lock] { cursor: pointer; }
.work-item.locked[data-lock]:hover .wi-name { color: var(--az); }
.work-item.unlocked { cursor: pointer; }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== RESPONSIVE ===== */

/* iOS Safari 100vh fix */
.hero { min-height: 100svh; }

@media (max-width: 900px) {
  nav.site-nav { padding: 0.65rem 1.5rem; }
  nav.site-nav .nav-links { display: none; }
  nav.site-nav .nav-cta  { display: none; }
  nav.site-nav .nav-lang { border-left: none; padding-left: 0; margin-left: auto; }

  .hero, .about, .home-work, .contact-s { padding-left: 1.5rem; padding-right: 1.5rem; }
  .hero { padding-top: 8rem; }
  .hero-h1 { font-size: clamp(3rem, 10vw, 5rem); }
  .hero-scroll { right: 1.5rem; }

  /* Fix: about and contact vertical padding too large on mobile */
  .about   { padding-top: 4rem; padding-bottom: 4rem; }
  .contact-s { padding-top: 4rem; padding-bottom: 4rem; }

  .about { grid-template-columns: 1fr; gap: 3rem; }
  .about-h2 { position: static; }
  .divider { padding: 0 1.5rem; }

  .svcs { grid-template-columns: 1fr; }
  .services { padding: 4rem 1.5rem; }

  .work-hero, .filter-bar, .nda-access { padding-left: 1.5rem; padding-right: 1.5rem; }
  .work-item { grid-template-columns: 1fr auto; gap: 1rem; padding-left: 1.5rem; padding-right: 1.5rem; }
  .work-item .wi-badge { display: none; }

  .blog-hero { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem; }
  .blog-featured { padding: 2rem 1.5rem 0; }
  .featured-card { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; padding: 0 1.5rem 4rem; }
  .blog-grid-header { padding: 2rem 1.5rem 1rem; }
  .newsletter { grid-template-columns: 1fr; padding: 3rem 1.5rem; }

  .proj { grid-template-columns: 50px 1fr auto; gap: 1rem; }
  .home-work { padding-left: 1.5rem; padding-right: 1.5rem; }

  footer.site-footer {
    padding: 1.5rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  footer.site-footer .footer-r { text-align: center; }

  .detail-breadcrumb, .detail-body, .detail-tags { padding-left: 1.5rem; padding-right: 1.5rem; }
  .detail-hero { padding: 3rem 1.5rem 2.5rem; }
  .detail-body { padding-top: 2rem; padding-bottom: 2rem; }
  .detail-hero.has-cover { grid-template-columns: 1fr; }
  .detail-hero-l { padding: 2.5rem 1.5rem 2rem; }
  .detail-hero-l .detail-body { padding: 2rem 0 0; }
  .detail-hero-r { position: static; height: 56vw; min-height: 220px; }
  .detail-hero-r .detail-cover-img { height: 100%; }

  .private-header { padding: 2rem 1.5rem; }
  .private-list { padding-left: 1.5rem; padding-right: 1.5rem; }

  .project-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-overlay-head { padding: 0.75rem 1rem; }
  .gallery-overlay-body { padding: 1rem; }
}

/* Small phones */
@media (max-width: 600px) {
  /* Hero scroll indicator and deco hidden on small screens */
  .hero-scroll { display: none; }
  .hero-deco { display: none; }

  /* Hero CTA buttons — stack vertically */
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Newsletter form — stack input + button */
  .nl-form { flex-direction: column; }
  .nl-input { border-right: 1px solid var(--line); border-bottom: none; }
  .nl-btn { width: 100%; text-align: center; justify-content: center; }

  /* Work item — small screens */
  .work-item { grid-template-columns: 1fr auto; gap: 0.75rem; padding-left: 1rem; padding-right: 1rem; }
  .proj { grid-template-columns: 1fr auto; gap: 0.75rem; }
  .proj-num { display: none; }

  /* Skill chips — slightly smaller */
  .skill-chip { font-size: 0.6rem; padding: 0.25rem 0.5rem; }
}

@media (max-width: 768px) {
  .hero-memoji { display: none; }
  .container { padding: 1.5rem; }

  .table-responsive-cards thead { display: none; }
  .table-responsive-cards tr { display: block; border: 1px solid var(--line); margin-bottom: 0.75rem; }
  .table-responsive-cards td { display: flex; gap: 1rem; align-items: center; padding: 0.5rem 0.75rem; border-bottom: none; }
  .table-responsive-cards td::before { content: attr(data-label); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); min-width: 70px; flex-shrink: 0; }

  .media-item { width: 130px; }
  form { max-width: 100%; }
}

@media print {
  nav.site-nav { display: none; }
  .hero { min-height: auto; padding-top: 2rem; }
}
