/* ==========================================================================
   PORTFOLIO STYLESHEET (Clean & Smooth UI)
   ========================================================================== */

/* --- CSS Variables & Themes (Apple Human Interface Guidelines) --- */
:root {
  /* Typography: Apple System Font Stack */
  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Helvetica Neue", "Inter", sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Helvetica Neue", "Plus Jakarta Sans", sans-serif;

  /* Transitions: Apple Deceleration & Fluid Motion Curves */
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Radii: Apple HIG Squircles & Pills */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 980px;
}

/* Dark Theme (Apple Space Black & OLED Midnight) */
[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #0c0d0f;
  --header-bg: rgba(0, 0, 0, 0.72);
  --card-bg: rgba(22, 22, 24, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(255, 255, 255, 0.18);
  
  --text-primary: #ffffff;
  --text-secondary: #86868b;
  --text-muted: #6e6e73;
  
  --accent: #0a84ff;
  --accent-light: #409cff;
  --accent-hover: #0071e3;
  --accent-glow: rgba(10, 132, 255, 0.22);
  --accent-gradient: linear-gradient(135deg, #0a84ff 0%, #2997ff 100%);
  
  --badge-bg: rgba(255, 255, 255, 0.06);
  --badge-text: #ffffff;
  --success: #30d158;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.65);
}

/* Light Theme (Apple Clean White & Titanium Silver) */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --header-bg: rgba(255, 255, 255, 0.82);
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(0, 0, 0, 0.06);
  --card-hover-border: rgba(0, 0, 0, 0.14);
  
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;
  
  --accent: #0071e3;
  --accent-light: #0077ed;
  --accent-hover: #0056b3;
  --accent-glow: rgba(0, 113, 227, 0.18);
  --accent-gradient: linear-gradient(135deg, #0071e3 0%, #0077ed 100%);
  
  --badge-bg: rgba(0, 0, 0, 0.04);
  --badge-text: #1d1d1f;
  --success: #34c759;
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

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

/* Typography & General */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.025em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  display: block;
}

.gradient-text {
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background: none;
  display: inline-block;
}
[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #0071e3 0%, #0056b3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Buttons & UI Elements (Apple Pill Style) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--accent-glow);
}
.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="light"] .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  transform: translateY(-1px);
}
[data-theme="light"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.14);
}
.btn-secondary:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.04);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}
[data-theme="light"] .icon-btn {
  background: rgba(0, 0, 0, 0.04);
}
.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
}
[data-theme="light"] .icon-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* Cards & Glassmorphism (Apple Materials & Vibrancy) */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}
.glass-card {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.06), var(--shadow-card);
}
[data-theme="light"] .glass-card {
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.8), var(--shadow-card);
}
.card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* --- Header & Navbar --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo-accent {
  color: var(--accent);
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-smooth);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-only {
  display: none;
}

/* Mobile Menu Drawer */
.mobile-menu {
  display: none;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 24px;
}
.mobile-menu.active {
  display: block;
}
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-nav-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px 0;
}
.mobile-nav-link:hover {
  color: var(--accent);
}

/* --- Section Shared Styles --- */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 56px auto;
}

.section-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--badge-text);
  background: var(--badge-bg);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.3rem;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* --- Hero Section --- */
.hero-section {
  padding-top: 140px;
  padding-bottom: 100px;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.badge-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--badge-text);
  margin-bottom: 24px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 3.2rem;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 2.2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.typewriter-text {
  color: var(--accent);
  font-weight: 700;
  margin-left: 6px;
}

.typewriter-cursor {
  color: var(--accent);
  font-weight: 300;
  animation: blink 0.8s infinite;
}

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

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.15rem;
  transition: all var(--transition-smooth);
}
.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  background: var(--badge-bg);
}

/* Hero Avatar */
.hero-visual {
  display: flex;
  justify-content: center;
}

.avatar-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
}

.avatar-glow {
  position: absolute;
  inset: -10px;
  background: var(--accent-gradient);
  border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  filter: blur(24px);
  opacity: 0.45;
  animation: morph-glow 8s ease-in-out infinite alternate;
  z-index: 1;
}

.avatar-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
  border: 3px solid var(--card-border);
  box-shadow: var(--shadow-card);
  animation: morph-shape 8s ease-in-out infinite alternate;
}

@keyframes morph-glow {
  0% { border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%; }
  100% { border-radius: 63% 37% 38% 62% / 56% 59% 41% 44%; }
}

@keyframes morph-shape {
  0% { border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%; }
  100% { border-radius: 63% 37% 38% 62% / 56% 59% 41% 44%; }
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 32px;
}

.about-bio {
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.about-bio p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.stat-card {
  padding: 26px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-heading);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Skills Section --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.skill-category-card {
  padding: 32px 28px;
}

.category-title {
  font-size: 1.25rem;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.skill-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.skill-name-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skill-icon {
  font-size: 1.25rem;
  color: var(--accent);
  width: 24px;
  text-align: center;
}

.skill-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.skill-level-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--badge-bg);
  color: var(--badge-text);
}

/* --- Projects Section & Filter Controls (Apple Segmented Controls) --- */
.filter-tabs {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--radius-full);
  gap: 4px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  max-width: 100%;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
[data-theme="light"] .filter-tabs {
  background: rgba(0, 0, 0, 0.04);
}

.filter-tab {
  padding: 7px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  font-family: var(--font-heading);
}
.filter-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .filter-tab:hover {
  background: rgba(0, 0, 0, 0.04);
}
.filter-tab.active {
  background: #2c2c2e;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-weight: 600;
}
[data-theme="light"] .filter-tab.active {
  background: #ffffff;
  color: #1d1d1f;
  border-color: rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.project-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.add-portfolio-card {
  border: 2px dashed var(--accent) !important;
  background: rgba(99, 102, 241, 0.04) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 32px 24px !important;
  min-height: 380px !important;
  transition: all var(--transition-normal) !important;
}
.add-portfolio-card:hover {
  background: rgba(99, 102, 241, 0.08) !important;
  border-color: var(--accent) !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 30px var(--accent-glow) !important;
}
[data-theme="light"] .add-portfolio-card {
  background: rgba(99, 102, 241, 0.03) !important;
}
[data-theme="light"] .add-portfolio-card:hover {
  background: rgba(99, 102, 241, 0.07) !important;
}

.project-img-wrapper {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-badge-featured {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.project-content {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}
.project-link:hover {
  color: var(--accent);
}

/* --- Experience & Timeline Section --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 31px;
  width: 2px;
  height: 100%;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-left: 76px;
  margin-bottom: 40px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-icon {
  position: absolute;
  top: 0;
  left: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 0 12px var(--accent-glow);
  z-index: 2;
}

.timeline-card {
  padding: 24px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.timeline-role {
  font-size: 1.15rem;
  font-weight: 700;
}

.timeline-period {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--badge-bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.timeline-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
  font-weight: 500;
}

.timeline-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
}

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

.info-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.info-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--badge-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.info-details h4 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-details a, .info-details p {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.social-links-compact {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.social-links-compact a {
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}
.social-links-compact a:hover {
  color: var(--accent);
}

.contact-form-wrapper {
  padding: 36px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255, 255, 255, 0.07);
}
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus,
[data-theme="light"] .form-group select:focus {
  background: #ffffff;
}

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

.form-error {
  color: #ef4444;
  font-size: 0.8rem;
  min-height: 18px;
}

.submit-btn {
  align-self: flex-start;
  margin-top: 4px;
}

.form-status {
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
}
.form-status.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
}
.form-status.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #ef4444;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  background: var(--bg-secondary);
}

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

.footer-left p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-subtext {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  margin-top: 4px;
}

.back-to-top-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition-smooth);
}
.back-to-top-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-4px);
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-subtitle {
    justify-content: center;
  }
  .hero-tagline {
    margin: 0 auto 32px auto;
  }
  .hero-buttons {
    justify-content: center;
  }
  .social-links {
    justify-content: center;
  }
  .hero-visual {
    order: -1;
  }
  .avatar-wrapper {
    width: 240px;
    height: 240px;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 12px;
    gap: 8px;
  }
  .search-container {
    margin: 0 8px !important;
    max-width: none !important;
  }
  .search-input-field {
    font-size: 0.82rem !important;
    padding: 7px 12px 7px 32px !important;
  }
  #authNavText {
    display: none;
  }
  #authNavBtn {
    padding: 8px 12px !important;
  }
  .desktop-nav {
    display: none;
  }
  .nav-links {
    display: none;
  }
  .mobile-only {
    display: flex;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.3rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .about-stats {
    grid-template-columns: 1fr;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .timeline::before {
    left: 21px;
  }
  .timeline-item {
    padding-left: 56px;
  }
  .timeline-icon {
    left: 4px;
  }
}

@media (max-width: 480px) {
  .brand-logo {
    font-size: 1.15rem;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-buttons .btn {
    width: 100%;
  }
  .contact-form-wrapper {
    padding: 24px;
  }
}

/* ==========================================================================
   INSTAGRAM-STYLE LIVE SEARCH DROPDOWN
   ========================================================================== */
.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.search-clear-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .search-clear-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.search-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 380px;
  overflow-y: auto;
  background: #18191d;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65);
  z-index: 99999;
  animation: searchDropdownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .search-dropdown-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.16);
}

@keyframes searchDropdownFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-dropdown-header {
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .search-dropdown-header {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

[data-theme="light"] .search-result-item {
  border-bottom-color: rgba(0, 0, 0, 0.04);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .search-result-item:hover,
[data-theme="light"] .search-result-item.selected {
  background: rgba(0, 0, 0, 0.05);
}

.search-result-item.exact-match {
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid #10b981;
}

.search-result-item.exact-match:hover,
.search-result-item.exact-match.selected {
  background: rgba(16, 185, 129, 0.15);
}

.search-result-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.search-result-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.search-result-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-result-username {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-exact-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.search-empty-state {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}
