/* ================================
   David Kitunov - Portfolio Styles
   Modern Dark Theme with Emerald/Teal Accents
   ================================ */

/* ================================
   CSS Reset & Custom Properties
   ================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors - Dark theme with emerald/teal */
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;

  --accent: #10b981;
  --accent-hover: #059669;
  --accent-2: #06b6d4;
  --accent-glow: rgba(16, 185, 129, 0.4);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Glass effect */
  --glass-bg: rgba(17, 24, 39, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, var(--accent), var(--accent-2));
  --gradient-text: linear-gradient(135deg, #10b981, #06b6d4, #22d3ee);
  --gradient-bg: radial-gradient(ellipse at top, #1a2744 0%, #0a0f1a 50%, #0a0f1a 100%);

  /* Typography */
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Space Grotesk', 'IBM Plex Sans', sans-serif;

  /* Spacing */
  --container-width: 1200px;
  --section-padding: clamp(74px, 9vw, 108px);
  --card-radius: 20px;
  --btn-radius: 12px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ================================
   Base Styles
   ================================ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated gradient background */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--gradient-bg);
}

/* Animated grid overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 70%, transparent 100%);
}

/* Floating particles container */
.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.3;
  animation: float-up 15s infinite ease-in-out;
}

.particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 18s;
}

.particle:nth-child(2) {
  left: 20%;
  animation-delay: 2s;
  animation-duration: 14s;
}

.particle:nth-child(3) {
  left: 30%;
  animation-delay: 4s;
  animation-duration: 20s;
}

.particle:nth-child(4) {
  left: 40%;
  animation-delay: 1s;
  animation-duration: 16s;
}

.particle:nth-child(5) {
  left: 50%;
  animation-delay: 3s;
  animation-duration: 22s;
}

.particle:nth-child(6) {
  left: 60%;
  animation-delay: 5s;
  animation-duration: 17s;
}

.particle:nth-child(7) {
  left: 70%;
  animation-delay: 2.5s;
  animation-duration: 19s;
}

.particle:nth-child(8) {
  left: 80%;
  animation-delay: 0.5s;
  animation-duration: 15s;
}

.particle:nth-child(9) {
  left: 90%;
  animation-delay: 3.5s;
  animation-duration: 21s;
}

.particle:nth-child(10) {
  left: 15%;
  animation-delay: 6s;
  animation-duration: 18s;
}

.particle:nth-child(11) {
  left: 25%;
  animation-delay: 7s;
  animation-duration: 16s;
}

.particle:nth-child(12) {
  left: 35%;
  animation-delay: 8s;
  animation-duration: 20s;
}

.particle:nth-child(13) {
  left: 45%;
  animation-delay: 1.5s;
  animation-duration: 14s;
}

.particle:nth-child(14) {
  left: 55%;
  animation-delay: 4.5s;
  animation-duration: 22s;
}

.particle:nth-child(15) {
  left: 65%;
  animation-delay: 5.5s;
  animation-duration: 17s;
}

.particle:nth-child(16) {
  left: 75%;
  animation-delay: 2s;
  animation-duration: 19s;
}

.particle:nth-child(17) {
  left: 85%;
  animation-delay: 6.5s;
  animation-duration: 15s;
}

.particle:nth-child(18) {
  left: 95%;
  animation-delay: 3s;
  animation-duration: 21s;
}

.particle:nth-child(19) {
  left: 5%;
  animation-delay: 7.5s;
  animation-duration: 18s;
}

.particle:nth-child(20) {
  left: 50%;
  animation-delay: 8.5s;
  animation-duration: 16s;
}

/* Different sizes */
.particle:nth-child(odd) {
  width: 3px;
  height: 3px;
  opacity: 0.2;
}

.particle:nth-child(3n) {
  width: 5px;
  height: 5px;
  opacity: 0.4;
  background: var(--accent-2);
}

.particle:nth-child(5n) {
  width: 2px;
  height: 2px;
  opacity: 0.15;
}

@keyframes float-up {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.3;
  }

  90% {
    opacity: 0.3;
  }

  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Glow orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.glow-orb-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  right: -100px;
  opacity: 0.15;
}

.glow-orb-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-2);
  bottom: 20%;
  left: -100px;
  opacity: 0.1;
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Section base */
section {
  padding: var(--section-padding) 0;
}

/* ================================
   Typography
   ================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.section-title {
  text-align: center;
  margin-bottom: clamp(38px, 6vw, 64px);
}

.section-title h2 {
  display: inline-block;
  position: relative;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 20px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

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

/* ================================
   Navigation
   ================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition-normal);
  overflow: hidden;
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.nav-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  transition: width 0.15s linear;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

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

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: var(--transition-normal);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-social a {
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: var(--transition-fast);
}

.nav-social a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-fast);
}

/* ================================
   Hero Section
   ================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
}

.hero-content {
  max-width: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-badge i {
  font-size: 0.75rem;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-title .greeting {
  display: block;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-title .name {
  display: block;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  text-align: left;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

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

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.hero-console {
  background:
    linear-gradient(180deg, rgba(8, 15, 30, 0.92), rgba(8, 15, 30, 0.82)),
    radial-gradient(circle at 12% 8%, rgba(6, 182, 212, 0.18), transparent 42%);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: var(--card-radius);
  padding: 20px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: start;
  min-height: 0;
  max-width: 560px;
}

.console-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.8);
}

.console-title {
  color: var(--text-primary);
  font-weight: 600;
}

.console-time {
  margin-left: auto;
  font-size: 0.8rem;
}

.console-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.console-line {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
}

.console-key {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.console-value {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.pipeline-map {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.pipe-node {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.55);
}

.pipe-node.online {
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.1);
}

.pipe-link {
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.6), rgba(6, 182, 212, 0.6));
  border-radius: 1px;
}

/* ================================
   Buttons
   ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--btn-radius);
  transition: var(--transition-normal);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #0a0f1a;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-hover);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
}

/* ================================
   About Section
   ================================ */
#about {
  background: transparent;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.about-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  font-size: 4rem;
  color: var(--accent);
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-text {
  margin-bottom: 32px;
}

.about-text p {
  margin-bottom: 16px;
}

.about-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.info-item {
  display: flex;
  gap: 12px;
}

.info-item i {
  color: var(--accent);
  font-size: 1.25rem;
  width: 24px;
}

.info-item span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-item strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
}

/* ================================
   Skills Section
   ================================ */
#skills {
  background: transparent;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: clamp(24px, 2.8vw, 32px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition-normal);
}

.skill-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 16px;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--accent);
}

.skill-card h3 {
  margin-bottom: 12px;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.skill-card:hover .skill-tag {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
}

/* ================================
   Workflow Section
   ================================ */
#workflow {
  background: transparent;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.workflow-step {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(11, 18, 32, 0.72));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  transition: var(--transition-normal);
}

.workflow-step:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.35);
}

.workflow-index {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.workflow-step h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.workflow-step p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ================================
   Experience Section
   ================================ */
#experience {
  background: transparent;
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.experience-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: clamp(24px, 2.8vw, 32px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-accent);
}

.experience-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.3);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.experience-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.experience-card h3 {
  margin-bottom: 8px;
}

.experience-company {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 16px;
}

.experience-card ul {
  list-style: none;
  padding: 0;
}

.experience-card li {
  position: relative;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.experience-card li::before {
  content: '->';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ================================
   Education Section
   ================================ */
#education {
  background: transparent;
}

.education-content {
  max-width: 900px;
  margin: 0 auto;
}

.education-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: clamp(26px, 3vw, 40px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 24px;
}

.education-header {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.education-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 16px;
  font-size: 1.75rem;
  color: var(--accent);
  flex-shrink: 0;
}

.education-info h3 {
  margin-bottom: 8px;
}

.education-info p {
  color: var(--text-muted);
  margin-bottom: 4px;
}

.education-year {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.education-courses {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.education-courses h4 {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 16px;
}

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

.course-tag {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.course-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ================================
   Projects Section
   ================================ */
#projects {
  background: transparent;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.project-card {
  --project-tint: 16, 185, 129;
  display: grid;
  grid-template-columns: minmax(340px, 1.05fr) 1fr;
  gap: 32px;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition-normal);
  position: relative;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 18%, rgba(var(--project-tint), 0.18), transparent 42%),
    radial-gradient(circle at 88% 80%, rgba(6, 182, 212, 0.14), transparent 40%);
  pointer-events: none;
}

.project-image {
  position: relative;
  padding: 26px 0 26px 26px;
  align-self: center;
}

.project-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(var(--project-tint), 0.08), rgba(15, 23, 42, 0.12));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: var(--transition-slow);
  position: relative;
  z-index: 1;
}

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

.project-content {
  padding: clamp(26px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.project-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.project-content h3 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.project-story {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.story-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: start;
}

.story-row span {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.story-row p {
  font-size: 1rem;
  color: var(--text-secondary);
}

.project-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.metric-tag {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
}

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

.stack-tag {
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--accent);
}

.project-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ================================
   Contact Section
   ================================ */
#contact {
  background: transparent;
  padding-bottom: 60px;
}

.contact-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 32px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.contact-content>p {
  font-size: 1.15rem;
  margin-bottom: 40px;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.contact-content::before,
.contact-content::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 25% 30%, rgba(236, 72, 153, 0.25), transparent 45%),
              radial-gradient(circle at 75% 70%, rgba(59, 130, 246, 0.25), transparent 45%);
  filter: blur(40px);
  opacity: 0.35;
  z-index: 0;
  animation: liquid-drift 22s ease-in-out infinite;
}

.contact-content::after {
  background: radial-gradient(circle at 65% 20%, rgba(16, 185, 129, 0.25), transparent 45%),
              radial-gradient(circle at 30% 80%, rgba(236, 72, 153, 0.2), transparent 45%);
  opacity: 0.3;
  animation-direction: reverse;
}

.contact-content > * {
  position: relative;
  z-index: 1;
}

@keyframes liquid-drift {
  0%   { transform: translate3d(-4%, -2%, 0) scale(1); }
  50%  { transform: translate3d(6%, 4%, 0) scale(1.04); }
  100% { transform: translate3d(-4%, -2%, 0) scale(1); }
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: var(--transition-normal);
}

.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0f1a;
  transform: translateY(-4px);
}

/* ================================
   Footer
   ================================ */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
}

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

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ================================
   Animations
   ================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Reveal animation classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Typing cursor */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  animation: blink 1s infinite;
  vertical-align: text-bottom;
}

@keyframes blink {

  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

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

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

  .project-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project-image {
    padding: 24px 24px 0;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 0 0 16px 16px;
    padding: 24px;
    gap: 20px;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }

  .hero-buttons {
    flex-direction: column;
  }

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

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

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

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

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

  .project-content {
    padding: 24px;
  }

  .project-image {
    padding: 16px 16px 0;
  }

  .hero-stats {
    border-top: none;
    padding-top: 12px;
  }

  .story-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contact-buttons {
    flex-direction: column;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  #hero {
    min-height: auto;
    padding-top: 96px;
  }

  .bg-grid,
  .particles {
    opacity: 0.35;
  }

  .glow-orb {
    display: none;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-console {
    padding: 16px;
    gap: 12px;
    box-shadow: none;
  }

  .console-header {
    font-size: 0.82rem;
  }

  .console-line {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 8px 10px;
  }

  .pipeline-map {
    gap: 6px;
  }

  .pipe-link {
    display: none;
  }

  .hero-stats {
    gap: 14px;
  }

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

  .project-card {
    gap: 16px;
  }

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

  .project-image {
    padding: 12px 12px 0;
  }

  .project-image img {
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  }

  .project-content {
    padding: 18px;
  }

  .project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }

  .project-story {
    gap: 10px;
    margin-bottom: 14px;
  }

  .story-row p {
    font-size: 0.95rem;
  }

  .metric-tag,
  .stack-tag {
    font-size: 0.75rem;
    padding: 5px 10px;
  }

  .project-links {
    flex-direction: column;
    gap: 10px;
  }

  .project-links .btn {
    width: 100%;
  }

  .skill-card,
  .experience-card,
  .education-card {
    padding: 24px;
  }
}
