/* ==========================================================================
   RUSSELL EVAN O. LOQUINARIO - PORTFOLIO 2026
   Modern Responsive Portfolio (Night & Day Theme)
   Pure HTML, CSS, JavaScript (No Database)
   ========================================================================== */

/* --- CSS Variables & Themes --- */
:root {
  /* Common variables */
  --font-main: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --header-height: 76px;
  --container-max: 1240px;

  /* NIGHT / DARK THEME (Default) */
  --bg-body: #060913;
  --bg-surface: #0b1120;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --bg-glass: rgba(11, 17, 32, 0.88);
  --bg-glass-nav: rgba(6, 9, 19, 0.9);
  --bg-input: rgba(15, 23, 42, 0.95);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --text-inverse: #0f172a;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(56, 189, 248, 0.35);
  --border-focus: #38bdf8;

  --accent-cyan: #00e5ff;
  --accent-blue: #38bdf8;
  --accent-green: #00e676;
  --accent-purple: #a855f7;
  --accent-orange: #fb923c;
  --accent-gradient: linear-gradient(135deg, #00e5ff 0%, #3b82f6 100%);
  --accent-gradient-green: linear-gradient(135deg, #00e676 0%, #00b0ff 100%);

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(0, 229, 255, 0.25);
  --shadow-glow-green: 0 0 25px rgba(0, 230, 118, 0.25);

  --grid-line-color: rgba(56, 189, 248, 0.04);
  --theme-icon: '🌙';
  --badge-bg: rgba(56, 189, 248, 0.12);
  --badge-text: #38bdf8;
}

/* DAY / LIGHT THEME */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --bg-glass-nav: rgba(248, 250, 252, 0.94);
  --bg-input: #ffffff;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-sub: #94a3b8;
  --text-inverse: #f8fafc;

  --border-light: rgba(226, 232, 240, 0.95);
  --border-accent: rgba(37, 99, 235, 0.3);
  --border-focus: #0284c7;

  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-green: #059669;
  --accent-purple: #7c3aed;
  --accent-orange: #ea580c;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  --accent-gradient-green: linear-gradient(135deg, #059669 0%, #0284c7 100%);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 4px 20px rgba(2, 132, 199, 0.18);
  --shadow-glow-green: 0 4px 20px rgba(5, 150, 105, 0.18);

  --grid-line-color: rgba(37, 99, 235, 0.03);
  --theme-icon: '☀️';
  --badge-bg: rgba(2, 132, 199, 0.08);
  --badge-text: #0284c7;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

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

/* Ambient Canvas & Background Lighting */
#ambientCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
  transition: opacity var(--transition-normal);
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  transition: opacity var(--transition-slow);
}
.glow-1 {
  top: -100px;
  left: 10%;
  width: 500px;
  height: 500px;
  background: var(--accent-cyan);
}
.glow-2 {
  bottom: 20%;
  right: 5%;
  width: 450px;
  height: 450px;
  background: var(--accent-blue);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

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

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

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

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  position: relative;
  z-index: 1;
}

/* --- Navigation Bar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--bg-glass-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--border-accent);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.nav-brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--accent-blue);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  color: var(--text-main);
  line-height: 1.1;
}

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

.brand-role {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-sub);
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

/* Nav Menu Links (Desktop) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.nav-link {
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

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

.nav-link.active {
  color: var(--accent-cyan);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-blue);
  transform: scale(1.08);
  box-shadow: var(--shadow-glow);
}

/* Mobile Toggle Hamburger */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 10px;
  z-index: 1001;
}

.mobile-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.mobile-nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
.mobile-nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: var(--bg-glass-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 0.85rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  z-index: 999;
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  border-color: var(--accent-blue);
  color: var(--accent-cyan);
  background: var(--badge-bg);
}

/* JS Viewport HUD badge */
.js-viewport-badge {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  color: var(--accent-cyan);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  z-index: 900;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0.85;
}

.js-viewport-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* --- Section Global Styling --- */
section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

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

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: var(--badge-bg);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

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

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

/* --- Buttons & UI Elements --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  border: 1px solid transparent;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn-green {
  background: var(--accent-gradient-green);
  color: #06150b;
  font-weight: 700;
  box-shadow: var(--shadow-glow-green);
}
.btn-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 230, 118, 0.45);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* --- HERO SECTION (Centered Portrait with Perfect1.png) --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
}

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

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  background: var(--badge-bg);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

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

.hero-title {
  font-size: 3.5rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-title .title-greet {
  display: block;
  font-size: 2rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.hero-title .name-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-typing-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
  min-height: 2rem;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.4rem;
  background: var(--accent-cyan);
  animation: blink 0.8s infinite;
}

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

.hero-bio {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

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

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  font-family: var(--font-mono);
}

.stat-number span {
  color: var(--accent-cyan);
}

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

/* Centered Portrait Card in Hero */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.portrait-frame {
  position: relative;
  width: 380px;
  min-height: 460px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  padding: 1.75rem 1.5rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.portrait-img-box {
  width: 290px;
  height: 290px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.4);
  position: relative;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; /* Dead center alignment */
  transition: transform var(--transition-normal);
}

.portrait-frame:hover .portrait-img-box img {
  transform: scale(1.05);
}

.portrait-info {
  margin-top: 1.5rem;
  text-align: center;
}

.portrait-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.portrait-sub {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-top: 0.25rem;
}

/* Floating Pills */
.floating-pill {
  position: absolute;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  animation: floatPill 4s ease-in-out infinite;
  z-index: 2;
}

.pill-1 {
  top: 25px;
  left: -20px;
  animation-delay: 0s;
}

.pill-2 {
  bottom: 35px;
  right: -20px;
  animation-delay: 2s;
}

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

/* --- ABOUT ME SECTION (Centered Bust Portrait) --- */
.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 3.5rem;
  align-items: center;
}

.about-card-left {
  position: relative;
  display: flex;
  justify-content: center;
}

.about-photo-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 440px;
  width: 100%;
}

.about-photo-wrapper img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-highlight-box {
  background: var(--badge-bg);
  border-left: 4px solid var(--accent-blue);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.05rem;
  color: var(--text-main);
}

.about-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.fact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.fact-icon {
  font-size: 1.4rem;
  color: var(--accent-cyan);
}

.fact-label {
  font-size: 0.775rem;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.fact-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

/* --- SKILLS & TECH STACK --- */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-normal);
}

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

.category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.category-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--badge-bg);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

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

.skill-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.skill-chip:hover {
  border-color: var(--accent-blue);
  background: var(--badge-bg);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

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

/* --- SERVICES SECTION --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.service-icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--badge-bg);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-accent);
}

.service-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.service-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

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

.service-features li {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-features li::before {
  content: '✓';
  color: var(--accent-green);
  font-weight: 700;
}

/* --- PROJECTS SHOWCASE --- */
.projects-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

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

.filter-btn.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-5px);
}

.project-media {
  position: relative;
  width: 100%;
  height: 220px;
  background: var(--bg-surface);
  overflow: hidden;
}

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

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

.project-badge-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 0.35rem 0.85rem;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  z-index: 2;
}

.project-view-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 0.35rem 0.85rem;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
  transition: all var(--transition-fast);
}

.project-card:hover .project-view-badge {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.project-media {
  cursor: pointer;
}

.project-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.project-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  font-size: 0.775rem;
  padding: 0.25rem 0.65rem;
  background: var(--badge-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--accent-blue);
  font-family: var(--font-mono);
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

/* --- INTERACTIVE CALCULATOR SECTION --- */
.calc-showcase-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 6rem 0;
}

.calc-container-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.calc-details-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.calc-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.calc-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.calc-feature-item span.icon {
  color: var(--accent-green);
  font-weight: 800;
}

/* Calculator Device Widget */
.calc-device-wrap {
  display: flex;
  justify-content: center;
}

.calc-device {
  width: 320px;
  background: #38c172;
  border-radius: 36px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(56, 193, 114, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -4px 8px rgba(0, 0, 0, 0.2);
  border: 2px solid #2d995b;
  position: relative;
  user-select: none;
}

.calc-header-brand {
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.calc-screen {
  background: #1a202c;
  border-radius: 18px;
  padding: 14px 18px;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  border: 2px solid #10141d;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6);
  margin-bottom: 20px;
}

.calc-history {
  font-size: 0.85rem;
  color: #718096;
  font-family: var(--font-mono);
  min-height: 1.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-result {
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calc-result.error-state {
  color: #fc8181;
}

.calc-keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.calc-btn {
  height: 54px;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.calc-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.calc-btn-num {
  background: #2d3748;
  color: #ffffff;
}
.calc-btn-num:hover {
  background: #37445a;
}

.calc-btn-op {
  background: #ed8936;
  color: #ffffff;
}
.calc-btn-op:hover {
  background: #dd6b20;
}

.calc-btn-clear {
  background: #e53e3e;
  color: #ffffff;
}
.calc-btn-clear:hover {
  background: #c53030;
}

.calc-btn-fn {
  background: #f6ad55;
  color: #2d3748;
}
.calc-btn-fn:hover {
  background: #ed8936;
}

.calc-btn-equal {
  background: #48bb78;
  color: #ffffff;
  font-size: 1.4rem;
}
.calc-btn-equal:hover {
  background: #38a169;
}

/* --- CERTIFICATIONS & ACHIEVEMENTS SECTION (Non-blurred Full Inspection) --- */
.certs-filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.cert-filter-pill {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.cert-filter-pill:hover {
  border-color: var(--accent-blue);
  color: var(--text-main);
}

.cert-filter-pill.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.cert-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-4px);
}

.cert-thumb-box {
  width: 100%;
  height: 200px;
  background: #0f172a;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.cert-card:hover .cert-thumb-box img {
  transform: scale(1.05);
}

.cert-view-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cert-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cert-issuer {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 0.35rem;
}

.cert-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.cert-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.cert-meta {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

/* Stats Counter Banner */
.stats-counter-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.stats-banner-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.stats-banner-title span {
  color: var(--accent-cyan);
}

.stats-grid-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat-counter-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-counter-icon {
  font-size: 2rem;
  color: var(--accent-cyan);
}

.stat-counter-val {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
  line-height: 1;
}

.stat-counter-txt {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- EXPERIENCE & EDUCATION --- */
.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.timeline-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-column-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-accent);
  color: var(--text-main);
}

.timeline-wrapper {
  position: relative;
  padding-left: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.timeline-wrapper::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  background: var(--border-accent);
}

.timeline-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition-fast);
}

.timeline-card:hover {
  border-color: var(--border-accent);
  transform: translateX(4px);
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 24px;
  left: -1.75rem;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 2px solid var(--bg-body);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.timeline-date {
  font-size: 0.775rem;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-org {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- TESTIMONIALS SECTION --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all var(--transition-normal);
}

.testimonial-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-3px);
}

.quote-icon {
  font-size: 2.5rem;
  line-height: 1;
  color: var(--accent-cyan);
  opacity: 0.4;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.author-info h4 {
  font-size: 0.95rem;
  color: var(--text-main);
}

.author-info p {
  font-size: 0.8rem;
  color: var(--text-sub);
}

/* --- RESUME / CV SECTION & PRINT VIEW --- */
.resume-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.resume-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.resume-paper {
  background: #ffffff;
  color: #1e293b;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid #cbd5e1;
}

.resume-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 1000px;
}

.resume-sidebar {
  background: #113438;
  color: #e2e8f0;
  padding: 2.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.resume-profile-header {
  text-align: center;
}

.resume-avatar-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem auto;
  border: 3px solid #38bdf8;
  background: #ffffff;
}

.resume-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.resume-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.resume-role {
  font-size: 0.825rem;
  color: #38bdf8;
  font-family: var(--font-mono);
  margin-top: 0.35rem;
}

.resume-side-block h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}

.resume-side-block p, .resume-side-block li {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.resume-side-block ul {
  list-style: square;
  padding-left: 1.2rem;
}

.resume-main-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.resume-section-block h3 {
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  border-bottom: 2px solid #0284c7;
  padding-bottom: 0.35rem;
  margin-bottom: 0.85rem;
}

.resume-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.resume-item-title {
  font-size: 0.925rem;
  font-weight: 700;
  color: #1e293b;
}

.resume-item-badge {
  font-size: 0.75rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  color: #475569;
  font-family: var(--font-mono);
}

.resume-item-sub {
  font-size: 0.825rem;
  color: #0284c7;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.resume-list-bullets {
  list-style: disc;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.6;
}

/* --- CONTACT SECTION --- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
}

.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card-info {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-fast);
}

.contact-card-info:hover {
  border-color: var(--accent-blue);
  transform: translateX(4px);
}

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

.contact-meta h4 {
  font-size: 0.825rem;
  color: var(--text-sub);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.contact-meta p {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.contact-form-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

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

.server-status-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 1rem;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 3.5rem 0 2rem 0;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.social-link-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.social-link-btn:hover {
  border-color: var(--accent-blue);
  color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-sub);
}

/* --- HIGH-RES MODAL / LIGHTBOX (Clear, Never Blurred) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  max-width: 940px; /* Wide format for full certificate readability */
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: scale(0.96);
  transition: transform var(--transition-normal);
  padding: 2.25rem;
}

.modal-overlay.open .modal-content-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  background: #e53e3e;
  color: #ffffff;
  border-color: #e53e3e;
}

.modal-img-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-light);
  background: #0f172a;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modal-img-container img {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  transition: opacity var(--transition-fast);
}

/* Modal Gallery Navigation Bar */
.modal-gallery-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.85rem 0;
  margin-bottom: 0.75rem;
  scrollbar-width: thin;
}

.modal-thumb-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
}

.modal-thumb-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-main);
  background: var(--bg-surface);
}

.modal-thumb-btn.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(14, 165, 233, 0.12);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.25);
}

.modal-credentials-box {
  background: rgba(14, 165, 233, 0.08);
  border: 1px dashed var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-main);
  flex-wrap: wrap;
}

.modal-features-list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.modal-features-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.6;
}

.modal-features-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 3000;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  color: var(--text-main);
  padding: 1rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.toast-success {
  border-color: var(--accent-green);
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-bio {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats-row {
    width: 100%;
    max-width: 500px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-card-left {
    order: -1;
  }

  .calc-container-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .stats-grid-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .resume-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 68px;
  }

  .nav-menu {
    display: none;
  }

  .mobile-nav-toggle {
    display: flex;
  }

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

  .hero-title .title-greet {
    font-size: 1.5rem;
  }

  .portrait-frame {
    width: 320px;
    min-height: 400px;
  }

  .portrait-img-box {
    width: 240px;
    height: 240px;
  }

  .floating-pill {
    display: none;
  }

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

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

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

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

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

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

  .resume-main-content {
    padding: 1.5rem;
  }

  .calc-device {
    width: 100%;
    max-width: 320px;
  }
}

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

  .hero-stats-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .btn {
    width: 100%;
  }

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

  .resume-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* --- PRINT STYLESHEET FOR RESUME / CV --- */
@media print {
  .navbar,
  .mobile-drawer,
  .mobile-nav-toggle,
  .theme-toggle-btn,
  #ambientCanvas,
  .ambient-glow,
  .js-viewport-badge,
  .hero-section,
  #about,
  #skills,
  #services,
  #projects,
  #calculator,
  #certificates,
  #experience,
  #testimonials,
  #contact,
  .site-footer,
  .resume-toolbar,
  .modal-overlay,
  .toast-container {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .resume-section {
    padding: 0 !important;
    background: none !important;
    border: none !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .resume-paper {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .resume-layout {
    grid-template-columns: 240px 1fr !important;
    min-height: auto !important;
  }

  .resume-sidebar {
    background: #113438 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .resume-main-content {
    padding: 1.5rem !important;
  }
}
