/* --- CSS Variables & Design System --- */
:root {
  /* Colors - Data-focused theme */
  --bg-color: #f0f4f8; /* Light blue-grey */
  --surface-color: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #4b5563; /* Improved from #555555 for WCAG AA */
  --border-color: #000000;
  --accent-color: #2563eb; /* Professional blue */
  --accent-secondary: #10b981; /* Data green */

  /* Spacing & Borders */
  --border-width: 1.5px;
  --radius-card: 32px;
  --radius-btn: 50px; /* Pill */
  --radius-input: 12px;
  --padding-container: 40px;
  --gap-grid: 24px;

  /* Typography */
  --font-heading: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Neo-Brutalist Shadows */
  --shadow-hard: 4px 4px 0px 0px var(--border-color);
  --shadow-hover: 2px 2px 0px 0px var(--border-color);
  --shadow-offset-x: 4px;
  --shadow-offset-y: 4px;

  /* Transitions */
  --transition-speed: 0.3s;
}

/* Dark Mode Variables */
body.dark-mode {
  --bg-color: #1e293b;
  --surface-color: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8; /* Improved from #cbd5e1 for better contrast on dark bg */
  --border-color: #ffffff;
  --accent-color: #2563eb;
  --accent-secondary: #10b981;
  background-color: #1e293b;
}

/* --- Reset & Global Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: #1a1a1a;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  transition:
    background-color var(--transition-speed) ease,
    color var(--transition-speed) ease;
}

body.dark-mode {
  color: #f1f5f9;
  background-color: #1e293b;
}

body.dark-mode p,
body.dark-mode span:not(.hero-tagline):not(.stat-number) {
  color: #cbd5e1;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  opacity: 0.1;
}

body::before {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
  top: -300px;
  right: -300px;
  animation: float 20s ease-in-out infinite;
}

body::after {
  width: 700px;
  height: 700px;
  background: radial-gradient(
    circle,
    var(--accent-secondary) 0%,
    transparent 70%
  );
  bottom: -250px;
  left: -250px;
  animation: float 25s ease-in-out infinite reverse;
}

main {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

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

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

ul {
  list-style: none;
}

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

/* --- Utilities --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 35px,
    rgba(0, 0, 0, 0.02) 35px,
    rgba(0, 0, 0, 0.02) 70px
  );
  pointer-events: none;
  z-index: 0;
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section-alt {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.3)
  );
  backdrop-filter: blur(20px);
}

body.dark-mode .section-alt {
  background: transparent;
  backdrop-filter: none;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 60px;
  display: inline-block;
  background: #ffffff;
  padding: 10px 30px;
  border: 1.5px solid #000000;
  border-radius: var(--radius-btn);
  box-shadow: 4px 4px 0 #000000;
  left: 50%;
  position: relative;
  transform: translateX(-50%);
}

body.dark-mode .section-title {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background-color: #ffffff;
  color: #000000;
  border: 1.5px solid #000000;
  border-radius: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 4px 4px 0px #000000;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* Primary Button - Main CTA */
.btn-primary {
  background-color: #2563eb;
  color: #000000;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* Secondary Button - Neutral */
.btn-secondary {
  background-color: #ffffff;
  color: #000000;
  border: 1.5px solid #000000;
  box-shadow: 4px 4px 0px #000000;
}

.btn-secondary:hover {
  background-color: #ffffff;
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* Tertiary Button - Outline style */
.btn-tertiary {
  background: transparent;
  color: #10b981;
  border: 1.5px solid #10b981;
  box-shadow: 4px 4px 0 #10b981;
}

.btn-tertiary:hover {
  background: transparent;
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* --- Navbar --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  background: transparent;
  transition: all 0.3s ease;
}

.navbar {
  width: fit-content;
  margin: 0 auto;
  background: #ffffff;
  padding: 10px 20px;
  border: 1.5px solid #000000;
  border-radius: var(--radius-btn);
  box-shadow: 4px 4px 0 #000000;
  transition: all 0.3s ease;
}

body.dark-mode .navbar {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

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

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s;
  position: relative;
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

body.dark-mode .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background-color: #000000;
  color: #ffffff;
  box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.2);
  border: 1.5px solid #000000;
}

body.dark-mode .nav-link.active {
  background-color: #ffffff;
  color: #000000;
  border: 1.5px solid #ffffff;
  box-shadow: 2px 2px 0px 0px rgba(255, 255, 255, 0.3);
}

header.scrolled .nav-link.active {
  background-color: #000000;
  color: #ffffff;
  box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.3);
}

body.dark-mode header.scrolled .nav-link.active {
  background-color: #ffffff;
  color: #000000;
  box-shadow: 2px 2px 0px 0px rgba(255, 255, 255, 0.3);
}

/* Mobile Nav Tweak - moved to responsive section at bottom */

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 80px;
  padding-bottom: 40px;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(37, 99, 235, 0.08),
      transparent 50%
    ),
    #f0f4f8;
}

body.dark-mode .hero {
  background: #1e293b;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  max-width: 1200px;
  width: 100%;
  padding: 0 40px;
}

.hero-text {
  flex: 1;
  text-align: left;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

/* --- Stats Section --- */
.stats-section {
  padding: 60px 0;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.05),
    rgba(16, 185, 129, 0.05)
  );
  border-top: 2px solid rgba(0, 0, 0, 0.05);
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

body.dark-mode .stats-section {
  background: #1e293b;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.stats-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(
      circle at 20% 50%,
      rgba(37, 99, 235, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 50%,
      rgba(16, 185, 129, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

body.dark-mode .stats-section::before {
  display: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.stat-card {
  text-align: center;
  padding: 40px 20px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 20px;
  box-shadow: 4px 4px 0 #000000;
  transition: all 0.3s ease;
}

body.dark-mode .stat-card {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 6px 6px 0px 0px #000000;
}

body.dark-mode .stat-card:hover {
  box-shadow: 6px 6px 0px 0px #ffffff;
}

.stat-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  line-height: 1.2;
}

.stat-label {
  font-size: 1rem;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 1px;
}

body.dark-mode .stat-label {
  color: #94a3b8; /* Improved from #9ca3af for readability */
}

/* --- Hero Section (continued) --- */

.hero-badge {
  background: #ffffff;
  padding: 12px 28px;
  border: 1.5px solid #000000;
  border-radius: 12px;
  font-weight: 700;
  margin-bottom: 24px;
  box-shadow: 4px 4px 0 #000000;
  z-index: 2;
  font-size: 1.1rem;
  position: relative;
  color: #111111;
}

body.dark-mode .hero-badge {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
  color: #f1f5f9;
}

.hero-badge::before {
  display: none;
}

.hero h1 {
  font-size: 3.5rem;
  max-width: 700px;
  margin-bottom: 20px;
  z-index: 2;
  color: #111111;
}

body.dark-mode .hero h1 {
  color: #f5f5f5;
}

.typing-text {
  overflow: hidden;
  border-right: 3px solid #111111;
  white-space: nowrap;
  animation:
    typing 2s steps(16, end),
    blink-caret 0.75s step-end infinite;
  display: inline-block;
}

body.dark-mode .typing-text {
  border-right: 3px solid #f5f5f5;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #111111;
  }
}

body.dark-mode .typing-text {
  animation:
    typing 2s steps(16, end),
    blink-caret-dark 0.75s step-end infinite;
}

@keyframes blink-caret-dark {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #f5f5f5;
  }
}

/* Remove cursor after animation */
.typing-text.typing-done {
  border-right: none;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #333333;
  font-weight: 500;
  max-width: 600px;
  margin-bottom: 20px;
  z-index: 2;
}

body.dark-mode .hero-subtitle {
  color: #e2e8f0; /* Improved from #cfcfcf for AA contrast */
}

.hero-tagline {
  font-size: 1.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: #2563eb;
  max-width: 600px;
  margin-bottom: 25px;
  z-index: 2;
  min-height: 2.2em;
}

body.dark-mode .hero-tagline {
  color: #2563eb;
}

.hero-image-container {
  position: relative;
  width: 320px;
  height: 320px;
  flex-shrink: 0;
  z-index: 2;
}

.hero-image-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed #000000;
  animation: rotateBorder 20s linear infinite;
  pointer-events: none;
}

body.dark-mode .hero-image-container::before {
  border: 2px dashed #ffffff;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  padding: 6px;
}

@keyframes rotateBorder {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.sticker-bg {
  display: none;
}

/* Decorations - Hidden for clean design */
.deco {
  display: none;
}

/* hero desktop sizing - moved to responsive section at bottom */

/* --- Skills/Services (Bento Grid) --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap-grid);
}

.bento-card {
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: 4px 4px 0 #000000;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

body.dark-mode .bento-card {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

.bento-card::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
  opacity: 0.1;
  transition: opacity 0.3s;
}

.bento-card:hover::before {
  opacity: 0.2;
}

.bento-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 6px 6px 0px 0px var(--border-color);
}

.bento-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px auto;
  stroke: var(--text-primary);
  stroke-width: 2;
}

.bento-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.skill-list {
  list-style: none;
  margin-top: 15px;
  padding: 0;
}

.skill-list li {
  padding: 5px 0;
  color: #4b5563;
  font-size: 0.95rem;
}

body.dark-mode .skill-list li {
  color: #cbd5e1;
}

.skill-list li::before {
  content: "▸ ";
  color: var(--accent-color);
  font-weight: bold;
}

/* --- Experience (Timeline) --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  padding-left: 60px;
}

.timeline-marker {
  position: absolute;
  left: 11px;
  top: 5px;
  width: 20px;
  height: 20px;
  background: var(--surface-color);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  z-index: 1;
}

.timeline-date {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
  display: block;
}

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.timeline-company {
  display: inline-block;
  background: #000000;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}

body.dark-mode .timeline-company {
  background: #ffffff;
  color: #000000;
}

.timeline-description {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.timeline-description li {
  padding: 5px 0;
  color: var(--text-secondary);
}

.timeline-description li::before {
  content: "• ";
  color: var(--accent-color);
  font-weight: bold;
}

/* --- Portfolio/Projects --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap-grid);
}

.portfolio-card {
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 4px 4px 0 #000000;
  transition: all 0.3s;
  position: relative;
}

body.dark-mode .portfolio-card {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

.portfolio-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 250px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.portfolio-card:hover::after {
  opacity: 1;
}

.portfolio-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 8px 8px 0px 0px var(--border-color);
}

.portfolio-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-bottom: var(--border-width) solid var(--border-color);
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #000000;
  position: relative;
  overflow: hidden;
}

body.dark-mode .portfolio-card::before {
  color: #ffffff;
}

.portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.portfolio-img-placeholder {
  font-size: 4rem;
  position: absolute;
  z-index: 1;
}

.portfolio-content {
  padding: 30px;
}

.portfolio-content h3 {
  margin-bottom: 10px;
}

.portfolio-role {
  display: inline-block;
  background: var(--accent-color);
  color: #000000;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.portfolio-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tool-tag {
  background: var(--bg-color);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.portfolio-link {
  display: inline-block;
  margin-top: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* --- Certifications --- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.cert-card {
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 20px;
  padding: 30px 20px;
  box-shadow: 4px 4px 0 #000000;
  text-align: center;
  transition: transform 0.2s;
  position: relative;
  overflow: hidden;
}

body.dark-mode .cert-card {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

.cert-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--accent-color),
    var(--accent-secondary)
  );
}

.cert-card:hover {
  transform: translateY(-3px) scale(1.02);
}

.cert-card h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

/* --- Contact --- */
.contact-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.contact-card {
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: 4px 4px 0 #000000;
}

body.dark-mode .contact-card {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-family: var(--font-heading);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 16px;
  border: 1.5px solid #000000;
  border-radius: var(--radius-input);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fafafa;
  color: #1a1a1a;
  outline: none;
  transition: box-shadow 0.2s;
}

body.dark-mode .form-input,
body.dark-mode .form-textarea {
  background: #1e293b;
  color: #f1f5f9;
  border: 1.5px solid #ffffff;
}

.form-input:focus,
.form-textarea:focus {
  box-shadow: 2px 2px 0px 0px #555555;
  background: #fff;
}

body.dark-mode .form-input:focus,
body.dark-mode .form-textarea:focus {
  box-shadow: 2px 2px 0px 0px #cbd5e1;
  background: #334155;
}

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

.submit-btn {
  width: 100%;
  margin-top: 10px;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 60px 0 30px;
  margin-top: 60px;
  border-top: 2px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode footer {
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border: 1.5px solid #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: #ffffff;
}

.social-icon:hover {
  background: #000000;
  color: #ffffff;
  transform: translateY(-3px);
}

body.dark-mode .social-icon {
  background: #334155;
  border: 1.5px solid #ffffff;
}

body.dark-mode .social-icon:hover {
  background: #ffffff;
  color: #000000;
}

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

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

/* --- Toast Notification --- */
#toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #000000;
  color: #ffffff;
  text-align: center;
  border-radius: var(--radius-btn);
  padding: 16px;
  position: fixed;
  z-index: 2000;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  border: 1.5px solid #000000;
  box-shadow: 4px 4px 0 #000000;
}

body.dark-mode #toast {
  background-color: #10b981;
  color: #000000;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

#toast.show {
  visibility: visible;
  animation:
    fadein 0.5s,
    fadeout 0.5s 2.5s;
}

@keyframes fadein {
  from {
    bottom: 0;
    opacity: 0;
  }
  to {
    bottom: 30px;
    opacity: 1;
  }
}

@keyframes fadeout {
  from {
    bottom: 30px;
    opacity: 1;
  }
  to {
    bottom: 0;
    opacity: 0;
  }
}
/* --- Download Button --- */
.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #10b981;
  border: 1.5px solid #10b981;
  box-shadow: 4px 4px 0px #10b981;
  font-weight: 600;
}

.btn-download:hover {
  background: transparent;
  color: #10b981;
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* --- Skill Confidence Bars --- */
.skill-bars-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.skill-bar-item {
  width: 100%;
}

.skill-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
}

.skill-name {
  color: #111111;
}

body.dark-mode .skill-name {
  color: #f1f5f9;
}

.skill-percentage {
  color: #2563eb;
  font-size: 1.1rem;
}

body.dark-mode .skill-percentage {
  color: #60a5fa;
}

.skill-bar-track {
  width: 100%;
  height: 16px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 50px;
  overflow: hidden;
  position: relative;
  box-shadow: 2px 2px 0 #000000;
}

body.dark-mode .skill-bar-track {
  background: #1e293b;
  border: 1.5px solid #ffffff;
  box-shadow: 2px 2px 0 #ffffff;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #10b981);
  border-radius: 50px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- Data Philosophy Section --- */
.philosophy-section {
  padding: 80px 0;
  background: transparent;
}

body.dark-mode .philosophy-section {
  background: transparent;
}

.philosophy-card {
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 20px;
  padding: 60px 40px;
  box-shadow: 4px 4px 0 #000000;
}

body.dark-mode .philosophy-card {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 30px;
}

.philosophy-item {
  padding: 25px;
  background: #f0f4f8;
  border: 1.5px solid #000000;
  border-radius: 20px;
  text-align: center;
  transition: all 0.3s;
}

body.dark-mode .philosophy-item {
  background: #1e293b;
  border: 1.5px solid #ffffff;
}

.philosophy-item:hover {
  transform: translateY(-5px);
  box-shadow: 6px 6px 0 #000000;
}

body.dark-mode .philosophy-item:hover {
  box-shadow: 6px 6px 0 #ffffff;
}

.philosophy-number {
  font-size: 2.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.philosophy-item p {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  color: #111111;
  margin: 0;
}

body.dark-mode .philosophy-item p {
  color: #f1f5f9;
}

/* --- View Project Button --- */
.btn-view-project {
  width: 100%;
  margin-top: 15px;
  padding: 12px 24px;
  background: #2563eb;
  color: #000000;
  border: 1.5px solid #000000;
  border-radius: var(--radius-btn);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 4px 4px 0px #000000;
}

.btn-view-project:hover {
  background: #2563eb;
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* --- Project Modal --- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  overflow-y: auto;
  padding: 40px 20px;
}

.modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal-content {
  background: #ffffff;
  color: #1a1a1a;
  border: 1.5px solid #000000;
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  position: relative;
  box-shadow: 8px 8px 0 #000000;
  animation: modalSlideIn 0.3s ease-out;
  margin: auto;
}

body.dark-mode .modal-content {
  background: #334155;
  color: #f1f5f9;
  border: 1.5px solid #ffffff;
  box-shadow: 8px 8px 0 #ffffff;
}

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

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #ffffff;
  color: #000000;
  border: 1.5px solid #000000;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 4px 4px 0 #000000;
  z-index: 10;
}

.modal-close:hover {
  background: #d32f2f;
  color: #ffffff;
  transform: rotate(90deg);
}

body.dark-mode .modal-close {
  background: #10b981;
  color: #000000;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

body.dark-mode .modal-close:hover {
  background: #d32f2f;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

.modal-header {
  padding: 40px 40px 20px;
  border-bottom: 1.5px solid #000000;
}

body.dark-mode .modal-header {
  border-bottom: 1.5px solid #ffffff;
}

.modal-header h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.modal-role {
  display: inline-block;
  padding: 6px 16px;
  background: #2563eb;
  color: #000000;
  border: 1.5px solid #000000;
  border-radius: var(--radius-btn);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  margin: 0;
  box-shadow: 2px 2px 0 #000000;
}

body.dark-mode .modal-role {
  background: #10b981;
  border: 1.5px solid #ffffff;
  box-shadow: 2px 2px 0 #ffffff;
}

.modal-body {
  padding: 40px;
}

.modal-image {
  width: 100%;
  height: 300px;
  border: var(--border-width) solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-section {
  margin-bottom: 30px;
}

.modal-section h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.modal-section p {
  line-height: 1.7;
  color: var(--text-secondary);
  font-size: 1rem;
}

.modal-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-section ul li {
  padding: 12px 0 12px 30px;
  position: relative;
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal-section ul li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: bold;
  font-size: 1.2rem;
}

.modal-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-tech-tags .tool-tag {
  padding: 8px 16px;
  background: #f0f4f8;
  border: 1.5px solid #000000;
  border-radius: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 2px 2px 0 #000000;
}

body.dark-mode .modal-tech-tags .tool-tag {
  background: #1e293b;
  border: 1.5px solid #ffffff;
  box-shadow: 2px 2px 0 #ffffff;
  color: #f1f5f9;
}

/* --- Interactive Dashboard --- */
.dashboard-card {
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 4px 4px 0 #000000;
  max-width: 1000px;
  margin: 0 auto;
}

body.dark-mode .dashboard-card {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.dashboard-header h3 {
  font-size: 1.5rem;
  margin: 0;
  color: #111111;
}

body.dark-mode .dashboard-header h3 {
  color: #f1f5f9;
}

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

.dashboard-select {
  padding: 10px 20px;
  border: 1.5px solid #000000;
  border-radius: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 2px 2px 0 #000000;
}

body.dark-mode .dashboard-select {
  background: #1e293b;
  color: #f1f5f9;
  border: 1.5px solid #ffffff;
  box-shadow: 2px 2px 0 #ffffff;
}

.dashboard-select:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000000;
}

body.dark-mode .dashboard-select:hover {
  box-shadow: 3px 3px 0 #ffffff;
}

.dashboard-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.chart-container {
  position: relative;
  height: 400px;
  margin-bottom: 30px;
  padding: 20px;
  background: #f0f4f8;
  border: 1.5px solid #000000;
  border-radius: 20px;
}

body.dark-mode .chart-container {
  background: #1e293b;
  border: 1.5px solid #ffffff;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-box {
  text-align: center;
  padding: 20px;
  background: #f0f4f8;
  border: 1.5px solid #000000;
  border-radius: 20px;
  transition: all 0.3s;
}

body.dark-mode .stat-box {
  background: #1e293b;
  border: 1.5px solid #ffffff;
}

.stat-box:hover {
  transform: translateY(-3px);
  box-shadow: 4px 4px 0 #000000;
}

body.dark-mode .stat-box:hover {
  box-shadow: 4px 4px 0 #ffffff;
}

.stat-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.dark-mode .stat-title {
  color: #cbd5e1;
}

/* --- Learning Timeline --- */
.learning-timeline {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.learning-item {
  display: flex;
  gap: 30px;
  margin-bottom: 60px;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.learning-item.aos-animate {
  opacity: 1;
  transform: translateY(0);
}

.learning-item:last-child::after {
  display: none;
}

.learning-item::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 60px;
  width: 2px;
  height: calc(100% + 60px);
  background: linear-gradient(
    180deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  opacity: 0.3;
}

.learning-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 #000000;
  position: relative;
  z-index: 1;
}

body.dark-mode .learning-icon {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

.learning-icon svg {
  stroke: #2563eb;
}

body.dark-mode .learning-icon svg {
  stroke: #60a5fa;
}

.learning-content {
  flex: 1;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 4px 4px 0 #000000;
  transition: all 0.3s;
  text-align: left;
}

body.dark-mode .learning-content {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

.learning-content:hover {
  transform: translateX(5px);
  box-shadow: 6px 6px 0 #000000;
}

body.dark-mode .learning-content:hover {
  box-shadow: 6px 6px 0 #ffffff;
}

.learning-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #2563eb, #10b981);
  color: #000000;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  box-shadow: 2px 2px 0 #000000;
}

body.dark-mode .learning-badge {
  box-shadow: 2px 2px 0 #ffffff;
}

.learning-content h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #111111;
}

body.dark-mode .learning-content h3 {
  color: #f1f5f9;
}

.learning-content p {
  color: #4b5563;
  line-height: 1.7;
  margin: 0;
}

body.dark-mode .learning-content p {
  color: #cbd5e1;
}

/* Mobile responsiveness for new sections - moved to responsive section at bottom */

/* --- Scroll Progress Indicator --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: transparent;
  z-index: 10000;
}

.scroll-progress-bar {
  height: 100%;
  background: #2563eb;
  width: 0%;
  transition: width 0.1s ease;
}

/* --- Theme Toggle Button --- */
.theme-toggle {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 4px 4px 0px #000000;
  position: relative;
  overflow: hidden;
  margin-left: 20px;
}

body.dark-mode .theme-toggle {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0px #ffffff;
}

.theme-toggle:hover {
  transform: rotate(180deg) scale(1.05);
  box-shadow: 6px 6px 0px #000000;
}

body.dark-mode .theme-toggle:hover {
  box-shadow: 6px 6px 0px #ffffff;
}

.theme-toggle:active {
  transform: rotate(180deg) scale(0.95);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  position: absolute;
  transition: all 0.3s ease;
  stroke: #000000;
}

body.dark-mode .theme-toggle .sun-icon,
body.dark-mode .theme-toggle .moon-icon {
  stroke: #ffffff;
}

.theme-toggle .sun-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle .moon-icon {
  opacity: 0;
  transform: scale(0) rotate(-180deg);
}

body.dark-mode .theme-toggle .sun-icon {
  opacity: 0;
  transform: scale(0) rotate(180deg);
}

body.dark-mode .theme-toggle .moon-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Update navbar for theme toggle */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* --- Micro-interactions --- */

/* Button ripple effect */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.btn::before,
.btn-primary::before,
.btn-view-project::before,
.btn-download::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: inherit;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

.btn,
.btn-primary,
.btn-view-project,
.btn-download {
  position: relative;
  overflow: hidden;
}

.btn:active::before,
.btn-primary:active::before,
.btn-view-project:active::before,
.btn-download:active::before {
  animation: ripple 0.6s ease-out;
}

/* Card tilt effect on hover */
.bento-card,
.portfolio-card,
.cert-card,
.testimonial-card {
  transition:
    all 0.3s ease,
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card:hover,
.portfolio-card:hover,
.cert-card:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-5px);
}

/* Pulse animation for stats */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.stat-card:hover .stat-number {
  animation: pulse 0.6s ease-in-out;
}

/* Smooth transitions for all interactive elements */
a,
button,
input,
textarea,
select {
  transition: all var(--transition-speed) ease;
}

/* Glow effect on focus */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}

body.dark-mode button:focus-visible,
body.dark-mode a:focus-visible {
  outline: 3px solid #10b981;
  outline-offset: 3px;
}

body.dark-mode button:focus:not(:focus-visible),
body.dark-mode a:focus:not(:focus-visible) {
  outline: none;
}

/* Dark mode button styles */
body.dark-mode .btn {
  border: 1.5px solid white;
  box-shadow: 4px 4px 0px white;
  background-color: #334155;
  color: #f1f5f9;
}

body.dark-mode .btn:hover {
  box-shadow: none;
}

/* Primary button dark mode */
body.dark-mode .btn-primary {
  background-color: #2563eb;
  color: #000000;
  border: 1.5px solid white;
  box-shadow: 4px 4px 0px white;
}

body.dark-mode .btn-primary:hover {
  background-color: #2563eb;
  box-shadow: none;
}

/* Secondary button dark mode */
body.dark-mode .btn-secondary {
  background-color: #334155;
  color: #f1f5f9;
  border: 1.5px solid white;
  box-shadow: 4px 4px 0px white;
}

body.dark-mode .btn-secondary:hover {
  background-color: #334155;
  box-shadow: none;
}

/* Tertiary button dark mode */
body.dark-mode .btn-tertiary {
  background: transparent;
  color: #10b981;
  border: 1.5px solid #10b981;
  box-shadow: 4px 4px 0 #10b981;
}

body.dark-mode .btn-tertiary:hover {
  background: transparent;
  box-shadow: none;
}

/* Download button dark mode */
body.dark-mode .btn-download {
  background: transparent;
  color: #10b981;
  border: 1.5px solid #10b981;
  box-shadow: 4px 4px 0px #10b981;
}

body.dark-mode .btn-download:hover {
  background: transparent;
  box-shadow: none;
}

body.dark-mode .btn-view-project {
  background-color: #10b981;
  border: 1.5px solid white;
  box-shadow: 4px 4px 0px white;
}

body.dark-mode .btn-view-project:hover {
  background-color: #10b981;
  box-shadow: none;
}

/* Floating animation enhancement */
@keyframes float-enhanced {
  0%,
  100% {
    transform: translateY(0px);
  }
  25% {
    transform: translateY(-10px) translateX(5px);
  }
  50% {
    transform: translateY(-20px) translateX(0px);
  }
  75% {
    transform: translateY(-10px) translateX(-5px);
  }
}

.hero-badge:hover {
  animation: float-enhanced 2s ease-in-out infinite;
}

/* Skill bar shimmer effect */
@keyframes skill-shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.skill-bar-fill {
  background: linear-gradient(
    90deg,
    var(--accent-color) 0%,
    var(--accent-secondary) 45%,
    #fff 50%,
    var(--accent-secondary) 55%,
    var(--accent-color) 100%
  );
  background-size: 200% 100%;
}

.skill-bar-item:hover .skill-bar-fill {
  animation: skill-shimmer 2s linear infinite;
}

/* Icon bounce on hover */
@keyframes icon-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.bento-icon:hover,
.learning-icon:hover {
  animation: icon-bounce 0.6s ease-in-out;
}

/* Social icon rotation */
.social-icon {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-icon:hover {
  transform: rotate(360deg) scale(1.1);
}

/* --- Back Button (Top Left) --- */
.back-button {
  position: fixed;
  top: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 4px 4px 0px #000000;
  transition: all 0.3s ease;
  z-index: 1101;
  pointer-events: auto;
  color: #000000;
  text-decoration: none;
}

body.dark-mode .back-button {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0px #ffffff;
  color: #ffffff;
}

.back-button svg {
  stroke: #000000;
  stroke-width: 2;
  transition: all 0.3s ease;
}

body.dark-mode .back-button svg {
  stroke: #ffffff;
}

.back-button:hover {
  background: #2563eb;
  color: #000000;
  border-color: #000000;
  transform: translateX(-8px) scale(1.15);
  box-shadow: 8px 8px 0 #000000;
}

.back-button:hover svg {
  stroke: #000000;
}

.back-button:active {
  transform: translateX(-4px) scale(1.1);
  box-shadow: 4px 4px 0 #000000;
}

/* Dark mode for back button */
body.dark-mode .back-button:hover {
  background: #2563eb;
  border-color: #ffffff;
  box-shadow: 8px 8px 0 #ffffff;
}

body.dark-mode .back-button:active {
  box-shadow: 4px 4px 0 #ffffff;
}

/* --- Scroll to Top Button --- */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #2563eb;
  color: #000000;
  border: 1.5px solid #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 4px 4px 0px #000000;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

body.dark-mode .scroll-to-top {
  background: #2563eb;
  color: #000000;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0px #ffffff;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: #10b981;
  transform: translateY(-5px);
  box-shadow: 6px 6px 0 #000000;
}

body.dark-mode .scroll-to-top:hover {
  background: #10b981;
  box-shadow: 6px 6px 0 #ffffff;
}

.scroll-to-top:active {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 #000000;
}

body.dark-mode .scroll-to-top:active {
  box-shadow: 3px 3px 0 #ffffff;
}

/* --- Keyboard Shortcuts Helper --- */
.shortcuts-helper {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 4px 4px 0px #000000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
  max-width: 300px;
}

body.dark-mode .shortcuts-helper {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0px #ffffff;
}

.shortcuts-helper.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.shortcuts-helper h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: #000000;
}

body.dark-mode .shortcuts-helper h3 {
  color: #ffffff;
}

.shortcuts-helper ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shortcuts-helper li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: #4b5563;
  font-size: 0.9rem;
}

body.dark-mode .shortcuts-helper li {
  color: #9ca3af;
}

.shortcuts-helper kbd {
  background: #f0f4f8;
  border: 1.5px solid #000000;
  border-radius: 6px;
  padding: 4px 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 30px;
  text-align: center;
  box-shadow: 2px 2px 0 #000000;
}

body.dark-mode .shortcuts-helper kbd {
  background: #1e293b;
  border: 1.5px solid #ffffff;
  box-shadow: 2px 2px 0 #ffffff;
  color: #ffffff;
}

/* --- Animated Counter for Stats --- */
.stat-number {
  animation: countUp 2s ease-out forwards;
}

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

/* --- Interactive Skill Bars with Tooltip --- */
.skill-bar-item {
  position: relative;
}

.skill-bar-item::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: #000000;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 4px 4px 0px #000000;
}

body.dark-mode .skill-bar-item::after {
  background: #ffffff;
  color: #000000;
  box-shadow: 4px 4px 0px #ffffff;
}

.skill-bar-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* --- Click to Copy Effect --- */
.copy-notification {
  position: fixed;
  top: 100px;
  right: 30px;
  background: #10b981;
  color: #000000;
  padding: 15px 25px;
  border-radius: 12px;
  border: 1.5px solid #000000;
  box-shadow: 4px 4px 0px #000000;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s ease;
  z-index: 10000;
  pointer-events: none;
}

body.dark-mode .copy-notification {
  background: #10b981;
  color: #000000;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0px #ffffff;
}

.copy-notification.show {
  opacity: 1;
  transform: translateX(0);
}

/* Shake animation for interactive elements */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.5s ease;
}

/* Mobile adjustments - moved to responsive section at bottom */

/* --- Section Reveal Animations --- */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Rotating Tagline --- */
.rotating-tagline {
  min-height: 1.6em;
  display: inline-block;
}

/* --- Currently Learning Badge --- */
.learning-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 12px;
  padding: 10px 20px;
  box-shadow: 4px 4px 0 #000000;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  margin-top: 20px;
}

body.dark-mode .learning-badge {
  background: #334155;
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
  color: #f1f5f9;
}

.learning-badge .pulse-dot {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* --- Navbar Scroll Background --- */
header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.dark-mode header.scrolled {
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

/* Mobile adjustments for new features - moved to responsive section at bottom */

/* --- Toast Notification System --- */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 16px 24px;
  border: 1.5px solid #000000;
  border-radius: 12px;
  box-shadow: 4px 4px 0 #000000;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

.toast.success {
  background: #10b981;
  color: #000000;
}

.toast.error {
  background: #dc2626;
  color: #ffffff;
}

body.dark-mode .toast {
  border: 1.5px solid #ffffff;
  box-shadow: 4px 4px 0 #ffffff;
}

body.dark-mode .toast.success {
  background: #10b981;
  color: #000000;
}

body.dark-mode .toast.error {
  background: #dc2626;
  color: #ffffff;
}

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

/* Toast mobile - moved to responsive section at bottom */

/* ============================================================
   HAMBURGER MENU
   ============================================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1200;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   COMPREHENSIVE MOBILE-FIRST RESPONSIVE SYSTEM
   ============================================================ */

/* ---- MOBILE: 0px - 767px ---- */
@media (max-width: 767px) {
  /* --- Container (P3: Consistency - uniform padding) --- */
  .container {
    padding: 0 16px;
  }

  /* --- Typography (P1: Clarity - readable, no clutter) --- */
  h1,
  .hero h1 {
    font-size: 2.2rem !important;
    line-height: 1.25;
  }

  h2,
  .section-title {
    font-size: 1.5rem !important;
    padding: 8px 20px !important;
    margin-bottom: 32px !important;
  }

  h3 {
    font-size: 1.15rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
  }

  .hero-tagline {
    font-size: 1.1rem;
    min-height: 1.8em;
  }

  body {
    font-size: 15px;
    line-height: 1.7;
  }

  /* --- Navbar / Hamburger (P9: Accessibility) --- */
  .hamburger {
    display: flex;
  }

  .navbar {
    width: calc(100% - 32px);
    margin: 0 16px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface-color);
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 4px 4px 0 var(--border-color);
    gap: 4px;
    z-index: 1100;
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .nav-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    min-height: 44px;
    line-height: 20px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    margin-left: 10px;
    box-shadow: 2px 2px 0 var(--border-color);
  }

  header {
    padding: 10px 0;
  }

  /* --- Hero Section (P1: Clarity, P2: Visual Hierarchy) --- */
  .hero {
    min-height: auto;
    padding-top: 90px;
    padding-bottom: 24px;
  }

  .hero-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 0;
  }

  .hero-text {
    text-align: center;
    max-width: 100%;
  }

  .hero-image-container {
    width: 160px;
    height: 160px;
    order: -1;
  }

  .hero-badge {
    font-size: 0.85rem;
    padding: 8px 18px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 16px;
    box-shadow: 3px 3px 0 var(--border-color);
  }

  /* P2: Reduce visual clutter - hide tagline on small mobile */
  .hero-tagline {
    font-size: 1rem;
    margin-bottom: 16px;
  }

  /* P2: De-emphasize learning badge on mobile */
  .learning-badge {
    font-size: 0.8rem;
    padding: 6px 12px;
    gap: 6px;
    text-align: center;
    justify-content: center;
    box-shadow: 2px 2px 0 var(--border-color);
    margin-top: 12px;
  }

  /* P2: Visual Hierarchy - single dominant CTA */
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
  }

  .hero-buttons .btn {
    width: 100%;
    min-height: 48px;
    margin-left: 0 !important;
    justify-content: center;
  }

  /* Make primary CTA visually dominant */
  .hero-buttons .btn-primary {
    font-size: 1rem;
    padding: 14px 24px;
  }

  /* Visually recede secondary buttons */
  .hero-buttons .btn-secondary,
  .hero-buttons .btn-download {
    font-size: 0.9rem;
    padding: 12px 20px;
    box-shadow: 2px 2px 0 var(--border-color);
  }

  /* --- Stats Section (P6: Proximity) --- */
  .stats-section {
    padding: 40px 0;
  }

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

  .stat-card {
    padding: 20px 12px;
    border-radius: 16px;
    box-shadow: 3px 3px 0 var(--border-color);
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .stat-label {
    font-size: 0.8rem;
    letter-spacing: 0.5px;
  }

  /* --- Skills / Bento Grid (P5: Alignment - single column) --- */
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bento-card {
    padding: 24px 20px;
    border-radius: 20px;
    box-shadow: 3px 3px 0 var(--border-color);
    text-align: left;
    align-items: flex-start;
  }

  .bento-card h3 {
    font-size: 1.2rem;
  }

  .bento-icon {
    width: 36px;
    height: 36px;
    margin: 0 0 14px 0;
  }

  .skill-list li {
    font-size: 0.9rem;
    text-align: left;
  }

  /* --- Sections (P3: Consistency, P6: Proximity) --- */
  .section {
    padding: 48px 0;
  }

  /* P10: Remove diagonal stripe pattern on mobile */
  .section::before {
    display: none;
  }

  main {
    padding-top: 65px;
  }

  /* --- Portfolio / Projects (P5: Single column, left-aligned) --- */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portfolio-card {
    border-radius: 20px;
    box-shadow: 3px 3px 0 var(--border-color);
  }

  .portfolio-img {
    height: 180px;
  }

  .portfolio-content {
    padding: 20px 16px;
    text-align: left;
  }

  .portfolio-content h3 {
    font-size: 1.1rem;
    line-height: 1.35;
  }

  .portfolio-role {
    font-size: 0.75rem;
  }

  .tool-tag {
    font-size: 0.75rem;
    padding: 3px 10px;
  }

  /* --- Certifications (P3: Consistent card sizing) --- */
  .cert-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cert-card {
    padding: 20px 16px;
    border-radius: 16px;
    box-shadow: 3px 3px 0 var(--border-color);
  }

  .cert-card h4 {
    font-size: 1rem;
  }

  /* --- Contact (P8: Affordance, P6: Proximity) --- */
  .contact-wrapper {
    max-width: 100%;
  }

  .contact-card {
    padding: 24px 16px;
    border-radius: 20px;
    box-shadow: 3px 3px 0 var(--border-color);
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-label {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .form-input,
  .form-textarea {
    padding: 14px;
    font-size: 16px; /* Prevents iOS zoom */
    border-radius: 10px;
  }

  .submit-btn {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
    margin-top: 8px;
  }

  /* --- Timeline (P5: Left-aligned, P6: Proximity) --- */
  .timeline {
    max-width: 100%;
  }

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

  .timeline-item {
    padding-left: 40px;
    margin-bottom: 36px;
  }

  .timeline-marker {
    left: 6px;
    width: 18px;
    height: 18px;
  }

  .timeline-role {
    font-size: 1.05rem;
  }

  .timeline-description li {
    font-size: 0.9rem;
  }

  /* --- Modal (P1: Clarity on small screen) --- */
  .modal {
    padding: 12px 8px;
  }

  .modal-content {
    border-radius: 18px;
    box-shadow: 4px 4px 0 var(--border-color);
  }

  .modal-header {
    padding: 20px 16px 14px;
  }

  .modal-header h2 {
    font-size: 1.3rem;
    padding-right: 36px;
    line-height: 1.3;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-image {
    height: 180px;
    border-radius: 12px;
    margin-bottom: 20px;
  }

  .modal-section {
    margin-bottom: 20px;
  }

  .modal-section h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .modal-section p {
    font-size: 0.92rem;
    line-height: 1.65;
  }

  .modal-section ul li {
    padding: 8px 0 8px 26px;
    font-size: 0.92rem;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    box-shadow: 2px 2px 0 var(--border-color);
  }

  /* --- Footer (P3: Consistency) --- */
  footer {
    padding: 36px 0 20px;
    margin-top: 36px;
  }

  /* P8: Affordance - larger social tap targets */
  .social-links {
    gap: 16px;
  }

  .social-icon {
    width: 44px;
    height: 44px;
  }

  /* --- Fixed Elements (P8: Affordance) --- */
  .scroll-to-top {
    width: 44px;
    height: 44px;
    bottom: 16px;
    right: 16px;
    box-shadow: 2px 2px 0 var(--border-color);
  }

  .back-button {
    width: 44px;
    height: 44px;
    top: 14px;
    left: 14px;
    box-shadow: 2px 2px 0 var(--border-color);
  }

  /* --- Scroll Progress --- */
  .scroll-progress {
    height: 3px;
  }

  /* --- Shortcuts Helper (hidden on mobile - keyboard not primary) --- */
  .shortcuts-helper {
    display: none !important;
  }

  /* --- Copy Notification --- */
  .copy-notification {
    top: 70px;
    right: 16px;
    left: 16px;
    text-align: center;
    font-size: 0.9rem;
  }

  /* --- Toast (P7: Feedback) --- */
  .toast {
    bottom: 10px;
    right: 10px;
    left: 10px;
    padding: 14px 20px;
    font-size: 0.9rem;
  }

  #toast {
    min-width: auto;
    left: 16px;
    right: 16px;
    transform: none;
    font-size: 0.9rem;
  }

  /* --- Dashboard --- */
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .chart-container {
    height: 240px;
    padding: 10px;
    border-radius: 14px;
  }

  .dashboard-card {
    padding: 20px 14px;
    border-radius: 18px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-select {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  /* --- Learning Timeline --- */
  .learning-item {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 36px;
  }

  .learning-item::after {
    display: none;
  }

  .learning-icon {
    width: 48px;
    height: 48px;
    box-shadow: 2px 2px 0 var(--border-color);
  }

  .learning-content {
    padding: 20px 16px;
    box-shadow: 3px 3px 0 var(--border-color);
    text-align: left;
  }

  .learning-content h3 {
    font-size: 1.05rem;
  }

  .learning-content p {
    font-size: 0.9rem;
  }

  .learning-content .learning-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  /* --- Philosophy (P11: Scalability) --- */
  .philosophy-section {
    padding: 48px 0;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .philosophy-card {
    padding: 24px 16px;
    border-radius: 18px;
  }

  .philosophy-item {
    padding: 18px 14px;
    border-radius: 14px;
  }

  .philosophy-number {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .philosophy-item p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* --- Skill Bars --- */
  .skill-bars-container {
    gap: 20px;
  }

  .skill-bar-header {
    font-size: 0.9rem;
  }

  .skill-bar-track {
    height: 14px;
  }

  /* --- Buttons (P7: Feedback, P8: Affordance) --- */
  .btn {
    min-height: 48px;
    padding: 12px 24px;
    font-size: 0.95rem;
    box-shadow: 3px 3px 0 var(--border-color);
  }

  .btn:active {
    transform: translate(3px, 3px);
    box-shadow: none;
    transition: transform 0.1s ease;
  }

  .btn-view-project {
    min-height: 48px;
    padding: 12px 20px;
    box-shadow: 3px 3px 0 var(--border-color);
  }

  .btn-view-project:active {
    transform: translate(3px, 3px);
    box-shadow: none;
    transition: transform 0.1s ease;
  }

  /* --- P10: Motion Discipline --- */
  body::before,
  body::after {
    animation: none !important;
    display: none;
  }

  .hero-image-container::before {
    animation: none !important;
  }

  /* P12: Identity - maintain borders/shadows but reduce 3D tilt */
  .bento-card:hover,
  .portfolio-card:hover,
  .cert-card:hover {
    transform: none;
    box-shadow: 3px 3px 0 var(--border-color);
  }

  /* P7: Feedback - clean tap state */
  .bento-card:active,
  .portfolio-card:active,
  .cert-card:active,
  .stat-card:active {
    transform: scale(0.98);
    box-shadow: 1px 1px 0 var(--border-color);
    transition: transform 0.1s ease;
  }

  /* --- Skills page hero fixes (P1: Clarity) --- */
  .hero.skills-hero,
  .hero[style] {
    min-height: auto !important;
    padding-top: 90px !important;
    padding-bottom: 24px !important;
  }

  .hero.skills-hero .section-title {
    font-size: 1.8rem !important;
  }

  /* --- Section separators (P6: Proximity, P12: Identity) --- */
  .stats-section {
    border-top-width: 1.5px;
    border-bottom-width: 1.5px;
  }

  /* --- About section inline text fix (P5: Alignment) --- */
  .section .container > div[style*="text-align: center"] p {
    text-align: left !important;
  }
}

/* ---- TABLET: 768px - 1023px ---- */
@media (min-width: 768px) and (max-width: 1023px) {
  /* --- Container --- */
  .container {
    padding: 0 24px;
  }

  /* --- Navbar --- */
  .navbar {
    width: auto;
    max-width: calc(100% - 48px);
  }

  .nav-link {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  /* --- Hero Section --- */
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    padding: 0 24px;
  }

  .hero-text {
    text-align: center;
    max-width: 100%;
  }

  .hero-image-container {
    width: 220px;
    height: 220px;
    order: -1;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* --- Stats --- */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* --- Skills / Bento Grid --- */
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* --- Portfolio / Projects --- */
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* --- Certifications --- */
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* --- Dashboard --- */
  .dashboard-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .chart-container {
    height: 350px;
  }

  /* --- Philosophy --- */
  .philosophy-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* --- Section --- */
  .section {
    padding: 60px 0;
  }
}

/* ---- DESKTOP: 1024px and above ---- */
@media (min-width: 1024px) {
  /* --- Container --- */
  .container {
    padding: 0 40px;
    max-width: 1200px;
  }

  /* --- Hero --- */
  .hero-content {
    flex-direction: row;
    text-align: left;
  }

  .hero-text {
    text-align: left;
  }

  .hero-image-container {
    width: 280px;
    height: 280px;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  /* --- Stats --- */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* --- Skills / Bento Grid --- */
  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* --- Portfolio / Projects --- */
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* --- Certifications --- */
  .cert-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
  }

  /* --- Contact Form --- */
  .contact-wrapper {
    max-width: 600px;
  }
}

/* ---- LARGE DESKTOP: 1280px+ ---- */
@media (min-width: 1280px) {
  .hero-image-container {
    width: 320px;
    height: 320px;
  }

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

/* ---- PREFERS REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .typing-text {
    animation: none !important;
    border-right: none !important;
    width: 100% !important;
  }
}

/* ---- TOUCH DEVICE: disable hover effects ---- */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
    box-shadow: 4px 4px 0px #000000;
  }

  .btn-primary:hover {
    transform: none;
    box-shadow: 4px 4px 0px #000000;
  }

  .btn-secondary:hover {
    transform: none;
    box-shadow: 4px 4px 0px #000000;
  }

  .btn-view-project:hover {
    transform: none;
    box-shadow: 4px 4px 0px #000000;
  }

  .btn-download:hover {
    transform: none;
    box-shadow: 4px 4px 0 #10b981;
  }

  .bento-card:hover {
    transform: none;
  }

  .portfolio-card:hover {
    transform: none;
  }

  .cert-card:hover {
    transform: none;
  }

  .stat-card:hover {
    transform: none;
  }

  .nav-link:hover {
    transform: none;
  }

  .hero-badge:hover {
    animation: none;
  }

  body.dark-mode .btn:hover {
    transform: none;
    box-shadow: 4px 4px 0px white;
  }

  body.dark-mode .btn-primary:hover {
    transform: none;
    box-shadow: 4px 4px 0px white;
  }

  body.dark-mode .btn-view-project:hover {
    transform: none;
    box-shadow: 4px 4px 0px white;
  }
}

/* ---- WORD BREAK / OVERFLOW PREVENTION ---- */
h1,
h2,
h3,
h4,
p,
span,
a,
li {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Prevent horizontal scrollbar */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}
