/* ============================================
   priyanjalipatil.com — Kiln & Shadow Theme
   ============================================ */

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

/* --- Theme Variables --- */
:root {
  --bg: #2c2520;
  --surface: #3d3229;
  --surface-hover: #4a3d32;
  --text: #e8ddd0;
  --text-secondary: #b8a594;
  --accent: #c4a882;
  --muted: #8a7562;
  --border: #5c4a3a;
  --shadow: rgba(0, 0, 0, 0.3);
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-md);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }

p {
  color: var(--text-secondary);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  min-height: calc(100vh - var(--nav-height));
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 80px;
}

/* --- Nav --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(44, 37, 32, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
}

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

nav .logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text);
}

nav .nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

nav .nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.5px;
  transition: color 0.2s;
  position: relative;
}

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

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

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

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

.btn-filled {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-filled:hover {
  background: #d4b892;
  border-color: #d4b892;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--shadow);
}

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--border), var(--muted));
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.card-body {
  padding: 20px;
}

.card-body h3 {
  margin-bottom: 6px;
  color: var(--text);
}

.card-body p {
  font-size: 0.9rem;
}

/* --- Tags --- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  color: var(--muted);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

/* --- Home: Hero --- */
.hero {
  display: flex;
  align-items: center;
  gap: 64px;
  min-height: 70vh;
  padding: 40px 0;
}

.hero-text {
  flex: 1;
}

.hero-divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: 20px 0;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text);
  font-style: italic;
}

.hero-sub {
  margin-top: 12px;
  font-size: 1rem;
}

.hero-image {
  flex: 1;
}

.hero-image-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--border), var(--muted));
  max-height: 500px;
}

/* --- Home: Featured Pieces --- */
.featured-pieces {
  padding-top: 80px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Page Header (shared) --- */
.page-header {
  margin-bottom: 48px;
}

.page-header h1 {
  margin-bottom: 8px;
}

/* --- Work: Showcase (featured + side) --- */
.work-showcase {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 80px;
}

.work-featured {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.work-featured .card-image {
  border-radius: 0;
}

.work-featured-info {
  padding: 28px;
}

.work-featured-info h2 {
  margin-bottom: 12px;
}

.work-featured-info > p {
  margin-bottom: 24px;
  line-height: 1.7;
}

.work-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.work-meta-item {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
}

.work-meta-label {
  color: var(--muted);
  min-width: 60px;
}

.work-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.work-side-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.work-side-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--shadow);
}

.work-side-card .card-image {
  aspect-ratio: 16/9;
  border-radius: 0;
}

.work-side-label {
  padding: 16px;
}

.work-side-label h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.work-side-label p {
  font-size: 0.85rem;
}

/* --- Work: Grid --- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Glazes: Index --- */
.glaze-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.glaze-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}

.glaze-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--shadow);
}

.glaze-swatch {
  height: 160px;
  width: 100%;
}

.glaze-card-body {
  padding: 24px;
}

.glaze-card-body h3 {
  margin-bottom: 8px;
  color: var(--text);
}

.glaze-card-body > p {
  margin-bottom: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.glaze-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --- Glazes: Subpage --- */
.glaze-page {
  max-width: 780px;
}

.glaze-hero-swatch {
  height: 200px;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
}

.glaze-section {
  margin-bottom: 48px;
}

.glaze-section h2 {
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.glaze-recipe {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin: 16px 0;
}

.glaze-recipe table {
  width: 100%;
  border-collapse: collapse;
}

.glaze-recipe th,
.glaze-recipe td {
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.glaze-recipe th {
  color: var(--muted);
  font-weight: 500;
  font-family: var(--font-body);
}

.glaze-recipe td {
  color: var(--text);
}

.glaze-recipe tr:last-child th,
.glaze-recipe tr:last-child td {
  border-bottom: none;
}

.glaze-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.glaze-back:hover {
  color: var(--accent);
}

/* --- About --- */
.about-page {
  display: flex;
  gap: 64px;
  align-items: flex-start;
  max-width: 960px;
}

.about-photo {
  flex: 0 0 320px;
  position: sticky;
  top: calc(var(--nav-height) + 32px);
}

.about-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--border), var(--muted));
}

.about-content {
  flex: 1;
}

.about-lead {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text);
  font-style: italic;
  margin-bottom: 24px;
  line-height: 1.6;
}

.about-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

/* --- Contact --- */
.contact-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 48px;
}

.contact-links {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.contact-link:hover {
  background: var(--surface-hover);
}

.contact-link-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.contact-divider {
  height: 1px;
  background: var(--border);
  margin: 36px 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

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

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .nav-toggle {
    display: block;
  }

  nav .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(44, 37, 32, 0.98);
    backdrop-filter: blur(12px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  nav .nav-links.open {
    display: flex;
  }

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

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

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

  .page {
    padding-top: calc(var(--nav-height) + 32px);
    padding-bottom: 60px;
  }

  .hero {
    flex-direction: column;
    gap: 40px;
    min-height: auto;
    text-align: center;
  }

  .hero-divider {
    margin: 20px auto;
  }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .work-showcase {
    grid-template-columns: 1fr;
  }

  .work-side {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 8px;
  }

  .work-side-card {
    min-width: 260px;
    scroll-snap-align: start;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-page {
    flex-direction: column;
    gap: 40px;
  }

  .about-photo {
    flex: none;
    width: 100%;
    max-width: 360px;
    position: static;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }

  .container {
    padding: 0 16px;
  }

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

  .contact-card {
    padding: 32px 24px;
  }

  .contact-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
