:root {
  --bg: #f4efe8;
  --bg-soft: #efe7dc;
  --surface: rgba(255, 252, 247, 0.88);
  --surface-strong: #fffaf3;
  --card: #ffffff;
  --line: rgba(40, 39, 37, 0.1);
  --line-strong: rgba(40, 39, 37, 0.18);
  --text: #1f2430;
  --muted: #5d6470;
  --accent: #a95b31;
  --accent-deep: #7d3f1b;
  --navy: #22344a;
  --success: #2d7c58;
  --shadow: 0 18px 50px rgba(52, 44, 34, 0.08);
  --shadow-soft: 0 12px 30px rgba(52, 44, 34, 0.05);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(169, 91, 49, 0.09), transparent 28%),
    radial-gradient(circle at top right, rgba(34, 52, 74, 0.08), transparent 24%),
    linear-gradient(180deg, #faf5ee 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-shell {
  position: relative;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 5.5rem 0;
}

.section-soft {
  background: rgba(255, 250, 243, 0.58);
  border-top: 1px solid rgba(40, 39, 37, 0.05);
  border-bottom: 1px solid rgba(40, 39, 37, 0.05);
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

h1 {
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  line-height: 1.05;
}

h3 {
  font-size: 1.4rem;
  line-height: 1.15;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-title,
.page-title {
  max-width: 13ch;
}

.page-summary,
.hero-summary,
.section-copy,
.contact-copy p {
  font-size: 1.02rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  background: rgba(250, 245, 238, 0.86);
  border-bottom: 1px solid rgba(40, 39, 37, 0.06);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 0;
}

.brand-mark {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
}

.brand-mark span {
  color: var(--accent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.nav-pill {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.55);
}

.hero {
  padding-top: 4.8rem;
  padding-bottom: 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 2rem;
  align-items: stretch;
}

.hero-copy {
  padding: 1rem 0;
}

.hero-summary {
  max-width: 60ch;
  margin-top: 1.5rem;
}

.hero-role-line {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding: 0.9rem 1.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(40, 39, 37, 0.08);
  box-shadow: var(--shadow-soft);
}

.role-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}

.typed-role {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--text);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.62);
}

.hero-points {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
}

.hero-points li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--muted);
  font-weight: 500;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--accent);
}

.hero-panel {
  display: flex;
}

.hero-panel-card {
  width: 100%;
  padding: 2rem;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(34, 52, 74, 0.98), rgba(26, 39, 54, 0.96)),
    #23354a;
  color: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel-card::after {
  content: "";
  position: absolute;
  inset: auto -12% -12% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(169, 91, 49, 0.14);
  filter: blur(8px);
}

.panel-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-panel-card h2 {
  margin-top: 0.9rem;
  color: #fff8f0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.hero-metrics {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-metrics div {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.metric-value {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  color: #fff;
}

.metric-name {
  display: block;
  margin-top: 0.3rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: start;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 4.5rem;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
  z-index: 1;
}

.about-profile-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.about-image-backdrop {
  position: absolute;
  inset: 1.5rem -1.5rem -1.5rem 1.5rem;
  border-radius: var(--radius-xl);
  background: rgba(169, 91, 49, 0.08);
  border: 1px solid rgba(169, 91, 49, 0.15);
  z-index: 0;
  transition: transform 0.3s ease;
}

.about-image-wrapper:hover .about-image-backdrop {
  transform: translate(-0.5rem, -0.5rem);
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-image-backdrop {
    inset: 1rem -1rem -1rem 1rem;
  }
}

.section-copy {
  display: grid;
  gap: 1rem;
}

.principles-grid,
.skills-grid,
.projects-grid,
.admin-grid {
  display: grid;
  gap: 1.5rem;
}

.principles-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2.5rem;
}

.principle-card,
.skill-card,
.project-card,
.admin-card,
.lock-card {
  background: var(--surface);
  border: 1px solid rgba(40, 39, 37, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.principle-card,
.skill-card,
.project-card,
.admin-card,
.lock-card {
  padding: 1.6rem;
}

.card-kicker,
.project-category {
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.principle-card p:last-child,
.skill-card li,
.project-card p {
  color: var(--muted);
}

.skills-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-card ul {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.15rem;
}

.skill-card li {
  padding-top: 0.8rem;
  border-top: 1px solid rgba(40, 39, 37, 0.08);
}

.section-head {
  max-width: 44rem;
}

.section-head-split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: none;
}

.text-link {
  color: var(--navy);
  font-weight: 700;
}

.text-link:hover {
  color: var(--accent);
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.projects-grid-full {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  padding: 1.8rem;
  background: #ffffff;
  border: 1px solid rgba(40, 39, 37, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.project-category {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  background: rgba(169, 91, 49, 0.12); /* Light tint of accent */
  color: var(--accent-deep);
  border-radius: 999px;
  margin-bottom: 0.25rem;
}

.project-title {
  font-size: 1.45rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.project-meta span {
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(34, 52, 74, 0.07);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 0.2rem;
}

.project-links a {
  font-weight: 700;
  color: var(--accent-deep);
}

.project-links a:hover {
  color: var(--accent);
}

.contact-grid {
  padding: 2rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 252, 247, 0.74);
  border: 1px solid rgba(40, 39, 37, 0.08);
  box-shadow: var(--shadow-soft);
}

.contact-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.contact-list a,
.contact-list span {
  color: var(--navy);
  font-weight: 600;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label,
.single-field,
.admin-form-grid label {
  display: grid;
  gap: 0.5rem;
}

.contact-form span,
.single-field span,
.admin-form-grid span {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

.contact-form input,
.contact-form textarea,
.single-field input,
.admin-form-grid input,
.admin-form-grid textarea,
.admin-form-grid select {
  width: 100%;
  border: 1px solid rgba(40, 39, 37, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  padding: 0.95rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.single-field input:focus,
.admin-form-grid input:focus,
.admin-form-grid textarea:focus,
.admin-form-grid select:focus {
  outline: none;
  border-color: rgba(169, 91, 49, 0.45);
  box-shadow: 0 0 0 4px rgba(169, 91, 49, 0.08);
}

.contact-form textarea,
.admin-form-grid textarea {
  resize: vertical;
}

.form-status,
.admin-status {
  min-height: 1.3rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--success);
}

.page-intro {
  padding-bottom: 2.2rem;
}

.page-summary {
  max-width: 58ch;
  margin-top: 1rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.filter-btn {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(40, 39, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.admin-shell {
  min-height: 20rem;
}

.lock-card {
  max-width: 32rem;
  margin: 0 auto;
  text-align: left;
}

.lock-card .section-title {
  max-width: none;
  margin-bottom: 1rem;
}

.lock-card .btn {
  margin-top: 1rem;
}

.hidden-panel {
  display: none;
}

.admin-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.admin-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.admin-card .section-title {
  max-width: none;
  font-size: 2rem;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-span-2 {
  grid-column: 1 / -1;
}

.admin-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.admin-list {
  display: grid;
  gap: 0.9rem;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(40, 39, 37, 0.08);
  background: rgba(255, 255, 255, 0.68);
}

.admin-item-copy {
  display: grid;
  gap: 0.35rem;
}

.admin-item-title {
  font-weight: 800;
  color: var(--text);
}

.admin-item-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-item-actions {
  display: flex;
  gap: 0.55rem;
  flex-shrink: 0;
}

.admin-item-actions button {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(40, 39, 37, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-item-actions button:hover {
  border-color: var(--text);
}

.admin-item-actions .delete-btn:hover {
  border-color: #a23c2a;
  color: #a23c2a;
}

.site-footer {
  padding: 1.8rem 0 2.5rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(40, 39, 37, 0.08);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--navy);
  font-weight: 700;
}

.hidden-field {
  display: none;
}

.empty-state {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px dashed rgba(40, 39, 37, 0.12);
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .hero-grid,
  .about-grid,
  .contact-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid,
  .projects-grid,
  .projects-grid-full,
  .principles-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .section {
    padding: 4.2rem 0;
  }

  .nav-row,
  .section-head-split,
  .footer-row {
    align-items: start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .hero-role-line {
    width: 100%;
    flex-wrap: wrap;
  }

  .typed-role {
    min-width: 0;
  }

  .skills-grid,
  .projects-grid,
  .projects-grid-full,
  .principles-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    padding: 1.35rem;
  }

  .admin-item {
    flex-direction: column;
  }

  .admin-item-actions {
    width: 100%;
  }

  .admin-item-actions button {
    flex: 1;
  }
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(10, 15, 25, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--card);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.2rem; right: 1.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}


/* Mr David AI Product Page Styles - Masterpiece Aesthetic */
body.dark-theme {
  background: #080706;
  color: #f4f0eb;
  overflow-x: hidden;
}

.site-header-dark {
  background: rgba(8, 7, 6, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 180, 100, 0.1);
}

.brand-mark-light {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 179, 71, 0.5);
}

.main-nav-light a {
  color: #d1c8c0;
  transition: color 0.3s ease;
  font-weight: 500;
}

.main-nav-light a:hover {
  color: #ffffff;
}

/* Ambient Glow Animations */
@keyframes ambientGlow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.2; }
  33% { transform: translate(30px, -50px) scale(1.1); opacity: 0.35; }
  66% { transform: translate(-20px, 20px) scale(0.9); opacity: 0.25; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.2; }
}

.ambient-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: ambientGlow 15s infinite ease-in-out alternate;
}

/* Hero Section */
.ai-hero {
  position: relative;
  padding-top: 150px;
  padding-bottom: 100px;
  overflow: hidden;
}

.ai-hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.ai-headline {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 1.05;
  color: #ffffff;
  margin: 1.5rem 0;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 2px 4px rgba(0,0,0,0.5);
}

.ai-headline-gradient {
  background: linear-gradient(135deg, #fff 30%, #ffb347 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ai-subheadline {
  font-size: 1.25rem;
  color: #e3ded8;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  font-weight: 500;
}

.ai-eyebrow {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  background: rgba(255, 179, 71, 0.15);
  border: 1px solid rgba(255, 179, 71, 0.3);
  color: #ffc97a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  box-shadow: 0 0 20px rgba(255, 179, 71, 0.15);
}

/* Masterpiece Buy Button */
.ai-buy-btn-master {
  position: relative;
  background: linear-gradient(135deg, #ffb347 0%, #ff7300 100%);
  color: #1a0f00;
  border: none;
  font-size: 1.1rem;
  padding: 1.2rem 2.5rem;
  border-radius: 30px;
  font-weight: 800;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 10px 30px rgba(255, 115, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.4);
  z-index: 1;
}

.ai-buy-btn-master::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, #ffc97a 0%, #ff8c00 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.ai-buy-btn-master:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(255, 115, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.ai-buy-btn-master:hover::before {
  opacity: 1;
}

/* Bento Box Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(100px, auto);
  gap: 1.5rem;
  margin-top: 4rem;
}

.bento-card {
  position: relative;
  background: rgba(15, 10, 5, 0.65);
  border: 1px solid rgba(255, 180, 100, 0.15);
  border-radius: 24px;
  padding: 2.5rem;
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  z-index: 1;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 180, 100, 0.08), transparent 40%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.bento-card:hover {
  transform: translateY(-5px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 60px rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 180, 100, 0.4);
}

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

.bento-wide { grid-column: span 12; }
.bento-half { grid-column: span 6; }
.bento-third { grid-column: span 4; }

@media (max-width: 992px) {
  .bento-half { grid-column: span 12; }
  .bento-third { grid-column: span 12; }
}

.bento-content {
  position: relative;
  z-index: 2;
}

.bento-title {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  color: #ffffff;
  margin-bottom: 1rem;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.bento-text {
  color: #d8cfc6;
  line-height: 1.7;
  font-size: 1.1rem;
  font-weight: 500;
}

.bento-image-wrapper {
  margin-top: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.08);
}

.bento-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s ease;
}

.bento-card:hover .bento-image-wrapper img {
  transform: scale(1.03);
}

/* Tech Stack Redesign */
.tech-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  margin: 0.25rem;
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.tech-pill:hover {
  background: rgba(255, 179, 71, 0.15);
  border-color: rgba(255, 179, 71, 0.4);
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(255, 179, 71, 0.2);
}

