/* ===================================
   GK Solutions - Main Stylesheet
   =================================== */

/* CSS Custom Properties / Design Tokens */
:root {
  /* Light theme (default) */
  --bg: #f8fafc;
  --bg-gradient-start: #ffffff;
  --bg-gradient-end: #f1f5f9;
  --card: #ffffff;
  --muted: #64748b;
  --text: #0f172a;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --glass: rgba(15, 23, 42, 0.03);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(15, 23, 42, 0.08);
  --nav-bg: transparent;
  --nav-border: rgba(15, 23, 42, 0.06);
  --code-bg: #1e293b;
  --code-text: #f8fafc;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-lg: 16px;
  --radius-md: 12px;

  /* Tutorial Design Tokens */
  --call-green-bg: rgba(16, 185, 129, 0.06);
  --call-green-border: rgba(16, 185, 129, 0.2);
  --call-yellow-bg: rgba(245, 158, 11, 0.06);
  --call-yellow-border: rgba(245, 158, 11, 0.2);
  --call-pink-bg: rgba(236, 72, 153, 0.06);
  --call-pink-border: rgba(236, 72, 153, 0.2);
  --sidebar-bg: var(--bg);
  --sidebar-border: var(--nav-border);
}

/* Dark theme overrides */
.dark-theme {
  --bg: #030712;
  --bg-gradient-start: #030712;
  --bg-gradient-end: #0f172a;
  --card: #0f172a;
  --muted: #94a3b8;
  --text: #f8fafc;
  --accent-cyan: #22d3ee;
  --accent-pink: #fb7185;
  --accent-green: #34d399;
  --accent-yellow: #fbbf24;
  --glass: rgba(255, 255, 255, 0.02);
  --glass-bg: rgba(15, 23, 42, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.03);
  --nav-border: rgba(255, 255, 255, 0.08);
  --code-bg: #000000;
  --code-text: var(--text);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);

  /* Dark Tutorial Design Tokens */
  --call-green-bg: rgba(52, 211, 153, 0.08);
  --call-green-border: rgba(52, 211, 153, 0.3);
  --call-yellow-bg: rgba(251, 191, 36, 0.08);
  --call-yellow-border: rgba(251, 191, 36, 0.3);
  --call-pink-bg: rgba(251, 113, 133, 0.08);
  --call-pink-border: rgba(251, 113, 133, 0.3);
}

/* ===================================
   Global Styles
   =================================== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  background: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 300ms ease, color 300ms ease;
}

h1,
h2,
h3,
h4,
h5,
h6,
.site-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ===================================
   Header / Hero Section
   =================================== */
header {
  padding: 3.5rem 1.25rem;
  text-align: center;
  background-image: radial-gradient(circle at 10% 10%, rgba(0, 245, 255, 0.06), transparent 10%),
    radial-gradient(circle at 85% 35%, rgba(255, 45, 149, 0.04), transparent 12%);
}

.site-title {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.6px;
  margin: 0;
}

.site-sub {
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ===================================
   Navigation
   =================================== */
nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 1rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  background: var(--nav-bg);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid var(--nav-border);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
}

nav a:hover {
  background: var(--glass-bg);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

nav a.active {
  color: #fff;
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* ===================================
   Main Content Area
   =================================== */
main {
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
  flex: 1;
}

/* ===================================
   Department Cards (Index Page)
   =================================== */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.dept-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--nav-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.dept-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-cyan);
}

/* Neon outlines using pseudo-elements */
.dept-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.2);
}

.neon-cse::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0% 0%, rgba(6, 182, 212, 0.1), transparent 70%);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.neon-ai::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0% 0%, rgba(236, 72, 153, 0.1), transparent 70%);
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.neon-ece::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.1), transparent 70%);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.neon-robotics::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.1), transparent 70%);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.dept-card>* {
  position: relative;
  z-index: 1;
}

.dept-name {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.dept-desc {
  font-size: 0.86rem;
  color: var(--muted);
}

/* ===================================
   Projects Area
   =================================== */
.projects-area {
  margin-top: 2rem;
}

.projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.project-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--nav-border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-pink);
}

.project-thumb {
  height: 140px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
}

.project-title {
  font-weight: 700;
  margin-top: 0.6rem;
}

.project-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.project-actions {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.5rem;
}

/* ===================================
   Buttons
   =================================== */
.btn {
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.btn-outline {
  border: 2px solid rgba(0, 0, 0, 0.06);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: white;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-pink));
  color: #001;
  border: none;
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

/* ===================================
   Contact Page Styles
   =================================== */
.contact-page {
  background: linear-gradient(135deg, #0f172a, #1e3a8a, #2563eb);
  background-size: 300% 300%;
  animation: gradientMove 8s ease infinite;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.contact-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  box-sizing: border-box;
  margin: 2rem auto 90px;
}

.contact-card h2 {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.contact-card p {
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.input-group {
  position: relative;
  width: 100%;
}

.input-group i {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
}

input,
textarea {
  width: 100%;
  padding: 0.8rem 0.8rem 0.8rem 2.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  background-color: var(--card);
  color: var(--text);
  box-sizing: border-box;
  transition: background 0.3s ease, transform 0.2s;
  font-family: 'Inter', sans-serif;
}

input::placeholder,
textarea::placeholder {
  color: #cbd5e1;
}

input:focus,
textarea:focus {
  background-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.02);
}

button[type='submit'] {
  padding: 0.8rem;
  background: linear-gradient(90deg, #00f2fe, #4facfe);
  color: #0f172a;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px #00f2fe;
  width: 100%;
  font-family: 'Inter', sans-serif;
}

button[type='submit']:hover {
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  box-shadow: 0 0 20px #00f2fe, 0 0 40px #4facfe;
  transform: translateY(-2px);
}

.popup {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #4ade80;
  color: #065f46;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  animation: fadeIn 0.5s ease;
  z-index: 1000;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Bottom Navigation Bar
   =================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-around;
  padding: 0.6rem 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 100;
}

.bottom-nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: 0.3s;
}

.bottom-nav a i {
  font-size: 1.2rem;
}

.bottom-nav a:hover {
  color: #38bdf8;
  transform: scale(1.1);
}

.bottom-nav a.active {
  color: #00f2fe;
  text-shadow: 0 0 10px #00f2fe;
}

/* ===================================
   Utility Classes
   =================================== */
.muted {
  color: var(--muted);
}

.hidden {
  display: none;
}

/* ===================================
   Footer
   =================================== */
footer {
  padding: 1.2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet */
@media (max-width: 900px) {
  .dept-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Mobile */
@media (max-width: 520px) {
  .dept-grid {
    grid-template-columns: 1fr;
  }

  .projects-list {
    grid-template-columns: 1fr;
  }

  header {
    padding: 2rem 1rem;
  }

  .site-title {
    font-size: 1.6rem;
  }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1rem 0.5rem;
    gap: 8px;
    overflow-x: visible;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  /* Wrap links properly on mobile */
  nav a {
    white-space: normal;
    font-size: 0.9rem;
    padding: 8px 14px;
    flex-grow: 0;
  }

  .projects-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .bottom-nav a {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .bottom-nav a {
    font-size: 0.75rem;
  }

  .bottom-nav a i {
    font-size: 1rem;
  }
}

/* Code block and inline code styling (override inline styles for readability) */
pre,
code,
kbd,
samp {
  background: var(--code-bg) !important;
  color: var(--code-text) !important;
  padding: 0.35rem 0.55rem !important;
  border-radius: 8px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', monospace !important;
  font-size: 0.95rem !important;
}

pre {
  padding: 1rem !important;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

/* Tutorial Layout */
.tutorial-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.tutorial-sidebar {
  width: 280px;
  position: sticky;
  top: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.tutorial-content {
  flex: 1;
  max-width: 820px;
  background: var(--card);
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--nav-border);
  box-shadow: var(--shadow-md);
}

.tutorial-sidebar h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--nav-border);
}

.tutorial-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tutorial-nav-item a {
  display: block;
  padding: 0.7rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  margin-bottom: 4px;
}

.tutorial-nav-item a:hover {
  background: var(--glass);
  color: var(--accent-cyan);
  transform: translateX(4px);
}

.tutorial-nav-item.active a {
  background: rgba(6, 182, 212, 0.08);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.2);
  font-weight: 600;
}

/* Callout Boxes */
.callout {
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  border-left: 5px solid transparent;
  box-shadow: var(--shadow-sm);
}

.callout h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.callout p {
  margin: 0;
  line-height: 1.7;
}

.callout-tip {
  background: var(--call-green-bg);
  border-color: var(--accent-green);
  color: var(--text);
}

.callout-note {
  background: var(--call-yellow-bg);
  border-color: var(--accent-yellow);
  color: var(--text);
}

.callout-warning {
  background: var(--call-pink-bg);
  border-color: var(--accent-pink);
  color: var(--text);
}

/* Code block "Copy" button */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

pre:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive Tutorial */
@media (max-width: 1000px) {
  .tutorial-container {
    flex-direction: column;
  }

  .tutorial-sidebar {
    width: 100%;
    position: relative;
    top: 0;
    max-height: none;
  }
}

.site-title {
  color: var(--text);
}

.site-sub {
  color: var(--muted);
}