/* ==========================================================================
   AMRITANSHU KR — Premium Dark Personal Portfolio Design System
   ========================================================================== */

/* --------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------- */
:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Dynamic Header Height */
  --header-height: 76px;

  /* Theme Palette (Premium Dark Theme Default) */
  --bg-primary: #0a0a0d;
  --bg-surface: #121319;
  --bg-surface-hover: #191b24;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.18);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-subtle: rgba(99, 102, 241, 0.18);
  
  --emerald: #10b981;
  --emerald-subtle: rgba(16, 185, 129, 0.15);
  
  --shadow-color: rgba(0, 0, 0, 0.6);
  --glow-1: rgba(99, 102, 241, 0.12);
  --glow-2: rgba(16, 185, 129, 0.08);

  /* Fluid Responsive Typography */
  --text-hero: clamp(2.25rem, 4.5vw, 4rem);
  --text-h1: clamp(1.875rem, 3.2vw, 2.75rem);
  --text-h2: clamp(1.5rem, 2.5vw, 2.25rem);
  --text-h3: clamp(1.125rem, 1.5vw, 1.375rem);

  /* Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Z-Index Hierarchy */
  --z-negative: -1;
  --z-elevate: 1;
  --z-sticky: 30;
  --z-header: 40;
  --z-drawer: 50;
  --z-modal-backdrop: 90;
  --z-modal: 100;
  --z-toast: 110;
  --z-cursor: 9999;
}

@media (max-width: 768px) {
  :root {
    --header-height: 68px;
    --text-hero: clamp(2rem, 7vw, 2.75rem);
  }
}

/* --------------------------------------------------
   2. GLOBAL RESET & BASE STYLES
   -------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  position: relative;
}

main, #main-content {
  padding-top: var(--header-height);
  min-width: 0;
  width: 100%;
}

section[id], article[id], div[id] {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

/* Core Color Tokens Utility Overrides */
.bg-primary { background-color: var(--bg-primary) !important; }
.bg-surface { background-color: var(--bg-surface) !important; }
.bg-surface-hover { background-color: var(--bg-surface-hover) !important; }
.border-subtle { border-color: var(--border-subtle) !important; }
.border { border-width: 1px; border-style: solid; }

.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-accent { color: var(--accent) !important; }
.text-emerald-400 { color: #34d399 !important; }
.text-emerald-500 { color: #10b981 !important; }

/* --------------------------------------------------
   3. LAYOUT CONTAINER UTILITIES
   -------------------------------------------------- */
.max-w-7xl, .page-container {
  width: min(100% - 2rem, 1280px);
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .max-w-7xl, .page-container {
    width: min(100% - 4rem, 1280px);
  }
}

/* --------------------------------------------------
   4. FIXED NAVBAR & RESPONSIVE HEADER
   -------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: var(--z-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(10, 10, 13, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  transition: background-color 0.25s ease;
}

.header-container {
  width: min(100% - 2rem, 1280px);
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .header-container {
    width: min(100% - 4rem, 1280px);
  }
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background-color: rgba(18, 19, 25, 0.85);
  backdrop-filter: blur(12px);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-link {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px var(--accent-subtle);
  white-space: nowrap;
}

.cta-btn svg {
  width: 16px;
  height: 16px;
}

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

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
}

@media (max-width: 1024px) {
  .desktop-nav {
    display: none !important;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
  }
}

/* Mobile Drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background-color: rgba(10, 10, 13, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  transition: all 0.25s ease;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.mobile-nav.open {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

/* --------------------------------------------------
   5. HERO SECTION — TWO COLUMN DESKTOP GRID
   -------------------------------------------------- */
.hero-section {
  position: relative;
  overflow: hidden;
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(3rem, 6vw, 6rem);
  min-height: calc(85vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: var(--z-negative);
}

.ambient-glow-1 {
  width: min(500px, 80vw);
  height: min(500px, 80vw);
  background: var(--glow-1);
  top: 5%;
  left: 10%;
}

.ambient-glow-2 {
  width: min(400px, 70vw);
  height: min(400px, 70vw);
  background: var(--glow-2);
  top: 25%;
  right: 10%;
}

/* Two Column Hero Grid System */
.hero-section .max-w-7xl > .grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  width: 100%;
}

@media (max-width: 1024px) {
  .hero-section .max-w-7xl > .grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Hero Left Column */
.hero-title {
  font-size: var(--text-hero) !important;
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: #f8fafc !important;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

/* CTA Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  background-color: var(--accent);
  color: #ffffff !important;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-subtle);
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-subtle);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  color: var(--text-primary) !important;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-active);
  transform: translateY(-1px);
}

/* Hero Right Column: Profile Card */
.hero-visual-card {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  position: relative;
}

@media (min-width: 1025px) {
  .hero-visual-card {
    margin-left: auto;
    margin-right: 0;
  }
}

.hero-visual-card > .relative {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: 0 20px 50px var(--shadow-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-social-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.profile-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.15s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.profile-social-btn svg {
  width: 16px;
  height: 16px;
}

.profile-social-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--bg-surface);
  transform: translateY(-2px);
}

/* --------------------------------------------------
   6. SECTION GRIDS & RESPONSIVE CARDS
   -------------------------------------------------- */
.specializations-section, .about-section, .work-section, 
.social-media-section, .design-section, .services-section, 
.experience-section, .skills-section, .building-section, 
.philosophy-section, .contact-section {
  padding-top: clamp(4rem, 7vw, 6rem);
  padding-bottom: clamp(4rem, 7vw, 6rem);
  width: 100%;
  position: relative;
}

/* General Grids */
.grid {
  display: grid;
  gap: 1.5rem;
}

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

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
}

.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: 1.75rem; }
.rounded-full { border-radius: var(--radius-full); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.gap-1 { gap: 0.25rem; }
.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; }

.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }

/* --------------------------------------------------
   7. TOASTS & CURSOR
   -------------------------------------------------- */
.toast-msg {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px var(--shadow-color);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  max-width: 90vw;
}

.toast-msg.success {
  background-color: #064e3b;
  color: #a7f3d0;
  border: 1px solid #059669;
}

.toast-msg.error {
  background-color: #7f1d1d;
  color: #fecaca;
  border: 1px solid #dc2626;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
}

.custom-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: calc(var(--z-cursor) - 1);
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

@media (pointer: coarse), (max-width: 1024px) {
  .custom-cursor, .custom-cursor-follower {
    display: none !important;
  }
}
