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

:root {
  --bg: hsl(220, 20%, 7%);
  --fg: hsl(40, 20%, 92%);
  --card: hsl(220, 18%, 10%);
  --surface: hsl(220, 18%, 12%);
  --border: hsl(220, 15%, 18%);
  --muted: hsl(220, 10%, 55%);
  --primary: hsl(40, 60%, 55%);
  --primary-dim: hsla(40, 60%, 55%, 0.2);
  --primary-glow: hsla(40, 60%, 55%, 0.15);
  --gold-light: hsl(40, 50%, 70%);
  --secondary-bg: hsl(220, 15%, 15%);
  --secondary-fg: hsl(40, 20%, 85%);
  --font-display: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; line-height: 1.6; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 800px; }
.narrow-md { max-width: 900px; }
.narrow-lg { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6rem 1.5rem; }
.bg-surface { background: var(--surface); }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-label { color: var(--primary); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 1rem; font-family: var(--font-sans); }
.section-title { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 600; margin-bottom: 1rem; }
.section-divider { width: 60px; height: 2px; margin: 0 auto; background: linear-gradient(90deg, transparent, var(--primary), transparent); }

/* ===== NAVBAR ===== */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: all 0.5s; }
.navbar.scrolled { background: hsla(220, 20%, 7%, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-display); font-size: 1.2rem; color: var(--primary); letter-spacing: 0.15em; }
.nav-links { display: flex; gap: 2rem; }
.nav-links button { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; transition: color 0.3s; }
.nav-links button:hover { color: var(--primary); }
.nav-toggle { display: none; font-size: 1.5rem; }
.mobile-menu { display: none; background: hsla(220, 20%, 7%, 0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 0 1.5rem 1.5rem; }
.mobile-menu button { display: block; width: 100%; text-align: left; padding: 0.75rem 0; color: var(--muted); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.08em; transition: color 0.3s; }
.mobile-menu button:hover { color: var(--primary); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu.open { display: block; }
}

/* ===== GALLERY CAROUSEL ===== */
.gallery-carousel { position: relative; width: 100%; height: 100vh; overflow: hidden; }
.carousel-images { position: relative; width: 100%; height: 100%; }
.carousel-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s, transform 1.2s; transform: scale(1.05); }
.carousel-img.active { opacity: 1; transform: scale(1); }
.carousel-overlay { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg), hsla(220,20%,7%,0.4) 50%, hsla(220,20%,7%,0.2)); }
.carousel-dots { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.75rem; z-index: 10; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: hsla(40,20%,92%,0.3); transition: all 0.3s; border: none; }
.dot.active { background: var(--primary); transform: scale(1.25); }
.dot:hover { background: hsla(40,20%,92%,0.5); }

/* ===== ABOUT ===== */
.about-text { display: flex; flex-direction: column; gap: 1.5rem; }
.about-text p { color: var(--muted); font-size: clamp(0.95rem, 2vw, 1.1rem); line-height: 1.8; }

/* ===== PROJECTS GRID ===== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.project-card { background: var(--card); border: 1px solid var(--border); border-radius: 2px; overflow: hidden; cursor: pointer; transition: all 0.5s; }
.project-card:hover { border-color: hsla(40,60%,55%,0.3); box-shadow: 0 0 40px var(--primary-glow); }
.project-card .card-img { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.project-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s; }
.project-card:hover .card-img img { transform: scale(1.05); }
.play-overlay { position: absolute; inset: 0; background: hsla(220,20%,7%,0.4); opacity: 0; transition: opacity 0.5s; display: flex; align-items: center; justify-content: center; }
.project-card:hover .play-overlay { opacity: 1; }
.play-btn { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--primary); display: flex; align-items: center; justify-content: center; }
.play-btn svg { color: var(--primary); margin-left: 2px; }
.card-info { padding: 1.25rem; }
.card-badge { display: inline-block; padding: 0.25rem 0.75rem; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; border-radius: 2px; margin-bottom: 0.75rem; }
.badge-doc { background: var(--primary-dim); color: var(--primary); }
.badge-inst { background: hsla(40,45%,45%,0.2); color: hsl(40,45%,45%); }
.badge-fiction { background: var(--secondary-bg); color: var(--secondary-fg); }
.badge-edu { background: hsla(40,60%,55%,0.15); color: var(--gold-light); }
.card-info h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.card-info p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ===== EXPERTISE GRID ===== */
.expertise-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.expertise-card { padding: 2rem; border: 1px solid var(--border); border-radius: 2px; background: var(--card); transition: all 0.5s; cursor: pointer; display: block; text-decoration: none; color: inherit; }
.expertise-card:hover { border-color: hsla(40,60%,55%,0.3); box-shadow: 0 0 40px var(--primary-glow); }
.expertise-card svg { color: var(--primary); margin-bottom: 1.5rem; transition: transform 0.3s; }
.expertise-card:hover svg { transform: scale(1.1); }
.expertise-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; }
.expertise-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ===== TEAM GRID ===== */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; max-width: 700px; margin: 0 auto; }
.team-card { background: var(--card); border: 1px solid var(--border); border-radius: 2px; overflow: hidden; cursor: pointer; transition: all 0.5s; }
.team-card:hover { border-color: hsla(40,60%,55%,0.3); }
.team-card .team-img { aspect-ratio: 1; overflow: hidden; }
.team-card .team-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s; }
.team-card:hover .team-img img { transform: scale(1.05); }
.team-card .team-info { padding: 1.5rem; }
.team-card .team-info .card-badge { background: var(--primary-dim); color: var(--primary); }
.team-card .team-info h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.team-card .team-info p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ===== CONTACT ===== */
.contact-content { text-align: center; }
.contact-text { color: var(--muted); max-width: 500px; margin: 0 auto 2rem; line-height: 1.7; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.contact-link { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); transition: color 0.3s; font-size: 0.85rem; }
.contact-link svg { color: var(--primary); flex-shrink: 0; }
.contact-link:hover { color: var(--primary); }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border); padding: 2rem 1.5rem; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: var(--font-display); color: var(--primary); font-size: 0.85rem; letter-spacing: 0.15em; }
.footer-copy { font-size: 0.7rem; color: var(--muted); }

/* ===== INNER PAGES ===== */
.inner-page { min-height: 100vh; }
.inner-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.85rem; transition: color 0.3s; margin-bottom: 2rem; }
.back-link:hover { color: var(--primary); }
.back-link svg { flex-shrink: 0; }

/* Member header */
.member-header { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.member-header img { width: 140px; height: 140px; object-fit: cover; border: 1px solid var(--border); border-radius: 2px; flex-shrink: 0; }
.member-header .member-info .card-badge { background: var(--primary-dim); color: var(--primary); }
.member-header .member-info h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 600; margin-bottom: 0.75rem; }
.member-header .member-info p { color: var(--muted); line-height: 1.7; max-width: 600px; }

/* ===== EXPERTISE DETAIL ===== */
.expertise-detail-header { display: flex; align-items: center; gap: 1rem; }
.expertise-detail-header svg { color: var(--primary); flex-shrink: 0; }
.expertise-detail-header h1 { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 600; }

.expertise-carousel { position: relative; aspect-ratio: 16/9; border-radius: 2px; overflow: hidden; margin-bottom: 3rem; }
.expertise-carousel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s; }
.expertise-carousel img.active { opacity: 1; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: hsla(220,20%,7%,0.7); color: var(--fg); border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.3s; z-index: 5; }
.carousel-arrow:hover { background: hsla(220,20%,7%,0.9); }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.expertise-carousel .carousel-dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; z-index: 5; }

.expertise-full-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1.5rem; font-size: 0.95rem; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: hsla(0,0%,0%,0.8); display: none; align-items: center; justify-content: center; z-index: 200; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal-content { position: relative; width: 100%; max-width: 900px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.modal-close { position: absolute; top: 0.5rem; right: 0.75rem; color: var(--fg); font-size: 1.2rem; z-index: 10; background: hsla(220,20%,7%,0.6); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.modal-video { aspect-ratio: 16/9; }
.modal-video iframe,
.modal-video video { width: 100%; height: 100%; border: none; object-fit: cover; }

/* ===== ANIMATIONS ===== */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s, transform 0.6s; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 640px) {
  .section { padding: 4rem 1rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .contact-links { flex-direction: column; align-items: center; }
  .member-header { flex-direction: column; align-items: center; text-align: center; }
  .member-header .member-info p { text-align: left; }
}
