/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500&display=swap');

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Light mode — teal */
  --teal-bg: #EAF5F1;
  --teal-accent: #0F6E56;
  --teal-title: #085041;
  --teal-body: #0F6E56;

  /* Light mode — warm */
  --warm-bg: #F7EDE4;
  --warm-accent: #B06A3A;
  --warm-title: #3D1C0E;
  --warm-body: #7A3D1A;

  /* Light mode — neutral */
  --neutral-bg: #ffffff;
  --neutral-text: #1a1a1a;
  --neutral-subtle: #6b7280;

  /* Nav */
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-border: rgba(0, 0, 0, 0.07);
  --nav-text: #2a2a2a;
  --nav-active: #0F6E56;

  /* Footer */
  --footer-bg: #f3f4f6;
  --footer-text: #6b7280;

  /* Global */
  --font: 'Outfit', sans-serif;
  --nav-height: 60px;
  --section-pad: 96px;
  --max-width: 960px;
  --transition: 0.25s ease;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --teal-bg: #0d2820;
  --teal-accent: #3ecfa0;
  --teal-title: #a8f0d8;
  --teal-body: #7dd8ba;

  --warm-bg: #241509;
  --warm-accent: #e0935a;
  --warm-title: #f5cba7;
  --warm-body: #c98a58;

  --neutral-bg: #111111;
  --neutral-text: #e8e8e8;
  --neutral-subtle: #9ca3af;

  --nav-bg: rgba(17, 17, 17, 0.92);
  --nav-border: rgba(255, 255, 255, 0.08);
  --nav-text: #d4d4d4;
  --nav-active: #3ecfa0;

  --footer-bg: #0d0d0d;
  --footer-text: #6b7280;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.7;
  background: var(--neutral-bg);
  color: var(--neutral-text);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== NAVIGATION ===== */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: calc(var(--max-width) + 80px);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-size: 15px;
  font-weight: 500;
  color: var(--nav-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-text);
  padding: 8px 14px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  transition: color var(--transition), background var(--transition);
  opacity: 0.65;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a.active {
  color: var(--nav-active);
  opacity: 1;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-btn {
  background: none;
  border: 1px solid var(--nav-border);
  border-radius: 6px;
  color: var(--nav-text);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 11px;
  letter-spacing: 0.04em;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.nav-btn:hover {
  background: var(--nav-active);
  color: #fff;
  border-color: var(--nav-active);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
  padding: 16px 24px 24px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-size: 15px;
  font-weight: 500;
  color: var(--nav-text);
  padding: 10px 12px;
  border-radius: 6px;
  opacity: 0.65;
  transition: opacity var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a.active { opacity: 1; color: var(--nav-active); }

.mobile-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--nav-border);
}

/* ===== SECTION ANATOMY ===== */
.section-teal {
  background: var(--teal-bg);
  color: var(--teal-body);
}

.section-warm {
  background: var(--warm-bg);
  color: var(--warm-body);
}

.section-neutral {
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-pad) 40px;
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.65;
}

.section-teal .section-label { color: var(--teal-accent); }
.section-warm .section-label { color: var(--warm-accent); }
.section-neutral .section-label { color: var(--neutral-subtle); }

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}

.section-title-bar {
  width: 28px;
  height: 2px;
  border-radius: 2px;
}

.section-teal .section-title-bar { background: var(--teal-accent); }
.section-warm .section-title-bar { background: var(--warm-accent); }
.section-neutral .section-title-bar { background: var(--neutral-text); }

.section-title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}

.section-teal .section-title { color: var(--teal-title); }
.section-warm .section-title { color: var(--warm-title); }
.section-neutral .section-title { color: var(--neutral-text); }

/* ===== HERO ===== */
#hero {
  background: var(--neutral-bg);
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
}

#hero .section-inner {
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neutral-subtle);
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--neutral-text);
  max-width: 700px;
  margin-bottom: 24px;
}

.hero-title em {
  font-style: normal;
  color: var(--teal-accent);
}

.hero-sub {
  font-size: 17px;
  color: var(--neutral-subtle);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--teal-accent);
  border: 1px solid var(--teal-accent);
  padding: 11px 22px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.02em;
}

.hero-cta:hover {
  background: var(--teal-accent);
  color: #fff;
}

.hero-cta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.hero-cta:hover svg { transform: translateY(3px); }

/* ===== ABOUT ===== */
.about-prose {
  max-width: 680px;
}

.about-prose p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.8;
}

.about-prose ul {
  margin: 8px 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-prose ul li {
  padding-left: 20px;
  position: relative;
  font-size: 16px;
}

.about-prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-accent);
}

.about-logos {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.about-logo-placeholder {
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--teal-accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--teal-accent);
  opacity: 0.6;
}

/* ===== TEAM ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 32px;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--warm-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 500;
  color: #fff;
  flex-shrink: 0;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--warm-title);
  line-height: 1.3;
}

.team-role {
  font-size: 13px;
  color: var(--warm-body);
  opacity: 0.8;
  line-height: 1.4;
}

/* ===== PROJECTS ===== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(15, 110, 86, 0.15);
  text-decoration: none;
  color: inherit;
  transition: padding-left var(--transition);
}

.project-row:first-child {
  border-top: 1px solid rgba(15, 110, 86, 0.15);
}

.project-row:hover {
  padding-left: 6px;
}

[data-theme="dark"] .project-row {
  border-color: rgba(62, 207, 160, 0.15);
}

.project-row:hover .project-arrow {
  transform: translateX(4px);
  opacity: 1;
}

.project-info { flex: 1; }

.project-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--teal-title);
  margin-bottom: 4px;
}

.project-meta {
  font-size: 13px;
  color: var(--teal-body);
  opacity: 0.7;
}

.project-arrow {
  width: 20px;
  height: 20px;
  stroke: var(--teal-accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

/* ===== COOPERATIONS ===== */
.cooperations-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 680px;
}

.cooperation-item {}

.cooperation-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--warm-title);
  margin-bottom: 4px;
}

.cooperation-desc {
  font-size: 15px;
  color: var(--warm-body);
  line-height: 1.6;
  opacity: 0.85;
}

/* ===== PUBLICATIONS ===== */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.publication-item {
  padding: 20px 0;
  border-bottom: 1px solid rgba(15, 110, 86, 0.15);
}

.publication-item:first-child {
  border-top: 1px solid rgba(15, 110, 86, 0.15);
}

[data-theme="dark"] .publication-item {
  border-color: rgba(62, 207, 160, 0.12);
}

.pub-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--teal-title);
  margin-bottom: 6px;
  line-height: 1.4;
}

.pub-meta {
  font-size: 13px;
  color: var(--teal-body);
  opacity: 0.75;
  margin-bottom: 8px;
  line-height: 1.5;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--teal-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.pub-link:hover { opacity: 1; }

.pub-link svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== CONTACT ===== */
.contact-body {
  max-width: 540px;
}

.contact-body p {
  font-size: 16px;
  color: var(--warm-body);
  margin-bottom: 32px;
  line-height: 1.8;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-icon {
  width: 18px;
  height: 18px;
  stroke: var(--warm-accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-text {
  font-size: 15px;
  color: var(--warm-title);
  line-height: 1.5;
}

.contact-text a {
  color: var(--warm-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== FOOTER ===== */
footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--nav-border);
}

.footer-inner {
  max-width: calc(var(--max-width) + 80px);
  margin: 0 auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-back {
  font-size: 13px;
  font-weight: 500;
  color: var(--footer-text);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.footer-back:hover { color: var(--teal-accent); }

.footer-back svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-legal {
  font-size: 12px;
  color: var(--footer-text);
  opacity: 0.6;
}

/* ===== FADE-IN ON SCROLL ===== */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PROJECT SUB-PAGE ===== */
.project-page-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
}

.project-page-nav .nav-inner {
  justify-content: space-between;
}

.project-back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--nav-text);
  opacity: 0.65;
  transition: opacity var(--transition);
}

.project-back-link:hover { opacity: 1; }

.project-back-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-page-hero {
  background: var(--teal-bg);
  padding: 80px 40px 64px;
}

.project-page-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.project-page-hero .section-label { color: var(--teal-accent); margin-bottom: 16px; }
.project-page-hero .section-title-bar { background: var(--teal-accent); margin-bottom: 12px; }

.project-page-title {
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 500;
  color: var(--teal-title);
  line-height: 1.25;
  max-width: 700px;
  margin-bottom: 16px;
}

.project-page-tagline {
  font-size: 16px;
  color: var(--teal-body);
  opacity: 0.8;
}

.project-page-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 40px 96px;
}

.project-page-body h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--neutral-text);
  margin: 40px 0 12px;
}

.project-page-body h2:first-child { margin-top: 0; }

.project-page-body p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--neutral-subtle);
  margin-bottom: 16px;
  max-width: 680px;
}

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
  background: var(--teal-bg);
  border-radius: 10px;
  padding: 28px 32px;
  margin: 40px 0;
}

.project-meta-item {}

.project-meta-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-accent);
  opacity: 0.7;
  margin-bottom: 4px;
}

.project-meta-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--teal-title);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root {
    --section-pad: 64px;
  }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  .nav-controls .nav-btn { display: none; }
  .nav-controls-desktop { display: none; }

  .section-inner { padding-left: 24px; padding-right: 24px; }

  .hero-title { font-size: 28px; }

  .team-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 24px;
  }

  .footer-inner { padding: 24px; }

  .project-page-hero { padding: 48px 24px 40px; }
  .project-page-body { padding: 40px 24px 64px; }
  .project-meta-grid { padding: 20px 24px; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 20px; }
  .nav-logo { font-size: 13px; }
  .hero-sub { font-size: 15px; }
}
