/* -------------------------------------------------------------
 * Mohamed Rizny — Portfolio Stylesheet
 * Clean CSS Architecture & Responsive Mobile Optimization
 * ----------------------------------------------------------- */

:root {
  --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Dark Theme Palette (Default) */
  --bg-color: #030712;
  --bg-alt: #070d1e;
  --surface: #0b1124;
  --surface-raised: #111a36;
  --surface-glass: rgba(11, 17, 36, 0.75);
  --surface-glass-high: rgba(15, 23, 48, 0.9);

  --border-color: rgba(56, 189, 248, 0.22);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(56, 189, 248, 0.6);
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.5);

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

  --accent-cyan: #00f2fe;
  --accent-blue: #38bdf8;
  --accent-violet: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-green: #10b981;

  --gradient-primary: linear-gradient(135deg, #00f2fe 0%, #38bdf8 30%, #8b5cf6 70%, #ec4899 100%);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme (High Contrast) */
[data-theme="light"] {
  --bg-color: #eef2f6;
  --bg-alt: #e2e8f0;
  --surface: #ffffff;
  --surface-raised: #f8fafc;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --surface-glass-high: rgba(255, 255, 255, 0.98);

  --border-color: #94a3b8;
  --border-subtle: #cbd5e1;
  --border-hover: #0284c7;
  --shadow-card: 0 12px 28px -6px rgba(15, 23, 42, 0.12), 0 0 0 1.5px #cbd5e1;

  --text-main: #090d16;
  --text-muted: #334155;
  --text-dim: #64748b;

  --accent-cyan: #0284c7;
  --accent-blue: #0ea5e9;
  --accent-violet: #7c3aed;
  --accent-pink: #db2777;

  --gradient-primary: linear-gradient(135deg, #0284c7 0%, #2563eb 35%, #7c3aed 75%, #db2777 100%);
}

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

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

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

ul, ol {
  list-style: none;
}

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

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

input, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  width: 100%;
}

::selection {
  background-color: var(--accent-blue);
  color: #030712;
}

:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

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

.desktop-only {
  display: none;
}
@media (min-width: 768px) {
  .desktop-only { display: inline; }
}

/* Background Canvas & Ambient Glows */
.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -4;
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border-subtle) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
}

.ambient-glow {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  will-change: transform;
  opacity: 0.45;
  transition: transform 0.25s ease-out;
}

.glow-cyan {
  top: -15%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 650px;
  max-height: 650px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.35), transparent 70%);
}

.glow-violet {
  top: 35%;
  right: -15%;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 360px;
  height: 360px;
  margin-top: -180px;
  margin-left: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(139, 92, 246, 0.05) 45%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-9999px, -9999px);
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
}

[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, rgba(124, 58, 237, 0.05) 45%, transparent 70%);
  mix-blend-mode: multiply;
}

/* Glass Cards */
.glass-card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3.5vw, 36px);
  position: relative;
  overflow: hidden;
}

.card {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  position: relative;
  transition: transform 0.3s var(--transition-smooth), border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px -10px rgba(56, 189, 248, 0.25), 0 0 0 1.5px var(--border-hover);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 20px 40px -10px rgba(2, 132, 199, 0.2), 0 0 0 2px var(--border-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: all 0.25s var(--transition-smooth);
  text-align: center;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.3) 0%, rgba(56, 189, 248, 0.4) 45%, rgba(139, 92, 246, 0.35) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 25px -4px rgba(56, 189, 248, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #7c3aed 100%);
  border: 1.5px solid #0284c7;
  box-shadow: 0 8px 20px -4px rgba(2, 132, 199, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 35px 2px rgba(56, 189, 248, 0.6);
}

.btn-secondary {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-color);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .btn-secondary {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -8px rgba(56, 189, 248, 0.35);
}

/* Header & Navigation */
.header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  background-color: var(--surface-glass-high);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1.5px solid var(--border-color);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4);
}

.header-container {
  width: min(94%, 1200px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
}

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

.logo-badge {
  padding: 5px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(139, 92, 246, 0.15));
  border: 1.5px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

[data-theme="light"] .logo-badge {
  background: #f0fdf4;
  border: 1.5px solid #94a3b8;
  color: #0284c7;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.96rem;
}

.logo-subtitle {
  font-size: 0.68rem;
  color: var(--accent-blue);
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

[data-theme="light"] .logo-subtitle {
  color: #0284c7;
}

.nav-menu {
  display: none;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 0.45rem 1.05rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--border-color);
}

.nav-link.is-active {
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px -3px rgba(56, 189, 248, 0.4);
}

[data-theme="light"] .nav-link.is-active {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #0284c7;
}

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

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: var(--surface);
  color: var(--text-main);
  transition: all 0.25s ease;
}

.theme-toggle:hover {
  transform: rotate(20deg) scale(1.06);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

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

.nav-toggle {
  display: grid;
  gap: 4.5px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-main);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile Menu Drawer (Phone Viewport Optimized) */
.nav-menu[data-open="true"] {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  padding: 12px 16px 18px;
  background-color: var(--surface-glass-high);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1.5px solid var(--border-color);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4);
  gap: 6px;
}

.nav-menu[data-open="true"] .nav-link {
  padding: 10px 14px;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
  text-align: left;
  border: 1px solid var(--border-subtle);
}

/* Hero Section & Circular Profile Avatar */
.hero-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 110px;
  padding-bottom: 60px;
  position: relative;
}

.hero-container {
  width: min(92%, 900px);
  margin-inline: auto;
  text-align: center;
}

.avatar-container {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.avatar-halo {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.45) 0%, rgba(139, 92, 246, 0.3) 50%, transparent 70%);
  filter: blur(16px);
  z-index: 1;
  animation: haloPulse 5s ease-in-out infinite alternate;
}

@keyframes haloPulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1.12); opacity: 0.9; }
}

.avatar-orbit {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(56, 189, 248, 0.6);
  z-index: 2;
  animation: rotateOrbit 20s linear infinite;
}

[data-theme="light"] .avatar-orbit {
  border-color: rgba(2, 132, 199, 0.7);
}

@keyframes rotateOrbit {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.avatar-frame {
  position: relative;
  z-index: 3;
  display: inline-block;
}

.avatar-ring {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet), var(--accent-pink));
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.5), 0 0 60px rgba(139, 92, 246, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--transition-smooth), box-shadow 0.4s ease;
}

.avatar-ring:hover {
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 0 45px rgba(56, 189, 248, 0.75), 0 0 80px rgba(139, 92, 246, 0.5);
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
  border: 3px solid var(--bg-color);
  background-color: var(--surface);
  display: block;
  transform: scale(1.05);
}

.avatar-scanner {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(56, 189, 248, 0.3) 50%, transparent 100%);
  pointer-events: none;
  animation: scanImage 4s ease-in-out infinite;
}

@keyframes scanImage {
  0% { top: -100%; }
  50%, 100% { top: 100%; }
}

.status-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 14px;
  background: rgba(3, 7, 18, 0.94);
  border: 1.5px solid var(--accent-blue);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-full);
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

[data-theme="light"] .status-badge {
  background: #ffffff;
  border: 1.5px solid #0284c7;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.15), 0 0 10px rgba(2, 132, 199, 0.25);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: dotPulse 1.8s ease-in-out infinite;
}

[data-theme="light"] .status-dot {
  background-color: #0284c7;
  box-shadow: 0 0 6px #0284c7;
}

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

.status-label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

[data-theme="light"] .status-label {
  color: #0f172a;
}

.tag-wrapper {
  margin-bottom: 16px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.4rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.1);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
}

[data-theme="light"] .meta-tag {
  color: #0284c7;
  background: #ffffff;
  border-color: #94a3b8;
}

.spark-icon {
  color: var(--accent-blue);
  animation: spinSpark 8s linear infinite;
}

[data-theme="light"] .spark-icon {
  color: #0284c7;
}

@keyframes spinSpark {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hero-heading {
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 16px;
}

.highlight-gradient {
  background-image: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 20px;
  min-height: 1.8em;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .hero-subtitle {
  color: #0284c7;
}

.cursor {
  animation: blink 0.8s infinite;
  color: var(--accent-pink);
  font-weight: 700;
  margin-left: 2px;
}

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

.hero-bio {
  max-width: 660px;
  margin-inline: auto;
  margin-bottom: 30px;
  font-size: clamp(0.96rem, 1.8vw, 1.1rem);
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

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

.badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
}

.badge-link:hover {
  color: var(--text-main);
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.14);
  transform: translateY(-2px);
}

.badge-static {
  cursor: default;
}
.badge-static:hover {
  transform: none;
  border-color: var(--border-color);
  background: var(--surface-glass);
  color: var(--text-muted);
}

.badge-live {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

[data-theme="dark"] .badge-live {
  color: #34d399;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: dotPulse 2s infinite;
}

/* Sections Layout */
.section {
  padding-block: clamp(55px, 8vw, 100px);
  scroll-margin-top: 80px;
}

.section-heading {
  margin-bottom: clamp(28px, 5vw, 46px);
}

.section-subtitle {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

[data-theme="light"] .section-subtitle {
  color: #0284c7;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.025em;
  font-weight: 800;
}

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

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* About Section */
.about-layout {
  display: grid;
  gap: 22px;
}

.about-intro {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chip {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
}

[data-theme="light"] .chip {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #94a3b8;
}

.about-intro p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.about-intro p strong {
  color: var(--text-main);
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1.5px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-blue);
}

[data-theme="light"] .stat-value {
  color: #0284c7;
}

.stat-desc {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.about-domains {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.domain-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  align-items: flex-start;
}

.icon-box {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  color: var(--accent-blue);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(139, 92, 246, 0.1));
  border: 1.5px solid var(--border-color);
}

[data-theme="light"] .icon-box {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #94a3b8;
}

.domain-item h3 {
  font-size: 1.05rem;
  margin-bottom: 5px;
}

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

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.skill-card-featured {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 15px 35px -10px rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .skill-card-featured {
  border-color: #0284c7;
}

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

.skill-emoji {
  font-size: 1.6rem;
}

.skill-header h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.skill-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="light"] .skill-category {
  color: #0284c7;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-main);
  transition: all 0.2s ease;
}

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

[data-theme="light"] .pill {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
}

.pill-accent {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--accent-blue);
}

[data-theme="light"] .pill-accent {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

.skill-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  padding-top: 12px;
  border-top: 1.5px solid var(--border-subtle);
}

.indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
}

[data-theme="light"] .indicator-dot {
  background: #0284c7;
}

/* Projects & Timeline */
.timeline-container {
  position: relative;
  display: grid;
  gap: 24px;
  padding-left: 28px;
}

.timeline-container::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-violet), transparent);
}

.timeline-entry {
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -28px;
  top: 18px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
}

.marker-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2), 0 0 15px var(--accent-cyan);
}

.timeline-content {
  padding: clamp(18px, 3vw, 28px);
}

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

.timeline-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

[data-theme="light"] .timeline-tag {
  color: #0284c7;
}

.timeline-name {
  font-size: 1.18rem;
}

.timeline-date {
  display: inline-block;
  padding: 3px 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
}

[data-theme="light"] .timeline-date {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #94a3b8;
}

.timeline-text {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 14px;
}

.timeline-text strong {
  color: var(--text-main);
  font-weight: 700;
}

.feature-list {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.feature-list li {
  display: flex;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-dim);
}

[data-theme="light"] .tech-tag {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #475569;
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.cert-card {
  overflow: hidden;
  will-change: transform;
  transition: transform 0.25s cubic-bezier(0.03, 0.98, 0.52, 0.99), border-color 0.3s ease;
}

.cert-link {
  display: block;
}

.cert-image-box {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(11, 17, 36, 0.8);
}

[data-theme="light"] .cert-image-box {
  background: #e2e8f0;
}

.cert-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #030712;
  background: var(--accent-blue);
  border-radius: var(--radius-sm);
}

[data-theme="light"] .cert-pill {
  background: #0284c7;
  color: #ffffff;
}

.cert-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--transition-smooth), filter 0.35s ease;
}

.cert-link:hover .cert-image-box img {
  transform: scale(1.06);
  filter: brightness(0.85);
}

.spotlight {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  opacity: var(--spot-opacity, 0);
  background: radial-gradient(circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(255, 255, 255, 0.15), transparent 65%);
  transition: opacity 0.25s;
}

.zoom-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--accent-blue);
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--border-color);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s, transform 0.25s;
}

[data-theme="light"] .zoom-button {
  color: #ffffff;
  background: #0f172a;
}

.cert-link:hover .zoom-button {
  opacity: 1;
  transform: translateY(0);
}

.cert-details {
  padding: 18px 20px 20px;
}

.cert-issuer {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 3px;
  display: block;
}

[data-theme="light"] .cert-issuer {
  color: #0284c7;
}

.cert-title {
  font-size: 1.02rem;
  margin-bottom: 5px;
  transition: color 0.25s ease;
}

.cert-link:hover .cert-title {
  color: var(--accent-blue);
}

[data-theme="light"] .cert-link:hover .cert-title {
  color: #0284c7;
}

.cert-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.cert-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.2s ease, gap 0.2s ease;
}

.cert-link:hover .cert-action {
  color: var(--accent-blue);
  gap: 7px;
}

[data-theme="light"] .cert-link:hover .cert-action {
  color: #0284c7;
}

/* Modal Lightbox */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  cursor: zoom-out;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-content {
  position: relative;
  max-width: min(94vw, 900px);
  max-height: 88vh;
  cursor: default;
}

.modal-content img {
  max-width: 100%;
  max-height: 86vh;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: 0 30px 100px -20px rgba(0, 0, 0, 0.8);
}

.modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(17, 26, 54, 0.98);
  border: 1.5px solid var(--border-color);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.modal-close:hover {
  transform: scale(1.1);
  background: rgba(239, 68, 68, 0.5);
  border-color: rgba(239, 68, 68, 0.8);
}

/* Contact Section */
.contact-layout {
  display: grid;
  gap: 22px;
}

.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-message-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

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

.contact-links {
  display: grid;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.12);
  border: 1.5px solid var(--border-color);
  flex-shrink: 0;
}

[data-theme="light"] .contact-icon {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #94a3b8;
}

.contact-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 2px;
}

.contact-text {
  font-size: 0.9rem;
  font-weight: 500;
  font-style: normal;
  color: var(--text-main);
  transition: color 0.2s ease;
  word-break: break-all;
}

.contact-item a.contact-text:hover {
  color: var(--accent-blue);
}

[data-theme="light"] .contact-item a.contact-text:hover {
  color: #0284c7;
}

.form-title-box {
  margin-bottom: 18px;
}

.form-title-box h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.form-title-box p {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.input-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-control {
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
}

[data-theme="light"] .form-control {
  background: #ffffff;
  border: 1.5px solid #94a3b8;
}

.form-control::placeholder {
  color: var(--text-dim);
}

.form-control:hover {
  border-color: var(--border-hover);
}

.form-control:focus {
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .form-control:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.textarea {
  min-height: 130px;
  resize: vertical;
}

.form-button {
  justify-self: start;
}

/* Footer */
.footer {
  border-top: 1.5px solid var(--border-subtle);
  padding-block: 26px;
  position: relative;
  z-index: 10;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.84rem;
  color: var(--text-dim);
}

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

.footer-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
}

[data-theme="light"] .footer-logo {
  color: #0284c7;
}

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

.footer-links a {
  transition: color 0.2s ease;
}

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

[data-theme="light"] .footer-links a:hover {
  color: #0284c7;
}

/* =========================================================
   PHONE & TABLET RESPONSIVE BREAKPOINTS
========================================================= */

/* Tablet & Desktop Screens */
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .about-domains { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .cert-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .nav-menu { display: flex; }
  .nav-toggle { display: none; }
  .about-layout { grid-template-columns: 1.1fr 1.3fr; align-items: start; }
  .contact-layout { grid-template-columns: 0.95fr 1.15fr; align-items: start; }
}

@media (min-width: 1120px) {
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Phone Viewport Optimizations (Max Width: 640px) */
@media (max-width: 640px) {
  .container {
    width: 92%;
  }

  .header-container {
    padding-block: 8px;
  }

  .nav-cta {
    display: none; /* Cleaner mobile header */
  }

  .hero-section {
    padding-top: 95px;
    padding-bottom: 45px;
  }

  .avatar-ring {
    width: 155px;
    height: 155px;
  }

  .hero-heading {
    font-size: clamp(1.75rem, 7.5vw, 2.4rem);
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 0.88rem;
    margin-bottom: 16px;
  }

  .hero-bio {
    font-size: 0.92rem;
    margin-bottom: 24px;
  }

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

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

  .hero-badges {
    gap: 6px;
  }

  .badge-link {
    font-size: 0.76rem;
    padding: 0.4rem 0.85rem;
  }

  .glass-card, .card {
    padding: 18px 15px;
    border-radius: var(--radius-lg);
  }

  .stats-grid {
    gap: 8px;
    padding-top: 14px;
  }

  .stat-value {
    font-size: 1.1rem;
  }

  .stat-desc {
    font-size: 0.65rem;
  }

  .domain-item {
    padding: 16px 14px;
    gap: 12px;
  }

  .icon-box {
    width: 38px;
    height: 38px;
  }

  .skill-card {
    padding: 18px 14px;
    gap: 14px;
  }

  .pill {
    font-size: 0.78rem;
    padding: 4px 10px;
  }

  .timeline-container {
    padding-left: 22px;
    gap: 18px;
  }

  .timeline-marker {
    left: -22px;
  }

  .timeline-content {
    padding: 16px 14px;
  }

  .timeline-name {
    font-size: 1.08rem;
  }

  .timeline-date {
    font-size: 0.7rem;
    padding: 2px 10px;
  }

  .cert-details {
    padding: 14px 14px 16px;
  }

  .contact-item {
    padding: 12px 14px;
    gap: 12px;
  }

  .contact-icon {
    width: 36px;
    height: 36px;
  }

  .form-control {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .form-button {
    width: 100%;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-links {
    justify-content: center;
    gap: 14px;
  }
}

@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;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .bg-canvas, .ambient-glow, .cursor-glow {
    display: none;
  }
}
