/* ==========================================================================
   THEME TOKENS & DESIGN VARIABLES
   ========================================================================== */
:root {
  /* Dark Mode Palette (Default) */
  --bg: #0b0f1a;
  --bg-alt: #101626;
  --surface: #141b2f;
  --surface-2: #1c253f;
  --surface-hover: #222d4c;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(108, 140, 255, 0.45);
  --text: #e7eaf5;
  --text-muted: #9aa3bd;
  --primary: #6c8cff;
  --primary-2: #9d68ff;
  --accent: #2fe3b2;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.45);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-pill: 9999px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --nav-height: 76px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] {
  /* Light Mode Palette */
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --surface-hover: #e2e8f0;
  --border: rgba(15, 23, 42, 0.09);
  --border-focus: rgba(68, 102, 242, 0.45);
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #4466f2;
  --primary-2: #8445f7;
  --accent: #0ca678;
  --shadow-sm: 0 4px 12px rgba(30, 41, 90, 0.06);
  --shadow: 0 12px 30px rgba(30, 41, 90, 0.08);
  --shadow-lg: 0 20px 45px rgba(30, 41, 90, 0.12);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

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

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

ul, ol {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* ==========================================================================
   BACKGROUND ORBS (Atmospheric Lighting)
   ========================================================================== */
.bg-gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  z-index: -1;
  pointer-events: none;
  transform: translateZ(0);
}
:root[data-theme="light"] .bg-gradient-orb {
  opacity: 0.12;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: var(--primary);
  top: -100px;
  left: -120px;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: var(--primary-2);
  top: 45%;
  right: -150px;
}

.orb-3 {
  width: 380px;
  height: 380px;
  background: var(--accent);
  bottom: -100px;
  left: 20%;
  opacity: 0.14;
}

/* ==========================================================================
   BUTTONS & INTERACTIVE ELEMENTS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.72rem 1.35rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(108, 140, 255, 0.32);
}

.btn-primary:hover {
  box-shadow: 0 8px 25px rgba(108, 140, 255, 0.45);
  filter: brightness(1.05);
}

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--surface-hover);
  color: var(--primary);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--surface-2);
  color: var(--primary);
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.nav-container {
  width: min(1200px, 92%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.logo-bracket {
  color: var(--text-muted);
}

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

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  transform: rotate(15deg) scale(1.05);
  border-color: var(--primary);
}

.sun-icon {
  display: none;
  color: #ffc857;
}

.moon-icon {
  display: inline-block;
  color: var(--primary);
}

:root[data-theme="dark"] .moon-icon,
:root:not([data-theme="light"]) .moon-icon {
  display: none;
}

:root[data-theme="dark"] .sun-icon,
:root:not([data-theme="light"]) .sun-icon {
  display: inline-block;
}

:root[data-theme="light"] .moon-icon {
  display: inline-block;
}

:root[data-theme="light"] .sun-icon {
  display: none;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.mobile-toggle .bar {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-toggle.open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 3.5rem) 0 4rem;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 227, 178, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(47, 227, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 227, 178, 0); }
}

.hero-title {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero-subtitle-wrapper {
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-weight: 600;
  margin-bottom: 1.2rem;
  min-height: 2.2rem;
  display: flex;
  align-items: center;
}

.role-prefix {
  color: var(--text-muted);
  margin-right: 0.35rem;
}

.typed-text {
  color: var(--primary);
  font-weight: 700;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--primary);
  animation: blink 1s steps(1) infinite;
  margin-left: 3px;
  vertical-align: middle;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-description {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 580px;
  margin-bottom: 1.6rem;
  line-height: 1.7;
}

.hero-description strong {
  color: var(--text);
  font-weight: 600;
}

.hero-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.8rem;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}

.tech-tag i {
  color: var(--primary);
}

.tech-tag:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2.2rem;
}

.hero-quick-stats {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.stat-card {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.stat-divider {
  width: 1px;
  height: 34px;
  background: var(--border);
}

/* ==========================================================================
   CODE WINDOW COMPONENT
   ========================================================================== */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.code-window-card {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}

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

.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.window-title {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.window-action .copy-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.window-action .copy-btn:hover {
  color: var(--primary);
  background: var(--surface-hover);
}

.window-body {
  padding: 1.3rem;
  overflow-x: auto;
}

.window-body pre {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.75;
}

/* Syntax Highlighting */
.token-keyword { color: #c678dd; font-weight: 600; }
.token-class { color: #e5c07b; }
.token-function { color: #61afef; }
.token-builtin { color: #e06c75; }
.token-string { color: #98c379; }
.token-comment { color: #6b7791; font-style: italic; }

/* Custom Scrollbar for code block */
.window-body::-webkit-scrollbar {
  height: 6px;
}
.window-body::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 4px;
}

/* ==========================================================================
   GLOBAL SECTION STYLING
   ========================================================================== */
.section {
  padding: 6rem 0;
  position: relative;
}

.section:nth-of-type(even) {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(1.85rem, 3.8vw, 2.6rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-top: 0.8rem;
  line-height: 1.6;
}

.section-line {
  width: 64px;
  height: 4px;
  border-radius: var(--radius-pill);
  margin: 1.2rem auto 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* Universal Card Base */
.about-card,
.highlight-card,
.skill-category-card,
.timeline-card,
.project-card,
.credential-card,
.resume-card,
.contact-card,
.contact-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.8rem;
  align-items: stretch;
}

.about-card {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
}

.about-card p {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 1.1rem;
  line-height: 1.7;
}

.about-card p strong {
  color: var(--text);
  font-weight: 600;
}

.about-card-icon,
.highlight-icon,
.credential-icon,
.cert-icon-box,
.category-icon,
.contact-icon,
.resume-icon {
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
  flex-shrink: 0;
}

.about-card-icon {
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.about-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-info-list {
  display: grid;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.92rem;
}

.info-item i {
  color: var(--primary);
  width: 18px;
  text-align: center;
}

.info-item a:hover {
  color: var(--primary);
}

.about-highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.highlight-card {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
}

.highlight-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.highlight-icon {
  width: 46px;
  height: 46px;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.highlight-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.highlight-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.skill-category-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.category-icon {
  width: 50px;
  height: 50px;
  font-size: 1.35rem;
}

.back-icon { background: linear-gradient(135deg, #2b5b84, #3776ab); }
.front-icon { background: linear-gradient(135deg, #00b4d8, #4466f2); }
.tool-icon { background: linear-gradient(135deg, #f97316, #dc2626); }

.category-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.category-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

.skill-items {
  display: grid;
  gap: 1.2rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
}

.skill-name {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}

.skill-name i {
  color: var(--primary);
  margin-right: 0.5rem;
}

.skill-level {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.skill-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 3rem;
  max-width: 1050px;
  margin-inline: auto;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  font-weight: 500;
  transition: var(--transition);
}

.skill-pill i {
  color: var(--primary);
  margin-right: 0.45rem;
}

.skill-pill:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  color: var(--primary);
}

/* ==========================================================================
   EXPERIENCE / TIMELINE SECTION
   ========================================================================== */
.timeline {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding-left: 3.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 1.5rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-2), transparent);
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -3.5rem;
  top: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
  font-size: 0.95rem;
  box-shadow: 0 0 0 5px var(--bg);
}

.timeline-card {
  padding: 2.2rem;
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.timeline-badge,
.badge-accent {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(47, 227, 178, 0.15);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.role-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.company-name {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 0.15rem;
}

.company-collab {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.company-collab i {
  color: var(--accent);
  margin-right: 0.3rem;
}

.timeline-date {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: right;
}

.timeline-duration {
  display: block;
  font-size: 0.78rem;
  opacity: 0.8;
  margin-top: 0.15rem;
}

.timeline-points {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}

.timeline-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.timeline-points li i {
  color: var(--accent);
  margin-top: 0.3rem;
  flex-shrink: 0;
}

.timeline-points strong {
  color: var(--text);
  font-weight: 600;
}

.timeline-tags,
.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.timeline-tags .tag,
.project-tech-tags span {
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 2.8rem;
}

.filter-btn {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

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

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(108, 140, 255, 0.3);
}

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

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.project-card.hide {
  display: none;
}

.project-card.fade-in {
  animation: fadeUp 0.45s ease both;
}

.project-image-wrapper {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.project-mockup {
  height: 100%;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.gradient-mockup-1 { background: linear-gradient(135deg, #3a5ce8, #8a4dff); }
.gradient-mockup-2 { background: linear-gradient(135deg, #f97316, #ec4899); }
.gradient-mockup-3 { background: linear-gradient(135deg, #0fb58a, #3b82f6); }

.mockup-content {
  text-align: center;
  display: grid;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.mockup-icon {
  font-size: 2.6rem;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 26, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  opacity: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.overlay-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #0f172a;
  font-size: 1.05rem;
  transition: var(--transition);
}

.overlay-link:hover {
  transform: scale(1.15);
  background: var(--primary);
  color: #ffffff;
}

.project-content {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.project-category-tag {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.project-title {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.project-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.project-link:hover,
.highlight-link {
  color: var(--primary);
}

/* ==========================================================================
   EDUCATION & CERTIFICATIONS SECTION
   ========================================================================== */
.edu-cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.2rem;
  align-items: start;
}

.column-title {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.column-title i {
  color: var(--primary);
  margin-right: 0.6rem;
}

.credential-card {
  padding: 1.8rem;
}

.credential-header {
  display: flex;
  gap: 1.1rem;
  margin-bottom: 1.2rem;
}

.credential-icon {
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
}

.credential-titles h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.institution {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.96rem;
}

.specialization {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.specialization i {
  color: var(--accent);
  margin-right: 0.3rem;
}

.credential-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 0.85rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.credential-meta span i {
  color: var(--primary);
  margin-right: 0.35rem;
}

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

.certifications-list {
  display: grid;
  gap: 1.2rem;
}

.cert-card {
  padding: 1.4rem;
}

.cert-item-inner {
  display: flex;
  gap: 1.1rem;
}

.cert-icon-box {
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
}

/* Individual Certificate Badges */
.cert-deloitte { background: linear-gradient(135deg, #86bc25, #005a36); }
.cert-python   { background: linear-gradient(135deg, #2b5b84, #ffd43b); }
.cert-udemy    { background: linear-gradient(135deg, #a435f0, #5624d0); }
.cert-claude   { background: linear-gradient(135deg, #cc6747, #993b1d); }

.cert-content {
  flex: 1;
}

.cert-issuer {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cert-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.25rem 0 0.35rem;
}

.cert-content p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.6rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary);
}

.cert-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   RESUME SECTION
   ========================================================================== */
.resume-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.resume-icon {
  width: 72px;
  height: 72px;
  font-size: 2.2rem;
}

.resume-info {
  flex: 1;
  min-width: 250px;
}

.resume-info h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.resume-info p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.resume-meta {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.6rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.resume-meta span i {
  color: var(--primary);
  margin-right: 0.35rem;
}

.resume-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2.4rem;
  align-items: start;
}

.contact-cards {
  display: grid;
  gap: 1.1rem;
}

.contact-card {
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  font-size: 1.25rem;
}

/* Specific Contact Card Icons */
.email-icon { background: linear-gradient(135deg, #ea4335, #ff6b6b); }
.phone-icon { background: linear-gradient(135deg, #0fb58a, #3b82f6); }
.linkedin-icon { background: #0a66c2; }
.github-icon { background: linear-gradient(135deg, #24292e, #475569); }
.loc-icon { background: linear-gradient(135deg, #f97316, #ef4444); }

.contact-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.card-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.card-value {
  font-weight: 600;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
  margin-top: 0.15rem;
}

a.card-value:hover {
  color: var(--primary);
}

.copy-btn,
.external-link-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: var(--transition);
  flex-shrink: 0;
}

.copy-btn:hover,
.external-link-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.contact-form-card {
  padding: 2.2rem;
}

.contact-form-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

.contact-form-card > p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0.4rem 0 1.6rem;
  line-height: 1.6;
}

.contact-form {
  display: grid;
  gap: 1.15rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.form-group {
  display: grid;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 600;
}

.required {
  color: var(--danger);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.submit-btn {
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-size: 0.98rem;
  margin-top: 0.4rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  padding: 4rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-container {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

.footer-logo {
  margin-bottom: 0.6rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.footer-nav a:hover,
.footer-socials a:hover {
  color: var(--primary);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.05rem;
  transition: var(--transition);
}

.footer-socials a:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  color: var(--primary);
}

.footer-copy {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   FLOATING ELEMENTS & NOTIFICATIONS
   ========================================================================== */
.back-to-top {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: var(--transition);
  z-index: 900;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(108, 140, 255, 0.45);
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 0.6rem;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
  font-weight: 500;
  animation: fadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: auto;
}

.toast.success { border-left: 4px solid var(--accent); }
.toast.error   { border-left: 4px solid var(--danger); }

/* Scroll reveal utility */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ==========================================================================
   MEDIA QUERIES (DESKTOP, LAPTOP, TABLET, MOBILE)
   ========================================================================== */

/* ===== 1. Large Desktops & Widescreens (min-width: 1400px) ===== */
@media (min-width: 1400px) {
  .container {
    width: min(1320px, 92%);
  }

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

  .section {
    padding: 7rem 0;
  }

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

/* ===== 2. Standard Laptops & Small Desktops (max-width: 1200px) ===== */
@media (max-width: 1200px) {
  .hero-container {
    gap: 2.5rem;
  }

  .about-grid {
    gap: 1.4rem;
  }

  .skills-grid {
    gap: 1.4rem;
  }

  .contact-wrapper {
    gap: 1.8rem;
  }

  .footer-container {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
  }
}

/* ===== 3. Tablets in Landscape & Small Laptops (max-width: 1024px) ===== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3.5rem;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-subtitle-wrapper {
    justify-content: center;
  }

  .hero-description {
    margin-inline: auto;
  }

  .hero-tech-stack,
  .hero-actions,
  .hero-quick-stats {
    justify-content: center;
  }

  .about-grid,
  .edu-cert-grid,
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

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

  .timeline {
    max-width: 100%;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
  }

  .footer-left {
    grid-column: span 2;
  }
}

/* ===== 4. Tablets in Portrait (max-width: 768px) ===== */
@media (max-width: 768px) {
  :root {
    --nav-height: 68px;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-menu {
    position: fixed;
    top: calc(var(--nav-height) + 10px);
    left: 4%;
    right: 4%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: var(--transition);
  }

  .nav-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.96rem;
  }

  .hero-section {
    padding-top: calc(var(--nav-height) + 2rem);
    min-height: auto;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

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

  .resume-card {
    flex-direction: column;
    text-align: center;
    gap: 1.4rem;
  }

  .resume-meta,
  .resume-actions {
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ===== 5. Mobile Devices (max-width: 540px) ===== */
@media (max-width: 540px) {
  .section {
    padding: 4.5rem 0;
  }

  .section-header {
    margin-bottom: 2.6rem;
  }

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

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-quick-stats {
    gap: 1rem;
  }

  .stat-divider {
    display: none;
  }

  .stat-card {
    align-items: center;
    width: 100%;
  }

  .about-highlights-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 2.6rem;
  }

  .timeline-marker {
    left: -2.6rem;
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .timeline::before {
    left: 15px;
  }

  .timeline-card {
    padding: 1.5rem;
  }

  .timeline-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .timeline-date {
    text-align: left;
  }

  .cert-item-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-card {
    padding: 1rem;
    gap: 0.85rem;
  }

  .contact-form-card {
    padding: 1.5rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-left {
    grid-column: span 1;
  }

  .footer-nav {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== 6. Extra Small Screens (max-width: 360px) ===== */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .badge-pill {
    font-size: 0.76rem;
    padding: 0.35rem 0.75rem;
  }

  .tech-tag,
  .skill-pill {
    font-size: 0.76rem;
  }

  .resume-actions .btn {
    width: 100%;
  }
}

/* ===== 7. Accessibility: Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}