/* ============================
   Sandhya Swaminathan — Portfolio
   Global Styles
   ============================ */

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

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-bg: #FAF7F2;
  --color-bg-alt: #F5F0E8;
  --color-text: #2D2D2D;
  --color-text-light: #6B6B6B;
  --color-text-muted: #999999;
  --color-accent: #C0613A;
  --color-accent-hover: #A8522E;
  --color-accent-light: rgba(192, 97, 58, 0.1);
  --color-tag-bg: #D4E4D0;
  --color-tag-text: #3D6B35;
  --color-border: #E5E0D8;
  --color-card-bg: #FFFFFF;
  --color-footer-bg: #F0EBE3;
  --color-white: #FFFFFF;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-width: 1100px;
  --nav-height: 60px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.06);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  color: var(--color-text-light);
  line-height: 1.75;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.page-content {
  flex: 1;
}

/* --- Placeholder Image Styling --- */
.placeholder-img {
  background: linear-gradient(135deg, #E8DDD0 0%, #D4C5B2 50%, #C9B89E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}

.placeholder-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
}

.placeholder-img.painting {
  background: linear-gradient(135deg, #C0613A 0%, #D4883A 30%, #8B9E5A 60%, #5C7A4A 100%);
}

.placeholder-img.sketch {
  background: linear-gradient(135deg, #F5F0E8 0%, #E8DDD0 50%, #DDD5C8 100%);
}

.placeholder-img.portrait {
  background: linear-gradient(135deg, #D4A574 0%, #C09060 50%, #A87D52 100%);
}

.placeholder-img.palette {
  background: linear-gradient(135deg, #C0613A 0%, #E8A040 25%, #5C7A4A 50%, #3A5CC0 75%, #8B3AC0 100%);
}

.placeholder-img.pencils {
  background: linear-gradient(180deg, #4A4A4A 0%, #6B6B6B 30%, #888888 60%, #AAAAAA 100%);
}

/* ============================
   Navigation
   ============================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.01em;
}

.nav-logo:hover {
  color: var(--color-accent-hover);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text);
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

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

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1.5px;
  background-color: var(--color-accent);
}

/* Accent bar below nav */
.nav-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #D4883A, var(--color-accent));
  opacity: 0.7;
}

/* Mobile Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
  z-index: 110;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================
   Footer
   ============================ */
.footer {
  background-color: var(--color-footer-bg);
  padding: var(--space-xl) 0;
  margin-top: auto;
}

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

.footer-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.footer-copy a {
  color: var(--color-accent);
}

/* ============================
   Buttons
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(192, 97, 58, 0.3);
}

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

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-1px);
}

.btn-arrow::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.btn-arrow:hover::after {
  transform: translateX(3px);
}

/* ============================
   Tags / Badges
   ============================ */
.tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.tag-green {
  background-color: var(--color-tag-bg);
  color: var(--color-tag-text);
}

.tag-accent {
  background-color: var(--color-accent);
  color: var(--color-white);
  font-size: 0.7rem;
}

.tag-outline {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-light);
  font-size: 0.72rem;
}

/* ============================
   Scroll Animations
   ============================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ============================
   HOME PAGE — Hero Section
   ============================ */
.hero {
  padding: var(--space-4xl) 0;
  min-height: calc(100vh - var(--nav-height) - 60px);
  display: flex;
  align-items: center;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-text {
  max-width: 480px;
}

.hero-text .tag {
  margin-bottom: var(--space-lg);
}

.hero-text h1 {
  margin-bottom: var(--space-lg);
}

.hero-text p {
  margin-bottom: var(--space-xl);
  font-size: 0.92rem;
}

.hero-images {
  position: relative;
  height: 480px;
}

.hero-img-landscape {
  position: absolute;
  top: 0;
  right: 0;
  width: 72%;
  height: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-slow);
}

.hero-img-landscape:hover {
  transform: scale(1.02);
}

.hero-img-landscape img,
.hero-img-landscape .placeholder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-img-sketch {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-white);
  padding: 8px 8px 0 8px;
  transition: transform var(--transition-slow);
}

.hero-img-sketch:hover {
  transform: scale(1.02);
}

.hero-img-sketch img,
.hero-img-sketch .placeholder-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.hero-img-caption {
  font-size: 0.75rem;
  color: var(--color-text-light);
  padding: var(--space-sm) 0;
}

/* ============================
   GALLERY PAGE
   ============================ */
.gallery-header {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.gallery-header h1 {
  margin-bottom: var(--space-sm);
}

.gallery-header p {
  font-size: 0.9rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Filter Tabs */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg) 0 var(--space-2xl);
}

.filter-btn {
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.filter-btn.active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.filter-btn.active-dark {
  background-color: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-white);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-lg);
  max-width: 780px;
  margin: 0 auto;
  padding-bottom: var(--space-2xl);
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img,
.gallery-item .placeholder-img {
  width: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item-info {
  padding: var(--space-md);
}

.gallery-item-info h3 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.gallery-item-info p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Large featured item */
.gallery-item.featured {
  grid-row: span 2;
}

.gallery-item.featured img,
.gallery-item.featured .placeholder-img {
  width: 100%;
  height: 460px;
  min-height: 360px;
  object-fit: cover;
}

.gallery-item.featured .gallery-item-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

.gallery-item.featured .gallery-item-info h3,
.gallery-item.featured .gallery-item-info p {
  color: var(--color-white);
}

.gallery-item.featured {
  position: relative;
}

.gallery-item.featured .tag {
  position: absolute;
  bottom: 70px;
  left: var(--space-lg);
  z-index: 2;
}

/* Small gallery items */
.gallery-item.small img,
.gallery-item.small .placeholder-img {
  height: 280px;
  object-fit: cover;
}

/* Full width items */
.gallery-item.wide {
  grid-column: 1;
}

.gallery-item.wide img,
.gallery-item.wide .placeholder-img {
  height: 220px;
}

/* Gallery bottom row */
.gallery-bottom-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-lg);
  max-width: 780px;
  margin: 0 auto;
  padding-bottom: var(--space-2xl);
}

/* View Archive */
.gallery-footer {
  text-align: center;
  padding: var(--space-lg) 0 var(--space-3xl);
}

/* Hide/show for filtering */
.gallery-item.hidden {
  display: none;
}

/* ============================
   ABOUT PAGE
   ============================ */
.about-hero {
  padding: var(--space-3xl) 0;
}

.about-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.about-text h1 {
  margin-bottom: var(--space-lg);
}

.about-text p {
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
}

.about-portrait {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-height: 400px;
}

.about-portrait img,
.about-portrait .placeholder-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center;
}

/* Medium Cards Section */
.about-mediums {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.about-mediums-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-xl);
  max-width: 780px;
  margin: 0 auto;
}

.medium-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.medium-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.medium-card-img {
  height: 180px;
  overflow: hidden;
}

.medium-card-img img,
.medium-card-img .placeholder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.medium-card-body {
  padding: var(--space-lg);
}

.medium-card-body h3 {
  margin-bottom: var(--space-sm);
}

.medium-card-body p {
  font-size: 0.85rem;
  line-height: 1.7;
}

/* Large medium card with image side by side */
.medium-card.large {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.medium-card.large .medium-card-img {
  height: 100%;
  min-height: 220px;
}

.medium-card.large .medium-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.medium-tags {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

/* Quote Section */
.about-quote {
  text-align: center;
  padding: var(--space-3xl) 0;
  max-width: 650px;
  margin: 0 auto;
}

.about-quote-divider {
  width: 60px;
  height: 2px;
  background-color: var(--color-border);
  margin: 0 auto var(--space-2xl);
}

.about-quote blockquote {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 500;
  color: var(--color-accent);
  line-height: 1.4;
  margin-bottom: var(--space-lg);
  font-style: normal;
}

.about-quote p {
  font-size: 0.88rem;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

/* ============================
   CONTACT PAGE
   ============================ */
.contact-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height) - 100px);
  padding: var(--space-3xl) 0;
}

.contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3xl);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-card);
}

.contact-card h1 {
  font-size: 1.8rem;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.contact-card > p {
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.9rem;
  color: var(--color-text);
}

.contact-info-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.contact-divider {
  width: 200px;
  height: 1px;
  background-color: var(--color-border);
  margin: var(--space-lg) 0;
}

.contact-social-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.contact-social-icons {
  display: flex;
  gap: var(--space-md);
}

.contact-social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  color: var(--color-accent);
  transition: all var(--transition-fast);
}

.contact-social-icons a:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
}

.contact-social-icons a svg {
  width: 16px;
  height: 16px;
}

/* ============================
   Responsive — Tablet
   ============================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .hero-text {
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-images {
    height: 380px;
    max-width: 550px;
    margin: 0 auto;
  }

  .about-hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .about-portrait {
    max-width: 400px;
    order: -1;
  }

  .about-mediums-inner {
    grid-template-columns: 1fr;
  }

  .medium-card.large {
    grid-template-columns: 1fr 1fr;
  }

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

  .gallery-bottom-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* ============================
   Responsive — Mobile
   ============================ */
@media (max-width: 600px) {
  :root {
    --nav-height: 56px;
  }

  .container {
    padding: 0 var(--space-lg);
  }

  /* Mobile Nav */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background-color: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px var(--space-2xl) var(--space-2xl);
    gap: var(--space-lg);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right var(--transition-base);
    z-index: 105;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.05rem;
  }

  /* Mobile overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 100;
  }

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

  /* Hero */
  .hero {
    padding: var(--space-2xl) 0;
    min-height: auto;
  }

  .hero-images {
    height: 300px;
  }

  .hero-img-landscape {
    width: 75%;
    height: 220px;
  }

  .hero-img-sketch {
    width: 50%;
  }

  .hero-img-sketch .placeholder-img,
  .hero-img-sketch img {
    height: 160px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-bottom-row {
    grid-template-columns: 1fr;
  }

  .gallery-item.featured {
    grid-row: span 1;
  }

  .gallery-item.featured img,
  .gallery-item.featured .placeholder-img {
    min-height: 250px;
    height: 250px;
  }

  /* About */
  .about-hero {
    padding: var(--space-2xl) 0;
  }

  .medium-card.large {
    grid-template-columns: 1fr;
  }

  .medium-card.large .medium-card-img {
    min-height: 180px;
  }

  /* Contact */
  .contact-card {
    padding: var(--space-2xl);
  }

  .contact-card h1 {
    font-size: 1.5rem;
  }
}
