/* ==========================================================================
   KRITHIKA SREE DEVI — INDUSTRIAL DESIGN STUDIO THEME
   Philosophy: Tactile, warm, physical product materiality, precision CAD.
   ========================================================================== */

:root {
  /* Surface & Base */
  --bg-deep: #0e0d10;
  --bg-surface: #17151a;
  --bg-card: rgba(26, 24, 30, 0.85);
  --bg-card-hover: rgba(34, 31, 40, 0.95);
  --bg-elevated: #222027;

  /* Text & Contrast */
  --text-main: #f5efe6;
  --text-sub: #b8b0a5;
  --text-muted: #7d756d;
  --text-dim: #544e47;

  /* Material Accents */
  --clay: #e06d53;
  --clay-glow: rgba(224, 109, 83, 0.28);
  --brass: #d4a359;
  --brass-soft: rgba(212, 163, 89, 0.15);
  --sage: #7da587;
  --sage-glow: rgba(125, 165, 135, 0.2);
  --cyan-cad: #38bdf8;
  --cyan-glow: rgba(56, 189, 248, 0.25);

  /* Borders & Lines */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(224, 109, 83, 0.5);
  --line-grid: rgba(255, 255, 255, 0.04);

  /* Typography */
  --font-serif: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Grotesk', monospace;

  /* Motion & Easings (Emil Kowalski Philosophy) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 160ms;
  --dur-norm: 260ms;
  --dur-slow: 450ms;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(224, 109, 83, 0.09), transparent),
    radial-gradient(circle at 90% 40%, rgba(212, 163, 89, 0.04), transparent 50%),
    radial-gradient(circle at 10% 70%, rgba(125, 165, 135, 0.04), transparent 50%);
}

/* CAD Wireframe Mode (Toggleable Technical View) */
body.cad-mode {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.08) 1px, transparent 1px);
}
body.cad-mode .cad-tag {
  display: inline-flex !important;
}

/* Subtle Noise Texture */
.noise-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  background: repeating-radial-gradient(circle at 50% 50%, #fff, #fff 1px, transparent 1px, transparent 4px);
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography Helpers */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(14, 13, 16, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  transition: transform var(--dur-norm) var(--ease-out), background var(--dur-norm);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-symbol {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--clay), #b84b34);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 14px var(--clay-glow);
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-role {
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color var(--dur-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--clay);
  transition: width var(--dur-fast) var(--ease-out);
}
.nav-link:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  transition: transform 120ms var(--ease-out), background var(--dur-fast), border-color var(--dur-fast);
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
  box-shadow: 0 4px 18px var(--clay-glow);
}
.btn-primary:hover {
  background: #eb7c63;
  border-color: #eb7c63;
}

.btn-cad {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 7px 12px;
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--cyan-cad);
  background: rgba(56, 189, 248, 0.08);
}
.btn-cad:hover {
  background: rgba(56, 189, 248, 0.16);
}

/* Pills & Badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
}

.pill-clay {
  background: rgba(224, 109, 83, 0.12);
  border-color: rgba(224, 109, 83, 0.35);
  color: #fca591;
}

.pill-brass {
  background: rgba(212, 163, 89, 0.12);
  border-color: rgba(212, 163, 89, 0.35);
  color: #fde047;
}

.pill-sage {
  background: rgba(125, 165, 135, 0.12);
  border-color: rgba(125, 165, 135, 0.35);
  color: #a7f3d0;
}

/* Hero Section */
.hero-section {
  padding-top: 140px;
  padding-bottom: 90px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  line-height: 1.12;
  margin-bottom: 20px;
  color: #fff;
}

.hero-title em {
  font-style: italic;
  color: var(--clay);
  font-family: var(--font-serif);
}

.hero-sub {
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* Hero Portrait Card (Tactile 3D Studio Frame) */
.hero-portrait-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  transform-style: preserve-3d;
  transition: transform var(--dur-norm) var(--ease-out);
}

.portrait-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: #1e1c22;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform var(--dur-slow) var(--ease-out);
}

.hero-portrait-card:hover .portrait-img {
  transform: scale(1.03);
}

/* Floating Tactile Specimen Pills on Card */
.specimen-tag {
  position: absolute;
  background: rgba(23, 21, 26, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  font-size: 11.5px;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.specimen-tag-1 { top: 28px; left: -22px; }
.specimen-tag-2 { bottom: 36px; right: -22px; }

/* Sections */
.section {
  padding: 80px 0;
  position: relative;
}

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

.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--clay);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: clamp(1.8rem, 2.6vw, 2.5rem);
  color: #fff;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-sub);
  max-width: 620px;
  line-height: 1.6;
}

/* Philosophy 4 Pillars Grid */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.philosophy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast);
  position: relative;
  overflow: hidden;
}

.philosophy-card:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 109, 83, 0.4);
}

.pillar-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--clay);
  margin-bottom: 14px;
  display: block;
}

.pillar-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.pillar-desc {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* Material & Fabrication Studio Inspector */
.material-inspector {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 36px;
  align-items: center;
}

.material-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mat-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: all var(--dur-fast) var(--ease-out);
}

.mat-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mat-btn.active {
  background: rgba(224, 109, 83, 0.15);
  border-color: var(--clay);
  color: #fca591;
}

.mat-details-card {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px;
}

.mat-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13px;
}

.mat-spec-table td {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mat-spec-table td:first-child {
  color: var(--text-muted);
  width: 40%;
}
.mat-spec-table td:last-child {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Works Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.filter-btn.active {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
}

/* Works Grid */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 109, 83, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.work-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1b191e;
  position: relative;
}

.work-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.work-card:hover .work-thumb {
  transform: scale(1.04);
}

.work-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.work-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.work-summary {
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}

.work-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--clay);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(8, 7, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-norm) var(--ease-out);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: #16141a;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
  transform: scale(0.96);
  transition: transform var(--dur-norm) var(--ease-out);
}

.modal-overlay.open .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: sticky;
  top: 0;
  background: #16141a;
  z-index: 10;
}

.modal-body {
  padding: 28px;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast);
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Timeline Components */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 6px; bottom: 6px; left: 6px; width: 2px;
  background: var(--border-subtle);
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px; top: 6px; width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid var(--clay);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 40px;
  background: #0b0a0d;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .material-inspector {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
