/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES
   ========================================================================== */
:root {
  --b: #050a10;
  --txt: #f2f8ff;
  --dim: #9bb0c4;
  --blue: #63c2ff;
  --lime: #c8ff4d;
  --line: #26445a;
  --mono: "DM Mono", monospace;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   BASE STYLES & RESET
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for sticky navigation bar */
}

body {
  background: var(--b);
  color: var(--txt);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Deep Cybernetic Background Glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background: 
    radial-gradient(circle at 15% 12%, rgba(21, 52, 80, 0.45) 0%, transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(27, 52, 40, 0.4) 0%, transparent 22%),
    linear-gradient(140deg, #050a10 0%, #081722 100%);
  pointer-events: none;
}

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

/* ==========================================================================
   LAYOUT WRAPPERS & UTILITIES
   ========================================================================== */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

section {
  padding: 120px 0;
}

/* ==========================================================================
   BACKGROUND CANVAS & VEIL
   ========================================================================== */
#webgl {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg, 
    transparent 0%, 
    rgba(5, 10, 16, 0.35) 50%, 
    rgba(5, 10, 16, 0.95) 100%
  );
  pointer-events: none;
}

/* ==========================================================================
   NAVIGATION HEADER
   ========================================================================== */
.navbar-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 80px;
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(5, 10, 16, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
}

.logo b {
  color: var(--lime);
  text-shadow: 0 0 10px rgba(200, 255, 77, 0.5);
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--dim);
  font-size: 0.88rem;
}

.navlinks a {
  position: relative;
  font-weight: 500;
  padding: 6px 0;
}

.navlinks a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--lime);
  transition: var(--transition-smooth);
}

.navlinks a:hover {
  color: var(--txt);
}

.navlinks a:hover::after {
  width: 100%;
}

.nav-contact-btn {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.nav-contact-btn:hover {
  border-color: var(--lime);
  color: var(--lime) !important;
  background: rgba(200, 255, 77, 0.05);
}

/* Mobile Hamburger Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 35;
}

.mobile-menu-btn span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--txt);
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.mobile-menu-btn span:nth-child(1) { top: 4px; }
.mobile-menu-btn span:nth-child(2) { top: 11px; }
.mobile-menu-btn span:nth-child(3) { top: 18px; }

.mobile-menu-btn.open span:nth-child(1) {
  top: 11px;
  transform: rotate(135deg);
}

.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
  left: -20px;
}

.mobile-menu-btn.open span:nth-child(3) {
  top: 11px;
  transform: rotate(-135deg);
}

/* ==========================================================================
   MOBILE DRAWER
   ========================================================================== */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  max-width: 320px;
  height: 100vh;
  background: rgba(5, 10, 16, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--line);
  z-index: 25;
  transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 40px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-drawer.open {
  right: 0;
}

.mobile-navlinks {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-navlinks a {
  font-family: "Syne", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dim);
}

.mobile-navlinks a:hover,
.mobile-navlinks a:focus {
  color: var(--lime);
  padding-left: 8px;
}

.mobile-navlinks .btn-contact {
  margin-top: 20px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--lime);
  color: var(--lime);
  border-radius: 8px;
  font-size: 1.1rem;
}

.mobile-navlinks .btn-contact:hover {
  background: rgba(200, 255, 77, 0.08);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0;
}

.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px var(--lime);
  animation: beacon 2s infinite;
}

@keyframes beacon {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.hero h1 {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(3.6rem, 9.5vw, 8.2rem);
  line-height: 0.86;
  letter-spacing: -0.07em;
  margin: 22px 0 26px;
}

.hero h1 span {
  color: var(--blue);
  text-shadow: 0 0 45px rgba(99, 194, 255, 0.35);
}

.intro {
  max-width: 600px;
  color: var(--dim);
  font-size: 1.12rem;
  line-height: 1.65;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 38px;
}

.btn {
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.92rem;
  transition: var(--transition-smooth);
  background: rgba(255, 255, 255, 0.02);
  display: inline-block;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.primary {
  color: #081118;
  background: var(--lime);
  border-color: var(--lime);
}

.primary:hover {
  box-shadow: 0 14px 30px rgba(200, 255, 77, 0.25);
  border-color: var(--lime);
}

.hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #c6dcea;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.86rem;
  font-family: var(--mono);
}

.scroll-cue {
  margin-top: 70px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}

.scroll-cue::before {
  content: "";
  width: 1px;
  height: 38px;
  background: linear-gradient(var(--lime), transparent);
  animation: pulse-scroll 1.8s ease-in-out infinite;
}

@keyframes pulse-scroll {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(4px); }
}

/* ==========================================================================
   READOUT BREADCRUMB
   ========================================================================== */
.readout {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #9ec8e6;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  white-space: nowrap;
  overflow: hidden;
  background: rgba(5, 10, 16, 0.3);
}

.readout span {
  display: inline-block;
  animation: marquee 28s linear infinite;
  padding-left: 20px;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   SECTIONS GENERAL
   ========================================================================== */
.over {
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lime);
}

h2 {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  max-width: 820px;
  margin: 14px 0 45px;
}

/* ==========================================================================
   COMPONENTS - CARDS
   ========================================================================== */
.card {
  padding: 30px;
  background: linear-gradient(150deg, rgba(15, 33, 49, 0.6) 0%, rgba(10, 20, 30, 0.85) 100%);
  border: 1px solid rgba(38, 68, 90, 0.6);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.2, 1), border-color 0.3s;
  
  /* 3D Depth Setup */
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card:hover {
  border-color: rgba(99, 194, 255, 0.6);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.55), 0 0 25px rgba(99, 194, 255, 0.05);
}

.card * {
  /* Ensure children can inherit 3D positioning */
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.2, 1);
}

/* 3D Card Hover Depth Offsets */
.card:hover .num { transform: translateZ(35px); }
.card:hover h3 { transform: translateZ(25px); }
.card:hover em { transform: translateZ(20px); }
.card:hover p { transform: translateZ(15px); }

/* ==========================================================================
   01 — CAPABILITY GRID
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid .num {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 0.9;
  color: var(--blue);
  text-shadow: 0 0 20px rgba(99, 194, 255, 0.2);
}

.grid p {
  color: var(--dim);
  margin-top: 16px;
  font-size: 0.95rem;
}

/* ==========================================================================
   02 — TECHNICAL STACK (SKILLS)
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill {
  min-height: 190px;
  position: relative;
  overflow: hidden;
}

/* High-tech Blueprint Rings */
.skill::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -34px;
  bottom: -52px;
  border: 1px solid rgba(99, 194, 255, 0.25);
  border-radius: 50%;
  box-shadow: 
    0 0 0 17px rgba(99, 194, 255, 0.04), 
    0 0 0 34px rgba(99, 194, 255, 0.03);
  pointer-events: none;
}

.skill em {
  display: block;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-style: normal;
}

.skill h3,
.project h3 {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.skill p,
.project p {
  color: var(--dim);
  font-size: 0.94rem;
}

/* ==========================================================================
   03 — SELECTED WORK
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 20px;
}

.project {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.project::before {
  content: "";
  position: absolute;
  top: 24px;
  right: 28px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(99, 194, 255, 0.3);
  border-radius: 50%;
  box-shadow: 
    0 0 0 16px rgba(99, 194, 255, 0.05), 
    0 0 0 32px rgba(99, 194, 255, 0.03);
  pointer-events: none;
}

.project:nth-child(2)::before {
  border-radius: 2px;
  transform: rotate(31deg);
  border-color: rgba(200, 255, 77, 0.3);
  box-shadow: 
    0 0 0 16px rgba(200, 255, 77, 0.05), 
    0 0 0 32px rgba(200, 255, 77, 0.03);
}

.project .date {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  margin-bottom: auto;
}

.project h3 {
  font-size: 2.1rem;
  line-height: 1.05;
  margin-top: 46px;
}

/* ==========================================================================
   04 — TIMELINE (TRAINING)
   ========================================================================== */
.timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.tl-item {
  padding: 30px;
  border: 1px solid rgba(38, 68, 90, 0.6);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(15, 33, 49, 0.6) 0%, rgba(10, 20, 30, 0.85) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tl-item .yr {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(200, 255, 77, 0.1);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tl-item h3 {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.tl-item p {
  color: var(--dim);
  font-size: 0.94rem;
}

/* ==========================================================================
   05 — CONTACT
   ========================================================================== */
.contact {
  border-top: 1px solid var(--line);
  padding: 100px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 30px;
  align-items: start;
}

.mail {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 3.4rem);
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  display: inline-block;
  margin-bottom: 14px;
}

.mail:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
  text-shadow: 0 0 25px rgba(200, 255, 77, 0.2);
}

.location-label {
  color: var(--dim);
  font-size: 1.05rem;
}

.contact-card {
  padding: 30px;
  border: 1px solid rgba(38, 68, 90, 0.6);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(15, 33, 49, 0.6) 0%, rgba(10, 20, 30, 0.85) 100%);
}

.contact-link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #dff0ff;
  font-weight: 500;
  font-size: 0.95rem;
}

.contact-link:last-child {
  border-bottom: none;
}

.contact-link:hover {
  color: var(--lime);
  transform: translateX(6px);
}

.phone-link {
  font-weight: 700;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-element {
  padding: 30px 0;
  color: var(--dim);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 0.78rem;
}

/* ==========================================================================
   ANIMATIONS & TRANSITIONS (IntersectionObserver reveal)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVENESS)
   ========================================================================== */
@media (max-width: 820px) {
  /* Layout modifications */
  .grid, 
  .skills-grid, 
  .projects-grid, 
  .timeline, 
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  section {
    padding: 85px 0;
  }
  
  /* Show Mobile Navigation elements */
  .navlinks {
    display: none; /* Hide desktop link list */
  }
  
  .mobile-menu-btn {
    display: block; /* Show hamburger button */
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 20px;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
}
