/* ===================== CSS VARIABLES ===================== */
:root {
  --yellow: #ffbd39;
  --yellow-dim: rgba(255,189,57,0.12);
  --yellow-border: rgba(255,189,57,0.3);
  --bg-deep: #0c0c18;
  --bg-card: #12121f;
  --bg-card2: #17172a;
  --border: #1f1f38;
  --border-light: #2a2a45;
  --text-primary: #f0f0f0;
  --text-muted: #8888aa;
  --text-dim: #555570;
  --font-main: 'Poppins', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-main);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  width: 100%;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--yellow); border-radius: 3px; }

/* ===================== NOISE OVERLAY ===================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  will-change: transform;
  transform: translateZ(0);
}

/* ===================== UTILITY ===================== */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; width: 100%; }
.section { padding: 100px 0; position: relative; z-index: 1; }
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 12px;
  display: block;
}
.section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}
.section-title span { color: var(--yellow); }
.section-sub { color: var(--text-muted); font-size: 15px; max-width: 520px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 6px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  will-change: transform;
}
.btn-yellow { background: var(--yellow); color: #0c0c18; }
.btn-yellow:hover { background: #ffd06b; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,189,57,0.3); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1.5px solid var(--border-light); }
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); transform: translateY(-2px); }

/* ===================== NAV ===================== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; padding: 0 24px;
  transition: background 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
  background: rgba(12,12,24,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.nav-logo span { color: var(--yellow); }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-size: 13.5px; font-weight: 500; color: var(--text-muted);
  transition: color 0.2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 2px; background: var(--yellow); transition: width 0.25s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-hire {
  background: var(--yellow); color: #0c0c18 !important;
  padding: 8px 18px; border-radius: 5px; font-weight: 700 !important;
}
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text-primary); border-radius: 2px; transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; inset: 0; background: rgba(12,12,24,0.98);
  z-index: 999; flex-direction: column; align-items: center; justify-content: center; gap: 36px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 22px; font-weight: 700; color: var(--text-muted); }

/* ===================== HERO ===================== */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding-top: 68px;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,189,57,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,189,57,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow {
  position: absolute; width: 600px; height: 600px; max-width: 100vw;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,189,57,0.08) 0%, transparent 70%);
  top: -100px; right: -100px; pointer-events: none;
  will-change: transform; transform: translateZ(0);
}
.hero-content {
  position: relative; z-index: 2; width: 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--yellow-dim); border: 1px solid var(--yellow-border);
  border-radius: 100px; padding: 6px 16px; font-size: 12px; font-weight: 600;
  color: var(--yellow); margin-bottom: 28px; font-family: var(--font-mono);
}
.hero-eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--yellow); animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }
.hero-name { font-size: clamp(3rem, 8vw, 6rem); font-weight: 900; line-height: 1.1; margin-bottom: 8px; }
.hero-name .yellow { color: var(--yellow); }
.hero-role { font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 300; color: var(--text-muted); margin-bottom: 28px; }

/* FIX 1 — Stack label + typed text vertically so the growing typed
   text never shunts "// currently building →" onto a new line. */
.hero-typing-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 40px;
  width: 100%;
}
.hero-typing-label { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
#typing-text {
  font-family: var(--font-mono); font-size: 15px; color: var(--yellow);
  font-weight: 700; border-right: 2px solid var(--yellow);
  animation: blink 1s step-end infinite; padding-right: 4px;
}
@keyframes blink { 0%,100%{border-color:var(--yellow)} 50%{border-color:transparent} }

.hero-btns {
  display: flex; justify-content: center;
  gap: 14px; flex-wrap: wrap; margin-bottom: 56px; width: 100%;
}

/* FIX 2 — Always 3 equal columns so stats never wrap into a broken
   2-on-top + 1-orphaned layout on Samsung F15 and similar phones. */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
/* Dividers don't work inside a grid, hide them */
.hero-stat-divider { display: none; }
.hero-stat-num { font-size: 2.2rem; font-weight: 800; color: var(--yellow); line-height: 1; }
.hero-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===================== ABOUT ===================== */
#about { background: var(--bg-card); }
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.about-info-card { background: var(--bg-deep); border: 1px solid var(--border-light); border-radius: 16px; padding: 32px; }
.about-info-row { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.about-info-row:last-child { border-bottom: none; }
.about-info-key { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-dim); min-width: 88px; flex-shrink: 0; font-family: var(--font-mono); }
.about-info-val { font-size: 13.5px; color: var(--text-primary); word-break: break-word; }
.skills-wrap { margin-top: 32px; }
.skill-row { margin-bottom: 20px; }
.skill-meta { display: flex; justify-content: space-between; margin-bottom: 7px; }
.skill-name { font-size: 13px; color: var(--text-muted); }
.skill-pct { font-size: 12px; font-family: var(--font-mono); color: var(--yellow); }
.skill-track { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.skill-fill { height: 100%; background: var(--yellow); width: 0%; transition: width 1.4s cubic-bezier(0.4,0,0.2,1); }
.about-bio { font-size: 15px; color: var(--text-muted); line-height: 1.85; margin-bottom: 24px; }
.about-interests { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.tag { font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 100px; background: var(--yellow-dim); color: var(--yellow); border: 1px solid var(--yellow-border); font-family: var(--font-mono); }

/* ===================== RESUME ===================== */
.resume-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.resume-section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--yellow); font-family: var(--font-mono); margin-bottom: 28px; display: flex; align-items: center; gap: 12px; }
.resume-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 20px; position: relative; }
.tl-item:not(:last-child)::before { content: ''; position: absolute; left: 7px; top: 16px; bottom: -16px; width: 1px; background: var(--border-light); }
.tl-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--bg-deep); z-index: 1; margin-top: 3px; flex-shrink: 0; }
.tl-body { padding-bottom: 32px; flex: 1; }
.tl-date { font-size: 11px; font-family: var(--font-mono); color: var(--yellow); margin-bottom: 5px; }
.tl-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.tl-company { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; }
.tl-desc { font-size: 13px; color: var(--text-dim); line-height: 1.7; padding-left: 0; }
.tl-desc li { position: relative; padding-left: 14px; margin-bottom: 5px; }
.tl-desc li::before { content: '›'; position: absolute; left: 0; color: var(--yellow); }

/* ===================== PROJECTS ===================== */
#projects { background: var(--bg-card); }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 52px; }
.proj-card {
  background: var(--bg-deep); border: 1px solid var(--border-light);
  border-radius: 14px; overflow: hidden; display: flex;
  flex-direction: column; transition: all 0.3s ease; will-change: transform;
}
.proj-card:hover { border-color: var(--yellow); transform: translateY(-6px); box-shadow: 0 20px 48px rgba(255,189,57,0.1); }
.proj-thumb { width: 100%; height: 190px; background-size: cover; background-position: center top; position: relative; flex-shrink: 0; }
.proj-thumb-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(12,12,24,0.1) 30%, var(--bg-deep) 100%); }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px 0; }
.proj-tag { font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 4px; background: var(--yellow-dim); color: var(--yellow); border: 1px solid var(--yellow-border); font-family: var(--font-mono); }
.proj-body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.proj-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; line-height: 1.3; }
.proj-desc { font-size: 13px; color: var(--text-muted); line-height: 1.65; flex: 1; margin-bottom: 16px; }
.proj-footer { display: flex; align-items: center; gap: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.proj-link {
  font-size: 12px; font-weight: 600; color: var(--yellow);
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); white-space: nowrap; word-break: normal;
}
.proj-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===================== COUNTER STRIP ===================== */
#counter { background: var(--yellow); padding: 48px 0; }
.counter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.counter-item { text-align: center; border-right: 1px solid rgba(12,12,24,0.15); padding: 8px 10px; }
.counter-item:last-child { border-right: none; }
.counter-num { font-size: 3rem; font-weight: 900; color: #0c0c18; font-family: var(--font-mono); line-height: 1; }
.counter-label { font-size: 12px; font-weight: 600; color: rgba(12,12,24,0.6); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ===================== CONTACT ===================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-info-list { display: flex; flex-direction: column; gap: 20px; margin-top: 32px; }
.contact-info-item { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 10px; transition: border-color 0.25s; overflow: hidden; }
.contact-info-item:hover { border-color: var(--yellow); }
.contact-icon { width: 40px; height: 40px; background: var(--yellow-dim); border: 1px solid var(--yellow-border); display: flex; align-items: center; justify-content: center; border-radius: 8px; flex-shrink: 0; }
.contact-icon svg { width: 18px; height: 18px; stroke: var(--yellow); fill: none; }
.contact-info-label { font-size: 11px; text-transform: uppercase; color: var(--text-dim); font-family: var(--font-mono); margin-bottom: 3px; }
.contact-info-val { font-size: 14px; color: var(--text-primary); word-break: break-word; overflow-wrap: break-word; }
.contact-cta { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 16px; padding: 40px; }
.contact-cta-title { font-size: clamp(1.3rem, 3vw, 1.6rem); font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.contact-cta-title span { color: var(--yellow); }
.contact-cta-text { font-size: 14px; color: var(--text-muted); line-height: 1.75; margin-bottom: 24px; }
.contact-cta-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }

/* ===================== SOCIAL BUTTONS ===================== */
.social-row { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.social-btn {
  width: 44px; height: 44px; border-radius: 8px;
  border: 1px solid var(--yellow-border); background: var(--yellow-dim);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s; color: var(--yellow); flex-shrink: 0;
}
.social-btn:hover { border-color: var(--yellow); background: var(--yellow); color: #0c0c18; }
.social-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.social-btn:last-child svg { fill: none; stroke-width: 2; }

/* ===================== FOOTER ===================== */
footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 32px 24px; text-align: center; }
.footer-text { font-size: 13px; color: var(--text-dim); line-height: 1.8; }
.footer-text span { color: var(--yellow); }

/* ===================== FADE ANIMATIONS ===================== */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===================== RESPONSIVE ===================== */

/* TABLET */
@media (max-width: 991px) {
  .about-grid, .resume-cols, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .counter-grid { grid-template-columns: repeat(2, 1fr); }
  .counter-item:nth-child(2) { border-right: none; }
  .counter-item:nth-child(3) { border-right: 1px solid rgba(12,12,24,0.15); }
  .counter-item:nth-child(3), .counter-item:nth-child(4) { margin-top: 24px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* MOBILE — scale down stat numbers slightly to fit 3 in a row */
@media (max-width: 768px) {
  .hero-stat-num { font-size: 1.8rem; }
  .hero-stats { max-width: 100%; }
}

/* SMALL MOBILE */
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .container { padding: 0 16px; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; width: 100%; gap: 12px; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .about-info-card, .contact-cta { padding: 24px 20px; }
  .counter-grid { grid-template-columns: 1fr; gap: 24px; }
  .counter-item { border-right: none !important; margin-top: 0 !important; padding: 0; }
  .contact-info-item { padding: 16px; }
  .hero-stat-num { font-size: 1.6rem; }
  .hero-stat-label { font-size: 11px; }
}

/* EXTRA SMALL — very tiny screens only */
@media (max-width: 380px) {
  .hero-name { font-size: 2.5rem; }
  .contact-cta-title { font-size: 1.5rem; }
  .social-row { justify-content: space-between; gap: 8px; }
}

/* ===================== CUSTOM AOS REPLACEMENT ===================== */
[data-aos] { opacity: 0; transition: opacity 0.7s ease, transform 0.7s ease; }
[data-aos="fade-up"]    { transform: translateY(30px); }
[data-aos="fade-down"]  { transform: translateY(-30px); }
[data-aos="fade-right"] { transform: translateX(-30px); }
[data-aos="fade-left"]  { transform: translateX(30px); }
[data-aos].aos-animate  { opacity: 1; transform: translate(0); }