/* ==========================================================================
   💎 Portfolio Design System & Styling
   ========================================================================== */

/* --- 1. Custom Properties & Tokens --- */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Colors - Sleek Dark Palette */
  --bg-deep: hsl(224, 25%, 6%);
  --bg-surface: hsla(224, 20%, 10%, 0.7);
  --bg-surface-hover: hsla(224, 20%, 14%, 0.9);
  
  --primary: hsl(190, 100%, 50%);         /* Electric Teal */
  --primary-glow: hsla(190, 100%, 50%, 0.15);
  --secondary: hsl(271, 95%, 65%);       /* Electric Purple */
  --secondary-glow: hsla(271, 95%, 65%, 0.15);
  
  --text-primary: hsl(210, 30%, 96%);
  --text-secondary: hsl(215, 15%, 72%);
  --text-muted: hsl(215, 12%, 50%);
  
  --border-light: hsla(215, 20%, 80%, 0.08);
  --border-glow: hsla(190, 100%, 50%, 0.25);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.4);

  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* --- 2. Global Resets & Basics --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: hsla(215, 12%, 20%, 1);
  border-radius: var(--radius-sm);
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* --- 3. Ambient Background & Blobs --- */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
  mix-blend-mode: screen;
  animation: float-blob 20s infinite alternate ease-in-out;
}

.blob-1 {
  background: var(--primary);
  top: -10%;
  right: -5%;
  animation-duration: 25s;
}

.blob-2 {
  background: var(--secondary);
  bottom: -15%;
  left: -10%;
  animation-duration: 30s;
}

@keyframes float-blob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 10%) scale(1.1); }
  100% { transform: translate(-5%, -5%) scale(0.95); }
}

/* --- 4. Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- 5. Nav / Header --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8%;
  background: rgba(10, 15, 29, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  height: 68px;
  background: rgba(10, 15, 29, 0.85);
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-deep);
  font-weight: 800;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: var(--transition-smooth);
}

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

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

.btn-nav {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-nav:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.mobile-nav-toggle {
  display: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 12px;
  margin-right: -12px;
  z-index: 102;
  transition: var(--transition-fast);
}

.mobile-nav-toggle i {
  pointer-events: none;
  width: 28px;
  height: 28px;
  display: block;
}

/* --- 6. Container & Layouts --- */
.section {
  padding: 120px 8% 80px 8%;
  max-width: 1400px;
  margin: 0 auto;
}

.section-hd {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 600;
}

.section-title {
  font-size: 2.5rem;
  color: var(--text-primary);
}

/* --- 7. Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 8% 60px 8%;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-sub {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: 16px;
  font-weight: 600;
  display: inline-block;
}

.hero-title {
  font-size: 4rem;
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 20px;
}

.btn-primary {
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--bg-deep);
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 180, 216, 0.4);
}

.btn-secondary {
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

/* Hero Art - Graphic Node Canvas */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 400px;
}

.hero-visual {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 50%, var(--bg-surface-hover), var(--bg-deep));
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.node-system {
  position: absolute;
  width: 100%;
  height: 100%;
}

.node-line {
  stroke: var(--text-muted);
  stroke-dasharray: 4, 4;
  opacity: 0.15;
}

.node-circle {
  fill: var(--bg-deep);
  stroke: var(--primary);
  stroke-width: 2;
  transition: var(--transition-smooth);
}

.node-circle.sec {
  stroke: var(--secondary);
}

/* --- 8. About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.about-img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 1px;
  box-shadow: var(--shadow-lg);
}

.about-img-box {
  background: var(--bg-deep);
  border-radius: calc(var(--radius-lg) - 1px);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about-logo-mark {
  width: 80px;
  height: 80px;
  color: var(--primary);
  margin: 0 auto 24px auto;
}

.about-uni-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-top: 10px;
}

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

.about-content h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.about-bio {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.detail-icon {
  color: var(--primary);
  font-size: 1.4rem;
  margin-top: 3px;
}

.detail-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.detail-val {
  font-weight: 600;
  color: var(--text-primary);
}

/* --- 9. Projects Grid Section --- */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--text-primary);
}

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

.project-card {
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: var(--transition-smooth);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition-smooth);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg), 0 0 20px var(--primary-glow);
}

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

.card-top {
  padding: 32px 32px 20px 32px;
  position: relative;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.project-card:nth-child(even) .project-icon {
  color: var(--secondary);
}

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

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

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

.tag {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-weight: 500;
}

.card-bottom {
  margin-top: auto;
  padding: 24px 32px 32px 32px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 16px;
}

.btn-card-primary {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--bg-deep);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-card-primary:hover {
  filter: brightness(1.15);
}

.btn-card-secondary {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-card-secondary:hover {
  border-color: var(--text-secondary);
}

/* --- 10. Stack & Capabilities --- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.stack-category {
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.stack-category:hover {
  border-color: var(--primary-glow);
  transform: scale(1.02);
}

.stack-cat-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.stack-cat-icon {
  color: var(--primary);
}

.stack-cat-title {
  font-size: 1.25rem;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stack-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.stack-name {
  font-weight: 600;
  color: var(--text-primary);
}

.stack-level {
  color: var(--text-muted);
}

.stack-bar-wrap {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-surface-hover);
  overflow: hidden;
}

.stack-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0; /* Animated via JS */
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 11. Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

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

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 20px;
}

.channel-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.channel-details {
  display: flex;
  flex-direction: column;
}

.channel-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.channel-val {
  font-weight: 600;
  color: var(--text-primary);
}

.contact-socials {
  display: flex;
  gap: 16px;
}

.social-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.social-circle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.channel-icon svg, .detail-icon svg, .project-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.social-circle:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--text-primary);
  transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 48px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.form-field {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.form-field:focus {
  border-color: var(--primary);
  background: var(--bg-surface);
  box-shadow: 0 0 10px var(--primary-glow);
}

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

.form-status {
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 10px;
  display: none;
}

.form-status.success {
  display: block;
  color: var(--primary);
}

.form-status.error {
  display: block;
  color: var(--secondary);
}

/* --- 12. Footer --- */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 40px 8%;
  text-align: center;
  background: rgba(10, 15, 29, 0.4);
}

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

/* --- 13. Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- 14. Responsive Layout Rules --- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-desc {
    margin: 0 auto 40px auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .about-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .about-img-wrap {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 6%;
  }
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(10, 15, 29, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 48px;
    gap: 32px;
    border-top: 1px solid var(--border-light);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    align-items: center;
    justify-content: flex-start;
    z-index: 99;
  }
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-link {
    font-size: 1.3rem;
    font-weight: 600;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .section {
    padding: 100px 6% 60px 6%;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .contact-form {
    padding: 32px;
  }
  .about-details {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .btn-nav {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .hero-actions .btn-primary, .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .card-bottom {
    flex-direction: column;
    gap: 12px;
  }
  .btn-card-primary, .btn-card-secondary {
    width: 100%;
  }
}

