/* =========================================
   aaruleswaran.com — Unified Layout
   Ensures consistent left-alignment across all pages
   ========================================= */

:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", Helvetica;
  --maxw: 1240px;

  /* Backgrounds */
  --bg-main: #f6f4ef;     /* warm off-white */
  --bg-card: #f1efe9;     /* card surface */
  --bg-card-hover: #ebe7e0;

  /* Text */
  --text-primary: #1f2933;    /* deep charcoal */
  --text-secondary: #4b5563;  /* muted slate */
  --text-tertiary: #6b7280;   /* quiet supporting text */

  /* Lines / borders */
  --line: rgba(31,41,51,.14);

  /* Accents */
  --accent: #5f7d8c;          /* calm blue-grey */
  --accent-strong: #2b4c66;   /* deep teal-navy */
  --accent-soft: rgba(95,125,140,.18);

  --radius: 18px;
  --pad: 20px;
  --header-height: 80px;
  --heroH: 70vh;
}

* { box-sizing: border-box; }
html, body { 
  height: 100%; 
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3 { margin-top: 0; line-height: 1.2; font-weight: 600; }
a { color: inherit; transition: 0.2s ease; text-decoration: none; }

/* Layout Containers */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.measure { max-width: 700px; }

/* Header & Nav */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  background: var(--bg-main);
  position: relative;
  z-index: 1001;
}

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

.brand-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-site {
  display: block;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 24px;
}

.nav-list a {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.nav-list a:hover, 
.nav-list a.is-active {
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  position: relative;
  height: var(--heroH);
  min-height: 400px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
}

.hero-media { position: absolute; inset: 0; z-index: 1; }
.hero-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-content { max-width: 700px; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); color: #fff; margin-bottom: 0.5rem; }
.hero-subtitle { font-size: clamp(1.1rem, 2vw, 1.3rem); color: rgba(255,255,255,0.9); }

/* Main Content Area */
#main { padding: 60px 0; }
.section { margin-bottom: 80px; }

.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 24px;
}

.section-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Grid & Cards */
.section-cards, .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: 0.2s ease;
  border: 1px solid transparent;
}

.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  border-color: var(--line);
}

.card-title { font-size: 1.25rem; margin-bottom: 12px; }
.card-text { color: var(--text-secondary); flex-grow: 1; margin-bottom: 20px; font-size: 0.95rem; }
.card-link { font-size: 0.9rem; font-weight: 600; color: var(--accent-strong); margin-top: auto; }

/* Partner Logo Helpers */
.logo-wrapper {
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.logo-wrapper img {
  max-height: 100%;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.footer-inner { display: flex; justify-content: space-between; align-items: center; }

/* Mobile Navigation Breakpoint */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  
  .site-nav {
    display: none; /* Hidden by default on mobile */
  }

  /* When JS adds .is-open class */
  .site-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-main);
    padding: var(--pad);
    border-bottom: 1px solid var(--line);
    z-index: 1000;
  }

  .nav-list {
    flex-direction: column;
    gap: 16px;
  }

  .hero { height: 60vh; }
  
  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}