/*
 * style.css - 100% Hand-Crafted Premium Custom CSS for Kamran Liaquat Portfolio
 * "Navy, Gold & Slate" academic-tech theme.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* Theme Variables Definition */
:root {
  /* BRAND COLOR PALETTE (CSS Variables) - Light Mode Defaults */
  --primary: #1e3a8a;          /* Deep Navy Blue */
  --primary-light: #2563eb;    /* Interactive Royal Blue */
  --primary-dark: #0f172a;     /* Deep Slate / Midnight */
  --accent: #d97706;           /* Premium Gold/Amber Accent */
  --accent-hover: #b45309;     /* Deep Gold */
  --bg-light: #f8fafc;         /* Soft Off-White Slate */
  --bg-card: #ffffff;          /* Pure White Cards */
  --text-main: #334155;        /* Slate Gray for paragraphs */
  --text-heading: #0f172a;     /* Dark Navy Slate for titles */
  --text-muted: #64748b;       /* Muted Slate Gray */
  --border-color: #e2e8f0;     /* Light Slate Border */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1);
  --shadow-gold: 0 10px 15px -3px rgba(217, 119, 6, 0.15);

  /* Fonts */
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Legacy layout mappings for backwards compatibility with existing stylesheet classes */
  --bg-base: var(--bg-light);
  --bg-surface: var(--bg-card);
  --bg-surface-hover: rgba(15, 23, 42, 0.03);
  --border: var(--border-color);
  --border-focus: var(--primary-light);
  --text-primary: var(--text-heading);
  --text-secondary: var(--text-main);
  --card-shadow: var(--shadow-md);
  
  --success: #10b981;
  --warning: #f59e0b;
  --accent-glow: rgba(30, 58, 138, 0.15);
  --accent-secondary: var(--primary-light);
  --accent-sec-glow: rgba(37, 99, 235, 0.1);
}

/* DOCK-MODE / DARK MODE OVERRIDES */
[data-theme="dark"], body.dark-mode {
  --primary: #3b82f6;          /* Bright Sky Blue */
  --primary-light: #60a5fa;
  --primary-dark: #020617;     /* Midnight Black */
  --accent: #f59e0b;           /* Bright Vibrant Gold */
  --bg-light: #030712;         /* Deep Charcoal Black */
  --bg-card: #0b0f19;          /* Deep Slate Navy Card */
  --text-main: #94a3b8;        /* Light Soft Gray */
  --text-heading: #f8fafc;     /* Clean Off-White */
  --border-color: #1e293b;     /* Dark Slate Border */

  /* Legacy mappings adjusted for dark mode */
  --bg-base: var(--bg-light);
  --bg-surface: var(--bg-card);
  --bg-surface-hover: rgba(248, 250, 252, 0.03);
  --border: var(--border-color);
  --border-focus: var(--primary);
  --text-primary: var(--text-heading);
  --text-secondary: var(--text-main);
  --card-shadow: var(--shadow-lg);
  
  --accent-glow: rgba(245, 158, 11, 0.15);
  --accent-secondary: var(--primary-light);
  --accent-sec-glow: rgba(96, 165, 250, 0.1);
}

/* Base Styles & Custom Scrollbar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-base);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-weight: 800;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Loading Screen / Page Preloader */
.loader-wrapper, #loading-screen {
  position: fixed;
  inset: 0;
  background-color: #0f172a; /* Dark slate background */
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.loader-container {
  text-align: center;
  font-family: var(--font-mono);
  color: var(--accent);
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(217, 119, 6, 0.1);
  border-top: 4px solid #d97706; /* Spinning golden border-top-color */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
  box-shadow: 0 0 15px rgba(217, 119, 6, 0.2);
}

.loader-text {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: pulse 1.5s infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Layout Container utility */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Sticky Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  z-index: 1000;
  background-color: rgba(3, 7, 18, 0.7);
  border-b: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] header {
  background-color: rgba(255, 255, 255, 0.8);
}

header.scrolled {
  height: 70px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Theme Switcher Toggle styling */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border);
  transition: .4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-primary);
  transition: .4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 2;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider::before {
  transform: translateX(24px);
  background-color: #ffffff;
}

.slider-icons {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  pointer-events: none;
  z-index: 1;
}

.slider-icons svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
}

/* Hamburger Menu (Mobile Only) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 10%;
  right: 5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero .container {
  display: grid;
  grid-template-cols: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.badge-tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background-color: var(--accent-glow);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tag span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -1.5px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent);
  min-height: 28px;
}

.hero-text {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 12px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

/* Button UI Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

.btn-outline-glow {
  background-color: rgba(37, 99, 235, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.btn-outline-glow:hover {
  background-color: rgba(37, 99, 235, 0.1);
  border-color: var(--accent);
  box-shadow: 0 6px 20px var(--accent-glow);
  transform: translateY(-2px);
}

/* Profile Image Box */
.profile-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-hex {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 30px;
  padding: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  box-shadow: 0 20px 50px var(--accent-glow);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

.profile-hex-inner {
  width: 100%;
  height: 100%;
  background-color: var(--bg-surface);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.profile-hex-inner img {
  width: 100%;
  height: 100%;
  object-cover: cover;
  transition: transform 0.5s ease;
}

.profile-hex:hover .profile-hex-inner img {
  transform: scale(1.05);
}

.profile-status-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.profile-status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
}

/* Section Title styling */
.section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 2px;
}

.section-title {
  position: relative;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  padding-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* About Section bento grid layout */
.about-bento {
  display: grid;
  grid-template-cols: 1.2fr 0.8fr;
  gap: 32px;
}

.about-bento-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bento-row {
  display: grid;
  grid-template-cols: repeat(2, 1fr);
  gap: 24px;
}

.bento-highlight-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-color: rgba(37, 99, 235, 0.2);
}

.about-paragraphs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.about-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin-top: 8px;
}

.about-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
}

.about-features-list svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
}

.stat-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-cols: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.service-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 15px 35px var(--accent-glow);
}

.service-icon-box {
  background-color: var(--bg-base);
  border: 1px solid var(--border);
  color: var(--accent);
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.service-card:hover .service-icon-box {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.service-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Highlighted / Featured Project Details styling */
.projects-grid {
  display: grid;
  grid-template-cols: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.projects-grid-full {
  grid-column: 1 / -1;
  margin-bottom: 24px;
}

.featured-project-card {
  background: linear-gradient(135deg, rgba(11, 15, 25, 1) 0%, rgba(3, 7, 18, 1) 100%);
  border: 2px solid var(--accent);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px var(--accent-glow);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-cols: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.featured-project-card::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 75%);
  pointer-events: none;
}

.badge-featured {
  position: absolute;
  top: 24px;
  right: 24px;
  background-color: var(--accent);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  background-color: var(--bg-surface-hover);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
}

.featured-project-card .tech-tag {
  border-color: rgba(37, 99, 235, 0.3);
  background-color: rgba(37, 99, 235, 0.05);
  color: var(--text-primary);
}

.project-buttons {
  display: flex;
  gap: 12px;
}

.project-visual {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 240px;
  color: var(--accent);
}

.project-visual svg {
  margin-bottom: 16px;
  stroke-width: 1.5;
}

/* Standard Project Card styling */
.project-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-focus);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Skills Section progress grids */
.skills-container {
  display: grid;
  grid-template-cols: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.skill-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.skill-name {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-percentage {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.progress-track {
  width: 100%;
  height: 8px;
  background-color: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-secondary) 100%);
  border-radius: 10px;
  transition: width 1.5s cubic-bezier(0.1, 0.9, 0.2, 1);
}

/* Warning & Ethics statement box styling */
.ethics-section {
  padding: 60px 0;
  background-color: rgba(239, 68, 68, 0.03);
  border-top: 1px solid rgba(239, 68, 68, 0.15);
  border-bottom: 1px solid rgba(239, 68, 68, 0.15);
}

.ethics-card {
  background-color: var(--bg-surface);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.05);
  display: flex;
  align-items: center;
  gap: 24px;
}

.ethics-icon {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ethics-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 4px;
}

.ethics-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 500;
}

/* Contact layout forms */
.contact-bento {
  display: grid;
  grid-template-cols: 0.8fr 1.2fr;
  gap: 32px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.contact-icon-box {
  background-color: var(--bg-base);
  color: var(--accent);
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card:hover .contact-icon-box {
  background-color: var(--accent);
  color: #ffffff;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.contact-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Contact Form UI Input styling */
.contact-form-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--card-shadow);
}

.form-grid {
  display: grid;
  grid-template-cols: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  background-color: var(--bg-base);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  font-size: 0.85rem;
  border-radius: 10px;
  outline: none;
  font-family: var(--font-sans);
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px var(--accent-glow);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Form validation styling states */
.form-control.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 4px;
  display: none;
}

/* Scroll Animations CSS classes via Intersection Observer */
.reveal {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
  transform: translateY(40px);
}

.reveal.slide-up {
  transform: translateY(50px);
}

.reveal.zoom-in {
  transform: scale(0.92);
}

.reveal.active {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Hover-Float helper class for premium micro-interactions */
.hover-float,
.about-bento-card,
.service-card,
.project-card,
.skill-card,
.contact-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.hover-float:hover,
.about-bento-card:hover,
.service-card:hover,
.project-card:hover,
.skill-card:hover,
.contact-card:hover {
  transform: translateY(-8px) !important;
  border-color: var(--accent) !important;
  box-shadow: var(--shadow-lg), var(--shadow-gold) !important;
}

/* Stagger animation helpers */
.stagger-container {
  /* Handled by JS appending transition-delays dynamically to dzieci (children) */
}

/* Scroll To Top button styling */
#scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--accent);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--accent-glow);
  cursor: pointer;
  z-index: 99;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(100px);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scroll-to-top.visible {
  transform: translateY(0);
  opacity: 1;
}

#scroll-to-top:hover {
  transform: translateY(-3px);
  background-color: var(--accent-secondary);
  box-shadow: 0 6px 20px var(--accent-sec-glow);
}

/* Typing cursor */
.typing-cursor::after {
  content: '|';
  display: inline-block;
  color: var(--accent);
  animation: cursor-blink 0.8s step-end infinite;
  margin-left: 2px;
}

@keyframes cursor-blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

/* Footer Section styling */
footer {
  border-t: 1px solid var(--border);
  background-color: var(--bg-surface);
  padding: 48px 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.connect-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
}

.connect-socials {
  display: flex;
  gap: 16px;
}

.connect-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-base);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.connect-icon-link:hover {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--accent-glow);
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Custom Success modal popup overlays */
#success-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: var(--card-shadow);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#success-modal.active .modal-content {
  transform: scale(1);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.modal-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Breakpoints & Responsive Adaptations */
@media (max-width: 991px) {
  html {
    font-size: 15px;
  }
  
  .hero .container {
    grid-template-cols: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .badge-tag {
    align-self: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .about-bento {
    grid-template-cols: 1fr;
  }
  
  .featured-project-card {
    grid-template-cols: 1fr;
    padding: 32px;
  }
  
  .featured-project-card .project-visual {
    height: 180px;
  }
  
  .contact-bento {
    grid-template-cols: 1fr;
  }
}

@media (max-width: 768px) {
  header {
    height: 70px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: 40px 24px;
    gap: 20px;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
  }
  
  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    width: 100%;
    text-align: center;
    padding: 10px 0;
  }
  
  .theme-switch-wrapper {
    margin-right: 12px;
  }
  
  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.85rem;
  }
  
  .hero {
    padding-top: 100px;
    padding-bottom: 40px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .profile-hex {
    width: 260px;
    height: 260px;
    margin: 0 auto;
  }
  
  .form-grid {
    grid-template-cols: 1fr;
    gap: 0;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.1rem;
  }

  .section-title {
    font-size: 1.65rem;
  }

  .container {
    padding: 0 16px;
  }

  .profile-hex {
    width: 220px;
    height: 220px;
  }

  .stat-grid, .services-grid, .skills-grid {
    grid-template-cols: 1fr;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
}

/* ==========================================
   BLOG / INTEL HUB SPECIFIC PREMIUM STYLES
   ========================================== */

.blog-grid {
  display: grid;
  grid-template-cols: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 40px;
  margin-bottom: 48px;
}

.blog-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.blog-image {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.08) 0%, rgba(217, 119, 6, 0.05) 100%);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

[data-theme="dark"] .blog-image {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.blog-badge-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-card);
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .blog-badge-icon {
  color: var(--accent);
  background-color: #0f172a;
}

.blog-card:hover .blog-badge-icon {
  transform: scale(1.1) rotate(4deg);
  color: var(--accent);
}

.blog-date {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.blog-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.blog-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.4;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
  color: var(--primary-light);
}

.blog-excerpt {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-light);
  text-decoration: none;
  transition: gap 0.3s ease, color 0.3s ease;
  margin-top: auto;
}

.blog-read-more:hover {
  color: var(--accent);
  gap: 12px;
}

.blog-view-all {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* Search and Filters */
.blog-search-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 700px;
  margin: 0 auto 40px;
}

.blog-search-row {
  position: relative;
  display: flex;
  align-items: center;
}

.blog-search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.blog-search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.blog-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-sec-glow);
}

.blog-filter-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.filter-btn.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Individual Post Detail View styling */
.blog-post-detail {
  display: none; /* Controlled by JavaScript hash-navigation */
  max-width: 800px;
  margin: 0 auto;
}

.blog-post-detail.active {
  display: block;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 32px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.blog-back-link:hover {
  color: var(--accent);
  transform: translateX(-4px);
}

.post-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.post-meta-top {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.post-tag {
  background-color: var(--accent-sec-glow);
  color: var(--primary-light);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

.post-title {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--accent);
}

.post-author-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.post-author-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
}

.post-content-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-content-body p {
  margin-bottom: 24px;
}

.post-content-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 16px;
}

.post-content-body ul, .post-content-body ol {
  margin-bottom: 24px;
  padding-left: 20px;
}

.post-content-body li {
  margin-bottom: 8px;
}

.post-content-body code {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background-color: var(--bg-base);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.post-content-body pre {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 28px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.02);
}

.post-content-body pre code {
  background-color: transparent;
  border: none;
  padding: 0;
  color: var(--text-primary);
}

.post-quote {
  border-left: 4px solid var(--accent);
  background-color: var(--bg-surface);
  padding: 16px 24px;
  border-radius: 0 12px 12px 0;
  margin: 32px 0;
  font-style: italic;
}

.post-quote p {
  margin-bottom: 0;
  color: var(--text-primary);
}

.post-banner-accent {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(217, 119, 6, 0.03) 100%);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 32px 0;
}

@media (max-width: 768px) {
  .post-title {
    font-size: 1.95rem;
  }
}

