/* ============================================================
   DARK PROFESSIONAL THEME — Ali Zinal Portfolio
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --bg:        #04091a;
  --bg-card:   #0c1528;
  --bg-card2:  #0f1c36;
  --border:    rgba(255, 255, 255, 0.06);
  --border-a:  rgba(79, 142, 247, 0.22);

  --text:      #c8d6ef;
  --text-dim:  #5a6e8c;
  --text-bright: #f1f5f9;

  --blue:    #4f8ef7;
  --purple:  #7c5af6;
  --green:   #10d9a0;
  --orange:  #f97316;
  --pink:    #ec4899;

  --grad: linear-gradient(135deg, #4f8ef7, #7c5af6);
  --grad-glow: rgba(79, 142, 247, 0.12);

  /* Bootstrap compat aliases */
  --background-color: var(--bg);
  --default-color:    var(--text);
  --heading-color:    var(--text-bright);
  --accent-color:     var(--blue);
  --surface-color:    var(--bg-card);
  --contrast-color:   #fff;
  --nav-color:        var(--text-dim);
  --nav-hover-color:  var(--blue);
  --nav-mobile-background-color: var(--bg-card);
  --nav-dropdown-background-color: var(--bg-card2);
  --nav-dropdown-color: var(--text);
  --nav-dropdown-hover-color: var(--blue);

  scroll-behavior: smooth;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; transition: color .25s; }
a:hover { color: var(--purple); }

h1,h2,h3,h4,h5,h6 {
  color: var(--text-bright);
  font-family: 'Outfit', 'Inter', sans-serif;
  line-height: 1.2;
}

img { max-width: 100%; }

/* ===== SELECTION ===== */
::selection { background: var(--blue); color: #fff; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-card2); border-radius: 4px; }

/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--bg);
  transition: opacity .5s ease-out;
}
#preloader::before {
  content: '';
  position: fixed;
  top: calc(50% - 24px);
  left: calc(50% - 24px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--blue);
  border-bottom-color: var(--purple);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SCROLL-TOP ===== */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: -20px;
  visibility: hidden;
  opacity: 0;
  z-index: 99999;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad);
  transition: all .4s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-top.active { visibility: visible; opacity: 1; bottom: 20px; }
.scroll-top i { font-size: 20px; color: #fff; line-height: 0; }
.scroll-top:hover { filter: brightness(1.2); }

/* ===== SECTIONS ===== */
section, .section {
  padding: 90px 0;
  overflow: clip;
}

.section-title {
  text-align: center;
  padding-bottom: 60px;
}
.section-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(79,142,247,.1);
  border: 1px solid rgba(79,142,247,.2);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 14px;
}
.section-title h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-bright);
}
.section-title h2 span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-title p {
  color: var(--text-dim);
  font-size: .95rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ===== PHP FORM MESSAGES ===== */
.php-email-form .error-message {
  display: none; background: #c0392b; color: #fff;
  padding: 12px 20px; border-radius: 8px; margin-bottom: 16px;
}
.php-email-form .sent-message {
  display: none; background: #059652; color: #fff;
  padding: 12px 20px; border-radius: 8px; margin-bottom: 16px; text-align: center;
}
.php-email-form .loading {
  display: none; background: var(--bg-card2);
  padding: 12px 20px; border-radius: 8px; margin-bottom: 16px; text-align: center;
}
.php-email-form .loading::before {
  content: '';
  display: inline-block;
  width: 18px; height: 18px;
  margin: 0 8px -4px 0;
  border-radius: 50%;
  border: 2px solid var(--blue);
  border-top-color: transparent;
  animation: spin .8s linear infinite;
}

/* ===== HEADER / SIDEBAR NAV ===== */
.header {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 72px;
  padding: 20px 0;
  background: rgba(4, 9, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  z-index: 997;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: width .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.header:hover { width: 200px; }

.header-logo {
  width: 40px; height: 40px;
  background: var(--grad);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 32px;
  flex-shrink: 0;
  letter-spacing: -.02em;
}

@media (max-width: 1199px) {
  .header {
    width: 260px;
    left: -100%;
    border-right: none;
    box-shadow: 4px 0 30px rgba(0,0,0,.5);
  }
  .header.header-show { left: 0; }
  .header:hover { width: 260px; }
}

/* Header toggle button (mobile) */
.header-toggle {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 9999;
  width: 40px; height: 40px;
  background: var(--grad);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  transition: filter .25s;
}
.header-toggle:hover { filter: brightness(1.15); }
@media (min-width: 1200px) { .header-toggle { display: none !important; } }

/* Language switch inside header */
.lang-switch {
  margin-top: auto;
  padding: 20px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.lang-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: .8rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color .2s, background .2s;
  width: 40px;
  overflow: hidden;
  transition: width .3s, color .2s, background .2s;
}
.header:hover .lang-switch a { width: 160px; justify-content: flex-start; padding: 6px 16px; }
.lang-switch a:hover { background: rgba(79,142,247,.1); color: var(--blue); }

/* ===== NAVMENU ===== */
.navmenu { width: 100%; flex: 1; }
.navmenu ul { list-style: none; padding: 0; margin: 0; }

.navmenu a,
.navmenu a:focus {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin: 2px 8px;
  border-radius: 12px;
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 500;
  transition: background .2s, color .2s;
  white-space: nowrap;
  overflow: hidden;
}
.navmenu a i { font-size: 1.15rem; flex-shrink: 0; }
.navmenu a span { opacity: 0; transition: opacity .2s; }
.header:hover .navmenu a span { opacity: 1; }
@media (max-width: 1199px) {
  .navmenu a span { opacity: 1; }
}

.navmenu a:hover,
.navmenu .active,
.navmenu .active:focus {
  background: rgba(79,142,247,.12);
  color: var(--blue);
}

/* Main content push */
@media (min-width: 1200px) {
  body main, body > section:not(.hero), body > footer { margin-left: 72px; }
  .hero { margin-left: 0 !important; width: 100vw !important; }
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: var(--bg);
  overflow: hidden;
  padding: 100px 0;
}

/* Animated mesh background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 50%, rgba(79,142,247,.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 90% 30%, rgba(124,90,246,.1) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 90%, rgba(16,217,160,.06) 0%, transparent 60%);
  animation: hero-bg 12s ease-in-out infinite alternate;
}
@keyframes hero-bg {
  0%   { opacity: .7; }
  100% { opacity: 1; }
}

/* Grid pattern overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}

.hero .container { position: relative; z-index: 1; }

/* Hero text */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,217,160,.1);
  border: 1px solid rgba(16,217,160,.25);
  color: var(--green);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 22px;
}
.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.7); }
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -.03em;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #f1f5f9 0%, #93c5fd 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
}

.hero-typed-wrap {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-dim);
  margin-bottom: 20px;
  font-weight: 400;
}
.hero-typed-wrap .typed {
  color: var(--blue);
  font-weight: 600;
  border-bottom: 2px solid var(--blue);
}

.hero-lead {
  color: var(--text-dim);
  font-size: .95rem;
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: 12px 28px;
  border-radius: 50px;
  transition: filter .25s, transform .2s;
  box-shadow: 0 4px 20px rgba(79,142,247,.3);
}
.btn-hero-primary:hover { filter: brightness(1.15); transform: translateY(-2px); color: #fff; }

.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: .9rem;
  padding: 12px 28px;
  border-radius: 50px;
  border: 1px solid var(--border-a);
  transition: background .2s, color .2s, transform .2s;
}
.btn-hero-outline:hover {
  background: rgba(79,142,247,.1);
  color: var(--blue);
  transform: translateY(-2px);
}

.hero-socials {
  display: flex;
  gap: 12px;
}
.hero-socials a {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1.1rem;
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.hero-socials a:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(79,142,247,.08);
  transform: translateY(-3px);
}

/* Hero avatar */
.hero-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-top: 40px;
}

.avatar-ring-wrapper {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(160deg, rgba(79,142,247,.55), rgba(124,90,246,.35) 45%, rgba(255,255,255,.06) 100%);
  box-shadow: 0 20px 50px -15px rgba(79,142,247,.35), inset 0 0 0 1px var(--border-a);
  position: relative;
  margin: 0 auto;
}

.avatar-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  border: 5px solid var(--bg);
  filter: saturate(1.02) contrast(1.02);
}

.avatar-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,142,247,.14) 0%, transparent 70%);
  pointer-events: none;
}

@media (max-width: 991px) {
  .hero-avatar-wrap { display: block; margin: 50px auto 0; }
  .avatar-ring-wrapper { width: 220px; height: 220px; }
  .hero-lead { max-width: 100%; }
}

/* ===== ABOUT ===== */
.about { background: var(--bg); }

.about-img-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-a);
}
.about-img-wrapper img {
  width: 100%;
  display: block;
  border-radius: 20px;
  filter: saturate(.9);
  transition: filter .4s, transform .4s;
}
.about-img-wrapper:hover img { filter: saturate(1.1); transform: scale(1.02); }

.about-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4,9,26,.8) 0%, transparent 50%);
  border-radius: 20px;
  pointer-events: none;
}

.about-content h3 {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.about-content .role-tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.about-content .lead-text {
  color: var(--text);
  font-size: .95rem;
  line-height: 1.75;
  margin-bottom: 24px;
  font-style: italic;
  border-left: 3px solid var(--blue);
  padding-left: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin-bottom: 24px;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .85rem;
}
.info-item i { color: var(--blue); margin-top: 2px; font-size: .9rem; flex-shrink: 0; }
.info-item strong { color: var(--text-bright); margin-right: 4px; }
.info-item span { color: var(--text-dim); }

.about-desc {
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.75;
  margin-bottom: 24px;
}

.btn-about {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--blue);
  font-weight: 600;
  font-size: .88rem;
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid var(--border-a);
  transition: background .2s, transform .2s;
}
.btn-about:hover {
  background: rgba(79,142,247,.1);
  transform: translateY(-2px);
  color: var(--blue);
}

/* ===== SKILLS ===== */
.skills { background: var(--bg-card); }

.skill-group {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  transition: border-color .25s, transform .25s;
  height: 100%;
}
.skill-group:hover {
  border-color: var(--border-a);
  transform: translateY(-4px);
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-bright);
}
.skill-group-header .icon-box {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.icon-blue   { background: rgba(79,142,247,.15); color: var(--blue); }
.icon-purple { background: rgba(124,90,246,.15); color: var(--purple); }
.icon-green  { background: rgba(16,217,160,.15); color: var(--green); }
.icon-orange { background: rgba(249,115,22,.15);  color: var(--orange); }
.icon-pink   { background: rgba(236,72,153,.15); color: var(--pink); }
.icon-teal   { background: rgba(20,184,166,.15); color: #14b8a6; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform .2s;
}
.skill-tag:hover { transform: translateY(-2px); }
.tag-blue   { background: rgba(79,142,247,.1);  border-color: rgba(79,142,247,.2);  color: #93c5fd; }
.tag-purple { background: rgba(124,90,246,.1);  border-color: rgba(124,90,246,.2); color: #c4b5fd; }
.tag-green  { background: rgba(16,217,160,.1);  border-color: rgba(16,217,160,.2);  color: #6ee7b7; }
.tag-orange { background: rgba(249,115,22,.1);   border-color: rgba(249,115,22,.2);  color: #fdba74; }
.tag-pink   { background: rgba(236,72,153,.1);  border-color: rgba(236,72,153,.2);  color: #f9a8d4; }
.tag-teal   { background: rgba(20,184,166,.1);  border-color: rgba(20,184,166,.2);  color: #5eead4; }

/* ===== RESUME / TECH STACK ===== */
.resume { background: var(--bg); }

.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  height: 100%;
  transition: border-color .25s, transform .25s;
}
.tech-card:hover { border-color: var(--border-a); transform: translateY(-4px); }

.tech-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-bright);
}
.tech-card-title i { font-size: 1rem; }

.tech-list {
  list-style: none;
  padding: 0; margin: 0;
}
.tech-list li {
  padding: 5px 0;
  font-size: .85rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.tech-list li:last-child { border-bottom: none; }
.tech-list li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  opacity: .7;
}

/* ===== PORTFOLIO ===== */
.portfolio { background: var(--bg-card); }

.portfolio-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  height: 100%;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
}
.portfolio-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity .3s;
}
.portfolio-card:hover {
  border-color: var(--border-a);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.portfolio-card:hover::before { opacity: 1; }

.portfolio-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}
.portfolio-card-header .card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(79,142,247,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--blue);
  flex-shrink: 0;
  transition: background .3s;
}
.portfolio-card:hover .card-icon { background: rgba(79,142,247,.22); }

.portfolio-card-header h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-bright);
  line-height: 1.3;
}
.portfolio-card p {
  font-size: .84rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
}
.portfolio-card .card-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  color: var(--blue);
  background: rgba(79,142,247,.1);
  border-radius: 4px;
  padding: 2px 8px;
  margin-top: 14px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ===== SERVICES ===== */
.services { background: var(--bg); }

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 26px;
  height: 100%;
  text-align: center;
  transition: border-color .3s, transform .3s;
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity .3s;
}
.service-card:hover {
  border-color: var(--border-a);
  transform: translateY(-6px);
}
.service-card:hover::after { opacity: 1; }

.service-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 20px;
  transition: transform .3s;
}
.service-card:hover .service-icon { transform: scale(1.1) rotate(-5deg); }

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-bright);
}
.service-card p {
  font-size: .85rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
}

.svc-blue   .service-icon { background: rgba(79,142,247,.12);  color: var(--blue); }
.svc-purple .service-icon { background: rgba(124,90,246,.12); color: var(--purple); }
.svc-green  .service-icon { background: rgba(16,217,160,.12);  color: var(--green); }
.svc-orange .service-icon { background: rgba(249,115,22,.12);  color: var(--orange); }
.svc-pink   .service-icon { background: rgba(236,72,153,.12); color: var(--pink); }

/* ===== CONTACT ===== */
.contact { background: var(--bg-card); }

.contact-info-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: border-color .25s;
}
.contact-info-card:hover { border-color: var(--border-a); }
.contact-info-card .info-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(79,142,247,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--blue);
  flex-shrink: 0;
}
.contact-info-card h4 {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin: 0 0 4px;
}
.contact-info-card p {
  margin: 0;
  font-size: .9rem;
  color: var(--text-bright);
  font-weight: 500;
}

.contact-social-links {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.contact-social-links a {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1.1rem;
  transition: all .2s;
}
.contact-social-links a:hover {
  border-color: var(--border-a);
  color: var(--blue);
  background: rgba(79,142,247,.08);
}

.contact-form-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}
.contact-form-card .form-control {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: .88rem;
  transition: border-color .2s, background .2s;
}
.contact-form-card .form-control::placeholder { color: var(--text-dim); }
.contact-form-card .form-control:focus {
  border-color: var(--border-a);
  background: rgba(79,142,247,.06);
  color: var(--text-bright);
  box-shadow: 0 0 0 3px rgba(79,142,247,.12);
}
.contact-form-card textarea.form-control { resize: none; }
.contact-form-card button[type=submit] {
  background: var(--grad);
  color: #fff;
  border: none;
  padding: 12px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: filter .25s, transform .2s;
  box-shadow: 0 4px 20px rgba(79,142,247,.25);
}
.contact-form-card button[type=submit]:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}
.footer .sitename {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.footer p { color: var(--text-dim); font-size: .85rem; margin-bottom: 20px; }
.footer .social-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.footer .social-links a {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1rem;
  transition: all .2s;
}
.footer .social-links a:hover {
  border-color: var(--border-a);
  color: var(--blue);
  background: rgba(79,142,247,.08);
}
.footer .copyright {
  color: var(--text-dim);
  font-size: .8rem;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section, .section { padding: 70px 0; }
  .section-title h2 { font-size: 1.8rem; }
  .info-grid { grid-template-columns: 1fr; }
}

@media screen and (max-width: 768px) {
  [data-aos-delay] { transition-delay: 0 !important; }
}

/* Keep legacy .light-background class neutral */
.light-background { background: var(--bg); }

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--green));
  z-index: 99998;
  transition: width .05s linear;
  box-shadow: 0 0 8px rgba(79,142,247,.6);
}

/* ===== HERO CANVAS ===== */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ===== HERO STATS ===== */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 32px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 24px;
  width: fit-content;
  backdrop-filter: blur(8px);
}
.hero-stat {
  text-align: center;
  padding: 0 24px;
}
.hero-stat:first-child { padding-left: 0; }
.hero-stat:last-child  { padding-right: 0; }
.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-lbl {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 5px;
  white-space: nowrap;
}
.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .hero-stats { flex-wrap: wrap; gap: 12px; }
  .hero-stat-divider { display: none; }
  .hero-stat { padding: 8px 12px; }
}

/* ===== EXPERIENCE / TIMELINE ===== */
.experience { background: var(--bg); }

.timeline {
  position: relative;
  padding-left: 48px;
  max-width: 860px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue) 0%, var(--purple) 60%, transparent 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 20px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.timeline-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse-dot 2.5s ease-in-out infinite;
}
.timeline-item.tl-latest .timeline-dot {
  border-color: var(--green);
  box-shadow: 0 0 12px rgba(16,217,160,.4);
}
.timeline-item.tl-latest .timeline-dot::after {
  background: var(--green);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 28px;
  transition: border-color .3s, transform .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
}
.timeline-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  opacity: 0;
  transition: opacity .3s;
}
.timeline-card:hover {
  border-color: var(--border-a);
  transform: translateX(6px);
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.timeline-card:hover::before { opacity: 1; }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.timeline-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0;
  font-family: 'Outfit', sans-serif;
}
.timeline-date {
  font-size: .73rem;
  font-weight: 600;
  color: var(--blue);
  background: rgba(79,142,247,.1);
  border: 1px solid rgba(79,142,247,.2);
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tl-latest .timeline-date {
  color: var(--green);
  background: rgba(16,217,160,.1);
  border-color: rgba(16,217,160,.2);
}

.timeline-company {
  font-size: .84rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.company-badge {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
}
.company-badge.badge-new {
  background: rgba(16,217,160,.15);
  border: 1px solid rgba(16,217,160,.3);
  color: var(--green);
}
.company-badge.badge-main {
  background: rgba(79,142,247,.12);
  border: 1px solid rgba(79,142,247,.25);
  color: var(--blue);
}

.timeline-desc {
  font-size: .855rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 14px;
}
.timeline-bullets {
  list-style: none;
  padding: 0; margin: 0 0 14px;
}
.timeline-bullets li {
  font-size: .82rem;
  color: var(--text-dim);
  padding: 3px 0 3px 20px;
  position: relative;
  line-height: 1.6;
}
.timeline-bullets li::before {
  content: '›';
  position: absolute;
  left: 5px;
  color: var(--blue);
  font-size: 1rem;
  line-height: 1.3;
}
.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}
.timeline-tech span {
  font-size: .72rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(79,142,247,.07);
  border: 1px solid rgba(79,142,247,.14);
  color: #93c5fd;
}

@media (max-width: 768px) {
  .timeline { padding-left: 36px; }
  .timeline::before { left: 11px; }
  .timeline-dot { left: -32px; width: 20px; height: 20px; }
  .timeline-card { padding: 20px; }
}

/* ===== EDUCATION STRIP ===== */
.edu-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}
.edu-card {
  flex: 1 1 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color .25s, transform .25s;
}
.edu-card:hover {
  border-color: var(--border-a);
  transform: translateY(-3px);
}
.edu-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(124,90,246,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--purple);
  flex-shrink: 0;
}
.edu-card h5 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 3px;
}
.edu-card .edu-inst {
  font-size: .78rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.edu-card .edu-period {
  font-size: .72rem;
  color: var(--blue);
  background: rgba(79,142,247,.08);
  border-radius: 20px;
  padding: 1px 8px;
  border: 1px solid rgba(79,142,247,.15);
  display: inline-block;
}
.edu-card .edu-note {
  font-size: .75rem;
  color: var(--green);
  font-weight: 600;
  margin-top: 6px;
  display: block;
}

/* ===== PORTFOLIO — highlight new cards ===== */
.badge-new-label {
  position: absolute;
  top: 16px; right: 16px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(16,217,160,.15);
  border: 1px solid rgba(16,217,160,.3);
  color: var(--green);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ===== SHIMMER TEXT ANIMATION ===== */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.shimmer-text {
  background: linear-gradient(90deg, #93c5fd 0%, #c4b5fd 30%, #f1f5f9 50%, #93c5fd 70%, #c4b5fd 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ===== CARD GLOW PULSE ===== */
@keyframes glow-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79,142,247,0); }
  50%       { box-shadow: 0 0 20px 2px rgba(79,142,247,.15); }
}
.portfolio-card:hover { animation: glow-border 2.5s ease-in-out infinite; }
