  :root {
  --bg-dark: #050505;
  --bg-panel: rgba(10, 10, 10, 0.75);
  --green: #32D583;
  --neon: #00FF88;
  --silver: #A8A8A8;
  --white: #FFFFFF;
  --glass-border: rgba(255, 255, 255, 0.08);
  --transition: 450ms cubic-bezier(.23, 1, .32, 1);
  --shadow-deep: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 25px rgba(0, 255, 136, 0.12);
}

/* 1. Global & Animated Background */
html,
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: 
    radial-gradient(at 0% 0%, rgba(50, 213, 131, 0.1) 0px, transparent 40%),
    radial-gradient(at 100% 100%, rgba(0, 255, 136, 0.08) 0px, transparent 40%),
    var(--bg-dark);
  background-attachment: fixed;
}

/* 2. HUD Navbar */
.custom-navbar {
  background: rgba(10, 10, 10, 0.5); /* Semi-transparent glass base */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  z-index: 1000;
}
.brand-container { text-decoration: none; display: block; }
.brand-top { display: flex; align-items: center; gap: 15px; }
.brand-title { font-family: 'Poppins', sans-serif; font-size: 24px; font-weight: 800; color: white; }
.brand-accent { color: var(--neon); }
.logo-monogram { width: 80px; height: 20px; }
.trace-line { stroke: var(--neon); stroke-width: 1.5; fill: none; stroke-dasharray: 100; animation: draw 3s infinite alternate; }
.node { fill: var(--neon); filter: drop-shadow(0 0 5px var(--neon)); }
.brand-tagline { font-size: 10px; letter-spacing: 2px; color: var(--silver); text-transform: uppercase; margin-top: 4px; display: block; }
@keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.nav-link {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--silver) !important; margin-left: 25px; position: relative; transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--neon) !important; text-shadow: 0 0 8px var(--neon); }
.nav-link::after {
  content: ''; position: absolute; bottom: -5px; left: 50%; width: 0; height: 2px;
  background: var(--neon); transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; left: 0; }

/* Hamburger visibility transition */
.navbar-toggler {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.navbar-toggler.is-hidden { opacity: 0; visibility: hidden; }

/* Mobile Overlay Menu */
@media (max-width: 991px) {
  .brand-container { max-width: 250px; }
  .brand-tagline { white-space: normal; line-height: 1.4; }

  .navbar-collapse {
    position: fixed;
    top: 0;
    right: 0;      /* Anchor strictly to the right edge */
    transform: translateX(100%); /* Move off-screen to the right by its own width */
    visibility: hidden;         /* Prevent interaction and accidental visibility */
    left: auto;
    width: 65%;   /* Covers a little more than half for better readability */
    height: 100vh;
    background: rgba(10, 10, 10, 0.85); /* Reduced transparency for better contrast */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 100px 40px; /* Space for the close button and elegance */
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.5s;
    z-index: 2000;
  }

  .navbar-collapse.active { transform: translateX(0); visibility: visible; }

  .mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
  }

  .btn-close-custom {
    background: none; border: none; color: var(--neon);
    font-size: 1.8rem; cursor: pointer;
    transition: var(--transition);
  }
  .btn-close-custom:hover { transform: rotate(90deg); color: var(--white); }

  .navbar-nav { width: 100%; align-items: flex-start !important; }
  .nav-link { font-size: 1rem !important; margin: 1rem 0 !important; padding: 5px 0 !important; border-bottom: 1px solid rgba(0, 255, 136, 0.05); width: 100%; }
  .nav-link::after { bottom: 0 !important; }
}

/* 3. Hero Layout (The Centering Fix) */
.page-main { padding: 60px 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }

.hero-container {
  width: 100%;
  max-width: 1200px; /* Limits the spread on large monitors */
  margin: 0 auto;
  padding: 0 20px;
}

.hero-section {
  display: flex;
  align-items: center;
  justify-content: center; /* Keeps items together */
  gap: 100px; /* Fixed distance between text and image */
  position: relative;
}

.hero-left { flex: 1; max-width: 580px; }
.hero-right { flex: 0 0 auto; }

/* 4. Home Specific Elements */
.hero-greeting {
  font-family: 'Courier New', monospace; color: var(--neon);
  font-size: 14px; font-weight: 600; letter-spacing: 4px; margin-bottom: 15px; display: block;
}
.hero-name {
  font-family: 'Poppins', sans-serif; font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800; background: linear-gradient(to bottom, #FFF 50%, #888 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 20px;
}
.hero-role { font-weight: 600; color: var(--silver); margin-bottom: 20px; }
.silver-divider { color: var(--neon); margin: 0 10px; }
.hero-description { color: var(--silver); line-height: 1.8; font-size: 1.05rem; }
.text-highlight { color: var(--white); border-bottom: 1px solid rgba(0, 255, 136, 0.3); }

/* 5. Buttons & Frame  */
/* -------------------------
   5. BUTTONS & FRAME (REFINED)
   ------------------------- */

.hero-ctas { 
  display: flex; 
  gap: 20px; 
  margin-top: 35px; 
  align-items: center; /* Prevents buttons from stretching vertically */
  flex-wrap: wrap;     /* Allows clean stacking on very small screens */
}

.btn-primary-tech, .btn-secondary-glass {
  white-space: nowrap; /* Forces "VIEW MY PROJECTS" to stay on one line */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: fit-content; /* Only takes up as much height as the text needs */
  text-align: center;
}

.btn-primary-tech {
  background: transparent; border: 1px solid var(--neon); color: var(--neon);
  padding: 16px 35px; font-weight: 700; text-decoration: none; border-radius: 4px;
  position: relative; overflow: hidden; z-index: 1; transition: 0.4s;
}

.btn-primary-tech::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: var(--neon); transition: 0.4s ease; z-index: -1;
}

.btn-primary-tech:hover { color: #000; box-shadow: 0 0 30px rgba(0, 255, 136, 0.4); }
.btn-primary-tech:hover::before { left: 0; }

.btn-secondary-glass {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px); color: #fff; padding: 16px 35px;
  text-decoration: none; border-radius: 4px; font-weight: 700; transition: 0.4s;
}

.btn-secondary-glass:hover { 
  background: rgba(255,255,255,0.08); 
  border-color: #fff; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
}

/* Responsive Mobile Tweak */
@media (max-width: 576px) {
  .hero-ctas {
    justify-content: center; /* Centers buttons on mobile */
    gap: 12px;
  }
  
  .btn-primary-tech, .btn-secondary-glass {
    padding: 12px 20px;   /* Slightly smaller padding for mobile fit */
    font-size: 0.9rem;    /* Ensures text fits without being "too big" */
    width: auto;          /* Prevents buttons from expanding to full screen width */
  }
}


.profile-wrap {
  width: 320px; height: 450px; position: relative; border-radius: 20px;
  background: linear-gradient(110deg, var(--bg-panel) 8%, rgba(20, 20, 20, 0.9) 18%, var(--bg-panel) 33%);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-deep); padding: 12px; transition: var(--transition);
}
@keyframes shimmer { to { background-position-x: -200%; } }

.profile-wrap::before, .profile-wrap::after {
  content: ''; position: absolute; width: 40px; height: 40px; border: 2px solid var(--neon); opacity: 0.3;
}
.profile-wrap::before { top: -5px; left: -5px; border-right: 0; border-bottom: 0; }
.profile-wrap::after { bottom: -5px; right: -5px; border-left: 0; border-top: 0; }
.profile-img { 
  width: 100%; height: 100%; object-fit: cover; border-radius: 12px; 
  display: block;
}
.profile-wrap:hover { transform: translateY(-10px) rotate(1deg); border-color: var(--neon); box-shadow: var(--shadow-deep), var(--shadow-glow); }


/* 6. Footer & Accents */
.site-footer {
  margin: 60px auto 40px;
  width: 90%;
  max-width: 900px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 20px 50px;
  box-shadow: var(--shadow-deep), var(--shadow-rim);
}

.footer-inner { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
}

/* Forces the icons to stay side-by-side */
.footer-center { 
  display: flex; 
  flex-direction: row; 
  gap: 20px; 
  margin: 0;
  padding: 0;
  justify-content: center;
  align-items: center;
}

.social-link {
  color: var(--silver); 
  font-size: 20px; 
  width: 45px; 
  height: 45px; 
  display: flex;
  align-items: center; 
  justify-content: center; 
  border-radius: 50%; 
  transition: 0.4s;
  background: rgba(255, 255, 255, 0.02);
  
  /* CRITICAL: Removes underlines and inherited nav-link lines */
  text-decoration: none !important;
  border-bottom: none !important;
  position: relative;
}

/* Ensures any global "after" lines (from nav-links) don't appear here */
.social-link::after {
  display: none !important;
}

.social-link:hover { 
  color: var(--neon); 
  transform: translateY(-8px) scale(1.1);
  background: rgba(0, 255, 136, 0.05);
  box-shadow: 0 10px 20px rgba(0, 255, 136, 0.1);
}

/* The Year Accent section remains consistent below */
.tech-footer-accent { 
  display: flex; 
  align-items: center; 
  gap: 20px; 
  margin-top: 80px; 
  padding-bottom: 40px; 
  width: 100%; 
  max-width: 1200px; 
  margin-left: auto; 
  margin-right: auto; 
}

.tech-footer-accent .line { 
  height: 1px; 
  flex: 1; 
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent); 
}

.portfolio-year { 
  font-size: 11px; 
  letter-spacing: 5px; 
  color: var(--silver); 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  text-transform: uppercase;
}

.dot.pulse { width: 6px; height: 6px; background: var(--neon); border-radius: 50%; animation: p 2s infinite; }
@keyframes p { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* 7. Responsive scaling */
@media (max-width: 1024px) {
  .hero-section { gap: 50px; }
}
@media (max-width: 850px) {
  .hero-section { flex-direction: column; text-align: center; }
  .hero-right { order: -1; margin-bottom: 30px; }
  .hero-ctas { justify-content: center; }
}



/* -------------------------
   ABOUT PAGE & SKILLS GRID
   ------------------------- */

/* Main Layout Wrapper */
.about-flex-wrapper {
  display: flex;
  flex-direction: column-reverse; /* Image on top for Mobile */
  gap: 40px;
  align-items: center;
  margin-top: 30px;
}

/* Bio Card Styling */
.about-glass-card {
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  padding: 35px;
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-deep);
  position: relative;
  overflow: hidden;
}

/* Subtle corner accent for the glass card */
.about-glass-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border-top: 2px solid var(--neon);
  border-left: 2px solid var(--neon);
  opacity: 0.5;
}


/* 1. Global Profile Wrap (Desktop & Mobile Base) */
.profile-wrap {
  position: relative; /* Required for the corner brackets */
  border: 1px solid var(--glass-border);
  padding: 0;
  background: transparent;
  transition: var(--transition);
  border-radius: 4px;
  overflow: visible; /* Allows brackets to sit slightly outside the frame */
}

/* 2. Cyber-Luxe Corner Accents (Apply to ALL views) */
.profile-wrap::before,
.profile-wrap::after {
  content: "";
  position: absolute;
  width: 30px; 
  height: 30px;
  z-index: 10;
  pointer-events: none; /* Clicking the bracket clicks the image */
}

.profile-wrap::before {
  top: -2px; 
  left: -2px;
  border-top: 2px solid var(--neon);
  border-left: 2px solid var(--neon);
}

.profile-wrap::after {
  bottom: -2px; 
  right: -2px;
  border-bottom: 2px solid var(--neon);
  border-right: 2px solid var(--neon);
}

/* 3. The Image itself */
.profile-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  image-rendering: auto; /* Ensures browser handles partial paints naturally */
  object-position: center;
  border-radius: 4px;
  filter: none !important;
  display: block;
}

/* 4. LAPTOP VIEW (Your Preferred Size) */
@media (min-width: 992px) {
  .profile-wrap {
    width: 350px;
    height: 450px;
  }
  .profile-wrap:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
  }
}

/* 5. MOBILE VIEW (Standard-Large Presence) */
@media (max-width: 768px) {
  .profile-wrap {
    /* Standard width that feels substantial but balanced */
    width: 310px !important; 
    
    /* Forces a professional 2:3 portrait shape */
    aspect-ratio: 2 / 3 !important; 
    height: auto !important; 
    
    margin: 0 auto 40px auto !important; 
    display: block;
    position: relative;
    border: 1px solid var(--glass-border);
    background: transparent;
    border-radius: 4px;
    box-shadow: var(--shadow-deep);
  }

  /* Cyber-Luxe Brackets - Scaled for Standard Frame */
  .profile-wrap::before,
  .profile-wrap::after {
    content: "";
    position: absolute;
    width: 30px; 
    height: 30px;
    z-index: 10;
  }

  .profile-wrap::before {
    top: -2px; left: -2px;
    border-top: 2px solid var(--neon);
    border-left: 2px solid var(--neon);
  }

  .profile-wrap::after {
    bottom: -2px; right: -2px;
    border-bottom: 2px solid var(--neon);
    border-right: 2px solid var(--neon);
  }

  .profile-img {
    width: 100% !important;
    height: 100% !important;
    
    /* THE FIX FOR STRETCHING: 
       'cover' ensures pixels stay in their natural ratio. 
       'center' ensures your face stays in the middle. */
    object-fit: cover !important; 
    object-position: center !important;
    
    display: block;
    filter: none !important;
    border-radius: 2px;
  }
}

/* Skills Grid Layout */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 50px;
}

/* Individual Skill Cards */
.skill-glass-card {
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.skill-glass-card:hover {
  transform: translateY(-10px);
  border-color: var(--neon);
  background: rgba(0, 255, 136, 0.02);
  box-shadow: var(--shadow-deep), 0 0 20px rgba(0, 255, 136, 0.1);
}

.skill-icon {
  font-size: 2.5rem;
  color: var(--neon);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3));
}

/* Skill Tags Styling */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.skill-tags span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--silver);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
}

/* -------------------------
   DESKTOP RESPONSIVE REFINEMENT
   ------------------------- */
@media (min-width: 992px) {
  .about-flex-wrapper {
    flex-direction: row; /* Text Left, Image Right */
    justify-content: space-between;
    text-align: left;
  }

  .hero-left-content {
    flex: 1;
    max-width: 65%;
  }

  .hero-right-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }
}


/* REFINED PROJECTS GRID */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.project-card {
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  overflow: hidden;
  transition: 450ms cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-12px);
  border-color: var(--neon);
  box-shadow: var(--shadow-deep), var(--shadow-glow);
}

.project-image-wrap {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(110deg, var(--bg-panel) 8%, rgba(20, 20, 20, 0.9) 18%, var(--bg-panel) 33%);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-img {
  transform: scale(1.1);
  opacity: 0.25;
}

/* Hover Overlay */
.project-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: 0.4s;
}

.project-card:hover .project-overlay { opacity: 1; }

.tech-badge {
  background: rgba(0, 0, 0, 0.9);
  color: var(--neon);
  border: 1px solid var(--neon);
  padding: 8px 16px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.project-info { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.project-title { font-family: 'Poppins', sans-serif; font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 15px; }
.project-excerpt { color: var(--silver); line-height: 1.6; margin-bottom: 25px; flex-grow: 1; }

.project-links { border-top: 1px solid var(--glass-border); padding-top: 20px; }
.view-link { 
  text-decoration: none; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; 
  color: var(--silver); transition: 0.3s; 
}
.view-link.live { color: var(--neon); }
.view-link:hover { color: #fff; transform: translateX(5px); }


/* CONTACT PAGE MODULES */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.contact-module {
  background: var(--bg-panel);
  border: 1px solid var(--glass-border);
  padding: 35px 25px;
  border-radius: 20px;
  text-align: center;
  transition: 400ms cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
}

.link-module {
  text-decoration: none;
  cursor: pointer;
}

.contact-module:hover {
  transform: translateY(-8px);
  border-color: var(--neon);
  box-shadow: var(--shadow-deep), var(--shadow-glow);
}

.module-icon {
  font-size: 1.8rem;
  color: var(--neon);
  margin-bottom: 20px;
  opacity: 0.8;
  filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.2));
}

.module-label {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--silver);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.module-data {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}

/* Mobile Tweak */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
