/* ==============================
   Fonts & Base
============================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

html, body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==============================
   Light & Dark Mode
============================== */
html.light, body.light {
  background-color: #ffffff;
  color: #0f172a; /* darker for better contrast */
}

html.dark, body.dark {
  background-color: #0f172a; /* slate-900 */
  color: #f8fafc;           /* slate-50 */
}

/* ==============================
   Headings & Typography
============================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  color: inherit;
}

p {
  font-weight: 400;
  line-height: 1.7;
  color: inherit;
}

/* --- Force good contrast for light mode where Tailwind classes were too light --- */
html.light #about p,
html.light #about .text-slate-300\/90,
html.light #about .text-slate-300\/80,
html.light #about .text-slate-300,
html.light #about .text-slate-200\/90,
html.light #about .text-slate-200,
html.light #contact p,
html.light #contact .text-slate-300\/90,
html.light #contact .text-slate-300\/80,
html.light #contact .text-slate-300,
html.light #contact .text-slate-200\/90,
html.light #contact .text-slate-200,
html.light #skills .text-slate-300\/90,
html.light #skills .text-slate-300\/80,
html.light #skills .text-slate-300 {
  color: #334155 !important; /* slate-700 */
}

/* Placeholder contrast */
html.light input::placeholder,
html.light textarea::placeholder { color: #64748b; } /* slate-500 */

html.dark input::placeholder,
html.dark textarea::placeholder { color: #94a3b8; }  /* slate-400 */

/* ==============================
   Buttons
============================== */
button, .btn-primary, .btn-glass {
  font-weight: 600;
  border-radius: 1rem;
  padding: 0.625rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background-color: rgba(255, 255, 255, 0.95);
  color: #0f172a;
}

html.dark button, html.dark .btn-primary, html.dark .btn-glass {
  background-color: rgba(30,41,59,0.85); /* slate-800/85 */
  color: #f8fafc;
}

button:hover, .btn-primary:hover, .btn-glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==============================
   Glass / Card
============================== */
.glass {
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: background-color 0.3s, border 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

html.light .glass {
  background-color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(180,180,180,0.35);
}

html.dark .glass {
  background-color: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255,255,255,0.12);
}

/* ==============================
   Hero & Images
============================== */
.hero-image {
  border-radius: 1.5rem;
  object-fit: cover;
  width: 100%;
  max-height: 500px;
  transition: transform 0.3s ease;
}

.hero-image:hover {
  transform: scale(1.03);
}

/* ==============================
   Forms & Inputs
============================== */
input, textarea {
  border-radius: 1rem;
  padding: 0.625rem 1rem;
  border: 1px solid #d1d5db;
  background-color: rgba(255,255,255,0.9);
  transition: all 0.3s ease;
  width: 100%;
  color: #0f172a;
}

html.dark input, html.dark textarea {
  background-color: rgba(30,41,59,0.8);
  border: 1px solid rgba(255,255,255,0.15);
  color: #f8fafc;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #6366F1;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.35);
}

/* ==============================
   Grid & Layout
============================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: 5rem 2rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 1024px) {
  #about .lg\:col-span-5 {
    height: 100%;
    display: flex;
    align-items: center;
  }
}

/* ==============================
   Icons
============================== */
i[data-lucide] {
  vertical-align: middle;
  transition: color 0.3s, transform 0.3s;
  color: inherit;
}

/* ==============================
   Links
============================== */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #6366F1;
}

/* ==============================
   Blockquote & HR
============================== */
blockquote {
  border-left: 4px solid #6366F1;
  padding-left: 1rem;
  color: #374151;
  font-style: italic;
}

hr {
  border: none;
  height: 1px;
  background: rgba(0,0,0,0.1);
  margin: 2rem 0;
}

/* ==============================
   Animated Background Blobs
============================== */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.35;
  animation: blobMove 20s infinite;
  z-index: -1;
}

html.dark .blob {
  opacity: 0.55;
}

@keyframes blobMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 50px) scale(1.2); }
}

/* ==============================
   Misc / Helpers
============================== */
.soft-shadow {
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* ==============================
    Mobile menu (hidden by default, slides in when active)
============================== */
#mobile-menu {
  max-width: 80%;
}

#mobile-menu.active {
  transform: translateX(0);
}
