/* ================================================================
   PORTFOLIO DESIGN SYSTEM — Himanshu Pathak
   Premium, ATS-optimized, recruiter-ready
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
  /* Frosty Dark Winter Theme */
  --bg-primary: #121418;
  --bg-secondary: #1a1d22;
  --bg-tertiary: #22262d;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-glass: rgba(136, 192, 208, 0.05);
  --bg-glass-hover: rgba(136, 192, 208, 0.1);

  --text-primary: #e5e9f0;
  --text-secondary: #d8dee9;
  --text-tertiary: #81a1c1;
  --text-muted: #4c566a;

  --accent: #8fbcbb;
  --accent-dim: rgba(143, 188, 187, 0.15);
  --accent-glow: rgba(143, 188, 187, 0.3);
  --accent-secondary: #88c0d0;
  --accent-secondary-dim: rgba(136, 192, 208, 0.15);
  --accent-gradient: linear-gradient(135deg, #8fbcbb 0%, #88c0d0 100%);
  --accent-gradient-text: linear-gradient(135deg, #8fbcbb 0%, #88c0d0 50%, #eceff4 100%);

  --success: #a3be8c;
  --warning: #ebcb8b;
  --danger: #bf616a;

  --border: rgba(136, 192, 208, 0.2);
  --border-accent: rgba(143, 188, 187, 0.4);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 40px rgba(143, 188, 187, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-heading: 'Cinzel', serif;

  --transition-fast: 0.15s ease;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --header-height: 72px;
  --max-width: 1200px;
}

/* Light Mode */
[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f4f4f8;
  --bg-card: rgba(0, 0, 0, 0.02);
  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-glass-hover: rgba(255, 255, 255, 0.85);

  --text-primary: #111118;
  --text-secondary: #555568;
  --text-tertiary: #8888a0;
  --text-muted: #b0b0c0;

  --accent: #0095cc;
  --accent-dim: rgba(0, 149, 204, 0.08);
  --accent-glow: rgba(0, 149, 204, 0.15);
  --accent-secondary: #6842d0;
  --accent-secondary-dim: rgba(104, 66, 208, 0.08);

  --border: rgba(0, 0, 0, 0.06);
  --border-accent: rgba(0, 149, 204, 0.2);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px rgba(0, 149, 204, 0.06);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--transition-base), color var(--transition-base);
}

h1, h2, h3, h4, h5, h6, .logo, .hero-title, .section-title {
  font-family: var(--font-heading);
}

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

ul,
ol {
  list-style: none;
}

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

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

input,
textarea {
  font-family: inherit;
}

/* ── Utility Classes ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Glass Card ── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.glass-card:hover {
  background: var(--bg-glass-hover);
  border-color: #ffffff;
  box-shadow: 0 0 50px rgba(143, 188, 187, 0.3), inset 0 0 20px rgba(143, 188, 187, 0.1);
  transform: translateY(-4px) scale(1.02);
}

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

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

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

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

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
  }

  50% {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
  }
}

@keyframes typewriter-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes gradient-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 1s cubic-bezier(0.2, 0, 0, 1), transform 1s cubic-bezier(0.2, 0, 0, 1);
}

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

/* ── Header / Navigation ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition-base);
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  opacity: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity var(--transition-base);
  z-index: -1;
}

.site-header.scrolled::before {
  opacity: 0.85;
}

.site-header.scrolled {
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 2px;
}

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

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}

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

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

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

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

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: all var(--transition-fast);
  background: var(--bg-glass);
  border: 1px solid var(--border);
}

.theme-toggle:hover {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--border-accent);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 24px;
}

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-secondary-dim) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease forwards;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

.hero-headline {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-headline .typed-text {
  color: var(--accent);
  font-weight: 600;
}

.hero-description {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
}

@keyframes breathPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(143, 188, 187, 0.25); }
  50% { box-shadow: 0 8px 32px rgba(143, 188, 187, 0.5); }
}

.btn-primary {
  background: var(--accent-gradient);
  color: #080b12;
  box-shadow: 0 4px 16px rgba(143, 188, 187, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  animation: breathPulse 3s infinite ease-in-out;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(143, 188, 187, 0.4);
  border-color: #ffffff;
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.hero-social {
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

.hero-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 20px;
  transition: all var(--transition-base);
}

.hero-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.hero-social a img {
  width: 20px;
  height: 20px;
  filter: grayscale(1) brightness(1.5);
  transition: filter var(--transition-base);
}

.hero-social a:hover img {
  filter: none;
}

.hero-image {
  flex-shrink: 0;
  width: 340px;
  height: 340px;
  position: relative;
  animation: fadeInRight 0.8s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent-gradient);
  opacity: 0.3;
  animation: pulse-glow 3s ease-in-out infinite;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  position: relative;
  z-index: 1;
}

/* ── Section Common ── */
.section {
  padding: 100px 0;
  position: relative;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-header {
  margin-bottom: 56px;
}

/* ── About Section ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--border-accent);
}

.about-image .orbit-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed var(--border-accent);
  animation: aboutSpinner 20s linear infinite;
}

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

.about-text h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.about-text h3 span {
  color: var(--accent);
}

.about-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.stat-card {
  text-align: center;
  padding: 20px 16px;
}

.stat-card .stat-number {
  font-size: 32px;
  font-weight: 800;
  background: var(--accent-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
  font-weight: 500;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.skill-tag {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 255, 0.1);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}

/* ── Experience Section ── */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-secondary), transparent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
  padding: 28px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -39px;
  top: 32px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 16px var(--accent-glow);
}

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

.timeline-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 12px;
  background: var(--accent-dim);
  border-radius: var(--radius-full);
}

.timeline-role {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

.timeline-bullets {
  list-style: none;
  padding: 0;
  margin-top: 16px;
}

.timeline-bullets li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
}

.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
  background: rgba(0, 230, 138, 0.08);
  border-radius: var(--radius-sm);
  margin-left: 4px;
}

/* ── Education Section ── */
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.edu-card {
  padding: 28px;
}

.edu-card .edu-year {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.edu-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.edu-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Tech Stack Section ── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tech-card {
  padding: 24px;
  text-align: center;
}

.tech-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.tech-card .tech-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tech-card .tech-item {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  transition: all var(--transition-fast);
}

.tech-card .tech-item:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ── Projects Section ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  padding: 24px;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  position: relative;
}

.project-image {
  width: 100%;
  height: 180px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .project-image {
    width: 120px;
    height: 120px;
    margin-bottom: 0;
    margin-right: 24px;
  }
}

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

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

.project-image .project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.project-overlay span {
  font-size: 12px;
  text-align: center;
  color: #fff;
}

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

.project-body {
  padding: 0;
  flex: 1;
  min-width: 250px;
}

.project-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.project-format {
  margin-bottom: 16px;
}

.project-format .format-item {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.format-item .format-label {
  font-weight: 700;
  color: var(--accent);
  min-width: 70px;
  flex-shrink: 0;
}

.format-item .format-value {
  color: var(--text-secondary);
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.project-tech-tags span {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--accent-dim);
  color: var(--accent);
}

.project-links-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.project-links-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.project-links-row a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.project-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border-accent);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.project-expand-btn:hover {
  background: var(--accent-glow);
}

.project-details {
  flex-basis: 100%;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.project-details.open {
  max-height: 800px;
  margin-top: 24px;
}

.project-details-inner {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
}

.project-details-inner h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  margin-top: 16px;
}

.project-details-inner h4:first-child {
  margin-top: 0;
}

.project-details-inner p,
.project-details-inner li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-details-inner ul {
  padding-left: 20px;
  list-style: disc;
}

.project-details-inner ul li {
  margin-bottom: 4px;
}

/* ── Achievements Section ── */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.achievement-card {
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.achievement-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-md);
}

.achievement-content h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.achievement-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.achievement-content a {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

.achievement-content a:hover {
  text-decoration: underline;
}

/* ── Why Hire Me Section ── */
.hire-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.hire-card {
  padding: 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hire-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.hire-card .hire-icon {
  font-size: 40px;
  margin-bottom: 20px;
  display: block;
}

.hire-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hire-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Terminal Section ── */
.terminal-window {
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red {
  background: #ff5f57;
}

.terminal-dot.yellow {
  background: #ffbd2e;
}

.terminal-dot.green {
  background: #28c840;
}

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.terminal-body {
  background: #0d1117;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: #c9d1d9;
  min-height: 280px;
  max-height: 400px;
  overflow-y: auto;
}

.terminal-line {
  margin-bottom: 4px;
}

.terminal-prompt {
  color: var(--accent);
}

.terminal-command {
  color: #f0f6fc;
}

.terminal-output {
  color: #8b949e;
  padding-left: 16px;
}

.terminal-key {
  color: #7ee787;
}

.terminal-value {
  color: #a5d6ff;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  animation: typewriter-blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

/* ── Now Section ── */
.now-content {
  max-width: 640px;
  margin: 0 auto;
}

.now-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  align-items: flex-start;
}

.now-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-md);
}

.now-text h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.now-text p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Chatbot Widget ── */
.chatbot-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #000;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
  z-index: 999;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.chatbot-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 212, 255, 0.4);
}

.chatbot-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 380px;
  max-height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  z-index: 998;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all var(--transition-base);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.chatbot-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chatbot-header {
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatbot-close {
  color: var(--text-tertiary);
  font-size: 20px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.chatbot-close:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.chatbot-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
}

.chat-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  animation: fadeInUp 0.3s ease;
}

.chat-message.bot {
  align-self: flex-start;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.chat-message.user {
  align-self: flex-end;
  background: var(--accent);
  color: #000;
  font-weight: 500;
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
  background: var(--bg-secondary);
}

.chatbot-suggestions button {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-glass);
  transition: all var(--transition-fast);
}

.chatbot-suggestions button:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.chatbot-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
}

.chatbot-input input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.chatbot-input input:focus {
  border-color: var(--accent);
}

.chatbot-input input::placeholder {
  color: var(--text-muted);
}

.chatbot-input button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #000;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.chatbot-input button:hover {
  background: #00bfe0;
}

/* ── Sticky CTA ── */
.sticky-cta {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 997;
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: 1s;
  opacity: 0;
}

.sticky-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #000;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.25);
  transition: all var(--transition-base);
}

.sticky-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 212, 255, 0.35);
}

/* ── Footer ── */
.site-footer {
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

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

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

.footer-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 18px;
  transition: all var(--transition-fast);
}

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

.footer-links a img {
  width: 18px;
  height: 18px;
  filter: grayscale(1) brightness(1.5);
}

.footer-links a:hover img {
  filter: none;
}

.footer-contact-info {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.footer-contact-info a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.footer-contact-info a i {
  color: var(--accent);
}

.footer-contact-info a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-tertiary);
}

.back-to-top {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 20px;
  transition: all var(--transition-fast);
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

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

.modal-content {
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-y: auto;
  padding: 36px;
  animation: scaleIn 0.3s ease;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(255, 77, 106, 0.1);
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-right: 40px;
}

.modal-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 24px;
  margin-bottom: 12px;
}

.modal-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.modal-content ul {
  padding-left: 20px;
  list-style: none;
}

.modal-content ul li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.modal-content ul li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}

/* ── Responsive Breakpoints ── */
@media (max-width: 1024px) {
  .hero-inner {
    gap: 40px;
  }

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

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

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

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    transform: translateY(-120%);
    transition: transform var(--transition-base);
    z-index: 999;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 16px;
    padding: 8px 0;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 32px;
    padding-top: 40px;
  }

  .hero-content {
    align-items: center;
    display: flex;
    flex-direction: column;
  }

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

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

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

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-image {
    width: 200px;
    height: 200px;
  }

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

  .about-skills {
    justify-content: center;
  }

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

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

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

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

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

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-contact-info {
    flex-direction: column;
    gap: 12px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .chatbot-panel {
    width: calc(100% - 48px);
    right: 24px;
    bottom: 88px;
  }

  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: clamp(28px, 5vw, 40px);
  }
}

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

  .hero-title {
    font-size: 32px;
  }

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

  .stat-card .stat-number {
    font-size: 28px;
  }

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

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .sticky-cta {
    left: 16px;
    bottom: 16px;
  }

  .chatbot-trigger {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .chatbot-panel {
    right: 16px;
    width: calc(100% - 32px);
  }
}

/* ── Scrollbar Styling ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ── Selection Color ── */
::selection {
  background: var(--accent);
  color: #000;
}

/* ── Floating Icons ── */
.achievement-icon, .now-icon, .hire-icon {
  animation: float 6s ease-in-out infinite;
}
