@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

@layer base, components, utilities;

@layer base {
  :root {
    --primary: oklch(65% 0.15 40);
    --primary-glow: oklch(65% 0.15 40 / 0.3);
    --bg: oklch(98% 0.01 60);
    --surface: oklch(100% 0 0);
    --text: oklch(20% 0.02 60);
    --text-light: oklch(45% 0.02 60);
    
    --shadow-soft: 0 4px 20px oklch(0% 0 0 / 0.05);
    --shadow-deep: 0 10px 40px oklch(0% 0 0 / 0.12);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
  }

  /* Premium Noise Texture */
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 9999;
  }

  h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
  }

  a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
  }
}

@layer components {
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
  }

  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
  }

  .navbar {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
    border-bottom: 1px solid oklch(0% 0 0 / 0.05);
  }

  .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
  }

  .nav-links {
    display: flex;
    gap: 32px;
    font-weight: 500;
  }

  .nav-links a:hover {
    color: var(--primary);
  }

  .tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-glow);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  /* Science Card Styling */
  .science-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .science-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-deep);
  }

  .science-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }

  .science-card .content {
    padding: 32px;
  }

  .science-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
  }

  .science-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
  }

  .read-more:hover {
    text-decoration: underline;
  }

  /* Footer Links */
  .footer-links {
    list-style: none;
  }

  .footer-links li {
    margin-bottom: 12px;
  }

  .footer-links a {
    color: var(--text-light);
    font-size: 0.95rem;
  }

  .footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
  }
}

/* Responsiveness */
@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 16px;
  }
  
  .nav-links {
    gap: 16px;
    font-size: 0.9rem;
  }

  section h2 {
    font-size: 2.2rem !important;
  }

  #research .container {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  footer .container {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 480px) {
  footer .container {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  
  footer .logo {
    justify-content: center;
  }
  
  footer div p {
    margin: 16px auto !important;
  }
}
