/* ==========================================================================
   Google Material Dark — Premium Portfolio v3
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:        #080808;
  --bg-2:      #0f0f0f;
  --surface:   #161616;
  --surface-2: #1e1e1e;
  --surface-3: #262626;
  --border:    rgba(255,255,255,0.07);
  --border-md: rgba(255,255,255,0.12);
  --border-hi: rgba(138,180,248,0.3);

  --blue:        #8ab4f8;
  --blue-hover:  #aecbfa;
  --blue-dark:   #1a73e8;
  --blue-dim:    rgba(138,180,248,0.08);
  --blue-dim2:   rgba(138,180,248,0.16);

  --green:       #81c995;
  --green-dim:   rgba(129,201,149,0.08);
  --red:         #f28b82;
  --yellow:      #fdd663;
  --yellow-dim:  rgba(253,214,99,0.10);
  --purple:      #c58af9;

  --text-primary:   #e8eaed;
  --text-secondary: #9aa0a6;
  --text-tertiary:  #5f6368;

  --font-display: 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --shadow-1: 0 1px 3px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.8);
  --shadow-2: 0 4px 16px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.6);
  --shadow-3: 0 8px 32px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.5);
  --shadow-blue: 0 0 0 1px rgba(138,180,248,0.2), 0 4px 24px rgba(138,180,248,0.06);

  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: radial-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ==========================================================================
   Splash
   ========================================================================== */
#signatureIntro {
  position: fixed; inset: 0;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
}
#signatureIntro.fade-out { opacity: 0; pointer-events: none; }
.signature-center { text-align: center; }

svg { width: 500px; height: auto; transform: rotate(-25deg); }
svg path { stroke: var(--blue); stroke-width: 3; fill: none; stroke-dasharray: 6000; stroke-dashoffset: 6000; }
svg path.underline { stroke: var(--yellow); stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawUnderline 2s ease-in-out 5.5s forwards; }
svg path:not(.underline) { animation: drawSignature 8s ease-in-out forwards; }
@keyframes drawSignature { to { stroke-dashoffset: 0; } }
@keyframes drawUnderline { to { stroke-dashoffset: 0; } }

#mainContent { opacity: 0; transform: translateY(16px); transition: opacity 0.8s ease, transform 0.8s ease; }
#mainContent.visible { opacity: 1; transform: none; }

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 60px;
  position: sticky; top: 0;
  background: rgba(8,8,8,0.88);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-icon { color: var(--blue); font-family: var(--font-mono); font-size: 15px; font-weight: 500; }
.logo-text { font-size: 17px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.3px; }

.hamburger { display: none; font-size: 1.3rem; cursor: pointer; color: var(--text-secondary); background: none; border: none; padding: 8px; border-radius: 50%; transition: background var(--transition); }
.hamburger:hover { background: var(--surface-2); }

.nav-links { display: flex; list-style: none; gap: 2px; align-items: center; }

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.01em;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text-primary); }

.nav-links a.nav-active { background: var(--blue-dim); color: var(--blue); }

.nav-links a.contact-btn {
  background: #1557b0;
  color: #fff;
  font-weight: 600;
  padding: 7px 18px;
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: 4px;
}
.nav-links a.contact-btn:hover { background: #0d47a1; color: #fff; }

.icon-contact { background: rgba(255,255,255,0.15); border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 9px; }
.nav-links a.contact-btn:hover .icon-contact { animation: vibrate 0.5s ease-in-out; }

@keyframes vibrate {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-15deg); }
  40%  { transform: rotate(15deg); }
  60%  { transform: rotate(-10deg); }
  80%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
#home { background: var(--bg); border-bottom: 1px solid var(--border); padding: 0; }

.hero-wrapper {
  max-width: 1160px; margin: 0 auto;
  padding: 64px 48px 80px;
  display: flex; align-items: center; gap: 72px;
}

.circle-img {
  width: 260px; height: 260px;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  border: 1.5px solid var(--border-md);
  box-shadow: var(--shadow-blue);
  animation: float 5s ease-in-out infinite;
}
.circle-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.intro { flex: 1; }

.intro-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.intro-eyebrow::before { content: ''; display: inline-block; width: 20px; height: 1px; background: var(--blue); }

.intro h1 { font-size: 52px; font-weight: 700; color: var(--text-primary); margin: 0 0 10px; letter-spacing: -1.5px; line-height: 1.08; }

.highlight-name {
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.intro-role { font-size: 19px; font-weight: 400; color: var(--text-secondary); margin: 0 0 18px; }
.intro-role span, .typing { color: var(--blue); font-weight: 500; }

.intro p.desc { color: var(--text-secondary); font-size: 14.5px; line-height: 1.78; margin: 0 0 28px; max-width: 520px; }
.intro p.desc strong { color: var(--text-primary); font-weight: 600; }

.hero-stats { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }

.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: 20px;
  padding: 8px 16px;
  display: flex; align-items: baseline; gap: 5px;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-chip:hover { border-color: var(--blue); transform: translateY(-1px); }

.stat-num { font-size: 19px; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 11.5px; color: var(--text-secondary); font-weight: 400; }

.social-icons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.social-icon { position: relative; }

.social-icons a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; font-size: 14px;
  text-decoration: none; color: #fff;
  transition: transform var(--transition), box-shadow var(--transition);
}
.social-icons a.linkedin { background: #0077b5; }
.social-icons a.github   { background: #1a1a1a; border: 1px solid var(--border-md); }
.social-icons a.mail     { background: #c5221f; }
.social-icons a:hover    { transform: scale(1.1); box-shadow: var(--shadow-2); }

.social-icon .tooltip {
  position: absolute; bottom: -30px; left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--surface-3); color: var(--text-primary);
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 6px;
  font-size: 10.5px; white-space: nowrap; opacity: 0;
  transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.social-icon:hover .tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }

.download-btn {
  display: inline-flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border-md);
  padding: 0 16px 0 12px; height: 36px;
  font-weight: 500; font-size: 13px; border-radius: 20px;
  cursor: pointer; gap: 8px; color: var(--text-primary);
  font-family: var(--font-body);
  transition: background var(--transition), border-color var(--transition);
}
.download-btn:hover { background: var(--surface-2); border-color: var(--border-md); }

.icon-circle { width: 24px; height: 24px; border-radius: 50%; background: var(--yellow); display: flex; align-items: center; justify-content: center; font-size: 10px; color: #000; }
.download-btn:hover .icon-circle { animation: bounce 0.5s ease; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ==========================================================================
   Divider
   ========================================================================== */
.g-divider { width: 100%; height: 1px; background: var(--border); }

/* ==========================================================================
   Section Base
   ========================================================================== */
section { padding: 76px 48px; }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 500; color: var(--blue);
  letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.section-label::before { content: ''; display: inline-block; width: 18px; height: 1px; background: var(--blue); }

.section-heading { font-size: 30px; font-weight: 700; color: var(--text-primary); margin: 0 0 44px; letter-spacing: -0.5px; }

/* ==========================================================================
   About
   ========================================================================== */
#about { background: var(--bg-2); }

.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 60px; align-items: start; }

.about-heading { font-size: 36px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.8px; line-height: 1.22; margin: 0 0 22px; }
.about-heading span { color: var(--blue); }

.about-description { font-size: 14.5px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 16px; }
.about-description strong { color: var(--text-primary); font-weight: 600; }
.about-description em { color: var(--blue); font-style: normal; }

.connect { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-secondary); margin-top: 24px; }
.connect a { color: var(--blue); text-decoration: none; font-weight: 500; }
.connect a:hover { text-decoration: underline; }
.connect i { color: var(--blue); }

.about-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-1); }

.about-card-section { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.about-card-section:last-child { border-bottom: none; }

.about-card-title { font-size: 10.5px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.10em; margin: 0 0 14px; display: flex; align-items: center; gap: 6px; }
.about-card-title i { color: var(--blue); font-size: 10px; width: 12px; text-align: center; }

.journey-item { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.04); align-items: flex-start; }
.journey-item:last-child { border-bottom: none; }

.year-badge { font-family: var(--font-mono); font-size: 10px; background: var(--blue-dim); color: var(--blue); padding: 2px 7px; border-radius: 4px; white-space: nowrap; margin-top: 2px; flex-shrink: 0; font-weight: 500; border: 1px solid rgba(138,180,248,0.12); }
.journey-text { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; }

.edu-item { padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.edu-item:last-child { border-bottom: none; }
.edu-name   { font-size: 13.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 3px; }
.edu-detail { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-tertiary); }

.github-stats-wrap { display: flex; flex-direction: column; gap: 10px; }
.stat-img-wrap { position: relative; width: 100%; }

.img-skeleton {
  width: 100%; height: 120px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-image: linear-gradient(90deg, var(--surface-2) 0px, var(--surface-3) 40px, var(--surface-2) 80px);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

.github-stat-img { opacity: 0; transition: opacity 0.4s ease; width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; }

/* ==========================================================================
   Achievements
   ========================================================================== */
#achievements { background: var(--bg); }

.achieve-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.achieve-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex; gap: 14px; align-items: flex-start;
  box-shadow: var(--shadow-1);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.achieve-card:hover { border-color: var(--border-hi); transform: translateY(-2px); box-shadow: var(--shadow-2); }

.achieve-icon { width: 38px; height: 38px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.achieve-body { flex: 1; }
.achieve-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; line-height: 1.4; }
.achieve-sub { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.achieve-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.atag { font-family: var(--font-mono); font-size: 10px; font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-tertiary); padding: 2px 8px; border-radius: 20px; }
.atag-yellow { background: var(--yellow-dim); color: var(--yellow); border-color: rgba(253,214,99,0.18); }
.atag-green  { background: var(--green-dim);  color: var(--green);  border-color: rgba(129,201,149,0.18); }
.atag-purple { background: rgba(197,138,249,0.08); color: var(--purple); border-color: rgba(197,138,249,0.18); }

/* ==========================================================================
   Skills
   ========================================================================== */
#skills { background: var(--bg-2); }

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-1);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color var(--transition);
}
.skill-category:hover { border-color: var(--border-md); }
.skill-category.visible { opacity: 1; transform: translateY(0); }
.skill-category:nth-child(1) { transition-delay: 0.05s; }
.skill-category:nth-child(2) { transition-delay: 0.10s; }
.skill-category:nth-child(3) { transition-delay: 0.15s; }
.skill-category:nth-child(4) { transition-delay: 0.20s; }

.skill-category h3 { font-size: 10.5px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.10em; margin: 0 0 14px; }

.skill-badges { display: flex; flex-wrap: wrap; gap: 7px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 5px 13px;
  background: var(--surface-2); color: var(--text-secondary);
  font-size: 12.5px; font-weight: 400;
  border-radius: 20px; border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.15s;
  cursor: default;
}
.badge:hover { background: var(--blue-dim); color: var(--blue); border-color: rgba(138,180,248,0.25); transform: translateY(-1px); }

/* ==========================================================================
   Projects
   ========================================================================== */
#projects { background: var(--bg); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-1);
  opacity: 0; transform: translateY(16px);
}
.project-card.zoom-in-on-scroll.active {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.project-card.zoom-in-on-scroll.active:hover { transform: translateY(-3px); border-color: var(--border-hi); box-shadow: var(--shadow-blue); }

.project-header { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }

.legal-header  { background: rgba(138,180,248,0.15); border-bottom: 1px solid rgba(138,180,248,0.22); }
.cv-header     { background: rgba(129,201,149,0.15); border-bottom: 1px solid rgba(129,201,149,0.22); }
.bi-header     { background: rgba(197,138,249,0.15); border-bottom: 1px solid rgba(197,138,249,0.22); }
.dash-header   { background: rgba(253,214,99,0.13);  border-bottom: 1px solid rgba(253,214,99,0.20);  }
.travel-header { background: rgba(129,201,149,0.13); border-bottom: 1px solid rgba(129,201,149,0.20); }
.kaary-header  { background: rgba(242,139,130,0.15); border-bottom: 1px solid rgba(242,139,130,0.22); }

.proj-num    { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: rgba(255,255,255,0.18); line-height: 1; }
.proj-domain { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.10em; color: rgba(255,255,255,0.45); text-transform: uppercase; font-weight: 500; }

.project-body { padding: 18px; display: flex; flex-direction: column; flex-grow: 1; }
.project-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0 0 5px; letter-spacing: -0.2px; }
.project-stack { font-family: var(--font-mono); font-size: 10.5px; color: var(--blue); margin-bottom: 9px; letter-spacing: 0.02em; opacity: 0.85; }
.project-description { font-size: 12.5px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 12px; flex-grow: 1; }
.project-metrics { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; }

.metric { font-size: 10.5px; font-weight: 500; background: var(--green-dim); border: 1px solid rgba(129,201,149,0.16); color: var(--green); padding: 3px 9px; border-radius: 20px; font-family: var(--font-mono); }

.project-links { padding: 0 18px 18px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.project-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--blue); text-decoration: none; font-weight: 500;
  padding: 5px 13px; border: 1px solid var(--border-md); border-radius: 20px;
  background: var(--surface-2);
  transition: background var(--transition), border-color var(--transition);
}
.project-link:hover { background: var(--blue-dim); border-color: rgba(138,180,248,0.25); }

.project-link-live { background: var(--blue-dim); border-color: rgba(138,180,248,0.2); }

.live-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 500; color: var(--green); font-family: var(--font-mono); padding: 3px 9px; background: var(--green-dim); border: 1px solid rgba(129,201,149,0.18); border-radius: 20px; }
.live-dot { font-size: 6px; animation: pulse-dot 1.5s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.research-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 500; color: var(--purple); font-family: var(--font-mono); padding: 3px 9px; background: rgba(197,138,249,0.07); border: 1px solid rgba(197,138,249,0.18); border-radius: 20px; }

/* ==========================================================================
   Certifications
   ========================================================================== */
#certifications { background: var(--bg-2); }

.cert-group-label { font-size: 10.5px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.10em; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.cert-category { margin-bottom: 36px; }
.cert-category:last-child { margin-bottom: 0; }
.certification-grid { display: flex; flex-wrap: wrap; gap: 12px; }

.cert-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px; width: 240px; box-shadow: var(--shadow-1);
  opacity: 0; transform: translateY(14px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease, border-color var(--transition);
}
.cert-card.reveal.active { opacity: 1; transform: translateY(0); }
.cert-card.reveal.active:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-hi); }
.cert-card img  { height: 30px; margin-bottom: 10px; }
.cert-card h3   { font-size: 12.5px; font-weight: 600; color: var(--text-primary); margin: 0 0 7px; line-height: 1.4; }
.cert-card p    { font-size: 11.5px; color: var(--text-secondary); line-height: 1.5; margin: 0; }
.skill-text     { font-weight: 600; color: var(--text-primary); }

.credential-link { display: inline-flex; align-items: center; gap: 3px; margin-top: 10px; text-decoration: none; color: var(--blue); font-weight: 500; font-size: 11.5px; }
.credential-link:hover { text-decoration: underline; }

/* ==========================================================================
   Contact
   ========================================================================== */
#contact { background: var(--bg); }

.contact-container { display: flex; flex-wrap: wrap; gap: 24px; }
.contact-form { flex: 1; min-width: 300px; display: flex; flex-direction: column; gap: 10px; }

.contact-form input, .contact-form textarea {
  padding: 11px 15px; border: 1px solid var(--border-md); background: var(--surface);
  color: var(--text-primary); border-radius: var(--radius-sm);
  font-size: 13.5px; font-family: var(--font-body);
  transition: border-color var(--transition), box-shadow var(--transition); outline: none;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-tertiary); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(138,180,248,0.10); }

.contact-form button {
  background: #1557b0; color: #fff; font-weight: 600; border: none;
  border-radius: 20px; padding: 11px 26px; cursor: pointer;
  font-size: 13.5px; font-family: var(--font-body); align-self: flex-start;
  transition: background var(--transition), box-shadow var(--transition);
}
.contact-form button:hover { background: #0d47a1; box-shadow: var(--shadow-1); }

.contact-info { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 9px; justify-content: center; }

.info-box {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary);
  padding: 13px 16px; display: flex; align-items: center; gap: 11px;
  border-radius: var(--radius-md); font-size: 13.5px;
  transition: border-color var(--transition);
}
.info-box:hover { border-color: var(--border-md); }
.info-box i { color: var(--blue); font-size: 14px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: 32px 48px; background: var(--bg); border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.footer-logo { font-size: 15px; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.footer-logo span { color: var(--blue); font-family: var(--font-mono); font-size: 13px; }

.footer-socials { display: flex; align-items: center; justify-content: center; gap: 8px; }
.footer-socials a {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-md); background: var(--surface);
  color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
  font-size: 13px; text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.footer-socials a:hover { background: var(--blue-dim); color: var(--blue); border-color: var(--border-hi); transform: translateY(-2px); }

.footer-copy { font-size: 11.5px; color: var(--text-tertiary); }

/* ==========================================================================
   Utility
   ========================================================================== */
#themeToggle {
  position: fixed; bottom: 24px; left: 24px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border-md); background: var(--surface);
  color: var(--text-secondary); font-size: 14px; cursor: pointer; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-2);
  transition: background var(--transition), transform var(--transition);
}
#themeToggle:hover { background: var(--surface-2); transform: scale(1.08); }

#backToTop {
  position: fixed; bottom: 24px; right: 24px;
  padding: 9px 18px; border: 1px solid var(--border-md);
  border-radius: 20px; background: var(--surface);
  color: var(--text-primary); font-size: 12px; font-weight: 600;
  font-family: var(--font-body); cursor: pointer;
  box-shadow: var(--shadow-2); opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background var(--transition); z-index: 999;
}
#backToTop.show { opacity: 1; visibility: visible; }
#backToTop:hover { background: var(--surface-2); }

.scroll-progress-wrapper { position: fixed; right: 6px; top: 50%; transform: translateY(-50%); width: 3px; height: 100px; background: var(--surface-2); border-radius: 4px; z-index: 999; display: none; }
.scroll-progress { width: 100%; height: 0%; background: var(--blue); border-radius: 4px; transition: height 0.15s ease; }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; will-change: opacity, transform; }
.reveal.active { opacity: 1; transform: translateY(0); }

.reveal-journey { opacity: 0; transform: translateX(-14px); transition: all 0.6s ease; }
.reveal-journey.active { opacity: 1; transform: translateX(0); }

.zoom-in-on-scroll { opacity: 0; transform: translateY(14px); transition: transform 0.5s ease, opacity 0.5s ease; will-change: transform, opacity; }
.zoom-in-on-scroll.active { opacity: 1; transform: translateY(0); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 10000; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.active { display: flex; }

.modal-box { background: var(--surface); border: 1px solid var(--border-md); border-radius: var(--radius-lg); width: 100%; max-width: 860px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-3); overflow: hidden; }

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13.5px; color: var(--text-primary); flex-shrink: 0; }

.modal-actions { display: flex; align-items: center; gap: 10px; }

.modal-btn { display: inline-flex; align-items: center; gap: 5px; background: #1557b0; color: #fff; border: none; border-radius: 20px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; font-family: var(--font-body); cursor: pointer; transition: background var(--transition); }
.modal-btn:hover { background: #0d47a1; }

.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1; transition: color var(--transition); }
.modal-close:hover { color: var(--text-primary); }

.resume-iframe { width: 100%; flex: 1; border: none; min-height: 500px; }

/* ==========================================================================
   Light Mode
   ========================================================================== */
body.light {
  --bg:        #f8f9fa;
  --bg-2:      #ffffff;
  --surface:   #ffffff;
  --surface-2: #f1f3f4;
  --surface-3: #e8eaed;
  --border:    rgba(0,0,0,0.07);
  --border-md: rgba(0,0,0,0.12);
  --border-hi: rgba(26,115,232,0.3);
  --blue:        #1a73e8;
  --blue-hover:  #1557b0;
  --blue-dim:    rgba(26,115,232,0.07);
  --blue-dim2:   rgba(26,115,232,0.14);
  --green:       #1e8e3e;
  --green-dim:   rgba(30,142,62,0.07);
  --red:         #d93025;
  --yellow:      #f29900;
  --yellow-dim:  rgba(242,153,0,0.09);
  --purple:      #7b2ff7;
  --text-primary:   #202124;
  --text-secondary: #5f6368;
  --text-tertiary:  #80868b;
  --shadow-1: 0 1px 2px rgba(60,64,67,.25), 0 1px 3px rgba(60,64,67,.12);
  --shadow-2: 0 1px 2px rgba(60,64,67,.25), 0 2px 6px rgba(60,64,67,.12);
  --shadow-3: 0 4px 8px rgba(60,64,67,.12), 0 1px 3px rgba(60,64,67,.25);
  --shadow-blue: 0 0 0 1px rgba(26,115,232,0.18), 0 4px 20px rgba(26,115,232,0.07);
  background-image: radial-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

body.light #signatureIntro { background: #fff; }
body.light .navbar { background: rgba(248,249,250,0.92); }
body.light .nav-links { background: rgba(248,249,250,0.98); }
body.light svg path { stroke: #1a73e8; }

body.light .proj-num   { color: rgba(0,0,0,0.18); }
body.light .proj-domain { color: rgba(0,0,0,0.45); }

body.light .legal-header  { background: rgba(26,115,232,0.12);  border-bottom: 1px solid rgba(26,115,232,0.20); }
body.light .cv-header     { background: rgba(30,142,62,0.12);   border-bottom: 1px solid rgba(30,142,62,0.20);  }
body.light .bi-header     { background: rgba(123,47,247,0.12);  border-bottom: 1px solid rgba(123,47,247,0.20); }
body.light .dash-header   { background: rgba(242,153,0,0.12);   border-bottom: 1px solid rgba(242,153,0,0.20);  }
body.light .travel-header { background: rgba(30,142,62,0.11);   border-bottom: 1px solid rgba(30,142,62,0.18);  }
body.light .kaary-header  { background: rgba(217,48,37,0.11);   border-bottom: 1px solid rgba(217,48,37,0.18);  }

body.light .github-stat-img { filter: invert(1) hue-rotate(180deg) saturate(1.2) brightness(0.92); border-color: #dadce0; }
body.light .modal-btn { color: #fff; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 768px) { .scroll-progress-wrapper { display: block; } }

@media (max-width: 1024px) { .achieve-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 900px) {
  .hero-wrapper { flex-direction: column; padding: 44px 24px 64px; gap: 36px; text-align: center; }
  .circle-img { width: 200px; height: 200px; }
  .intro h1 { font-size: 36px; }
  .intro-role { font-size: 17px; }
  .intro p.desc { max-width: 100%; }
  .hero-stats { justify-content: center; }
  .social-icons { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .skills-grid { grid-template-columns: 1fr; }
  .intro-eyebrow { justify-content: center; }
  .connect { flex-wrap: wrap; }
}

@media (max-width: 768px) {
  svg { width: 280px; }
  section { padding: 52px 20px; }
  .hamburger { display: block; }
  .nav-links { flex-direction: column; align-items: flex-start; background: rgba(8,8,8,0.97); backdrop-filter: blur(20px); position: absolute; top: 60px; left: 0; width: 100%; padding: 10px 14px; display: none; z-index: 100; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-2); gap: 2px; }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; }
  .navbar { padding: 0 18px; position: relative; }
  .footer { padding: 24px 20px; }
  .section-heading { font-size: 24px; }
  .about-heading { font-size: 26px; }
  .achieve-grid { grid-template-columns: 1fr; }
  .project-card, .cert-card { width: 100%; max-width: 100%; }
  .certification-grid { justify-content: center; }
  .modal-box { max-height: 95vh; }
  .resume-iframe { min-height: 360px; }
}

@media (max-width: 480px) {
  svg { width: 240px; }
  .intro h1 { font-size: 28px; }
  #themeToggle { bottom: 76px; }
}

/* Tester note on project cards */
.tester-note {
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 0 18px 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.5;
}
.tester-note i { color: var(--yellow); font-size: 10px; flex-shrink: 0; }
.tester-note a { color: var(--blue); text-decoration: none; font-weight: 500; }
.tester-note a:hover { text-decoration: underline; }