/* ===== FONTS ===== */
@font-face {
  font-family: 'Gilroy';
  src: url('fonts/Gilroy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('fonts/Gilroy-RegularItalic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('fonts/Gilroy-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('fonts/Gilroy-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('fonts/Gilroy-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('fonts/Gilroy-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('fonts/Gilroy-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Caveat';
  src: url('fonts/Caveat-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ===== VARIABLES ===== */
:root {
  --bg-cream: #FFFDF2;
  --brown-dark: #6B2D2D;
  --brown-light: #8B4D4D;
  --ocre: #C4956A;
  --footer-dark: #051C2C;
  --text-dark: #2D2D2D;
  --text-muted: #666666;
  --border-light: #E0DDD5;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-dark);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
  font-weight: 400;
  line-height: 1.2;
}

h1 {
  font-size: 2.75rem;
  color: var(--text-dark);
}

h2 {
  font-size: 2.25rem;
  color: var(--text-dark);
}

h3 {
  font-size: 1.25rem;
  color: var(--text-dark);
}

.italic {
  font-family: 'Caveat', cursive;
  font-style: italic;
  color: var(--brown-dark);
  font-size: 1.15em;
}

.accent {
  font-family: 'Caveat', cursive;
  color: var(--brown-dark);
  font-size: 1.15em;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

/* ===== HEADER ===== */
header {
  background-color: #FFFFFF;
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.footer-logo .logo img {
  height: 40px;
  background: var(--bg-cream);
  padding: 8px 16px;
  border-radius: 4px;
}

nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

nav a {
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
  color: var(--brown-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lang-switch {
  border: 1px solid var(--text-dark);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* ===== HERO / PHILOSOPHY ===== */
.philosophy {
  padding: 4rem 0;
}

.philosophy .container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.philosophy-image {
  border-radius: 8px;
  overflow: hidden;
  max-width: 400px;
}

.philosophy-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.philosophy-content .section-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.philosophy-content h1 {
  margin-bottom: 1.5rem;
}

.philosophy-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ===== PRINCIPLES ===== */
.principles {
  padding: 5rem 0;
  background-color: #F0F4E9;
}

.principles .section-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.principles h2 {
  margin-bottom: 3rem;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.principle-card {
  background: transparent;
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  border-radius: 4px;
}

.principle-card .number {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.principle-card .number .icon {
  width: 40px;
  height: 40px;
  padding: 10px;
  background: white;
  border-radius: 50%;
  color: var(--brown-dark);
  flex-shrink: 0;
}

.principle-card .number .icon path,
.principle-card .number .icon circle,
.principle-card .number .icon polyline {
  stroke: var(--brown-dark);
}

.principle-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.principle-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== PROJECTS PAGE ===== */
.projects-hero {
  padding: 3rem 0;
}

.projects-hero .section-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: 1.5rem;
  padding: 2rem 0 5rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

/* Tall card spans 2 rows */
.project-card.tall {
  grid-row: span 2;
}

.project-card.tall img {
  height: 100%;
  min-height: 440px;
}

/* Wide card spans 2 columns */
.project-card.wide {
  grid-column: span 2;
}

.project-card.wide img {
  height: 280px;
}

.project-info {
  padding: 1rem 0;
}

.project-info .meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.project-info h3 {
  font-size: 1rem;
  font-weight: 500;
}

/* ===== ABOUT PAGE ===== */
.achievements {
  background: var(--bg-cream);
  padding: 5rem 0;
}

.achievements .section-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--brown-dark);
  margin-bottom: 1rem;
}

.achievements h2 {
  margin-bottom: 3rem;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.achievement-card {
  background: white;
  border: 1px solid var(--border-light);
  padding: 2rem;
  border-radius: 4px;
}

.achievement-card .icon {
  width: 40px;
  height: 40px;
  background: #FDF6E3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--ocre);
}

.achievement-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.achievement-list {
  list-style: none;
}

.achievement-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.achievement-list li:last-child {
  border-bottom: none;
}

.achievement-list li span {
  color: var(--text-muted);
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--footer-dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-logo .logo {
  color: white;
  margin-bottom: 1rem;
}

.footer-logo .logo-icon {
  border-color: white;
}

.footer-logo .tagline {
  font-style: italic;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-section h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: var(--ocre);
}

.footer-section p,
.footer-section a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-section svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-section a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: white;
  color: var(--footer-dark);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation classes */
.animate {
  opacity: 0;
}

.animate.visible {
  animation: fadeIn 0.8s ease forwards;
}

.animate-left.visible {
  animation: fadeInLeft 0.8s ease forwards;
}

.animate-right.visible {
  animation: fadeInRight 0.8s ease forwards;
}

.animate-scale.visible {
  animation: scaleIn 0.6s ease forwards;
}

/* Staggered animations for cards */
.principle-card,
.project-card,
.achievement-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.principle-card.visible,
.project-card.visible,
.achievement-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.principle-card:nth-child(1) { transition-delay: 0.1s; }
.principle-card:nth-child(2) { transition-delay: 0.2s; }
.principle-card:nth-child(3) { transition-delay: 0.3s; }
.principle-card:nth-child(4) { transition-delay: 0.4s; }
.principle-card:nth-child(5) { transition-delay: 0.5s; }
.principle-card:nth-child(6) { transition-delay: 0.6s; }

.project-card:nth-child(1) { transition-delay: 0.1s; }
.project-card:nth-child(2) { transition-delay: 0.15s; }
.project-card:nth-child(3) { transition-delay: 0.2s; }
.project-card:nth-child(4) { transition-delay: 0.25s; }
.project-card:nth-child(5) { transition-delay: 0.3s; }
.project-card:nth-child(6) { transition-delay: 0.35s; }

.achievement-card:nth-child(1) { transition-delay: 0.1s; }
.achievement-card:nth-child(2) { transition-delay: 0.2s; }
.achievement-card:nth-child(3) { transition-delay: 0.3s; }

/* Hover animations */
.principle-card,
.achievement-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease;
}

.principle-card:hover,
.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.project-card img {
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.achievement-list li {
  transition: background 0.3s ease;
}

.achievement-list li:hover {
  background: rgba(0,0,0,0.02);
}

/* Button and link hover effects */
nav a {
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brown-dark);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

nav a:hover,
nav a.active {
  text-decoration: none;
}

/* Logo hover */
.logo {
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .philosophy .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .philosophy-image {
    max-width: 100%;
    order: -1;
  }

  .principles-grid,
  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }

  .projects-grid .project-card {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .projects-grid .project-card.tall {
    grid-row: auto;
  }

  .projects-grid .project-card.tall img,
  .projects-grid .project-card img {
    height: 180px;
    min-height: auto;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-section {
    text-align: center;
  }

  .footer-section p,
  .footer-section a {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    background: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
  }

  nav.active {
    right: 0;
  }

  nav a {
    font-size: 1rem;
  }

  .lang-switch {
    margin-top: 1rem;
  }

  /* Overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }

  .nav-overlay.active {
    display: block;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1.25rem;
  }

  h1 {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.1rem;
  }

  .principles-grid,
  .projects-grid,
  .achievements-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Reset project cards for mobile */
  .projects-grid .project-card {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .projects-grid .project-card.tall {
    grid-row: auto;
  }

  .projects-grid .project-card.tall img {
    height: 250px;
    min-height: auto;
  }

  .projects-grid .project-card img {
    height: 220px;
  }

  section {
    padding: 3rem 0;
  }

  .philosophy {
    padding: 2rem 0;
  }

  .philosophy-content p {
    font-size: 0.9rem;
  }

  .principle-card {
    padding: 1.25rem;
  }

  .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }

  .footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-logo .logo {
    margin-bottom: 0.5rem;
  }

  .footer-logo .tagline {
    font-size: 0.85rem;
    text-align: center;
  }

  .footer-section {
    width: 100%;
    text-align: center;
  }

  .footer-section h4 {
    margin-bottom: 1rem;
  }

  .footer-section p,
  .footer-section a {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }

  .footer-bottom {
    padding-top: 1.5rem;
  }

  .footer-bottom p {
    font-size: 0.75rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .projects-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .projects-grid .project-card {
    width: 100%;
  }

  .projects-grid .project-card img {
    height: 220px;
    width: 100%;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .section-label {
    font-size: 0.7rem;
  }
}
