/* ============================================================================
   AHMAD AZAM STYLE PORTFOLIO — LIGHT & DARK THEME
   ============================================================================ */

:root {
  --primary: #0ea5e9;
  --accent: #f97316;
  --text-primary: #0c111d;
  --text-secondary: #4b5563;
  --bg: #f7f7f9;
  --panel: #ffffff;
  --border: rgba(12, 17, 29, 0.1);
  --code-bg: #eef2ff;
  --glow: rgba(14, 165, 233, 0.12);
  --shadow: 0 15px 50px rgba(12, 17, 29, 0.08);
  
  --font-sans: 'Space Grotesk', 'Sora', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Menlo', 'Monaco', 'SF Mono', 'Courier New', monospace;
}

html.dark-mode {
  --primary: #38bdf8;
  --accent: #fb923c;
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --bg: #0b1220;
  --panel: #0f172a;
  --border: rgba(255, 255, 255, 0.08);
  --code-bg: #0f172a;
  --glow: rgba(56, 189, 248, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.08), transparent 32%),
              radial-gradient(circle at 80% 0%, rgba(249, 115, 22, 0.08), transparent 25%),
              var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* ============================================================================
   SKIP LINK FOR ACCESSIBILITY
   ============================================================================ */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  z-index: 200;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================================
   LAYOUT
   ============================================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

main {
  padding: 4rem 0 3rem;
}

section {
  margin-bottom: 4rem;
  padding-bottom: 0;
  border-bottom: none;
  transition: border-color 0.3s;
}

section:last-of-type {
  border-bottom: none;
}

/* ============================================================================
   NAVBAR
   ============================================================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--panel);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.navbar.scrolled {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.08);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.logo:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.2rem;
  align-items: center;
  padding: 0;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.2rem;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

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

.nav-link:focus {
  outline: none;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

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

.theme-toggle {
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0.55rem 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--text-secondary);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  color: var(--primary);
  border-color: var(--primary);
}

.theme-toggle:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.active span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle.active span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

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

.nav-toggle:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.navbar-minimal {
  box-shadow: none;
  border-bottom: 1px solid var(--border);
}

.nav-shell-minimal {
  justify-content: flex-start;
  padding: 0.85rem 0;
}

.navbar-minimal #navMenu {
  display: none;
}

.navbar-minimal + .container {
  padding-top: 2.5rem;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  line-height: 1;
  min-height: 44px;
  letter-spacing: 0.01em;
}

.back-home-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10 19l-7-7 7-7m-7 7h18'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10 19l-7-7 7-7m-7 7h18'/%3E%3C/svg%3E") center/contain no-repeat;
}

.back-home-btn:hover {
  transform: translateX(-2px);
  border-color: var(--primary);
  color: var(--primary);
}

.back-home-btn:active {
  transform: translateX(-1px) scale(0.995);
}

.back-home-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent);
}

@media (max-width: 960px) {
  .nav-menu {
    position: fixed;
    inset: 72px 1.25rem auto 1.25rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    gap: 1rem;
  }

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

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }

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

/* ============================================================================
   TERMINAL PROMPT
   ============================================================================ */

.terminal-prompt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 3rem;
  margin-bottom: 2rem;
  scroll-margin-top: 80px;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-content::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, var(--glow), transparent 45%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--glow), rgba(249, 115, 22, 0.14));
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.hero-content h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
  margin: 1rem 0 0.35rem;
  line-height: 1.15;
}

.subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

.hero-content > p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  transition: color 0.3s;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--code-bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
}

.tech-banner {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--code-bg);
  border: 1px dashed var(--border);
  transition: color 0.3s, border-color 0.3s;
}

.tech-icon {
  color: var(--primary);
  margin: 0 0.35rem;
  transition: color 0.3s;
}

.stats-compact {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stats-compact div {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
}

.hero-image img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--panel);
  padding: 0.4rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.3s;
}

.hero-image img:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: var(--primary);
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-image {
    order: -1;
  }
}

@media (max-width: 640px) {
  .hero-content {
    padding: 1.5rem;
  }

  .hero-content h1 {
    font-size: 1.85rem;
  }

  .section {
    padding: 1.25rem;
  }
}

@media (max-width: 600px) {
  .hero-image img {
    max-height: 220px;
    width: 100%;
    object-fit: cover;
  }

  .project-thumb {
    height: 160px;
  }
}

/* ============================================================================
   SECTION STYLES
   ============================================================================ */

.section h2 {
  font-size: 1.3rem;
  margin: 1rem 0 1.5rem;
  font-weight: 700;
}

.section h3 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
}

.section p {
  color: var(--text-secondary);
  margin: 0.75rem 0;
  line-height: 1.7;
  transition: color 0.3s;
}

/* ============================================================================
   TECH STACK
   ============================================================================ */

.tech-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.tech-column {
  font-size: 0.9rem;
  line-height: 1.6;
}

.tech-column strong {
  color: var(--primary);
  font-weight: 600;
  transition: color 0.3s;
}

/* ============================================================================
   EXPERIENCE
   ============================================================================ */

.experience-item {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}

.experience-item:last-child {
  border-bottom: none;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 1rem;
}

.exp-header h3 {
  margin: 0;
}

.exp-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0 0;
  font-style: italic;
  transition: color 0.3s;
}

.experience-item ul {
  list-style: none;
  margin-top: 0.75rem;
}

.experience-item li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  padding-left: 1.25rem;
  position: relative;
  transition: color 0.3s;
}

.experience-item li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
  transition: color 0.3s;
}

/* ============================================================================
   PROJECTS
   ============================================================================ */

.project {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}

.project:last-child {
  border-bottom: none;
}

.project h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.project > p {
  margin: 0.75rem 0 1.25rem;
  font-size: 0.95rem;
}

.project-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.app-link {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 3px;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.app-link:hover {
  background: var(--primary);
  color: var(--bg);
}

/* ============================================================================
   PROJECT GALLERY
   ============================================================================ */

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.project-gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

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

@media (max-width: 768px) {
  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .project-gallery img {
    height: 180px;
  }
}

@media (max-width: 576px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }
  
  .project-gallery img {
    height: 220px;
  }
}

/* ============================================================================
   CONSULTING & TESTIMONIALS
   ============================================================================ */

.tech-list {
  color: var(--text-secondary);
  margin: 1rem 0;
  transition: color 0.3s;
}

.testimonial {
  padding: 1.5rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 1.5rem 0;
  transition: background-color 0.3s, border-color 0.3s;
}

.testimonial p {
  font-size: 0.95rem;
  margin: 0 0 1rem;
  color: var(--text-primary);
  line-height: 1.7;
  font-style: italic;
}

.testimonial-author {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
  transition: color 0.3s;
}

/* ============================================================================
   AWARDS
   ============================================================================ */

.award-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}

.award-item:last-child {
  border-bottom: none;
}

.award-item h3 {
  margin: 0 0 0.5rem;
}

.award-item p {
  margin: 0;
}

/* ============================================================================
   CONTACT
   ============================================================================ */

.contact-links {
  margin-top: 1.5rem;
}

.contact-links p {
  margin: 0.75rem 0;
  font-size: 0.95rem;
}

.contact-links strong {
  color: var(--primary);
  transition: color 0.3s;
}

.contact-links a {
  color: var(--text-secondary);
  text-decoration: none;
  word-break: break-word;
  transition: color 0.2s;
}

.contact-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

/* ============================================================================
   STATS SECTION
   ============================================================================ */

.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
  padding: 1rem 0;
  scroll-margin-top: 80px;
}

.stat {
  text-align: center;
  padding: 1.5rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
  transition: color 0.3s;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  transition: color 0.3s;
}

/* ============================================================================
   EXPERTISE GRID
   ============================================================================ */

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.expertise-card {
  background: var(--code-bg);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.expertise-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 102, 255, 0.15);
}

.expertise-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  transition: color 0.3s;
}

.expertise-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
  transition: color 0.3s;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags span {
  display: inline-block;
  background: var(--border);
  color: var(--text-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  transition: background-color 0.3s, color 0.3s;
}

.tags span:hover {
  background: var(--primary);
  color: white;
}

/* ============================================================================
   WORK EXPERIENCE
   ============================================================================ */

.work-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.work-header h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  transition: color 0.3s;
}

.work-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color 0.3s;
}

.work-list {
  list-style-position: inside;
  color: var(--text-secondary);
  line-height: 1.8;
}

.work-list li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.work-list li:before {
  content: '→ ';
  color: var(--primary);
  font-weight: bold;
  margin-right: 0.5rem;
  transition: color 0.3s;
}

/* ============================================================================
   TESTIMONIALS
   ============================================================================ */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.testimonial-card {
  background: var(--code-bg);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 102, 255, 0.1);
}

.stars {
  color: #ffd700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
}

.testimonial-card p {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-style: italic;
  transition: color 0.3s;
}

.testimonial-text {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.5rem;
}

.testimonial-card.expanded .testimonial-text,
.testimonial.expanded .testimonial-text {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.testimonial-toggle {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin: 0 0 0.6rem 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.testimonial-toggle:hover {
  color: var(--accent);
}

.testimonial-source {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: -0.25rem;
}

.testimonial-source:hover {
  color: var(--primary);
  text-decoration: underline;
}

.testimonial-author {
  font-size: 0.85rem !important;
  color: var(--text-secondary) !important;
  font-style: normal !important;
  transition: color 0.3s;
}

/* ============================================================================
   CONTACT SECTION
   ============================================================================ */

.contact-links {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--code-bg);
  border-radius: 8px;
}

.contact-links p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.contact-links strong {
  color: var(--primary);
  transition: color 0.3s;
}

.contact-links a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary);
  transition: all 0.3s;
}

.contact-links a:hover {
  border-bottom-style: solid;
  background: rgba(0, 102, 255, 0.1);
  padding: 0 2px;
}

.cta-section {
  margin-top: 2rem;
  text-align: center;
}

.cta-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  transition: color 0.3s;
}

.scroll-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-primary);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  z-index: 90;
}

.scroll-to-top.show {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top:hover {
  border-color: var(--primary);
}

/* ==========================================================================
   PORTFOLIO PAGE
   ========================================================================= */

.portfolio-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.75rem;
  align-items: start;
}

.portfolio-intro .hero-badge {
  margin-bottom: 0.75rem;
}

.portfolio-intro ul {
  margin: 1rem 0;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.portfolio-intro li {
  margin-bottom: 0.4rem;
}

.portfolio-meta {
  display: grid;
  gap: 0.75rem;
}

.portfolio-meta .stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 1rem 1.1rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.portfolio-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
  border-color: var(--primary);
}

.project-thumb {
  height: 190px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(249, 115, 22, 0.12));
  display: grid;
  place-items: center;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.project-body {
  padding: 1.25rem;
  display: grid;
  gap: 0.85rem;
  flex: 1;
}

.project-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.project-copy {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--code-bg);
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-links .btn {
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
}

.mini-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(14, 165, 233, 0));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
}

@media (max-width: 900px) {
  .portfolio-intro {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   CTA BUTTONS
   ============================================================================ */

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.2s ease;
  font-family: var(--font-sans);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.22);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.25);
}

.btn-primary:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-secondary:focus {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-ghost:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================================================
   TECH BANNER
   ============================================================================ */

.tech-banner {
  background: var(--code-bg);
  padding: 1rem 1.5rem;
  border-radius: 6px;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--primary);
  transition: background-color 0.3s, border-color 0.3s;
}

.tech-icon {
  color: var(--primary);
  margin: 0 0.5rem;
  transition: color 0.3s;
}

/* ============================================================================
   SECTION STYLING
   ============================================================================ */

.section {
  scroll-margin-top: 80px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.section h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  transition: color 0.3s;
}

.section h2:before {
  content: '';
  display: inline-block;
}

.terminal-prompt {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.terminal-prompt:before {
  content: '';
  color: var(--primary);
  margin-right: 0.5rem;
}

footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 2rem;
  transition: border-color 0.3s, color 0.3s;
}

footer p {
  margin: 0;
  letter-spacing: 0.05em;
}

/* ============================================================================
   UTILITIES & ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .navbar,
  footer {
    display: none;
  }
}
