/* ==========================================================================
   Biggest Manuel — Personal Portfolio Design System & Stylesheet
   Modern, Ultra-Crisp, High-Performance CSS (Light & Dark Theme)
   ========================================================================== */

/* --- Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

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

/* --- Theme Variables --- */
:root {
  /* Light Theme */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-input: #ffffff;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #8b5cf6;

  --accent: #7c3aed;
  --accent-2: #0284c7;
  --accent-soft: rgba(124, 58, 237, 0.1);
  --accent-border: rgba(124, 58, 237, 0.25);
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #0284c7 100%);
  --text-gradient: linear-gradient(135deg, #0f172a 0%, #7c3aed 50%, #0284c7 100%);

  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --danger: #ef4444;
  --danger-bg: #fef2f2;

  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 35px rgba(124, 58, 237, 0.18);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.dark {
  /* Dark Theme */
  --bg-main: #090d15;
  --bg-surface: #0f1728;
  --bg-surface-elevated: #131d31;
  --bg-surface-hover: #1c2a45;
  --bg-input: #0a0f1c;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #a78bfa;

  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-border: rgba(139, 92, 246, 0.35);
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  --text-gradient: linear-gradient(135deg, #ffffff 0%, #c4b5fd 50%, #67e8f9 100%);

  --success: #34d399;
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-border: rgba(52, 211, 153, 0.25);
  --danger: #f87171;
  --danger-bg: rgba(239, 68, 68, 0.12);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 50px -12px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 45px rgba(139, 92, 246, 0.28);
}

/* --- Base Body & Typography --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-size: 16px;
}

body {
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.2;
}

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

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

input, textarea {
  font-family: inherit;
  color: inherit;
}

.container {
  width: min(1180px, 92%);
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.gradient-text {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Ambient Glows & Grid --- */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.bg-glow-1 {
  top: -100px;
  left: 20%;
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28) 0%, rgba(34, 211, 238, 0.12) 50%, transparent 70%);
}

.bg-glow-2 {
  top: 900px;
  right: 5%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2) 0%, rgba(139, 92, 246, 0.1) 60%, transparent 75%);
}

.bg-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 900px;
  background-image: radial-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.1) 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.1) 75%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* --- Navigation --- */
#mainNav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  z-index: 1000;
  transition: all var(--transition-normal);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--bg-surface) 80%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
  transition: transform var(--transition-fast);
}

.logo:hover .logo-mark {
  transform: scale(1.06);
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

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

.nav-link.active {
  color: var(--accent);
  background-color: var(--accent-soft);
  font-weight: 700;
}

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

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

body.dark .sun-icon { display: block; }
body.dark .moon-icon { display: none; }
body:not(.dark) .sun-icon { display: none; }
body:not(.dark) .moon-icon { display: block; }

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

/* Mobile Hamburger Button */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 8px;
  flex-direction: column;
  justify-content: space-around;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.hamburger span {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* --- Hero Section --- */
.hero {
  padding: 150px 20px 80px;
  min-height: 85vh;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 860px;
  margin: 0 auto;
}

.hero-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: statusPulse 1.8s infinite ease-in-out;
}

@keyframes statusPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.hero-title {
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 14px;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 36px;
  line-height: 1.75;
}

.hero-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Button System */
.btn {
  height: 50px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45);
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-main);
}

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

/* Copy Email Micro-interaction */
.btn-secondary .check-icon { display: none; }
.btn-secondary.copied {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}
.btn-secondary.copied .copy-icon { display: none; }
.btn-secondary.copied .check-icon { display: block; }

.hero-highlights {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.highlight-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

/* --- Common Section Styles --- */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

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

.section-eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
}

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

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.about-bio-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.about-bio-card p {
  margin-bottom: 16px;
  font-size: 1.02rem;
  color: var(--text-muted);
}

.about-bio-card p:last-child {
  margin-bottom: 0;
}

.about-bio-card strong {
  color: var(--text-main);
}

/* Stat Cards Grid */
.about-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.stat-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.stat-icon-wrap.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.stat-icon-wrap.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.stat-icon-wrap.green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.stat-icon-wrap.orange { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.stat-info h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 2px;
}

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

/* Photo Frame */
.photo-wrapper {
  display: grid;
  place-items: center;
}

.photo-frame {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 10px;
  background: var(--accent-gradient);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  transition: transform var(--transition-normal);
}

.photo-frame:hover {
  transform: scale(1.02);
}

.photo-inner {
  position: relative;
  border-radius: calc(var(--radius-xl) - 8px);
  overflow: hidden;
  background: var(--bg-surface);
}

.profile-photo {
  width: 100%;
  max-width: 380px;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}

.photo-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: color-mix(in srgb, var(--bg-surface) 85%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Skills & Focus Section --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.skill-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

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

.skill-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.skill-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* Tools Grid */
.tools-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  box-shadow: var(--shadow-md);
}

.tools-heading {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
}

.tool-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.tool-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.tool-card:hover {
  background: var(--bg-surface);
  border-color: var(--brand, var(--accent));
  color: var(--text-main);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -6px var(--brand, var(--accent-soft));
}

.tool-card:hover .tool-logo {
  transform: scale(1.15);
}

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

.service-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}

.service-icon-box.cyan { background: rgba(34, 211, 238, 0.12); color: #0284c7; }
.service-icon-box.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.service-icon-box.green { background: rgba(16, 185, 129, 0.12); color: #10b981; }

.service-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.65;
}

.service-features {
  list-style: none;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.service-features li span {
  color: var(--accent);
  font-weight: 800;
}

/* --- Projects Section --- */
.project-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.filter-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.project-img-wrapper {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-surface-elevated);
}

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

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 21, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.overlay-btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform var(--transition-fast);
}

.overlay-btn.primary {
  background: var(--accent-gradient);
  color: #ffffff;
}

.overlay-btn.secondary {
  background: #ffffff;
  color: #0f172a;
}

.overlay-btn:hover {
  transform: scale(1.05);
}

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

.project-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

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

.project-status-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.project-status-tag.green {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.project-status-tag.purple {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
}

.project-body h3 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.project-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

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

.stack-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

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

.case-study-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  transition: gap var(--transition-fast);
}

.case-study-cta:hover {
  gap: 10px;
}

.live-link-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.live-link-icon:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-card-highlight {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.contact-card-highlight h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.contact-card-highlight p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

.contact-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

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

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

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

.contact-item-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.contact-item-link {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
}

.contact-item-link:hover {
  color: var(--accent);
}

.copy-email-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.copy-email-icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
}

/* Contact Form Card */
.contact-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}

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

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

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.94rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.w-full {
  width: 100%;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.loading .btn-text { visibility: hidden; }
.btn.loading .btn-spinner { display: block; position: absolute; }

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

.form-status {
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  display: none;
}

.form-status.success {
  display: block;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.form-status.error {
  display: block;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

/* --- Footer --- */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-surface) 50%, transparent);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 6px;
  display: block;
}

.footer-brand p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

/* --- Scroll To Top Button --- */
.scroll-to-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  display: grid;
  place-items: center;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition-normal);
}

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

.scroll-to-top-btn:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--accent);
}

.progress-ring {
  position: absolute;
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.1s linear;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  animation: toastIn 0.3s var(--transition-bounce);
}

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

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

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--transition-normal), transform 0.65s var(--transition-normal);
}

.reveal.reveal-from-right {
  transform: translateX(30px);
}

.reveal.reveal-from-left {
  transform: translateX(-30px);
}

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

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* --- Responsive Layout Breakpoints --- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .photo-wrapper { order: -1; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: 16px;
    right: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
  }

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

  .nav-cta-btn { display: none; }
  .hamburger { display: flex; }

  .hero { padding-top: 120px; }
  .hero-title { font-size: 2.5rem; }

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

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-btns { flex-direction: column; width: 100%; }
  .hero-btns .btn { width: 100%; }
  .footer-content { flex-direction: column; text-align: center; }
}