/* ═══════════════════════════════════════════════════════════════
   RESET & CUSTOM PROPERTIES
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #070d1a;
  --bg2:     #0c1527;
  --azure:   #0078d4;
  --azure-l: #50aeff;
  --orange:  #ff9600;
  --text:    #e8edf5;
  --muted:   #7a8fa8;
  --glass:   rgba(7, 13, 26, 0.78);
  --border:  rgba(0, 120, 212, 0.16);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
}

body.is-loading { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════
   CUSTOM CURSOR
═══════════════════════════════════════════════════════════════ */
#cur-dot,
#cur-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: left, top;
}

#cur-dot {
  width: 5px;
  height: 5px;
  background: var(--azure-l);
}

#cur-ring {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(64, 176, 255, 0.45);
  transition: width 0.25s, height 0.25s, border-color 0.25s;
}

body:has(a:hover) #cur-ring,
body:has(button:hover) #cur-ring {
  width: 50px;
  height: 50px;
  border-color: var(--azure-l);
}

/* ═══════════════════════════════════════════════════════════════
   LOADER
═══════════════════════════════════════════════════════════════ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  transition: opacity 0.9s ease;
}

#loader.out { opacity: 0; pointer-events: none; }

.loader-bar {
  width: 220px;
  height: 1px;
  background: rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}

.loader-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--azure), var(--azure-l), var(--orange));
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-text {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   CANVAS
═══════════════════════════════════════════════════════════════ */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING LABELS
═══════════════════════════════════════════════════════════════ */
#fl-labels {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.fl {
  position: absolute;
  white-space: nowrap;
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(160, 210, 255, 1);
  background: rgba(2, 8, 24, 0.82);
  border: 1px solid rgba(0, 120, 212, 0.55);
  padding: 0.18rem 0.58rem;
  border-radius: 2px;
  backdrop-filter: blur(4px);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s;
}

/* ═══════════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════════ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 3.5rem;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background: rgba(5, 5, 16, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: var(--border);
}

#nav-toggle { display: none; } /* shown only on mobile via JS */

.nav-logo {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  cursor: default;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 3rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  cursor: none;
  transition: color 0.22s;
}

.nav-links a:hover { color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(7,13,26,0.60) 0%, rgba(7,13,26,0.88) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-inner {
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

/* All hero children start invisible — GSAP drives them in */
.hero-eye,
.hero-h1,
.hero-sub,
.hero-btn,
.scroll-cue { opacity: 0; }

.hero-eye {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--azure-l);
  margin-bottom: 1.6rem;
  text-shadow: 0 0 18px rgba(80, 174, 255, 0.7), 0 2px 8px rgba(0,0,0,0.8);
}

.hero-h1 {
  font-size: clamp(2.8rem, 8.5vw, 6.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06em;
  padding-bottom: 0.15em; /* prevent descender clipping */
  filter: drop-shadow(0 0 30px rgba(255, 210, 100, 0.22)) drop-shadow(0 2px 10px rgba(0,0,0,0.85));
}

.h1-a {
  background: linear-gradient(160deg, #ffffff 0%, #fff7ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.h1-b {
  background: linear-gradient(160deg, #ffffff 0%, #ffe3a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 3.2rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9), 0 0 24px rgba(0,0,0,0.6);
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.88rem 2.8rem;
  color: #fff;
  background: rgba(0, 120, 212, 0.1);
  border: 1px solid rgba(0, 120, 212, 0.45);
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: none;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.25s;
}

.hero-btn:hover {
  background: rgba(0, 120, 212, 0.26);
  border-color: var(--azure-l);
  box-shadow: 0 0 40px rgba(0, 120, 212, 0.3), 0 0 80px rgba(0, 120, 212, 0.1);
  transform: translateY(-3px);
}

.btn-arr { animation: bounce 2.2s ease-in-out infinite; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 2.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  z-index: 2;
}

.sc-line {
  display: block;
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--azure-l), transparent);
  animation: linePulse 2.4s ease-in-out infinite;
}

@keyframes linePulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.8); transform-origin: top; }
  50%       { opacity: 1;    transform: scaleY(1);   }
}

.sc-txt {
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   SECTIONS — SHARED
═══════════════════════════════════════════════════════════════ */
.section {
  position: relative;
  z-index: 10;
  padding: 8rem 2rem;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}

.s-dark { background: rgba(4, 6, 18, 0.85); }

.container {
  max-width: 980px;
  margin: 0 auto;
}

.s-title {
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 3.5rem;
  position: relative;
  padding-bottom: 1.2rem;
}

.s-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 44px; height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--azure-l));
  border-radius: 2px;
}

/* Reveal — GSAP controls this */
.reveal { opacity: 0; }

/* ═══════════════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4.5rem;
  align-items: start;
}

.about-copy p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1.1rem;
  line-height: 1.75;
}

.about-copy p:last-child { margin-bottom: 0; }

.about-copy strong { color: var(--azure-l); font-weight: 600; }

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-content: flex-start;
}

.sp {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(0, 120, 212, 0.06);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--azure-l);
  cursor: default;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.sp:hover {
  background: rgba(0, 120, 212, 0.18);
  border-color: var(--azure-l);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   EXPERIENCE
═══════════════════════════════════════════════════════════════ */
.xp-list {
  display: flex;
  flex-direction: column;
  position: relative;
}

.xp-list::before {
  content: '';
  position: absolute;
  left: 148px;
  top: 2.7rem;
  bottom: 1rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--azure) 70%, transparent);
  transform-origin: top;
  animation: tlGrow 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes tlGrow {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

.xp {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 2.5rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid rgba(0, 120, 212, 0.09);
  position: relative;
}

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

.xp::before {
  content: '';
  position: absolute;
  left: calc(148px - 4px);
  top: 2.55rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--azure-l);
  box-shadow: 0 0 8px var(--azure), 0 0 18px rgba(0, 120, 212, 0.5);
  z-index: 1;
}

.xp-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.15rem;
}

.xp-yr {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.xp-badge {
  font-size: 0.62rem;
  padding: 0.15rem 0.55rem;
  background: rgba(255, 150, 0, 0.1);
  border: 1px solid rgba(255, 150, 0, 0.32);
  color: var(--orange);
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  width: fit-content;
}

.xp-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.8rem;
}

.xp-co {
  font-weight: 400;
  color: var(--azure-l);
  font-size: 0.9rem;
}

.xp-body ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }

.xp-body li {
  font-size: 0.87rem;
  color: var(--muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.55;
}

.xp-body li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-size: 0.6rem;
  top: 0.32rem;
}

.xp-sub {
  font-size: 0.78rem;
  color: var(--azure-l);
  margin-bottom: 0.85rem;
  letter-spacing: 0.03em;
}

.xp-proj-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
}

.xp-proj-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.2rem;
}

.xp-proj-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(255, 150, 0, 0.08);
  border: 1px solid rgba(255, 150, 0, 0.25);
  border-radius: 20px;
  padding: 0.18rem 0.6rem;
  white-space: nowrap;
}

.xp-proj-yr {
  font-weight: 400;
  opacity: 0.6;
  text-transform: none;
  letter-spacing: 0;
}

/* ═══════════════════════════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════════════════════════ */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 1.8rem;
}

.proj-card {
  position: relative;
  overflow: hidden;
  background: rgba(4, 7, 22, 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  cursor: pointer;
  transition: border-color 0.35s, transform 0.35s, box-shadow 0.35s;
  transition-delay: var(--card-delay, 0s);
}

.proj-card:hover {
  border-color: rgba(0, 120, 212, 0.5);
  transform: translateY(-7px) scale(1.01);
  box-shadow: 0 24px 64px rgba(0, 120, 212, 0.14);
}

.pc-glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(0, 120, 212, 0.06);
  filter: blur(50px);
  pointer-events: none;
  transition: background 0.4s;
}

.proj-card:hover .pc-glow { background: rgba(0, 120, 212, 0.22); }

.pc-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.pc-top,
.proj-card h3,
.proj-card p,
.pc-tags {
  position: relative;
  z-index: 2;
}

.pc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.pc-num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--orange);
}

.pc-link {
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: none;
  cursor: none;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.pc-link:hover { color: var(--azure-l); transform: translate(2px, -2px); }

.proj-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}

.proj-card p {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.4rem;
}

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

.pc-tags span {
  font-size: 0.67rem;
  padding: 0.16rem 0.52rem;
  background: rgba(255, 150, 0, 0.06);
  border: 1px solid rgba(255, 150, 0, 0.18);
  color: #b87000;
  border-radius: 3px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   CERTIFICATIONS
═══════════════════════════════════════════════════════════════ */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem 4rem;
  align-items: start;
}

.cert-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════════ */
.contact-wrap { text-align: left; }

.contact-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-top: -2.2rem;
  margin-bottom: 3.5rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1.2rem;
}

.c-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2.4rem;
  background: rgba(4, 7, 22, 0.65);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: none;
  transition: border-color 0.3s, background 0.3s, transform 0.25s, box-shadow 0.3s;
}

.c-link:hover {
  border-color: rgba(0, 120, 212, 0.5);
  background: rgba(0, 120, 212, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 120, 212, 0.12);
}

.c-ico {
  font-size: 0.9rem;
  color: var(--azure-l);
  font-weight: 700;
  min-width: 1.1rem;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 1.8rem;
  background: rgba(3, 4, 14, 0.94);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 740px) {
  /* Nav */
  #nav { padding: 1rem 1.5rem; }
  .nav-links {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 5rem 2rem 3rem;
    background: rgba(7, 13, 26, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { font-size: 1.1rem; }
  #nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
  }
  #nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
  }
  #nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  #nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  #nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* Sections */
  .section { padding: 5rem 1.4rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Timeline — collapse to single col, hide line/dots */
  .xp { grid-template-columns: 1fr; gap: 0.4rem; }
  .xp-meta { flex-direction: row; align-items: center; }
  .xp-list::before { display: none; }
  .xp::before { display: none; }

  /* Projects */
  .proj-grid { grid-template-columns: 1fr; }

  /* Contact */
  .contact-links { flex-direction: column; align-items: stretch; }
  .c-link { justify-content: flex-start; }

  /* Cursor */
  body { cursor: auto; }
  #cur-dot, #cur-ring { display: none; }
}
