/* ============================================================
   Nanduvamsikrishna Yanamandala — Portfolio
   Neo-Brutalist structure · ORIGINAL palette (cyan/coral/violet/emerald)
   Space Grotesk (display/body) · Space Mono (labels/data)
   Core rules: 0 radius · 3–4px black borders · hard 8px offset shadows
               hover = lift + grow shadow · click = press + shrink shadow
   ============================================================ */

:root {
  --bg:       #F6F8FA;   /* cool page */
  --white:    #FFFFFF;   /* card surface */
  --surface:  #EEF1F5;   /* cool off-white sub-sections */
  --ink:      #0B0B10;   /* borders + shadows + text */
  --ink-soft: #2b2b33;

  --primary:  #3FD0E0;   /* electric cyan — hero, highlights, active */
  --accent:   #FF6B4A;   /* coral — card header band, mid bar */
  --violet:   #6C4CE0;   /* badges, section labels, low bar */
  --plum:     #2E1C63;   /* in-house footer band */
  --emerald:  #0E9D6A;   /* high metric fill, open-source footer */
  --mint:     #25E0A4;   /* bright tile */
  --cobalt:   #3D6BFF;   /* tile / accent */
  --magenta:  #FF4D9D;   /* accent */
  --gray:     #5f6470;
  --gray-l:   #E2E6EC;

  --disp: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;

  --bd:   3px solid var(--ink);
  --bd4:  4px solid var(--ink);
  --sh-sm: 4px 4px 0 var(--ink);
  --sh:    8px 8px 0 var(--ink);
  --sh-h:  10px 10px 0 var(--ink);
  --sh-xl: 12px 12px 0 var(--ink);
  --maxw: 1200px;
  --pad: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--disp);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-style: italic; }
strong { font-weight: 700; }
mark { background: var(--primary); color: var(--ink); padding: 0 .1em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
::selection { background: var(--primary); color: var(--ink); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px var(--pad);
  background: var(--white);
  border-bottom: var(--bd4);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  background: var(--primary); color: var(--ink); border: var(--bd);
  width: 40px; height: 40px; display: grid; place-items: center;
  box-shadow: var(--sh-sm);
}
.brand-mark svg { width: 23px; height: 23px; display: block; }
.brand-name { font-family: var(--disp); font-weight: 700; font-size: 1rem; letter-spacing: -0.5px; display: flex; flex-direction: column; line-height: 1.05; }
.brand-sub { font-family: var(--mono); font-size: .58rem; font-weight: 400; color: var(--gray); letter-spacing: 0; }

.nav-links { display: flex; gap: 8px; }
.nav-links a { font-family: var(--mono); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 8px 14px; border: 2px solid transparent; transition: all .14s var(--ease); }
.nav-links a:hover { border: var(--bd); background: var(--primary); box-shadow: var(--sh-sm); transform: translate(-2px,-2px); }

.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-resume { font-family: var(--mono); font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .5px; border: var(--bd); padding: 10px 14px; background: var(--primary); box-shadow: var(--sh-sm); display: inline-flex; gap: 8px; align-items: center; transition: all .14s var(--ease); }
.nav-resume:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.nav-resume:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: var(--primary); border: var(--bd); padding: 9px; box-shadow: var(--sh-sm); }
.hamburger span { width: 20px; height: 2.6px; background: var(--ink); transition: .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(3.8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { transform: translateY(-3.8px) rotate(-45deg); }

/* ---------- buttons (push/pull) ---------- */
.btn { font-family: var(--mono); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .5px; display: inline-flex; align-items: center; gap: 8px; padding: 15px 24px; border: var(--bd); box-shadow: var(--sh-sm); transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .18s; }
.btn span { transition: transform .16s var(--ease); }
.btn:hover { transform: translate(-2px,-2px); box-shadow: var(--sh); }
.btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover span { transform: translateX(4px); }
.btn-white { background: var(--white); }
.btn-yellow { background: var(--primary); }

/* ---------- section scaffolding ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(60px,8vw,104px) var(--pad); }
.sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: 44px; flex-wrap: wrap; }
.sec-ix { font-family: var(--mono); font-weight: 700; font-size: .9rem; background: var(--ink); color: var(--white); padding: 7px 12px; }
.sec-title { font-family: var(--disp); font-weight: 700; font-size: clamp(2rem,5.4vw,2.6rem); letter-spacing: -1px; line-height: 1; text-transform: uppercase; }
.sec-note { font-family: var(--mono); font-size: .72rem; color: var(--gray); margin-left: auto; }

/* ---------- hero (full-bleed cyan) ---------- */
.hero { background: var(--primary); border-bottom: var(--bd4); padding: clamp(40px,7vw,84px) var(--pad) clamp(40px,6vw,72px); }
.hero-inner { max-width: var(--maxw); margin: 0 auto; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.tag { font-family: var(--mono); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; padding: 8px 14px; border: var(--bd); box-shadow: var(--sh-sm); display: inline-flex; align-items: center; gap: 8px; }
.tag-white { background: var(--white); }
.tag-dark { background: var(--ink); color: var(--white); }
.tag-dark .dot { width: 8px; height: 8px; background: var(--mint); animation: livePulse 1.5s infinite; }
@keyframes livePulse { 0%,100%{transform:scale(1);box-shadow:0 0 0 0 rgba(37,224,164,.7)} 50%{transform:scale(1.35);box-shadow:0 0 0 6px rgba(37,224,164,0)} }

.hero-title { font-family: var(--disp); font-weight: 700; font-size: clamp(2.6rem, 9.5vw, 7rem); line-height: .92; letter-spacing: -2px; text-transform: uppercase; }
.hero-title mark { display: inline-block; background: var(--violet); color: var(--white); padding: 0 .12em; border: var(--bd); box-shadow: var(--sh); transform: rotate(-1.2deg); }

.hero-role { font-family: var(--mono); font-size: clamp(1rem,2.6vw,1.4rem); font-weight: 700; margin-top: 28px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; text-transform: uppercase; }
.role-static { color: var(--ink-soft); }
.role-rotate { background: var(--ink); color: var(--primary); padding: 2px 10px; min-height: 1em; }

.hero-desc { max-width: 580px; margin-top: 26px; font-size: 1.12rem; color: var(--ink-soft); text-transform: none; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; }

.hero-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: clamp(40px,6vw,60px); }
.stat-box { border: var(--bd4); box-shadow: var(--sh); padding: 18px; transition: transform .14s var(--ease), box-shadow .14s var(--ease); }
.stat-box:hover { transform: translate(-3px,-3px); box-shadow: var(--sh-xl); }
.stat-box b { font-family: var(--disp); font-weight: 700; font-size: clamp(1.7rem,4vw,2.4rem); line-height: 1; display: block; }
.stat-box span { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .5px; margin-top: 6px; display: block; }
.s-white { background: var(--white); }
.s-green { background: var(--mint); }
.s-blue  { background: var(--cobalt); color: var(--white); }
.s-blue span { color: rgba(255,255,255,.85); }
.s-dark  { background: var(--ink); color: var(--white); }
.s-dark b { color: var(--primary); }
.s-dark span { color: rgba(255,255,255,.7); }

/* ---------- ticker (near-black + cyan) ---------- */
.ticker { background: #141418; border-top: var(--bd4); border-bottom: var(--bd4); height: 46px; overflow: hidden; display: flex; align-items: center; }
.ticker-track { display: inline-flex; align-items: center; gap: 18px; white-space: nowrap; animation: marquee 30s linear infinite; font-family: var(--mono); font-weight: 700; font-size: .9rem; color: var(--primary); }
.ticker-track i { font-style: normal; color: #4a4a55; font-size: .7rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px,5vw,60px); align-items: start; }
.about-lead { font-family: var(--disp); font-weight: 700; font-size: clamp(1.5rem,3.4vw,2.2rem); line-height: 1.18; letter-spacing: -0.5px; }
.about-side { display: flex; flex-direction: column; gap: 16px; color: var(--ink-soft); font-size: 1.04rem; padding-top: 6px; }

/* ---------- work / loot cards (5 zones) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 30px; }
.card { background: var(--white); border: var(--bd4); box-shadow: var(--sh); overflow: hidden; display: flex; flex-direction: column; transition: transform .14s var(--ease), box-shadow .14s var(--ease); }
.card:hover { transform: translate(-3px,-3px); box-shadow: var(--sh-xl); }

/* zone 1 — header band */
.card-bar { background: var(--accent); border-bottom: var(--bd); padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; }
.card-cat { font-family: var(--mono); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .5px; }
.card-num { font-family: var(--mono); font-weight: 700; font-size: .74rem; background: var(--ink); color: var(--white); padding: 4px 9px; display: inline-flex; gap: 5px; align-items: center; }

/* zone 2 — title section */
.card-title { background: var(--surface); border-bottom: var(--bd); padding: 18px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-name { font-family: var(--disp); font-weight: 700; font-size: 1.5rem; letter-spacing: -1px; line-height: 1.02; }
.card-loc { font-family: var(--mono); font-size: .72rem; color: var(--gray); margin-top: 6px; }
.card-loc b { color: var(--violet); }
.card-badge { flex-shrink: 0; background: var(--violet); color: #fff; border: var(--bd); box-shadow: var(--sh-sm); font-family: var(--mono); font-weight: 700; font-size: .72rem; padding: 9px 11px; transform: rotate(3deg); white-space: nowrap; animation: badgePulse 2.4s ease-in-out infinite; }
@keyframes badgePulse { 0%,100%{transform:rotate(3deg) scale(1)} 50%{transform:rotate(3deg) scale(1.04)} }

/* zone 3 — content */
.card-body { padding: 16px; }
.card-label { font-family: var(--mono); font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .5px; color: var(--violet); margin-bottom: 8px; }
.card-label.mt { margin-top: 16px; }
.card-desc { font-size: .95rem; color: var(--ink-soft); line-height: 1.5; }
.card-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.card-tech span { font-family: var(--mono); font-size: .68rem; border: 2px solid var(--ink); padding: 3px 8px; background: var(--surface); }
.card-dash { border: none; border-top: 2px dashed rgba(11,11,16,0.28); margin: 16px 0; }

/* zone 4 — metrics */
.metrics { display: flex; flex-direction: column; gap: 10px; }
.metric { display: grid; grid-template-columns: 84px 1fr 30px; gap: 10px; align-items: center; }
.metric-l { font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .5px; color: var(--gray); }
.seg { display: flex; gap: 5px; }
.seg i { flex: 1; height: 18px; border: 2px solid var(--ink); background: #EAEDF2; transition: background .4s var(--ease); }
.seg i.on.hi  { background: var(--emerald); }
.seg i.on.mid { background: var(--accent); }
.seg i.on.lo  { background: var(--violet); }
.metric-v { font-family: var(--mono); font-weight: 700; font-size: .72rem; text-align: right; }

/* zone 5 — footer band */
.card-foot { margin-top: auto; border-top: var(--bd); padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .5px; }
.card-foot.live { background: var(--emerald); color: #fff; }
.card-foot.priv { background: var(--plum); color: #fff; }
.card-foot a, .card-foot span { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.card-foot .arr { transition: transform .16s var(--ease); }
.card:hover .card-foot.live .arr { transform: translateX(4px); }

/* ---------- stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.stack-card { background: var(--white); border: var(--bd4); box-shadow: var(--sh); overflow: hidden; transition: transform .14s var(--ease), box-shadow .14s var(--ease); }
.stack-card:hover { transform: translate(-3px,-3px); box-shadow: var(--sh-xl); }
.stack-bar { font-family: var(--mono); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; padding: 11px 14px; border-bottom: var(--bd); }
.stack-bar.c0 { background: var(--primary); }
.stack-bar.c1 { background: var(--mint); }
.stack-bar.c2 { background: var(--cobalt); color: #fff; }
.stack-bar.c3 { background: var(--magenta); }
.stack-bar.c4 { background: var(--accent); }
.stack-chips { padding: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.stack-chips span { font-family: var(--mono); font-size: .74rem; border: 2px solid var(--ink); padding: 5px 9px; background: var(--surface); transition: transform .12s var(--ease), background .18s; }
.stack-chips span:hover { transform: translate(-2px,-2px); background: var(--primary); box-shadow: var(--sh-sm); }

/* ---------- experience ---------- */
.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.exp-card { background: var(--white); border: var(--bd4); box-shadow: var(--sh); overflow: hidden; }
.exp-bar { background: var(--ink); color: var(--white); font-family: var(--mono); font-weight: 700; font-size: .82rem; letter-spacing: .5px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; }
.exp-bar-2 { background: var(--violet); }
.exp-when { font-size: .66rem; opacity: .85; }
.exp-pad { padding: 20px 20px 22px; }
.exp-pad h3 { font-family: var(--disp); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.5px; }
.exp-pad h3 em { color: var(--gray); font-weight: 400; font-size: .82rem; }
.exp-pad ul { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-top: 14px; }
.exp-pad li { position: relative; padding-left: 22px; color: var(--ink-soft); font-size: .94rem; }
.exp-pad li::before { content: '→'; position: absolute; left: 0; color: var(--violet); font-weight: 700; }

/* ---------- education ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.edu-card { background: var(--white); border: var(--bd4); box-shadow: var(--sh); padding: 22px; display: flex; flex-direction: column; gap: 8px; transition: transform .14s var(--ease), box-shadow .14s var(--ease); }
.edu-card:hover { transform: translate(-3px,-3px); box-shadow: var(--sh-xl); }
.edu-score { font-family: var(--disp); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--emerald); display: flex; align-items: baseline; gap: 5px; }
.edu-score i { font-family: var(--mono); font-style: normal; font-size: .6rem; color: var(--gray); }
.edu-score.cert { color: var(--violet); }
.edu-card h3 { font-family: var(--disp); font-weight: 700; font-size: 1.16rem; letter-spacing: -0.5px; }
.edu-card p { font-size: .92rem; color: var(--ink-soft); }
.edu-foot { font-family: var(--mono); font-size: .66rem; color: var(--gray); letter-spacing: .5px; margin-top: auto; padding-top: 10px; border-top: 2px dashed rgba(11,11,16,0.22); }

/* ---------- contact ---------- */
.contact-box { background: var(--primary); border: var(--bd4); box-shadow: var(--sh-xl); padding: clamp(28px,5vw,56px); }
.contact-kick { font-family: var(--mono); font-weight: 700; font-size: .76rem; letter-spacing: 1px; color: var(--plum); }
.contact-title { font-family: var(--disp); font-weight: 700; font-size: clamp(2.2rem,6vw,4rem); line-height: 1; letter-spacing: -1.5px; text-transform: uppercase; margin: 16px 0 14px; }
.contact-title mark { background: var(--ink); color: var(--primary); }
.contact-sub { color: var(--ink-soft); font-size: 1.05rem; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 30px 0 26px; }
.contact-mail { font-family: var(--mono); font-weight: 700; font-size: .95rem; border-bottom: 3px solid var(--ink); padding-bottom: 2px; }
.contact-mail:hover { color: var(--plum); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 3px solid var(--ink); }
.contact-links a { font-family: var(--mono); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; border: var(--bd); padding: 10px 14px; background: var(--white); box-shadow: var(--sh-sm); transition: all .14s var(--ease); }
.contact-links a:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); background: var(--white); }
.contact-links a:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }

/* ---------- footer ---------- */
.footer { max-width: var(--maxw); margin: 0 auto; padding: 26px var(--pad); border-top: var(--bd4); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-family: var(--mono); font-size: .72rem; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; }
.foot-top:hover { color: var(--violet); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .about-grid { grid-template-columns: 1fr; }
  .exp-grid { grid-template-columns: 1fr; }
  .sec-note { width: 100%; margin-left: 0; }
}
@media (max-width: 720px) {
  .nav-links { position: fixed; inset: 70px 0 auto 0; flex-direction: column; gap: 0; background: var(--white); border-bottom: var(--bd4); padding: 12px var(--pad) 18px; transform: translateY(-140%); transition: transform .3s var(--ease); pointer-events: none; }
  .nav-links.open { transform: none; pointer-events: auto; }
  .nav-links a { border: var(--bd); margin-bottom: 8px; box-shadow: var(--sh-sm); }
  .hamburger { display: flex; }
  .nav-resume { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .card-title { flex-direction: column; }
  .card-badge { transform: none; align-self: flex-start; animation: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
