/* ============================================
   Ronida Ali Portfolio — Nordic Aurora Editorial
   ============================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  /* Colors — Nordic Aurora Palette */
  --color-bg: #F7F7FB;
  /* Cool off-white base */
  --color-surface: #FFFFFF;
  --color-text: #0F172A;
  /* Deep Navy */
  --color-text-muted: #475569;
  /* Slate */

  /* Accents */
  --color-teal: #14B8A6;
  --color-indigo: #6366F1;
  --color-rose: #F43F5E;

  /* UI Colors */
  --color-border: rgba(99, 102, 241, 0.1);
  /* Subtle Indigo tint */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  --gradient-aurora: linear-gradient(135deg, rgba(20, 184, 166, 0.1) 0%, rgba(99, 102, 241, 0.1) 50%, rgba(244, 63, 94, 0.1) 100%);
  --gradient-border: linear-gradient(to right, var(--color-teal), var(--color-indigo));

  /* Typography */
  --font-ui: 'Inter', sans-serif;
  --font-display: 'Playfair Display', serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --header-height: 80px;

  /* Layout */
  --measure: 1100px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

body {
  font-family: var(--font-ui);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Animated Aurora Background */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(244, 63, 94, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  filter: blur(60px);
  animation: aurora-move 20s infinite alternate linear;
}

@keyframes aurora-move {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  100% {
    transform: translate(-10%, -5%) rotate(5deg);
  }
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  background: linear-gradient(to right, #0F172A, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--space-lg);
}

h3 {
  font-family: var(--font-ui);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--space-xs);
}

p {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

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

/* ============================================
   Header & Nav
   ============================================ */
header {
  height: var(--header-height);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.container {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

/* Desktop Nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-indigo);
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  padding-left: var(--space-lg);
  border-left: 1px solid var(--color-border);
}

.lang-btn {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  color: var(--color-text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-indigo);
}

.lang-btn.active {
  background: var(--color-indigo);
  color: white;
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-icon {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: all 0.3s;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s;
}

.menu-icon::before {
  transform: translateY(-8px);
}

.menu-icon::after {
  transform: translateY(8px);
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: var(--color-bg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 90;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* ============================================
   Hero
   ============================================ */
#hero {
  padding: var(--space-xl) 0;
  text-align: center;
  position: relative;
}

/* Profile Image */
.hero-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-md);
  display: block;
  border: 4px solid var(--color-surface);
  box-shadow:
    0 0 0 2px var(--color-indigo),
    /* Inner ring */
    0 10px 20px rgba(0, 0, 0, 0.1);
  /* Drop shadow */
  transition: transform 0.3s ease;
}

.hero-image:hover {
  transform: scale(1.05);
}

.hero-sub {
  display: inline-block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-indigo);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-pill);
}

.hero-mission {
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  font-size: 1.25rem;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.trust-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  opacity: 0.8;
}

/*Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--color-text);
  color: white;
  border: 2px solid var(--color-text);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: #334155;
  border-color: #334155;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-text);
  background: white;
}

/* ============================================
   Grid & Articles
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.article-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-border);
  opacity: 0;
  transition: opacity 0.3s;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.article-card:hover::before {
  opacity: 1;
}

.card-outlets {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.outlet-label {
  color: var(--color-text-muted);
}

.tag-pill {
  color: var(--color-teal);
  font-weight: 700;
}

.card-excerpt {
  flex-grow: 1;
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
  color: var(--color-text-muted);
}

.btn-text {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-indigo);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-text span {
  transition: transform 0.2s;
}

.article-card:hover .btn-text span {
  transform: translateX(4px);
}

/* ============================================
   Timeline
   ============================================ */
.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  transition: border-color 0.2s;
}

.timeline-item:hover {
  border-color: var(--color-indigo);
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.timeline-org {
  color: var(--color-indigo);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* ============================================
   Contact & Footer
   ============================================ */
.contact-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

footer {
  text-align: center;
  padding: var(--space-lg);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xl);
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
  :root {
    --space-xl: 3rem;
  }

  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  /* Mobile Menu Styles */
  .mobile-menu .nav-link {
    font-size: 1.5rem;
    font-family: var(--font-display);
    font-weight: 700;
  }

  .mobile-lang-switch {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
  }

  .mobile-lang-switch .lang-btn {
    text-align: center;
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
  }

  h1 {
    font-size: 2.25rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .trust-bar {
    flex-wrap: wrap;
  }
}

/* ============================================
   RTL Overrides
   ============================================ */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .lang-switch {
  padding-left: 0;
  padding-right: var(--space-lg);
  border-left: none;
  border-right: 1px solid var(--color-border);
}

html[dir="rtl"] .article-card:hover .btn-text span {
  transform: translateX(-4px);
}

html[dir="rtl"] .menu-icon::before {
  transform: translateY(-8px);
}

/* Keep icon visual same */

html[dir="rtl"] .mobile-menu {
  left: auto;
  right: 0;
  transform: translateX(-100%);
}

html[dir="rtl"] .mobile-menu.open {
  transform: translateX(0);
}