
@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Mono:wght@300;400&display=swap');

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

:root {
  --paper:      #f4f0e4;
  --paper-dark: #ebe6d6;
  --paper-blue: #e8eef7;
  --ink:        #1a1a1a;
  --ink-mid:    #4a4a4a;
  --ink-dim:    #888880;
  --blue:       #1a3a6b;
  --blue-lt:    #2d5fa8;
  --blue-dim:   rgba(26,58,107,0.12);
  --rule:       rgba(26,26,26,0.15);
  --rule-blue:  rgba(26,58,107,0.2);

  --font-display: 'Special Elite', 'Courier New', monospace;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'DM Mono', monospace;
  --nav-h: 68px;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
}

/* ── Registration mark corners (decorative) ── */
body::before, body::after {
  content: '';
  position: fixed;
  width: 20px; height: 20px;
  border-color: var(--rule-blue);
  border-style: solid;
  pointer-events: none;
  z-index: 0;
}
body::before {
  top: 12px; left: 12px;
  border-width: 1px 0 0 1px;
}
body::after {
  top: 12px; right: 12px;
  border-width: 1px 1px 0 0;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(244,240,228,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  z-index: 100;
}
nav::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 3rem; right: 3rem;
  height: 1px;
  background: var(--rule-blue);
  opacity: 0.5;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
}
.nav-logo span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 2px;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::before {
  content: '—';
  position: absolute;
  left: -14px;
  color: var(--blue);
  opacity: 0;
  transition: opacity 0.2s;
  font-family: var(--font-mono);
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-links a:hover::before, .nav-links a.active::before { opacity: 1; }

/* Hamburger */
.nav-toggle {
  display: none; flex-direction: column;
  justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 1px; background: var(--ink); transition: all 0.25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── PAGE ── */
.page { padding-top: var(--nav-h); position: relative; z-index: 1; }

/* ── HERO ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-h));
  border-bottom: 1px solid var(--rule);
}
.hero-drawing {
  background: white;
  border-right: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-drawing img {
  max-width: 100%; max-height: 80vh;
  object-fit: contain;
  opacity: 1;
}
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 4rem 5rem 5rem;
  background: var(--paper);
  position: relative;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--blue-dim);
  display: inline-block;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1.75rem;
  position: relative;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 1.25rem;
  position: relative;
}
.hero-subtitle {
  font-size: 0.95rem;
  color: var(--ink-mid);
  max-width: 400px;
  line-height: 1.85;
  margin-bottom: 2.5rem;
  position: relative;
}
.hero-cta { display: flex; gap: 1.25rem; flex-wrap: wrap; position: relative; }
.btn-primary {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--blue);
  border: 1px solid var(--blue);
  padding: 0.7rem 1.75rem;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-ghost {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  padding: 0.7rem 1.75rem;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--ink); }

/* ── PAGE BAND ── */
.page-band {
  padding: 3.5rem 3rem 2.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
  position: relative;
}
.page-band::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 3rem; right: 3rem;
  height: 1px;
  background: var(--rule-blue);
  opacity: 0.4;
}
.page-band-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.75rem;
  display: block;
}
.page-band h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  color: var(--ink);
  line-height: 1.2;
}
.page-band p {
  font-size: 0.9rem;
  color: var(--ink-mid);
  margin-top: 0.75rem;
  max-width: 600px;
  font-style: italic;
}

/* ── SECTION ── */
.section {
  padding: 0 3rem 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ── GALLERY ── */
.gallery {
  columns: 3;
  column-gap: 16px;
}
@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 500px) { .gallery { columns: 1; } }
.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
}
.gallery-frame {
  position: relative;
  background: white;
  border: 1px solid var(--rule);
  overflow: hidden;
  cursor: pointer;
}
/* Corner ticks on gallery frames */
.gallery-frame::before, .gallery-frame::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-color: var(--rule-blue);
  border-style: solid;
  z-index: 2;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.gallery-frame::before { top: 4px; left: 4px; border-width: 1px 0 0 1px; }
.gallery-frame::after  { top: 4px; right: 4px; border-width: 1px 1px 0 0; }
.gallery-item:hover .gallery-frame::before,
.gallery-item:hover .gallery-frame::after { opacity: 1; }
.gallery-frame img {
  width: 100%;
  height: auto !important;
  max-height: none !important;
  object-fit: unset !important;
  aspect-ratio: unset !important;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.gallery-item:hover .gallery-frame img { transform: scale(1.03); }
.gallery-overlay { display: none; }
.gallery-fig { display: none; }

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}
.about-sidebar { position: sticky; top: calc(var(--nav-h) + 2rem); }
.about-photo {
  background: white;
  border: 1px solid var(--rule);
  padding: 1rem;
  position: relative;
  margin-bottom: 1.5rem;
}

.about-photo img { width: 100%; display: block; }
.services-box {
  border: 1px solid var(--rule-blue);
  background: var(--paper-blue);
  padding: 1.5rem;
}
.services-box h3 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule-blue);
}
.services-list { list-style: none; }
.services-list li {
  font-size: 0.85rem;
  color: var(--ink-mid);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(26,58,107,0.08);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.services-list li:last-child { border-bottom: none; }
.services-list li::before {
  content: '—';
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  flex-shrink: 0;
}
.about-content h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}
.about-content .about-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 2rem;
}
.about-content p {
  font-size: 0.95rem;
  color: var(--ink-mid);
  margin-bottom: 1.25rem;
  line-height: 1.85;
}
.about-content h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}
.contact-info h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.contact-info p {
  font-size: 0.92rem;
  color: var(--ink-mid);
  line-height: 1.85;
  margin-bottom: 2rem;
  max-width: 360px;
}
.contact-detail {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem;
}
.contact-detail:last-child { border-bottom: none; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  width: 70px;
  flex-shrink: 0;
  padding-top: 2px;
}
.contact-detail a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); transition: border-color 0.2s; }
.contact-detail a:hover { border-color: var(--blue); color: var(--blue); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
}
.form-input, .form-textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink);
  background: white;
  border: 1px solid var(--rule);
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-input:focus, .form-textarea:focus { border-color: var(--blue); }
.form-textarea { resize: vertical; min-height: 150px; }
.form-submit {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--blue);
  border: 1px solid var(--blue);
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: all 0.2s;
  align-self: flex-start;
}
.form-submit:hover { background: var(--ink); border-color: var(--ink); }
.form-note { font-size: 0.75rem; color: var(--ink-dim); line-height: 1.6; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative; z-index: 1;
  margin-top: 4rem;
}
footer::before {
  content: '';
  position: absolute;
  top: 4px; left: 3rem; right: 3rem;
  height: 1px;
  background: var(--rule-blue);
  opacity: 0.4;
}
.footer-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.footer-contact a {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-blue);
  transition: border-color 0.2s;
}
.footer-contact a:hover { border-color: var(--blue); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up   { animation: fadeUp 0.6s ease both; }
.fade-up-2 { animation: fadeUp 0.6s 0.12s ease both; }
.fade-up-3 { animation: fadeUp 0.6s 0.24s ease both; }
.fade-up-4 { animation: fadeUp 0.6s 0.36s ease both; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  nav { padding: 0 1.2rem; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(244,240,228,0.98);
    backdrop-filter: blur(8px);
    flex-direction: column; align-items: center;
    border-bottom: 1px solid var(--rule);
    padding: 1rem 0; z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 0.85rem 2rem; border-bottom: 1px solid var(--rule); }
  .nav-links a::before { display: none; }
  .nav-links li:last-child a { border-bottom: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-drawing { min-height: 40vw; padding: 2rem; }
  .hero-text { padding: 2.5rem 1.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-sidebar { position: static; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .section { padding: 0 1.5rem 3rem; }
  .page-band { padding: 2.5rem 1.5rem 2rem; }
  footer { flex-direction: column; gap: 0.75rem; text-align: center; padding: 1.5rem; }
  .gallery { columns: 2; }
}

/* ── PORTFOLIO TABS ── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}
.tab-btn {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.85rem 1.75rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── THUMBNAIL GRID ── */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.thumb-item {
  background: white;
  border: 1px solid var(--rule);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.thumb-item::before, .thumb-item::after {
  content: '';
  position: absolute;
  width: 7px; height: 7px;
  border-color: var(--rule-blue);
  border-style: solid;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s;
}
.thumb-item::before { top: 4px; left: 4px; border-width: 1px 0 0 1px; }
.thumb-item::after  { top: 4px; right: 4px; border-width: 1px 1px 0 0; }
.thumb-item:hover { border-color: var(--blue); box-shadow: 0 4px 16px rgba(26,58,107,0.12); }
.thumb-item:hover::before, .thumb-item:hover::after { opacity: 1; }
.thumb-item img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
.thumb-item:hover img { transform: scale(1.05); }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,10,8,0.94);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  background: white;
  padding: 1.5rem;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.lightbox-close {
  position: fixed;
  top: 1.5rem; right: 1.5rem;
  background: none; border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  font-family: var(--font-mono);
  z-index: 1001;
}
.lightbox-close:hover { color: white; }
.lightbox-prev, .lightbox-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: rgba(255,255,255,0.5);
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  transition: color 0.2s;
  font-family: var(--font-mono);
  z-index: 1001;
  line-height: 1;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover { color: white; }
.lightbox-counter {
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .lightbox-img { padding: 0.5rem; }
}
