/* ============================================================
   CHHAVI — Portfolio | Design System & Styles
   Minimalist · Elegant · Warm
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --bg-primary: #FAFAF8;
  --bg-secondary: #F4F1ED;
  --bg-card: #FFFFFF;
  --text-primary: #2C2C2C;
  --text-secondary: #6B6560;
  --text-muted: #9C9590;
  --accent: #B8977E;
  --accent-light: #D4C4B5;
  --accent-dark: #96755C;
  --border: #E8E4DF;
  --overlay: rgba(44, 44, 44, 0.85);
  --shadow-sm: 0 2px 8px rgba(44, 44, 44, 0.06);
  --shadow-md: 0 8px 30px rgba(44, 44, 44, 0.10);
  --shadow-lg: 0 20px 60px rgba(44, 44, 44, 0.15);

  /* Typography */
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --section-padding: 120px;
  --container-max: 1200px;
  --gap: 24px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- 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;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

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

h1 { font-size: clamp(3rem, 8vw, 7rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 600px;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.section-title {
  margin-bottom: 20px;
}

.section-desc {
  margin-bottom: 60px;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes dash {
  to { stroke-dashoffset: 0; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 24px 0;
  transition: all 0.4s var(--ease-out);
}

.nav.scrolled {
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 0;
  box-shadow: 0 1px 0 var(--border);
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  transition: opacity 0.3s;
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}

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

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s var(--ease-out);
  border-radius: 2px;
}

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

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

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

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--gap) 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 151, 126, 0.08) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 151, 126, 0.05) 0%, transparent 70%);
  animation: float 10s ease-in-out infinite reverse;
}

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeInUp 1s var(--ease-out);
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: inline-block;
}

.hero h1 {
  margin-bottom: 24px;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-dark);
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 48px;
  letter-spacing: 0.03em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding: 16px 36px;
  border: 1px solid var(--border);
  border-radius: 50px;
  transition: all 0.4s var(--ease-out);
}

.hero-cta:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease-out);
}

.hero-cta:hover svg {
  transform: translateY(4px);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeIn 1s 1.5s var(--ease-out) both;
}

.scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: float 2s ease-in-out infinite;
}

/* ---------- Work / Gallery Section ---------- */
.work {
  padding: var(--section-padding) 0;
}

.work-header {
  text-align: center;
  margin-bottom: 60px;
}

.work-header p {
  margin-left: auto;
  margin-right: auto;
}

/* Filters */
.filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease-out);
}

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

.filter-btn.active {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-color: var(--border);
}

/* Gallery Grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--gap);
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: var(--bg-secondary);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

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

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44, 44, 44, 0.75) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  color: #fff;
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.gallery-overlay .category-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-light);
}

/* Item animation */
.gallery-item {
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.10s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.20s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.30s; }

/* PDF Cards */
.pdf-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2C2C2C 0%, #3d3428 50%, #2C2C2C 100%);
  padding: 32px 24px;
  position: relative;
}

.pdf-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(184, 151, 126, 0.12);
  border-radius: 8px;
  pointer-events: none;
}

.gallery-item:hover .pdf-card {
  background: linear-gradient(135deg, #352f28 0%, #4a3f35 50%, #352f28 100%);
}

/* Drive Embedded Preview */
.drive-preview {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #f4f1ed;
}

.drive-preview iframe {
  width: 140%;
  height: 140%;
  position: absolute;
  top: -20%;
  left: -20%;
  border: none;
  pointer-events: none;
  transform: scale(0.85);
  transform-origin: center center;
}

.drive-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-out);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  transform: scale(0.9);
  transition: transform 0.4s var(--ease-out);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.lightbox-info {
  text-align: center;
  margin-top: 20px;
}

.lightbox-info h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.lightbox-info p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  max-width: 500px;
  margin: 0 auto;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  transition: all 0.3s;
  z-index: 201;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  transition: all 0.3s;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

/* ---------- About Section ---------- */
.about {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image-wrapper {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-lg);
}

.about-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image-accent {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  border: 1px solid var(--accent-light);
  border-radius: 50%;
  opacity: 0.4;
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-content .about-bio {
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.about-content .about-bio-2 {
  margin-bottom: 40px;
}

/* Skills */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.skill-tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent-dark);
  background: rgba(184, 151, 126, 0.12);
  padding: 8px 18px;
  border-radius: 50px;
  border: 1px solid rgba(184, 151, 126, 0.2);
  transition: all 0.3s;
}

.skill-tag:hover {
  background: rgba(184, 151, 126, 0.2);
  transform: translateY(-2px);
}

/* ---------- Contact Section ---------- */
.contact {
  padding: var(--section-padding) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-left h2 {
  margin-bottom: 20px;
}

.contact-left p {
  margin-bottom: 40px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all 0.3s var(--ease-out);
}

.social-link:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 18px 20px;
  outline: none;
  transition: all 0.3s var(--ease-out);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: var(--bg-primary);
  box-shadow: 0 0 0 4px rgba(184, 151, 126, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-submit {
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--text-primary);
  padding: 18px 40px;
  border-radius: 50px;
  transition: all 0.4s var(--ease-out);
}

.form-submit:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 100%;
  margin: 0 auto;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-image {
    max-width: 400px;
    margin: 0 auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
    --gap: 16px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .hero h1 {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .lightbox-prev,
  .lightbox-next {
    display: none;
  }

  .lightbox-content {
    max-width: 95vw;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    padding: 14px 28px;
    font-size: 0.8rem;
  }

  .filters {
    gap: 6px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.72rem;
  }
}
