/* ============================================================
   SEI STUDIO — Stylesheet
   ============================================================ */

:root {
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Lato', sans-serif;
  --bg: #ffffff;
  --bg-warm: #f9f7f4;
  --bg-surface: #f0edea;
  --text-primary: #1a1714;
  --text-secondary: #6b6560;
  --text-muted: #a09890;
  --accent: #b8845c;
  --border: #e5e1dc;
  --border-light: #efecea;
  --shadow-soft: 0 2px 20px rgba(0,0,0,0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--border) var(--bg); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.4rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav.nav-scrolled {
  padding: 0.9rem 3rem;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
}
.nav-logo {
  cursor: pointer; display: flex; align-items: center;
}
.nav-logo img {
  height: 28px; width: auto; object-fit: contain;
  transition: opacity 0.3s;
}
.nav-logo img:hover { opacity: 0.7; }
.nav-center {
  display: flex; gap: 2.5rem; list-style: none;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-center a {
  font-size: 0.72rem; font-weight: 400; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-secondary);
  text-decoration: none; cursor: pointer; transition: color 0.3s;
  position: relative;
}
.nav-center a:hover { color: var(--text-primary); }
.nav-center a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--accent); transition: width 0.3s;
}
.nav-center a:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 0.2rem; }
.lang-btn {
  font-family: var(--font-body); font-size: 0.68rem; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.6rem; border: none; background: none;
  color: var(--text-muted); cursor: pointer; border-radius: 3px; transition: all 0.25s;
}
.lang-btn:hover { color: var(--text-primary); }
.lang-btn.active { color: var(--text-primary); background: var(--bg-surface); font-weight: 700; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text-primary); }

/* ---- MOBILE MENU ---- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 150; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2rem; animation: fadeIn 0.25s;
}
.mobile-menu a { font-family: var(--font-display); font-size: 2rem; color: var(--text-primary); text-decoration: none; cursor: pointer; }
.mobile-menu-close { position: absolute; top: 1.4rem; right: 1.5rem; font-size: 1.5rem; background: none; border: none; color: var(--text-primary); cursor: pointer; }
.mobile-lang-row { display: flex; gap: 0.5rem; margin-top: 1rem; }

/* ---- HERO ---- */
.hero {
  height: 100vh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 3rem 4.5rem; position: relative; background: var(--bg); overflow: hidden;
}
.hero-bg-text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -55%);
  font-family: var(--font-display); font-weight: 700; font-style: italic; font-variant: small-caps;
  font-size: clamp(10rem, 22vw, 20rem); color: var(--border-light);
  user-select: none; pointer-events: none; white-space: nowrap;
}
.hero-logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -55%);
  z-index: 1;
}
.hero-logo img {
  max-height: 30vh; max-width: 60vw; object-fit: contain;
  opacity: 0.12;
}
.hero-content { position: relative; z-index: 2; }
.hero-tagline {
  font-size: 0.72rem; font-weight: 400; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 400; line-height: 1.15; color: var(--text-primary); max-width: 680px;
}
.hero-subtitle {
  font-size: 0.8rem; font-weight: 300; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-secondary);
  margin-top: 1.6rem; display: flex; align-items: center; gap: 1rem;
}
.hero-subtitle::before { content: ''; width: 36px; height: 1px; background: var(--accent); }
.hero-scroll-hint {
  position: absolute; bottom: 2rem; right: 3rem;
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-muted); writing-mode: vertical-rl; animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- SECTIONS ---- */
.section { padding: 6rem 3rem; max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 2.5rem;
  display: flex; align-items: center; gap: 1.2rem;
}
.section-label::after { content: ''; flex: 1; max-width: 80px; height: 1px; background: var(--border); }
.section-title {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400; line-height: 1.28; color: var(--text-primary);
  max-width: 600px; margin-bottom: 1.6rem;
}
.section-text { font-size: 0.92rem; font-weight: 300; line-height: 1.85; color: var(--text-secondary); max-width: 560px; }

/* ---- PROJECTS SECTION ---- */
.projects-section { padding-top: 5rem; padding-bottom: 5rem; }
.projects-header { max-width: 1800px; margin: 0 auto; padding: 0 3rem 1.8rem; }

/* ---- FILTER TABS ---- */
.filter-tabs {
  display: flex; gap: 6px; margin-bottom: 2rem; padding: 0 3rem;
  max-width: 1800px; margin-left: auto; margin-right: auto; flex-wrap: wrap;
}
.filter-tab {
  font-family: var(--font-body); font-size: 0.7rem; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.45rem 1.1rem; border: 1px solid var(--border); background: var(--bg);
  color: var(--text-muted); cursor: pointer; border-radius: 100px; transition: all 0.25s;
}
.filter-tab:hover { color: var(--text-primary); border-color: var(--text-muted); }
.filter-tab.active { background: var(--text-primary); color: var(--bg); border-color: var(--text-primary); }

/* ---- GIF WALL ---- */
.gif-wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; max-width: 1800px; margin: 0 auto; padding: 0 3rem;
}
.gif-tile {
  position: relative; aspect-ratio: 1; overflow: hidden;
  cursor: pointer; background: var(--bg-surface); border-radius: 3px;
}
.gif-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.4,0,0.2,1); }
.gif-tile:hover img { transform: scale(1.04); }
.gif-tile-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,23,20,0.88) 0%, rgba(26,23,20,0.12) 50%, transparent 100%);
  opacity: 0; transition: opacity 0.35s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 1.4rem;
}
.gif-tile:hover .gif-tile-overlay { opacity: 1; }
.gif-tile-title { font-family: var(--font-display); font-size: 1.2rem; color: #fff; margin-bottom: 0.25rem; }
.gif-tile-meta { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.6); font-weight: 300; }

.gif-tile-badge {
  position: absolute; top: 0.8rem; left: 0.8rem;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.25rem 0.6rem; border-radius: 2px; z-index: 3; color: #fff;
  opacity: 0; transition: opacity 0.35s;
}
.gif-tile:hover .gif-tile-badge { opacity: 1; }
.badge-research { background: #5a8a7a; }
.badge-1st { background: #c9a84c; }
.badge-2nd { background: #a0a0a0; }
.badge-3rd { background: #8b7355; }
.badge-mention { background: #7a8a8a; }

/* ---- TEAM ---- */
.team-list { display: flex; flex-direction: column; margin-top: 2.5rem; border-top: 1px solid var(--border); }
.team-row {
  display: flex; align-items: baseline; gap: 2rem; padding: 1.3rem 0;
  border-bottom: 1px solid var(--border); transition: background 0.2s;
}
.team-row:hover { background: var(--bg-warm); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }
.team-name { font-family: var(--font-display); font-size: 1.25rem; color: var(--text-primary); min-width: 240px; }
.team-role { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); min-width: 120px; }
.team-email {
  font-size: 0.82rem; font-weight: 300; color: var(--text-secondary); text-decoration: none;
  border-bottom: 1px solid var(--border); padding-bottom: 1px; transition: all 0.3s; margin-left: auto;
}
.team-email:hover { color: var(--text-primary); border-color: var(--accent); }

/* ---- CONTACT ---- */
.contact-section { background: var(--bg-warm); border-top: 1px solid var(--border-light); }
.contact-section .section { padding-top: 5rem; padding-bottom: 5rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; margin-top: 2rem; }
.contact-detail { margin-bottom: 1.3rem; }
.contact-detail label {
  display: block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.35rem;
}
.contact-detail a, .contact-detail span {
  font-family: var(--font-display); font-size: 1.15rem; color: var(--text-primary);
  text-decoration: none; transition: color 0.3s; display: block;
}
.contact-detail a:hover { color: var(--accent); }
.address-secondary {
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 300;
  color: var(--text-secondary);
}

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border); padding: 2.2rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.7rem; color: var(--text-muted); font-weight: 300;
  position: relative;
}
.footer-center { position: absolute; left: 50%; transform: translateX(-50%); }
.footer-socials { display: flex; gap: 1.2rem; align-items: center; }
.footer-social {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--text-muted); text-decoration: none; transition: color 0.3s; text-transform: uppercase;
}
.footer-social:hover { color: var(--text-primary); }

/* ---- PROJECT VIEWER ---- */
.project-viewer {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  overflow-y: auto; overflow-x: hidden;
}
.project-viewer.viewer-enter { animation: viewerIn 0.5s cubic-bezier(0.22,1,0.36,1) forwards; }
.project-viewer.viewer-exit { animation: viewerOut 0.3s ease forwards; }
@keyframes viewerIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes viewerOut { from { opacity: 1; } to { opacity: 0; } }

.viewer-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 210;
  padding: 0.8rem 2rem; display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}
.viewer-topbar-title { font-size: 0.72rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.viewer-topbar-actions { display: flex; gap: 0.4rem; align-items: center; }
.viewer-btn {
  width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%;
  background: var(--bg); color: var(--text-secondary); font-size: 0.9rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.25s;
}
.viewer-btn:hover { border-color: var(--text-primary); color: var(--text-primary); }
.viewer-close-btn {
  font-family: var(--font-body); font-size: 0.68rem; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.5rem 1.2rem; border: 1px solid var(--border); border-radius: 100px;
  background: var(--bg); color: var(--text-secondary); cursor: pointer; transition: all 0.25s; margin-left: 0.4rem;
}
.viewer-close-btn:hover { background: var(--text-primary); color: var(--bg); border-color: var(--text-primary); }

.viewer-hero { width: 100%; height: 60vh; margin-top: 54px; overflow: hidden; background: var(--bg-surface); }
.viewer-hero img { width: 100%; height: 100%; object-fit: cover; animation: heroReveal 0.8s cubic-bezier(0.22,1,0.36,1) forwards; }
@keyframes heroReveal { from { transform: scale(1.05); opacity: 0.5; } to { transform: scale(1); opacity: 1; } }

.viewer-content { max-width: 1050px; margin: 0 auto; padding: 3.5rem 3rem 1.5rem; }
.viewer-project-title {
  font-family: var(--font-display); font-size: clamp(2rem,4vw,3.2rem);
  font-weight: 400; line-height: 1.18; color: var(--text-primary); margin-bottom: 2.2rem;
}
.viewer-meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.3rem 2.2rem; padding: 1.8rem 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.viewer-meta-item label {
  display: block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.35rem;
}
.viewer-meta-item span { font-size: 0.88rem; font-weight: 300; color: var(--text-primary); line-height: 1.45; }
.viewer-description { font-size: 0.95rem; font-weight: 300; line-height: 1.85; color: var(--text-secondary); max-width: 600px; padding: 1.8rem 0 0; }

/* Gallery */
.viewer-gallery { max-width: 1050px; margin: 0 auto; padding: 2.5rem 3rem 5rem; }
.gallery-main {
  width: 100%; aspect-ratio: 16/10; overflow: hidden; border-radius: 3px;
  margin-bottom: 8px; position: relative; background: var(--bg-surface); cursor: pointer;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: var(--bg-warm); transition: opacity 0.3s; }
.gallery-counter {
  position: absolute; bottom: 0.8rem; right: 0.8rem;
  font-size: 0.65rem; letter-spacing: 0.08em; color: var(--text-muted);
  background: rgba(255,255,255,0.88); padding: 0.3rem 0.65rem; border-radius: 100px; backdrop-filter: blur(8px);
}
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(8px);
  color: var(--text-primary); font-size: 0.95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.25s; z-index: 5;
}
.gallery-arrow:hover { background: var(--text-primary); color: var(--bg); border-color: var(--text-primary); }
.gallery-arrow-left { left: 0.8rem; }
.gallery-arrow-right { right: 0.8rem; }
.gallery-thumbs { display: flex; gap: 5px; overflow-x: auto; padding: 3px 0; scrollbar-width: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex-shrink: 0; width: 68px; height: 47px; overflow: hidden; border-radius: 2px;
  cursor: pointer; opacity: 0.3; transition: all 0.25s; border: 2px solid transparent;
}
.gallery-thumb.active { opacity: 1; border-color: var(--accent); }
.gallery-thumb:hover { opacity: 0.65; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(255,255,255,0.97);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
  animation: fadeIn 0.2s;
}
.lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; box-shadow: 0 16px 60px rgba(0,0,0,0.1); cursor: default; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .gif-wall { grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 10px; }
}
@media (max-width: 768px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-center { display: none; }
  .nav-right .lang-btn { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 0 1.5rem 3rem; }
  .hero-scroll-hint { display: none; }
  .hero-bg-text { font-size: 7rem; }
  .section { padding: 4rem 1.5rem; }
  .gif-wall { grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 1.5rem; }
  .filter-tabs { padding: 0 1.5rem; }
  .projects-header { padding: 0 1.5rem 1.8rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .viewer-content { padding: 2.5rem 1.5rem 1rem; }
  .viewer-gallery { padding: 1.5rem 1.5rem 3rem; }
  .viewer-meta-grid { grid-template-columns: 1fr 1fr; }
  .viewer-topbar { padding: 0.7rem 1rem; }
  .viewer-topbar-title { display: none; }
  .footer { flex-direction: column; gap: 0.8rem; text-align: center; padding: 2rem 1.5rem; }
  .footer-center { position: static; transform: none; }
  .team-row { flex-direction: column; gap: 0.3rem; }
  .team-name { min-width: 0; }
  .team-email { margin-left: 0; }
}
@media (max-width: 480px) {
  .gif-wall { grid-template-columns: 1fr; gap: 10px; }
  .gif-tile { aspect-ratio: 4/3; }
}
