/* Editorial Aesthetic Stylesheet - Monochrome Portfolio */

:root {
  --bg-main: #ffffff;
  --bg-subtle: #f8f8f8;
  --bg-card: #fafafa;
  --bg-dark: #111111;
  --text-main: #0a0a0a;
  --text-muted: #666666;
  --text-light: #999999;
  --border-light: #e5e5e5;
  --border-dark: #262626;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html.dark {
  --bg-main: #09090b;
  --bg-subtle: #141417;
  --bg-card: #121215;
  --bg-dark: #000000;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-light: #71717a;
  --border-light: #27272a;
  --border-dark: #3f3f46;
  color-scheme: dark;
}

html.dark body {
  background-color: #09090b !important;
  color: #f4f4f5 !important;
}

html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6 {
  color: #ffffff !important;
}

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

html, body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Typography Utilities */
h1, h2, h3, h4, h5 {
  font-weight: 500;
  letter-spacing: -0.03em;
}

.font-serif {
  font-family: var(--font-serif);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Base Layout Classes */
.max-w-7xl {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

/* Grid & Flexbox Utilities */
.grid { display: grid; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Bento Item Cards */
.bento-card {
  border: 1px solid var(--border-light);
  background-color: #fafafa;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.bento-card:hover {
  border-color: #000000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.bento-card-dark {
  background-color: var(--bg-dark);
  color: #ffffff;
  border-color: var(--border-dark);
}

.bento-card-dark:hover {
  border-color: #ffffff;
  background-color: #000000;
}

.bento-hero {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .bento-hero {
    grid-column: span 2;
  }
}

/* Image Cover Frames */
.card-img-frame {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: #e5e5e5;
  border: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
}

.bento-hero .card-img-frame {
  aspect-ratio: 16/9;
}

.card-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: transform 0.6s ease, filter 0.6s ease;
}

.bento-card:hover .card-img-frame img {
  filter: grayscale(0%);
  transform: scale(1.04);
}

/* Rectangular Tags & Badges */
.badge-rect {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background-color: #eee;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-main);
}

.badge-rect-dark {
  background-color: #222;
  color: #eee;
}

/* Modal Overlay & Forms */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content {
  background-color: #121212;
  border: 1px solid #2a2a2a;
  color: #ffffff;
  border-radius: 1rem;
  width: 100%;
  max-width: 72rem;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* Inputs & Form Styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #1a1a1a;
  border: 1px solid #333333;
  color: #ffffff;
  border-radius: 0.375rem;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: #ffffff;
}

.light-input {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

.light-input:focus {
  border-color: #000000;
}

.dark .light-input,
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="url"],
.dark select,
.dark textarea {
  background-color: #171717 !important;
  border-color: #262626 !important;
  color: #f5f5f5 !important;
}

.dark .light-input:focus,
.dark input:focus,
.dark select:focus,
.dark textarea:focus {
  border-color: #ffffff !important;
}

.dark .bento-card {
  background-color: #0f0f0f;
  border-color: #262626;
  color: #f5f5f5;
}

.dark .bento-card:hover {
  border-color: #ffffff;
}

.dark .card-img-frame {
  background-color: #171717;
  border-color: #262626;
}

/* Buttons */
.btn-black {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background-color: #000000;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.btn-black:hover {
  opacity: 0.85;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background-color: transparent;
  color: #000000;
  border: 1px solid #000000;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.btn-outline:hover {
  background-color: #000000;
  color: #ffffff;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #121212;
}
::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 3px;
}
