/* ==========================================================================
   LINGUOLAB - CURATED ELEGANCE THEME (2025)
   Aesthetic: Artistic, Sophisticated, Modern, Gallery-like
   ========================================================================== */

:root {
  /* --- PALETTE: WARM GALLERY --- */
  --color-canvas: #FAFAF8;
  /* Warm White */
  --color-white: #FFFFFF;
  /* Pure White */
  --color-ink: #1A1A1A;
  /* Soft Black */
  --color-charcoal: #333333;
  /* Dark Grey */
  --color-stone: #666666;
  /* Medium Grey */
  --color-silver: #999999;
  /* Light Grey */
  --color-gold: #B8965A;
  /* Aged Gold (Sophisticated) */
  --color-gold-light: #E6D5B8;
  /* Gold Tint */

  --color-border: rgba(0, 0, 0, 0.06);
  --shadow-ambient: 0 40px 80px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.08);

  /* --- TYPOGRAPHY --- */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Noto Sans SC', sans-serif;

  /* Fluid Typography - Golden Ratio Scales */
  --text-display: clamp(3.5rem, 6vw, 7rem);
  --text-h1: clamp(2.5rem, 4vw, 4.5rem);
  --text-h2: clamp(2rem, 3vw, 3.5rem);
  --text-h3: clamp(1.25rem, 1.5vw, 1.75rem);
  --text-body: clamp(1rem, 1.1vw, 1.125rem);
  --text-small: 0.875rem;
  --text-overline: 0.75rem;

  /* --- SPACING: GALLERY RHYTHM --- */
  --spacing-xs: 1rem;
  --spacing-sm: 2.5rem;
  --spacing-md: 5rem;
  --spacing-lg: 10rem;
  --spacing-xl: 15rem;

  --container-width: 1440px;
  --grid-gap: 2.5rem;

  /* --- ANIMATION --- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-slow: 1.2s var(--ease-out-expo);
  --transition-fast: 0.6s var(--ease-out-expo);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-canvas);
  color: var(--color-charcoal);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.8;
  /* Relaxed reading */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.1;
  font-weight: 300;
  /* Light weight for elegance */
  letter-spacing: -0.03em;
}

.overline {
  font-family: var(--font-display);
  font-size: var(--text-overline);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-gold);
  margin-bottom: 1.5rem;
  display: block;
  font-weight: 500;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.container {
  width: 88%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}

/* Column Spans */
.col-3 {
  grid-column: span 3;
}

.col-4 {
  grid-column: span 4;
}

.col-5 {
  grid-column: span 5;
}

.col-6 {
  grid-column: span 6;
}

.col-7 {
  grid-column: span 7;
}

.col-8 {
  grid-column: span 8;
}

.col-12 {
  grid-column: span 12;
}

@media (max-width: 1024px) {

  .col-3,
  .col-4,
  .col-5,
  .col-7,
  .col-8 {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .grid {
    display: flex;
    flex-direction: column;
  }

  .col-3,
  .col-4,
  .col-5,
  .col-6,
  .col-7,
  .col-8 {
    width: 100%;
  }
}

.section {
  padding: var(--spacing-lg) 0;
  position: relative;
}

.section-dark {
  background-color: var(--color-ink);
  color: var(--color-white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: var(--color-white);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* --- BUTTONS: MAGNETIC & MINIMAL --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 3rem;
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  border-radius: 0;
  /* Sharp edges for modern art feel */
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-ink);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-gold);
  color: var(--color-white);
  padding-left: 3.5rem;
  /* Subtle movement */
}

.btn-outline {
  background-color: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-ink);
  background: var(--color-white);
}

/* --- CARDS: FLOATING & CLEAN --- */
.card {
  background: var(--color-white);
  padding: var(--spacing-sm);
  transition: all var(--transition-slow);
  position: relative;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
  z-index: 10;
}

/* --- ART FRAME: THE GALLERY LOOK --- */
.art-frame {
  position: relative;
  overflow: hidden;
  background: var(--color-white);
  /* No shadow by default, clean look */
}

.art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s var(--ease-out-expo);
}

.art-frame:hover img {
  transform: scale(1.03);
}

/* ==========================================================================
   HEADER & NAV
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 2rem 0;
  transition: all var(--transition-fast);
  background: rgba(250, 250, 248, 0.9);
  /* Warm Frosted */
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--color-ink);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 4rem;
  align-items: center;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-charcoal);
  position: relative;
  letter-spacing: 0.05em;
}

.nav-link .lang-en {
  font-size: 0.65rem;
  color: var(--color-silver);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-ink);
}

.nav-link:hover .lang-en {
  color: var(--color-gold);
}

.lang-btn {
  border: 1px solid var(--color-border);
  background: transparent;
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-display);
  letter-spacing: 0.1em;
}

.lang-btn:hover {
  border-color: var(--color-ink);
}

/* --- MOBILE MENU --- */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-ink);
  transition: all 0.3s ease;
}

.mobile-menu-btn span:first-child {
  margin-bottom: 6px;
}

.mobile-menu-btn.active span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.mobile-menu-btn.active span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-canvas);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-out-expo);
    z-index: 1000;
  }

  .nav-links.mobile-active {
    transform: translateX(0);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  }

  .nav-link {
    font-size: 1.25rem;
  }
}

/* --- LANGUAGE TOGGLE --- */
/* Default: Show CN, Hide EN */
.lang-en {
  display: none !important;
}

/* EN Mode: Hide CN, Show EN */
body.en-mode .lang-cn {
  display: none !important;
}

body.en-mode .lang-en {
  display: inline-block !important;
}

/* Block level overrides */
body.en-mode p.lang-en,
body.en-mode div.lang-en,
body.en-mode h2 .lang-en,
body.en-mode h3 .lang-en {
  display: block !important;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  height: 100vh;
  min-height: 800px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Sophisticated Gradient Overlay */
  background: linear-gradient(to right, rgba(250, 250, 248, 0.95) 0%, rgba(250, 250, 248, 0.8) 40%, rgba(250, 250, 248, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-title {
  font-size: var(--text-display);
  line-height: 0.95;
  margin-bottom: 3rem;
  font-weight: 200;
  /* Ultra light */
}

.hero-title span {
  display: block;
}

/* ==========================================================================
   ANIMATIONS (SCROLL REVEAL)
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s var(--ease-out-expo);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

/* ==========================================================================
   SPECIFIC PAGE STYLES
   ========================================================================== */

/* Accordion (Academics) */
.accordion-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.5rem 0;
  cursor: pointer;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-content {
  height: 0;
  overflow: hidden;
  transition: height 0.6s var(--ease-out-expo);
  opacity: 0.7;
}

.accordion-item.active .accordion-content {
  height: auto;
  padding-top: 1.5rem;
}

/* Forms */
input,
textarea,
select {
  width: 100%;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  font-family: var(--font-body);
  margin-bottom: 1.5rem;
  transition: border-color var(--transition-fast);
  border-radius: 0;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-gold);
}

/* Horizontal Scroll (Mobile Qualities) */
.horizontal-scroll {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding-bottom: 2rem;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

/* --- UTILITIES: MASKS & EFFECTS --- */
.mask-fade {
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.mask-fade-radial {
  -webkit-mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
  mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

/* Feature image override - allow large images */
.feature-image {
  max-width: none !important;
  width: 100% !important;
  height: 850px !important;
  object-fit: contain !important;
  display: block !important;
}

/* --- SVG ANIMATIONS --- */
@keyframes float-gentle {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-soft {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.svg-anim-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-path 3s ease-out forwards;
}

@keyframes draw-path {
  to {
    stroke-dashoffset: 0;
  }
}

/* --- MODAL --- */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: block;
  opacity: 1;
}

.modal-content {
  background-color: var(--color-white);
  margin: 10% auto;
  padding: 3rem;
  border: 1px solid var(--color-border);
  width: 90%;
  max-width: 600px;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-ambient);
}

.modal.show .modal-content {
  transform: translateY(0);
}

.close {
  color: var(--color-stone);
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
  line-height: 0.5;
}

.close:hover,
.close:focus {
  color: var(--color-ink);
  text-decoration: none;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  color: var(--color-charcoal);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}